1 #ifndef CommonTools_Statistics_hsm_1d_h 2 #define CommonTools_Statistics_hsm_1d_h 15 typename std::vector<T>::iterator begin =
values.begin();
16 typename std::vector<T>::iterator
end =
values.end() - 1;
21 int stepsize =
static_cast<int>(floor(.4999999999 +
size * .5));
26 T div = (
T)fabs((
T)(*end) - (
T)(*begin));
27 typename std::vector<T>::iterator new_begin = begin;
28 typename std::vector<T>::iterator new_end =
end;
30 for (
typename std::vector<T>::iterator
i = (begin + 1);
i != (begin +
size -
stepsize + 1); ++
i) {
34 div = (
T)((
T)(*new_end) - (
T)(*new_begin));
43 std::pair<typename std::vector<T>::iterator,
typename std::vector<T>::iterator>
ret(begin,
end);
62 std::pair<typename std::vector<T>::iterator,
typename std::vector<T>::iterator> itors =
64 T ret = ((
T)(*(itors.first)) + (
T)(*(itors.second))) / (
T)2.;
T hsm_1d(std::vector< T > values)
ret
prodAgent to be discontinued
std::pair< typename std::vector< T >::iterator, typename std::vector< T >::iterator > hsm_1d_returning_iterators(std::vector< T > &values)