#include "CommonTools/Statistics/interface/StatisticsException.h"
#include <vector>
#include <cmath>
#include <algorithm>
Go to the source code of this file.
|
template<class T > |
T | hsm_1d (std::vector< T > values) |
|
template<class T > |
std::pair< typename
std::vector< T >::iterator,
typename std::vector< T >
::iterator > | hsm_1d_returning_iterators (std::vector< T > &values) |
|
template<class T >
T hsm_1d |
( |
std::vector< T > |
values | ) |
|
stepsize Sample Mode one dimension. T must be sortable, 'addable', and dividable by 2.
Definition at line 53 of file hsm_1d.h.
References hsm_1d_returning_iterators(), and runTheMatrix::ret.
Referenced by hsm_3d().
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.;
tuple 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)
template<class T >
std::pair<typename std::vector<T>::iterator, typename std::vector<T>::iterator> hsm_1d_returning_iterators |
( |
std::vector< T > & |
values | ) |
|
Definition at line 11 of file hsm_1d.h.
References SplitLinear::begin, dataset::end, mps_fire::i, runTheMatrix::ret, findQualityFiles::size, and createBeamHaloJobs::stepsize.
Referenced by hsm_1d().
15 typename std::vector<T>::iterator
begin =
values.begin();
16 typename std::vector<T>::iterator
end =
values.end() - 1;
19 const int size = (int)(end - begin);
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);
tuple ret
prodAgent to be discontinued
tuple size
Write out results.