Mercurial > jwe > octave
changeset 30103:de8ba056e8e2
maint: use "m_" prefix for more member variables in oct-norm.cc (da3659538d16)
* oct-norm.cc: Use "m_" prefix for more member variables in oct-norm.cc
cset (da3659538d16).
author | Rik <rik@octave.org> |
---|---|
date | Wed, 01 Sep 2021 09:39:06 -0700 |
parents | da3659538d16 |
children | 58fb9432217b |
files | liboctave/numeric/oct-norm.cc |
diffstat | 1 files changed, 15 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/numeric/oct-norm.cc Wed Sep 01 08:58:44 2021 -0700 +++ b/liboctave/numeric/oct-norm.cc Wed Sep 01 09:39:06 2021 -0700 @@ -178,51 +178,51 @@ template <typename R> class norm_accumulator_inf { - R max; + R m_max; public: - norm_accumulator_inf () : max (0) { } + norm_accumulator_inf () : m_max (0) { } template <typename U> void accum (U val) { if (math::isnan (val)) - max = numeric_limits<R>::NaN (); + m_max = numeric_limits<R>::NaN (); else - max = std::max (max, std::abs (val)); + m_max = std::max (m_max, std::abs (val)); } - operator R () { return max; } + operator R () { return m_max; } }; - // norm accumulator for the -inf pseudonorm (min abs value) + // norm accumulator for the -inf pseudonorm (m_min abs value) template <typename R> class norm_accumulator_minf { - R min; + R m_min; public: - norm_accumulator_minf () : min (numeric_limits<R>::Inf ()) { } + norm_accumulator_minf () : m_min (numeric_limits<R>::Inf ()) { } template <typename U> void accum (U val) { if (math::isnan (val)) - min = numeric_limits<R>::NaN (); + m_min = numeric_limits<R>::NaN (); else - min = std::min (min, std::abs (val)); + m_min = std::min (m_min, std::abs (val)); } - operator R () { return min; } + operator R () { return m_min; } }; // norm accumulator for the 0-pseudonorm (hamming distance) template <typename R> class norm_accumulator_0 { - unsigned int num; + unsigned int m_num; public: - norm_accumulator_0 () : num (0) { } + norm_accumulator_0 () : m_num (0) { } template <typename U> void accum (U val) { - if (val != static_cast<U> (0)) ++num; + if (val != static_cast<U> (0)) ++m_num; } - operator R () { return num; } + operator R () { return m_num; } }; // OK, we're armed :) Now let's go for the fun