OpendTect
7.0
|
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 () |
double | average () const |
void | clear () |
T | clipVal (float ratio, bool upper) const |
requires sort; 0 <= ratio <= 1 More... | |
size_type | count () const |
T | extreme (idx_type *index_of_extr=0) const |
idx_type | getIndex (Type) const |
only for Median, Min and Max More... | |
double | getValue (Type) const |
bool | hasUndefs () const |
bool | isEmpty () const |
bool | isWeighted () const |
T | max (idx_type *index_of_max=0) const |
T | median (idx_type *index_of_median=0) const |
const T * | medValsArr () const |
T | min (idx_type *index_of_min=0) const |
T | mostFreq () const |
float_complex | mostFreq () const |
mUseType (CalcSetup, idx_type) | |
mUseType (CalcSetup, size_type) | |
double | normvariance () const |
double | rms () const |
const CalcSetup & | setup () const |
size_type | size (bool used=true) const |
T | sqSum () const |
double | stdDev () const |
T | sum () const |
virtual double | variance () const |
double | variance () const |
Protected Member Functions | |
BaseCalc (const CalcSetup &s) | |
T | computeMedian (idx_type *index_of_median=nullptr) const |
T | computeWeightedMedian (idx_type *index_of_median=nullptr) const |
bool | isZero (const double &val) const |
bool | isZero (const float &val) const |
bool | isZero (const T &) const |
const float_complex * | sort (idx_type *idx_of_med) |
virtual const T * | sort (idx_type *index_of_median=nullptr) |
Protected Attributes | |
LargeValVec< idx_type > | clss_ |
LargeValVec< T > | clsswt_ |
bool | issorted_ = false |
idx_type | maxidx_ |
T | maxval_ |
LargeValVec< idx_type > | medidxs_ |
LargeValVec< T > | medvals_ |
LargeValVec< T > | medwts_ |
idx_type | minidx_ |
T | minval_ |
size_type | nradded_ |
Threads::Atomic< size_type > | nrused_ |
CalcSetup | setup_ |
T | sum_w_ |
T | sum_wx_ |
T | sum_wxx_ |
T | sum_x_ |
T | sum_xx_ |
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 |
requires sort; 0 <= ratio <= 1
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
only for Median, Min and Max
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Stats::BaseCalc< T >::mUseType | ( | CalcSetup | , |
idx_type | |||
) |
Stats::BaseCalc< T >::mUseType | ( | CalcSetup | , |
size_type | |||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotectedvirtual |
Reimplemented in Stats::ParallelCalc< T >, Stats::ParallelCalc< float >, Stats::ParallelCalc< T >, and Stats::ParallelCalc< float >.
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in Stats::ParallelCalc< T >, Stats::ParallelCalc< float >, Stats::ParallelCalc< T >, and Stats::ParallelCalc< float >.
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
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. 1995-2024