diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-10 14:03:04 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-10 14:03:04 +0000 |
commit | 33321b57b889dee2c308474e87b8f6cd384782dd (patch) | |
tree | bda89798c5ed976bd3a7f331139b031624881830 /src/jtutil/norm.cc | |
parent | ca8170fae34fbc42f75075f6060718e0432dfd98 (diff) |
change from jtutil::min/max --> std::, also add missing std:: in some files
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@481 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/jtutil/norm.cc')
-rw-r--r-- | src/jtutil/norm.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jtutil/norm.cc b/src/jtutil/norm.cc index 1878e74..d6f0baf 100644 --- a/src/jtutil/norm.cc +++ b/src/jtutil/norm.cc @@ -5,8 +5,8 @@ // *** class jtutil::norm:: // -#include <float.h> -#include <math.h> +#include <cmath> +#include <algorithm> #include <assert.h> #include "jt/util.hh" @@ -21,7 +21,7 @@ template <typename fp> { ++N_; sum2_ += x*x; -infinity_norm_ = jtutil::max(infinity_norm_, jtutil::abs(x)); +infinity_norm_ = std::max(infinity_norm_, jtutil::abs<fp>(x)); } } // namespace jtutil:: @@ -31,10 +31,10 @@ infinity_norm_ = jtutil::max(infinity_norm_, jtutil::abs(x)); namespace jtutil { template<typename fp> - fp norm<fp>::two_norm() const { return sqrt(sum2_); } + fp norm<fp>::two_norm() const { return std::sqrt(sum2_); } template<typename fp> fp norm<fp>::rms_norm() const - { assert(is_nonempty()); return sqrt(sum2_/fp(N_)); } + { assert(is_nonempty()); return std::sqrt(sum2_/fp(N_)); } template<typename fp> fp norm<fp>::infinity_norm() const { return infinity_norm_; } } // namespace jtutil:: |