11 #ifndef __stir_more_algorithms_H__ 12 #define __stir_more_algorithms_H__ 32 template <
class iterT>
44 template <
class IterT,
class elemT>
45 inline elemT
sum(IterT start, IterT end, elemT init);
62 template <
class IterT>
63 inline typename std::iterator_traits<IterT>::value_type
sum(IterT start, IterT end);
71 template <
class IterT>
72 inline typename std::iterator_traits<IterT>::value_type
average(IterT start, IterT end);
Implementation of some functions missing from std::algorithm.
iterT abs_max_element(iterT start, iterT end)
Like std::max_element, but comparing after taking absolute value.
Definition: more_algorithms.inl:28
std::iterator_traits< IterT >::value_type average(IterT start, IterT end)
Compute the average of a sequence using sum(start,end).
Definition: more_algorithms.inl:75
std::iterator_traits< IterT >::value_type sum(IterT start, IterT end)
Compute the sum of a sequence using operator+=().
Definition: more_algorithms.inl:62
basic configuration include file