template<class UnaryFunction, class Operator>
class theplu::yat::normalizer::RangeNormalizer< UnaryFunction, Operator >
The class normalizes a range [first, last)
in two steps. First, a value is calculaterd using the functor UnaryFunction
. Second, the each element in the result range is calculated by applying the operator on the input range and the value. UnaryFunction
must be a functor that has an operator:
return_type
operator()(InputIterator, InputIterator)
constwhere return_type
must be convertible to value_type
of InputIterator
.
Operator must be a binary function object class with result type and argument types such that result type
is convertible to double
and double
is convertible to the argument type
s.
- Since
- New in yat 0.18
template<class UnaryFunction , class Operator >
template<class InputIterator , class OutputIterator >
Calculates the value x of the range [first, last) using UnaryFunction. This value, x, is then applied from each element in the range [first, last) and assigned to the corresponding element in range [result, result + (last-first) ).
It is possible to normalize a range "in place"; it is permissible for the iterators first and result to be the same.
Type Requirements:
- See also
- std::transform