ZeusMath-Library  2.0.4
zeus::TDistribution Class Reference

#include <Distribution.h>

Inheritance diagram for zeus::TDistribution:
zeus::IDistribution

Public Member Functions

 TDistribution (const TArrayList< Float > &rlstData, bool bDataAsProbabilities)
 
 TDistribution (const Float *pafData, Int iArraySize, bool bDataAsProbabilities)
 
 TDistribution (const Float *pafSampleData, const Float *pafProb, Int iArraySize)
 
 TDistribution (const TArrayList< TMappedValue > &rlstData)
 
 TDistribution (const TDistribution &rDist)
 
virtual ~TDistribution ()
 
virtual Float MQUALIFIER getEntropy () const
 
virtual Float MQUALIFIER getExpectedValue () const
 
virtual Float MQUALIFIER getMean () const
 
virtual Float MQUALIFIER getMedian () const
 
virtual Float MQUALIFIER getVariance () const
 
virtual Float MQUALIFIER getMode () const
 
virtual Float MQUALIFIER getSkewness () const
 
virtual Float MQUALIFIER getCumulativeProb (const Float &rfStart, const Float &rfEnd) const
 
virtual Float MQUALIFIER getStdDeviation () const
 
virtual Float MQUALIFIER getProb (const Float &rfX) const
 
virtual Float MQUALIFIER getSampleProb (Int iSample) const
 
const TMappedValuegetSampleConst (Int iIndex) const
 
TMappedValuegetSample (Int iIndex)
 
Int getSampleCount () const
 
Float getSampleValue (Int iIndex) const
 
Float getProbabilitySum () const
 
Float getMaximumSampleValue () const
 
Float getMinimumSampleValue () const
 

Static Public Member Functions

static Float getMean (const TArrayList< Float > &rlstData)
 
static Float getMean (const Float *pafData, Int iCount)
 
static Float getMedian (const TArrayList< Float > &rlstData)
 
static Float getMedian (const Float *pafData, Int iCount)
 
static Float getMedian (const Float *pafData, Int iCount, Float fTotalArea)
 
static Float getStdDeviation (const TArrayList< Float > &rlstData)
 
static Float getStdDeviation (const Float *pafData, Int iCount)
 

Detailed Description

This class implements the discrete probability distribution. It contains also some generally usable methods (static methods) for other distributions.

Constructor & Destructor Documentation

§ TDistribution() [1/5]

TDistribution::TDistribution ( const TArrayList< Float > &  rlstData,
bool  bDataAsProbabilities 
)

Creates a distribution class by an array of double values as samples

Parameters
rlstData: sample data
bDataAsProbabilities: Flag if the data list contains probabilities (=true) or samples (=false)

§ TDistribution() [2/5]

TDistribution::TDistribution ( const Float *  pafData,
Int  iArraySize,
bool  bDataAsProbabilities 
)

Creates a distribution class by an array of double values as samples

Parameters
pafData: array of sample data
iArraySize: Size of the data array
bDataAsProbabilities: Flag if the data list contains probabilities (=true) or samples (=false)

§ TDistribution() [3/5]

TDistribution::TDistribution ( const Float *  pafSampleData,
const Float *  pafProb,
Int  iArraySize 
)

Creates a distribution class by an array of double values as samples

Parameters
pafSampleData: array of sample data
pafProb: probabilities of the samples
iArraySize: Size of the data array

§ TDistribution() [4/5]

TDistribution::TDistribution ( const TArrayList< TMappedValue > &  rlstData)

Creates a dirstibution class by an array of mapped values, where as the first parameter represents the data and the second value represents its propapility

Parameters
rlstData: sample data

§ TDistribution() [5/5]

TDistribution::TDistribution ( const TDistribution rDist)

Copy constructor of the distribution

§ ~TDistribution()

TDistribution::~TDistribution ( )
virtual

Destroys the distribution

Member Function Documentation

§ getCumulativeProb()

Float MQUALIFIER TDistribution::getCumulativeProb ( const Float &  rfStart,
const Float &  rfEnd 
) const
virtual

§ getEntropy()

Float MQUALIFIER TDistribution::getEntropy ( ) const
virtual

§ getExpectedValue()

Float MQUALIFIER TDistribution::getExpectedValue ( ) const
virtual

§ getMaximumSampleValue()

Float TDistribution::getMaximumSampleValue ( ) const

returns the maximum value of the distribution

m_lstData.isEmpty()

§ getMean() [1/3]

Float MQUALIFIER TDistribution::getMean ( ) const
virtual

§ getMean() [2/3]

Float zeus::TDistribution::getMean ( const TArrayList< Float > &  rlstData)
inlinestatic

§ getMean() [3/3]

Float TDistribution::getMean ( const Float *  pafData,
Int  iCount 
)
static

calculates the mean value, which is also called sample mean. This is the most used method to calculate the avarage of a distribution.

Parameters
pafData: List of data
iCount: Size of the array
Returns
mean value

§ getMedian() [1/4]

Float MQUALIFIER TDistribution::getMedian ( ) const
virtual

§ getMedian() [2/4]

Float zeus::TDistribution::getMedian ( const TArrayList< Float > &  rlstData)
inlinestatic

§ getMedian() [3/4]

Float zeus::TDistribution::getMedian ( const Float *  pafData,
Int  iCount 
)
inlinestatic

§ getMedian() [4/4]

Float TDistribution::getMedian ( const Float *  pafData,
Int  iCount,
Float  fTotalArea 
)
static

Returns the median of a list of data items. The median value seperates the data list into two parts, where as the area of the parts are equal

Parameters
pafData: List of data
iCount: Size of the array
fTotalArea: total area
Returns
median value

§ getMinimumSampleValue()

Float TDistribution::getMinimumSampleValue ( ) const

returns the minimum value of the distribution

m_lstData.isEmpty()

§ getMode()

Float MQUALIFIER TDistribution::getMode ( ) const
virtual

At the moment this method only returns the global maximum as mode

See also
IDistribution::getVariance

Implements zeus::IDistribution.

§ getProb()

Float MQUALIFIER zeus::TDistribution::getProb ( const Float &  rfX) const
inlinevirtual

§ getProbabilitySum()

Float zeus::TDistribution::getProbabilitySum ( ) const
inline

Returns the sum of the probabilities. This is basically the whole area of the distribution

§ getSample()

TMappedValue & zeus::TDistribution::getSample ( Int  iIndex)
inline

returns the indexed sample

Parameters
iIndex: Index of sample
Returns
sample

§ getSampleConst()

const TMappedValue & zeus::TDistribution::getSampleConst ( Int  iIndex) const
inline

returns the indexed sample

Parameters
iIndex: Index of sample
Returns
sample

§ getSampleCount()

Int zeus::TDistribution::getSampleCount ( ) const
inline

Returns the number of samples

§ getSampleProb()

Float MQUALIFIER zeus::TDistribution::getSampleProb ( Int  iSample) const
inlinevirtual

§ getSampleValue()

Float zeus::TDistribution::getSampleValue ( Int  iIndex) const
inline

returns the indexed sample value

Parameters
iIndex: Index of sample
Returns
sample value

§ getSkewness()

Float MQUALIFIER TDistribution::getSkewness ( ) const
virtual

§ getStdDeviation() [1/3]

Float MQUALIFIER zeus::TDistribution::getStdDeviation ( ) const
inlinevirtual

§ getStdDeviation() [2/3]

Float zeus::TDistribution::getStdDeviation ( const TArrayList< Float > &  rlstData)
inlinestatic

§ getStdDeviation() [3/3]

Float TDistribution::getStdDeviation ( const Float *  pafData,
Int  iCount 
)
static

Returns the standard deviation of the data

Parameters
pafData: Data array
iCount: Size of the array
Returns
standard deviation

§ getVariance()

Float MQUALIFIER TDistribution::getVariance ( ) const
virtual

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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Sep 14 2016 06:46:06