41 template<
int N,
typename TReal>
42 struct NthPower : std::unary_function<TReal,TReal>
47 for (
int i=1; i <
N; ++i) {
56 template<
typename InputIterator>
57 typename std::iterator_traits<InputIterator>::value_type
59 const InputIterator begin,
60 const InputIterator end
63 typedef typename std::iterator_traits<InputIterator>::value_type TReal;
64 std::vector<TReal>
x(begin,end);
67 TReal sum = std::accumulate(x.begin(), x.end() , TReal(0.));
68 sum = sum/
static_cast<TReal
>(x.size() - size_t(1));
76 template<
typename InputIterator>
80 std::pair<
typename std::iterator_traits<InputIterator>::value_type,
typename std::iterator_traits<InputIterator>::value_type> & scaled,
85 typedef typename std::iterator_traits<InputIterator>::value_type TReal;
86 std::vector<TReal> tmp;
91 std::transform(begin, end, begin, std::bind2nd( std::minus<TReal>(), scaled.first));
95 scaled.first = std::numeric_limits<TReal>::quiet_NaN();
100 std::transform(begin, end, begin , std::bind2nd(std::divides<TReal>(), scaled.second) );
104 scaled.second = std::numeric_limits<TReal>::quiet_NaN();
std::iterator_traits< InputIterator >::value_type mean(InputIterator begin, InputIterator end)
MEAN Trimmed arithmetic mean.
TReal operator()(const TReal &x)
void scale(InputIterator begin, InputIterator end, std::pair< typename std::iterator_traits< InputIterator >::value_type, typename std::iterator_traits< InputIterator >::value_type > &scaled, bool center=true, bool scale=true)
scale centers and/or scales all values from begin in to end.
EQUISPACEINTERPOL Interpolation on a equidistantly spaced grid.
KernelTraitsBase< Kernel >::space_type::abscissa_type x
std::iterator_traits< InputIterator >::value_type rootMeanSquare(const InputIterator begin, const InputIterator end)
The root-mean-square for a column is obtained by computing the square-root of the sum-of-squares of t...