1 #ifndef _theplu_yat_normalizer_utility_
2 #define _theplu_yat_normalizer_utility_
25 #include "yat/utility/concept_check.h"
26 #include "yat/utility/iterator_traits.h"
27 #include "yat/utility/WeightIterator.h"
29 #include <boost/concept_check.hpp>
35 namespace normalizer {
39 template<
typename InputIterator,
typename OutputIterator>
40 void copy_weight_if_weighted(InputIterator first, InputIterator last,
41 OutputIterator result,
42 utility::unweighted_iterator_tag tag)
46 template<
typename InputIterator,
typename OutputIterator>
47 void copy_weight_if_weighted(InputIterator first, InputIterator last,
48 OutputIterator result,
49 utility::weighted_iterator_tag tag)
51 using utility::weight_iterator;
52 std::copy(weight_iterator(first), weight_iterator(last),
53 weight_iterator(result));
61 template<
typename InputIterator,
typename OutputIterator>
62 void copy_weight_if_weighted(InputIterator first, InputIterator last,
63 OutputIterator result)
65 BOOST_CONCEPT_ASSERT((utility::DataIteratorConcept<OutputIterator>));
66 typename utility::weighted_iterator_traits<OutputIterator>::type tag;
67 copy_weight_if_weighted(first, last, result, tag);