[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
![]() |
AccumulatorChain< T, Selected, dynamic > Class Template Reference | ![]() |
Create an accumulator chain containing the selected statistics and their dependencies. More...
#include <vigra/accumulator.hxx>
Public Member Functions | |
void | merge (AccumulatorChainImpl const &o) |
void | operator+= (AccumulatorChainImpl const &o) |
unsigned int | passesRequired () const |
void | reset (unsigned int reset_to_pass=0) |
template<class U , int N> | |
void | reshape (TinyVector< U, N > const &s) |
void | setHistogramOptions (HistogramOptions const &options) |
void | updatePassN (T const &t, unsigned int N) |
void | updatePassN (T const &t, double weight, unsigned int N) |
Static Public Member Functions | |
static ArrayVector < std::string > const & | tagNames () |
Create an accumulator chain containing the selected statistics and their dependencies.
AccumulatorChain is used to compute global statistics which have to be selected at compile time.
The template parameters are as follows:
Usage:
typedef double DataType; AccumulatorChain<DataType, Select<Variance, Mean, Minimum, ...> > accumulator;
Usage, using CoupledHandle:
const int dim = 3; //dimension of MultiArray typedef double DataType; typedef double WeightType; typedef vigra::CoupledIteratorType<dim, DataType, WeightType>::HandleType Handle; AccumulatorChain<Handle, Select<DataArg<1>, WeightArg<2>, Mean,...> > a;
See Feature Accumulators for more information and examples of use.
void reshape | ( | TinyVector< U, N > const & | s | ) |
Before having seen data (current_pass_==0), the shape of the data can be changed... (?)
static ArrayVector<std::string> const& tagNames | ( | ) | [static] |
Return the names of all tags in the accumulator chain (selected statistics and their dependencies).
void setHistogramOptions | ( | HistogramOptions const & | options | ) |
Set options for all histograms in the accumulator chain. See histogram accumulators for possible options. The function is ignored if there is no histogram in the accumulator chain.
void reset | ( | unsigned int | reset_to_pass = 0 | ) |
Reset current_pass_ of the accumulator chain to 'reset_to_pass'.
void operator+= | ( | AccumulatorChainImpl const & | o | ) |
Equivalent to merge(o) .
void merge | ( | AccumulatorChainImpl const & | o | ) |
Merge the accumulator chain with accumulator chain 'o'. This only works if all selected statistics in the accumulator chain support the '+=' operator. See the documentations of the particular statistics for support information.
void updatePassN | ( | T const & | t, |
unsigned int | N | ||
) |
Upate all accumulators in the accumulator chain that work in pass N with data t. Requirement: 0 < N < 6 and N >= current_pass_ . If N < current_pass_ call reset first.
void updatePassN | ( | T const & | t, |
double | weight, | ||
unsigned int | N | ||
) |
Upate all accumulators in the accumulator chain that work in pass N with data t and weight. Requirement: 0 < N < 6 and N >= current_pass_ . If N < current_pass_ call reset first.
unsigned int passesRequired | ( | ) | const |
Return the number of passes required to compute all statistics in the accumulator chain.
Reimplemented in DynamicAccumulatorChain< T, Selected >.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|