STAT_UNIVARIATE Class Reference

Container for accumulating and computing univariate statistics. More...

#include <mi32/statunivar.h>

List of all members.

Public Member Functions

ERRVALUE Accumulate (UINT32 NumValues, const void *pValues, const UINT8 *pValidity=0)
ERRVALUE AccumulateWeighted (const void *pValue, double weight)
double ComputeBinCenter (INT32 BinIndex) const
INT32 ComputeBinIndex (double value) const
ERRVALUE Finalize ()
UINT64 GetBinCount (INT32 BinIndex) const
double GetBinCountWeighted (INT32 BinIndex) const
const DOUBLE_RANGEGetBinRange () const
double GetBinWidth (INT32 BinIndex) const
UINT64 GetCountAboveMaxBin () const
double GetCountAboveMaxBinWeighted () const
UINT64 GetCountBelowMinBin () const
double GetCountBelowMinBinWeighted () const
UINT64 GetCountInvalid () const
UINT64 GetCountValid () const
double GetCountValidWeighted () const
double GetMean () const
INT32 GetMedianBinIndex () const
INT32 GetModeBinIndex () const
UINT32 GetNumBins () const
double GetStdDev () const
double GetSum2 () const
const DOUBLE_RANGEGetValueRange () const
bool HasEqualBinWidths () const
ERRVALUE Initialize (NUMTYPE NumType, UINT32 NumBins, double MinBin, double MaxBin, double BinWidth=0)
ERRVALUE Set (UINT64 CountValid, UINT64 CountBelowMinBin, UINT64 CountAboveMaxBin, UINT64 CountInvalid, double Mean, double Sum2, const DOUBLE_RANGE &ValueRange, const DOUBLE_RANGE &BinRange, double BinWidth, const void *BinCounts, UINT32 NumBins, int BinBytes)
 STAT_UNIVARIATE ()
 ~STAT_UNIVARIATE ()


Detailed Description

Container for accumulating and computing univariate statistics.

Statistics include minimum, maximum, mean, standard deviation and optional histogram.

Definition at line 53 of file statunivar.h.


Constructor & Destructor Documentation

STAT_UNIVARIATE::STAT_UNIVARIATE  ) 
 

Default constructor.

STAT_UNIVARIATE::~STAT_UNIVARIATE  ) 
 

Destructor.


Member Function Documentation

ERRVALUE STAT_UNIVARIATE::Accumulate UINT32  NumValues,
const void *  pValues,
const UINT8 pValidity = 0
 

Accumulate samples for computing statistics.

Parameters:
pValues  Number of sample values
pValidity  Pointer to sample values, must match numeric type specified in Initialize Pointer to validity, if NULL all samples considered valid

ERRVALUE STAT_UNIVARIATE::AccumulateWeighted const void *  pValue,
double  weight
 

Accumulate single sample with weight.

Parameters:
weight  Pointer to sample value, must match numeric type specified in Initialize Weight, 1.0 same as whole sample

double STAT_UNIVARIATE::ComputeBinCenter INT32  BinIndex  )  const
 

Compute center value for specified bin.

Parameters:
BinIndex  Bin index

INT32 STAT_UNIVARIATE::ComputeBinIndex double  value  )  const
 

Compute bin index from specified value.

ERRVALUE STAT_UNIVARIATE::Finalize  ) 
 

Finalize computation of statistics.

UINT64 STAT_UNIVARIATE::GetBinCount INT32  BinIndex  )  const
 

Get count of samples in specified bin.

If any weighted will be rounded up, use GetBinCountWeighted for weighted total.

Parameters:
BinIndex  Bin index

double STAT_UNIVARIATE::GetBinCountWeighted INT32  BinIndex  )  const
 

Get count of samples in specified bin with partial counts for weighted.

Parameters:
BinIndex  Bin index

const DOUBLE_RANGE& STAT_UNIVARIATE::GetBinRange  )  const [inline]
 

Get range for histogram bins.

Definition at line 101 of file statunivar.h.

double STAT_UNIVARIATE::GetBinWidth INT32  BinIndex  )  const
 

Get width of specified bin.

Parameters:
BinIndex  Bin index

UINT64 STAT_UNIVARIATE::GetCountAboveMaxBin  )  const
 

Get count of valid samples above maximum bin.

If any weighted will be rounded up, use GetCountAboveMaxBinWeighted for weighted total.

double STAT_UNIVARIATE::GetCountAboveMaxBinWeighted  )  const
 

Get count of valid samples above maximum bin with partial counts for weighted.

UINT64 STAT_UNIVARIATE::GetCountBelowMinBin  )  const
 

Get count of valid samples below minimum bin.

If any weighted will be rounded up, use GetCountBelowMinBinWeighted for weighted total.

double STAT_UNIVARIATE::GetCountBelowMinBinWeighted  )  const
 

Get count of valid samples below minimum bin with partial counts for weighted.

UINT64 STAT_UNIVARIATE::GetCountInvalid  )  const [inline]
 

Get count of invalid samples.

Definition at line 128 of file statunivar.h.

UINT64 STAT_UNIVARIATE::GetCountValid  )  const
 

Get count of valid samples.

If any weighted will be rounded up, use GetCountValidWeighted for weighted total.

double STAT_UNIVARIATE::GetCountValidWeighted  )  const
 

Get count of valid samples with partial counts for weighted.

double STAT_UNIVARIATE::GetMean  )  const [inline]
 

Get mean sample value.

Definition at line 141 of file statunivar.h.

INT32 STAT_UNIVARIATE::GetMedianBinIndex  )  const [inline]
 

Get index for median bin.

Definition at line 145 of file statunivar.h.

INT32 STAT_UNIVARIATE::GetModeBinIndex  )  const [inline]
 

Get index for mode bin.

Definition at line 149 of file statunivar.h.

UINT32 STAT_UNIVARIATE::GetNumBins  )  const [inline]
 

Get number of bins.

Definition at line 153 of file statunivar.h.

double STAT_UNIVARIATE::GetStdDev  )  const [inline]
 

Get standard deviation.

Definition at line 157 of file statunivar.h.

double STAT_UNIVARIATE::GetSum2  )  const [inline]
 

Get sum of squares.

Definition at line 161 of file statunivar.h.

const DOUBLE_RANGE& STAT_UNIVARIATE::GetValueRange  )  const [inline]
 

Get range of accumulated values.

Definition at line 165 of file statunivar.h.

bool STAT_UNIVARIATE::HasEqualBinWidths  )  const [inline]
 

Determine if has equal bin widths.

Definition at line 169 of file statunivar.h.

ERRVALUE STAT_UNIVARIATE::Initialize NUMTYPE  NumType,
UINT32  NumBins,
double  MinBin,
double  MaxBin,
double  BinWidth = 0
 

Initialize for accumulation and statistics computation, including histogram with equal bin widths.

Note that for integer types, the bin width will also be an integer, thus the last bin may have a smaller width.

Parameters:
NumType  Sample numeric type
NumBins  Number of bins to allocate, if 0 will determine from bin range and width
MinBin  Minimum bin value
MaxBin  Maximum bin value
BinWidth  Bin width, if 0 will determine from number of bins and range

ERRVALUE STAT_UNIVARIATE::Set UINT64  CountValid,
UINT64  CountBelowMinBin,
UINT64  CountAboveMaxBin,
UINT64  CountInvalid,
double  Mean,
double  Sum2,
const DOUBLE_RANGE ValueRange,
const DOUBLE_RANGE BinRange,
double  BinWidth,
const void *  BinCounts,
UINT32  NumBins,
int  BinBytes
 

Set all statistics.

Parameters:
CountValid  Count of valid samples
CountBelowMinBin  Count of samples below minimum bin
CountAboveMaxBin  Count of samples above maximum bin
CountInvalid  Count of invalid samples
Mean  Mean
Sum2  Sum of squares of sample values
ValueRange  Range of sample values
BinRange  Range of bin values
BinWidth  Bin width
BinCounts  Bin count array
NumBins  Number of bins
BinBytes  Bin size in bytes (1, 2, 4 or 8)


The documentation for this class was generated from the following file:
Generated on Wed May 31 15:29:12 2006 for TNTsdk by  doxygen 1.3.8-20040913