OpendTect  7.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Stats::WindowedCalc< T > Class Template Reference

RunCalc manager which buffers a part of the data. More...

Public Member Functions

 WindowedCalc (const CalcSetup &rcs, size_type sz)
 
 ~WindowedCalc ()
 
WindowedCalcaddValue (T data, T weight=1)
 
double average () const
 
void clear ()
 
size_type count () const
 
extreme (idx_type *i=0) const
 
idx_type getIndex (Type) const
 Only use for Min, Max or Median. More...
 
double getValue (Type) const
 
max (idx_type *i=0) const
 
median (idx_type *i=0) const
 
min (idx_type *i=0) const
 
mostFreq () const
 
 mUseType (CalcSetup, idx_type)
 
 mUseType (CalcSetup, size_type)
 
double normvariance () const
 
WindowedCalcoperator+= (T t)
 
double rms () const
 
sqSum () const
 
double stdDev () const
 
sum () const
 
double variance () const
 

Protected Member Functions

void fillCalc (RunCalc< T > &) const
 

Protected Attributes

RunCalc< T > calc_
 
bool empty_
 
bool full_
 
bool needcalc_
 
idx_type posidx_
 
const size_type sz_
 
T * vals_
 
T * wts_
 

Detailed Description

template<class T>
class Stats::WindowedCalc< T >

RunCalc manager which buffers a part of the data.

Allows calculating running stats on a window only. Once the window is full, WindowedCalc will replace the first value added (fifo).

<>

Constructor & Destructor Documentation

◆ WindowedCalc()

template<class T >
Stats::WindowedCalc< T >::WindowedCalc ( const CalcSetup rcs,
size_type  sz 
)
inline

◆ ~WindowedCalc()

template<class T >
Stats::WindowedCalc< T >::~WindowedCalc ( )
inline

Member Function Documentation

◆ addValue()

template<class T >
WindowedCalc< T > & Stats::WindowedCalc< T >::addValue ( data,
weight = 1 
)
inline

◆ average()

template<class T >
double Stats::WindowedCalc< T >::average ( ) const
inline

◆ clear()

template<class T >
void Stats::WindowedCalc< T >::clear
inline

◆ count()

template<class T >
size_type Stats::WindowedCalc< T >::count ( ) const
inline

◆ extreme()

template<class T >
T Stats::WindowedCalc< T >::extreme ( idx_type *  i = 0) const
inline

◆ fillCalc()

template<class T >
void Stats::WindowedCalc< T >::fillCalc ( RunCalc< T > &  calc) const
inlineprotected

◆ getIndex()

template<class T >
CalcSetup::idx_type Stats::WindowedCalc< T >::getIndex ( Type  t) const
inline

Only use for Min, Max or Median.

◆ getValue()

template<class T >
double Stats::WindowedCalc< T >::getValue ( Type  t) const
inline

◆ max()

template<class T >
T Stats::WindowedCalc< T >::max ( idx_type *  i = 0) const
inline

◆ median()

template<class T >
T Stats::WindowedCalc< T >::median ( idx_type *  i = 0) const
inline

◆ min()

template<class T >
T Stats::WindowedCalc< T >::min ( idx_type *  i = 0) const
inline

◆ mostFreq()

template<class T >
T Stats::WindowedCalc< T >::mostFreq ( ) const
inline

◆ mUseType() [1/2]

template<class T >
Stats::WindowedCalc< T >::mUseType ( CalcSetup  ,
idx_type   
)

◆ mUseType() [2/2]

template<class T >
Stats::WindowedCalc< T >::mUseType ( CalcSetup  ,
size_type   
)

◆ normvariance()

template<class T >
double Stats::WindowedCalc< T >::normvariance ( ) const
inline

◆ operator+=()

template<class T >
WindowedCalc& Stats::WindowedCalc< T >::operator+= ( t)
inline

◆ rms()

template<class T >
double Stats::WindowedCalc< T >::rms ( ) const
inline

◆ sqSum()

template<class T >
T Stats::WindowedCalc< T >::sqSum ( ) const
inline

◆ stdDev()

template<class T >
double Stats::WindowedCalc< T >::stdDev ( ) const
inline

◆ sum()

template<class T >
T Stats::WindowedCalc< T >::sum ( ) const
inline

◆ variance()

template<class T >
double Stats::WindowedCalc< T >::variance ( ) const
inline

Member Data Documentation

◆ calc_

template<class T >
RunCalc<T> Stats::WindowedCalc< T >::calc_
protected

◆ empty_

template<class T >
bool Stats::WindowedCalc< T >::empty_
protected

◆ full_

template<class T >
bool Stats::WindowedCalc< T >::full_
protected

◆ needcalc_

template<class T >
bool Stats::WindowedCalc< T >::needcalc_
protected

◆ posidx_

template<class T >
idx_type Stats::WindowedCalc< T >::posidx_
protected

◆ sz_

template<class T >
const size_type Stats::WindowedCalc< T >::sz_
protected

◆ vals_

template<class T >
T* Stats::WindowedCalc< T >::vals_
protected

◆ wts_

template<class T >
T* Stats::WindowedCalc< T >::wts_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024