1 #ifndef _theplu_yat_normalizer_centralizer_
2 #define _theplu_yat_normalizer_centralizer_
28 #include "yat/statistics/Average.h"
29 #include "yat/utility/DataIterator.h"
30 #include "yat/utility/iterator_traits.h"
31 #include "yat/utility/WeightIterator.h"
33 #include <boost/concept_check.hpp>
40 namespace normalizer {
63 template<
class UnaryFunction = statistics::Average>
97 template<
class InputIterator,
class ForwardIterator>
99 ForwardIterator result)
const
101 BOOST_CONCEPT_ASSERT((boost::InputIterator<InputIterator>));
102 BOOST_CONCEPT_ASSERT((boost::Mutable_ForwardIterator<ForwardIterator>));
104 detail::copy_weight_if_weighted(first, last, result);
105 std::transform(utility::data_iterator(first),
106 utility::data_iterator(last),
107 utility::data_iterator(result),
108 std::bind2nd(std::minus<double>(),func_(first, last)));