OpendTect-6_4
6.4
|
Base class to calculate mean, min, max, etc.. can be used either as running values (Stats::RunCalc) or in parallel (Stats::ParallelCalc). More...
Public Member Functions | |
virtual | ~BaseCalc () |
void | clear () |
const CalcSetup & | setup () const |
bool | isWeighted () const |
double | getValue (Type) const |
int | getIndex (Type) const |
only for Median, Min and Max More... | |
bool | hasUndefs () const |
int | size (bool used=true) const |
bool | isEmpty () const |
int | count () const |
double | average () const |
T | mostFreq () const |
T | sum () const |
T | min (int *index_of_min=0) const |
T | max (int *index_of_max=0) const |
T | extreme (int *index_of_extr=0) const |
T | median (int *index_of_median=0) const |
T | sqSum () const |
double | rms () const |
double | stdDev () const |
double | normvariance () const |
virtual double | variance () const |
T | clipVal (float ratio, bool upper) const |
require median; 0 <= ratio <= 1 More... | |
template<> | |
double | variance () const |
template<> | |
float_complex | mostFreq () const |
Public Attributes | |
TypeSet< T > | medvals_ |
Protected Member Functions | |
BaseCalc (const CalcSetup &s) | |
bool | isZero (const T &t) const |
template<> | |
bool | isZero (const float &val) const |
template<> | |
bool | isZero (const double &val) const |
Protected Attributes | |
CalcSetup | setup_ |
int | nradded_ |
int | nrused_ |
int | minidx_ |
int | maxidx_ |
T | minval_ |
T | maxval_ |
T | sum_x_ |
T | sum_xx_ |
T | sum_w_ |
T | sum_wx_ |
T | sum_wxx_ |
TypeSet< int > | clss_ |
TypeSet< T > | clsswt_ |
TypeSet< T > | medwts_ |
Base class to calculate mean, min, max, etc.. can be used either as running values (Stats::RunCalc) or in parallel (Stats::ParallelCalc).
The mostFrequent assumes the data contains integer classes. Then the class that is found most often will be the output. Weighting, again, assumes integer values. Beware that if you pass data that is not really class-data, the memory consumption can become large (and the result will be rather uninteresting).
The variance won't take the decreasing degrees of freedom into consideration when weights are provided.
The object is ready to use with int, float and double types. If other types are needed, you may need to specialize an isZero function for each new type.
|
inlinevirtual |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
require median; 0 <= ratio <= 1
|
inline |
|
inline |
|
inline |
only for Median, Min and Max
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in Stats::ParallelCalc< T >, Stats::ParallelCalc< T >, and Stats::ParallelCalc< float >.
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
TypeSet<T> Stats::BaseCalc< T >::medvals_ |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019