1 #ifndef _theplu_yat_normalizer_utility_
2 #define _theplu_yat_normalizer_utility_
25 #include "yat/utility/iterator_traits.h"
26 #include "yat/utility/WeightIterator.h"
32 namespace normalizer {
36 template<
typename InputIterator,
typename OutputIterator>
37 void copy_weight_if_weighted(InputIterator first, InputIterator last,
38 OutputIterator result,
39 utility::unweighted_iterator_tag tag)
43 template<
typename InputIterator,
typename OutputIterator>
44 void copy_weight_if_weighted(InputIterator first, InputIterator last,
45 OutputIterator result,
46 utility::weighted_iterator_tag tag)
48 using utility::weight_iterator;
49 std::copy(weight_iterator(first), weight_iterator(last),
50 weight_iterator(result));
58 template<
typename InputIterator,
typename OutputIterator>
59 void copy_weight_if_weighted(InputIterator first, InputIterator last,
60 OutputIterator result)
62 typename utility::weighted_iterator_traits<OutputIterator>::type tag;
63 copy_weight_if_weighted(first, last, result, tag);