
--- milena/ChangeLog | 4 ++++ milena/mln/accu/stat/deviation.hh | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index f97ab68..5ecbfb8 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,9 @@ 2010-11-16 Guillaume Lazzara <z@lrde.epita.fr> + * mln/accu/stat/deviation.hh: Fix type of constructor argument. + +2010-11-16 Guillaume Lazzara <z@lrde.epita.fr> + Remove a useless from_to overload. * mln/convert/from_to.hxx, diff --git a/milena/mln/accu/stat/deviation.hh b/milena/mln/accu/stat/deviation.hh index 1f15100..ca57f23 100644 --- a/milena/mln/accu/stat/deviation.hh +++ b/milena/mln/accu/stat/deviation.hh @@ -64,7 +64,9 @@ namespace mln typedef T argument; typedef M result; - deviation(const T mean); + // Note: We may like to have an initial mean as precise as the + // sum type. So type S is prefered to type T here. + deviation(const S& mean); /// Manipulators. /// \{ @@ -89,7 +91,7 @@ namespace mln // parameter since in the core of the deviation::take method, // this accumulator takes data of type mln_sum(T). accu::math::sum<mln_sum(T),S> sum_; - T mean_; + S mean_; }; @@ -120,7 +122,7 @@ namespace mln template <typename T, typename S, typename M> inline - deviation<T,S,M>::deviation(const T mean) + deviation<T,S,M>::deviation(const S& mean) { init(); mean_ = mean; -- 1.5.6.5