STIRA  0.1
Static Public Member Functions | List of all members
stira::common::Statistics< T > Class Template Reference

class to compute some simple statistics Note void ProcessArray ( const int * , size_t numInts ) ; can be called directly with an stl vector as follows ProcessArray ( &foo[0], foo.size() ); More...

#include <Statistics.h>

Static Public Member Functions

static double GetAverage (T *pData, int nrElements)
 Computes the average of the elements in the given array. More...
 
static double GetAverage (std::vector< T > vData)
 Computes the average of the elements in the given STL vector (Calls pointer-based method) More...
 
static double GetVariance (T *pData, int nrElements)
 Computes the variance of the elements in the given array Computes implicitely the average of the elements to be able to compute the variance. More...
 
static double GetVariance (std::vector< T > vData)
 Computes the variance of the elements in the given vector (Calls pointer-based method) Computes implicitely the average of the elements to be able to compute the variance. More...
 
static double GetVariance (T *pData, int nrElements, double average)
 Computes the variance of the elements in the given array Uses the average passed as argument to compute the variance. More...
 
static double GetVariance (std::vector< T > vData, double average)
 Computes the variance of the elements in the given vector (Calls pointer-based method) Uses the average passed as argument to compute the variance. More...
 
static double GetCorrelation (double *pData1, double *pData2, int nrElements)
 Computes the correlation between the elements in two given vectors. More...
 
static double GetCorrelation (std::vector< double > vData1, std::vector< double > vData2)
 Computes the correlation between the elements in two given vectors. More...
 
static std::pair< double, double > ComputeFirstTwoCentralMoments (std::vector< Point< double > > inPoints)
 

Detailed Description

template<class T>
class stira::common::Statistics< T >

class to compute some simple statistics Note void ProcessArray ( const int * , size_t numInts ) ; can be called directly with an stl vector as follows ProcessArray ( &foo[0], foo.size() );

Member Function Documentation

template<class T >
double stira::common::Statistics< T >::GetAverage ( T *  pData,
int  nrElements 
)
static

Computes the average of the elements in the given array.

Parameters
pDatapointer to array of values
nrElementsnumber of elements in the array
template<class T >
double stira::common::Statistics< T >::GetAverage ( std::vector< T >  vData)
static

Computes the average of the elements in the given STL vector (Calls pointer-based method)

Parameters
vDataSTL vector of values
template<class T >
double stira::common::Statistics< T >::GetCorrelation ( double *  pData1,
double *  pData2,
int  nrElements 
)
static

Computes the correlation between the elements in two given vectors.

Parameters
pData1pointer to first array of values
pData2pointer to second array of values
nrElementsnumber of elements

Referenced by stira::common::QuantileNormalDistribution::AnalyseNormalizedHistogram().

template<class T >
double stira::common::Statistics< T >::GetCorrelation ( std::vector< double >  vData1,
std::vector< double >  vData2 
)
static

Computes the correlation between the elements in two given vectors.

Parameters
vData1vector 1 of values
vData2vector 2 of values
template<class T >
double stira::common::Statistics< T >::GetVariance ( T *  pData,
int  nrElements 
)
static

Computes the variance of the elements in the given array Computes implicitely the average of the elements to be able to compute the variance.

Parameters
pDatapointer to array of values
nrElementsnumber of elements in the array
template<class T >
double stira::common::Statistics< T >::GetVariance ( std::vector< T >  vData)
static

Computes the variance of the elements in the given vector (Calls pointer-based method) Computes implicitely the average of the elements to be able to compute the variance.

Parameters
vDatavector of values
template<class T >
double stira::common::Statistics< T >::GetVariance ( T *  pData,
int  nrElements,
double  average 
)
static

Computes the variance of the elements in the given array Uses the average passed as argument to compute the variance.

Parameters
pDatapointer to array of values
nrElementsnumber of elements in the array
averageUses this value as average to compute the variance
template<class T >
double stira::common::Statistics< T >::GetVariance ( std::vector< T >  vData,
double  average 
)
static

Computes the variance of the elements in the given vector (Calls pointer-based method) Uses the average passed as argument to compute the variance.

Parameters
vDatavector of values
averageUses this value as average to compute the variance

The documentation for this class was generated from the following file: