MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
mds::math::CGaussianFunc< T, N > Class Template Reference

N-dimensional gaussian function having diagonal covariance matrix. More...

#include <mdsGaussianFunc.h>

List of all members.

Public Types

enum  { NUM_OF_DIMENSIONS = N }
 The number of dimensions. More...
typedef T tElement
 Type used for feature representation.
typedef CStaticVector< T, NtVector
 Vector used to represent mean and diagonal covariance matrix of the gaussian function.

Public Member Functions

 CGaussianFunc ()
 Default constructor.
 CGaussianFunc (double dWeight, const tVector &Mean, const tVector &Cov)
 Constructor.
void computeInverse ()
 Normalizes the covariance matrix and computes its determinant and inverse.
tVectorgetCov ()
 Returns diagonal covariance matrix of the gaussian function.
const tVectorgetCov () const
getCov (mds::tSize i) const
 Returns element of the diagonal covariance matrix.
tVectorgetMean ()
 Returns component mean.
const tVectorgetMean () const
getMean (mds::tSize i) const
 Returns component mean.
tSize getNumOfDimensions () const
 Returns the number od dimensions.
double getValue (const tVector &x)
 Returns value of the gaussian function.
double getWeight () const
 Returns weight of the mixture component.
double getWeightedValue (const tVector &x)
 Returns weighted value of the gaussian function.
void setCov (const tVector &Cov)
 Sets diagonal covariance matrix of the gaussian function.
void setCov (mds::tSize i, T Value)
 Directly sets element of the diagonal covariance matrix.
void setMean (const tVector &Mean)
 Sets mean of the gaussian function.
void setMean (mds::tSize i, T Value)
 Sets mean of the gaussian function.
void setWeight (double dWeight)
 Sets weight of the component.
 ~CGaussianFunc ()
 Destructor.

Static Public Member Functions

static void setMinCovariance (T Value)
 Sets minimal allowed covariance value in the matrix.

Protected Attributes

bool m_bModified
 Helper flag;.
tVector m_Cov
 Diagonal covariance matrix and its inverse.
tVector m_CovDet
 Determinant of the covariance matrix.
double m_dWeight
 Weight of the gaussian function.
tVector m_InvCov
tVector m_Mean
 Mean value.

Static Protected Attributes

static T m_MinCovariance = T(GaussianFunc::DEFAULT_MIN_COVARIANCE)
 Minimal allowed covariance value.

Detailed Description

template<typename T, int N>
class mds::math::CGaussianFunc< T, N >

N-dimensional gaussian function having diagonal covariance matrix.


Member Typedef Documentation

template<typename T , int N>
typedef T mds::math::CGaussianFunc< T, N >::tElement

Type used for feature representation.

template<typename T , int N>
typedef CStaticVector<T,N> mds::math::CGaussianFunc< T, N >::tVector

Vector used to represent mean and diagonal covariance matrix of the gaussian function.


Member Enumeration Documentation

template<typename T , int N>
anonymous enum

The number of dimensions.

Enumerator:
NUM_OF_DIMENSIONS 

Constructor & Destructor Documentation

template<typename T , int N>
mds::math::CGaussianFunc< T, N >::CGaussianFunc ( )

Default constructor.

template<typename T , int N>
mds::math::CGaussianFunc< T, N >::CGaussianFunc ( double  dWeight,
const tVector Mean,
const tVector Cov 
)

Constructor.

template<typename T , int N>
mds::math::CGaussianFunc< T, N >::~CGaussianFunc ( )

Destructor.


Member Function Documentation

template<typename T , int N>
void CGaussianFunc::computeInverse ( )

Normalizes the covariance matrix and computes its determinant and inverse.

template<typename T , int N>
tVector& mds::math::CGaussianFunc< T, N >::getCov ( )

Returns diagonal covariance matrix of the gaussian function.

template<typename T , int N>
const tVector& mds::math::CGaussianFunc< T, N >::getCov ( ) const
template<typename T , int N>
T mds::math::CGaussianFunc< T, N >::getCov ( mds::tSize  i) const

Returns element of the diagonal covariance matrix.

template<typename T , int N>
tVector& mds::math::CGaussianFunc< T, N >::getMean ( )

Returns component mean.

template<typename T , int N>
const tVector& mds::math::CGaussianFunc< T, N >::getMean ( ) const
template<typename T , int N>
T mds::math::CGaussianFunc< T, N >::getMean ( mds::tSize  i) const

Returns component mean.

template<typename T , int N>
tSize mds::math::CGaussianFunc< T, N >::getNumOfDimensions ( ) const

Returns the number od dimensions.

template<typename T , int N>
double CGaussianFunc::getValue ( const tVector x)

Returns value of the gaussian function.

template<typename T , int N>
double mds::math::CGaussianFunc< T, N >::getWeight ( ) const

Returns weight of the mixture component.

template<typename T , int N>
double mds::math::CGaussianFunc< T, N >::getWeightedValue ( const tVector x)

Returns weighted value of the gaussian function.

template<typename T , int N>
void mds::math::CGaussianFunc< T, N >::setCov ( const tVector Cov)

Sets diagonal covariance matrix of the gaussian function.

template<typename T , int N>
void mds::math::CGaussianFunc< T, N >::setCov ( mds::tSize  i,
Value 
)

Directly sets element of the diagonal covariance matrix.

template<typename T , int N>
void mds::math::CGaussianFunc< T, N >::setMean ( const tVector Mean)

Sets mean of the gaussian function.

template<typename T , int N>
void mds::math::CGaussianFunc< T, N >::setMean ( mds::tSize  i,
Value 
)

Sets mean of the gaussian function.

template<typename T , int N>
static void mds::math::CGaussianFunc< T, N >::setMinCovariance ( Value) [static]

Sets minimal allowed covariance value in the matrix.

template<typename T , int N>
void mds::math::CGaussianFunc< T, N >::setWeight ( double  dWeight)

Sets weight of the component.


Member Data Documentation

template<typename T , int N>
bool mds::math::CGaussianFunc< T, N >::m_bModified [protected]

Helper flag;.

template<typename T , int N>
tVector mds::math::CGaussianFunc< T, N >::m_Cov [protected]

Diagonal covariance matrix and its inverse.

template<typename T , int N>
tVector mds::math::CGaussianFunc< T, N >::m_CovDet [protected]

Determinant of the covariance matrix.

template<typename T , int N>
double mds::math::CGaussianFunc< T, N >::m_dWeight [protected]

Weight of the gaussian function.

template<typename T , int N>
tVector mds::math::CGaussianFunc< T, N >::m_InvCov [protected]
template<typename T , int N>
tVector mds::math::CGaussianFunc< T, N >::m_Mean [protected]

Mean value.

template<typename T , int N>
T CGaussianFunc::m_MinCovariance = T(GaussianFunc::DEFAULT_MIN_COVARIANCE) [static, protected]

Minimal allowed covariance value.


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