Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
bsta_gaussian_full< T, n > Class Template Reference

A Gaussian distribution with a full covariance matrix. More...

#include <bsta_gaussian_full.h>

Inheritance diagram for bsta_gaussian_full< T, n >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef vnl_matrix_fixed< T, n, n > covar_type
 the covariance type.
enum  { dimension = n }
 The dimension of the distribution. More...
typedef T math_type
 The type used for calculations.
typedef vnl_vector_fixed
< math_type, dimension > 
vector_type
 The type used for a n-dimensional vector of math types.
typedef vector_type field_type
 for compatibility with vpdl/vpdt.

Public Member Functions

 bsta_gaussian_full ()
 Constructor.
 bsta_gaussian_full (const vnl_vector_fixed< T, n > &mean, const vnl_matrix_fixed< T, n, n > &covar)
 Constructor.
 ~bsta_gaussian_full ()
 Destructor.
const covar_typecovar () const
 The covariance matrix of the distribution.
void set_covar (const covar_type &covar)
 Set the covariance matrix of the distribution.
dist_prob_density (const T &sqr_mahal_dist) const
 The probability density at this sample given square mahalanobis distance.
prob_density (const vnl_vector_fixed< T, n > &pt) const
 The probability density at this sample.
probability (const vnl_vector_fixed< T, n > &, const vnl_vector_fixed< T, n > &) const
 The probability integrated over a box.
sqr_mahalanobis_dist (const vnl_vector_fixed< T, n > &pt) const
 The squared Mahalanobis distance to this point.
det_covar () const
 Compute the determinant of the covariance matrix.
const covar_typeinv_covar () const
 The inverse covariance matrix of the distribution.
const vector_mean () const
 The mean of the distribution.
void set_mean (const vector_ &mean)
 Set the mean of the distribution.

Protected Attributes

covar_type covar_
 The covariance matrix.
det_covar_
 The cached covariance determinant.
vector_ mean_
 The mean.

Private Member Functions

void compute_det ()
 compute the determinant of the covariance.

Private Attributes

vnl_matrix_fixed< T, n, n > * inv_covar_
 cache for inverse of the covariance matrix.

Detailed Description

template<class T, unsigned n>
class bsta_gaussian_full< T, n >

A Gaussian distribution with a full covariance matrix.

Definition at line 23 of file bsta_gaussian_full.h.


Member Typedef Documentation

template<class T, unsigned n>
typedef vnl_matrix_fixed<T,n,n> bsta_gaussian_full< T, n >::covar_type

the covariance type.

Definition at line 27 of file bsta_gaussian_full.h.

template<class T, unsigned n>
typedef vector_type bsta_distribution< T, n >::field_type [inherited]

for compatibility with vpdl/vpdt.

Reimplemented in bsta_von_mises< T, n >.

Definition at line 29 of file bsta_distribution.h.

template<class T, unsigned n>
typedef T bsta_distribution< T, n >::math_type [inherited]

The type used for calculations.

Reimplemented in bsta_von_mises< T, n >.

Definition at line 25 of file bsta_distribution.h.

template<class T, unsigned n>
typedef vnl_vector_fixed<math_type,dimension> bsta_distribution< T, n >::vector_type [inherited]

The type used for a n-dimensional vector of math types.

Reimplemented in bsta_von_mises< T, n >.

Definition at line 27 of file bsta_distribution.h.


Member Enumeration Documentation

template<class T, unsigned n>
anonymous enum [inherited]

The dimension of the distribution.

Enumerator:
dimension 

Definition at line 23 of file bsta_distribution.h.


Constructor & Destructor Documentation

template<class T, unsigned n>
bsta_gaussian_full< T, n >::bsta_gaussian_full ( ) [inline]

Constructor.

Definition at line 30 of file bsta_gaussian_full.h.

template<class T, unsigned n>
bsta_gaussian_full< T, n >::bsta_gaussian_full ( const vnl_vector_fixed< T, n > &  mean,
const vnl_matrix_fixed< T, n, n > &  covar 
) [inline]

Constructor.

Definition at line 34 of file bsta_gaussian_full.h.

template<class T, unsigned n>
bsta_gaussian_full< T, n >::~bsta_gaussian_full ( ) [inline]

Destructor.

Definition at line 40 of file bsta_gaussian_full.h.


Member Function Documentation

template<class T , unsigned int n>
void bsta_gaussian_full< T, n >::compute_det ( ) [private]

compute the determinant of the covariance.

The squared Mahalanobis distance to this point.

Definition at line 108 of file bsta_gaussian_full.txx.

template<class T, unsigned n>
const covar_type& bsta_gaussian_full< T, n >::covar ( ) const [inline]

The covariance matrix of the distribution.

Definition at line 43 of file bsta_gaussian_full.h.

template<class T, unsigned n>
T bsta_gaussian_full< T, n >::det_covar ( ) const [inline]

Compute the determinant of the covariance matrix.

Definition at line 75 of file bsta_gaussian_full.h.

template<class T, unsigned n>
T bsta_gaussian_full< T, n >::dist_prob_density ( const T &  sqr_mahal_dist) const [inline]

The probability density at this sample given square mahalanobis distance.

Definition at line 49 of file bsta_gaussian_full.h.

template<class T , unsigned int n>
const vnl_matrix_fixed< T, n, n > & bsta_gaussian_full< T, n >::inv_covar ( ) const

The inverse covariance matrix of the distribution.

Return the inverse of the covariance matrix.

Note:
this matrix is cached and updated only when needed

Definition at line 130 of file bsta_gaussian_full.txx.

template<class T, unsigned n>
const vector_& bsta_gaussian< T, n >::mean ( ) const [inline, inherited]

The mean of the distribution.

Definition at line 46 of file bsta_gaussian.h.

template<class T, unsigned n>
T bsta_gaussian_full< T, n >::prob_density ( const vnl_vector_fixed< T, n > &  pt) const [inline]

The probability density at this sample.

Definition at line 58 of file bsta_gaussian_full.h.

template<class T, unsigned n>
T bsta_gaussian_full< T, n >::probability ( const vnl_vector_fixed< T, n > &  ,
const vnl_vector_fixed< T, n > &   
) const [inline]

The probability integrated over a box.

Definition at line 64 of file bsta_gaussian_full.h.

template<class T , unsigned int n>
void bsta_gaussian_full< T, n >::set_covar ( const covar_type covar)

Set the covariance matrix of the distribution.

Update the covariance (and clear cached values).

Definition at line 117 of file bsta_gaussian_full.txx.

template<class T, unsigned n>
void bsta_gaussian< T, n >::set_mean ( const vector_ mean) [inline, inherited]

Set the mean of the distribution.

Definition at line 49 of file bsta_gaussian.h.

template<class T , unsigned int n>
T bsta_gaussian_full< T, n >::sqr_mahalanobis_dist ( const vnl_vector_fixed< T, n > &  pt) const

The squared Mahalanobis distance to this point.

Definition at line 93 of file bsta_gaussian_full.txx.


Member Data Documentation

template<class T, unsigned n>
covar_type bsta_gaussian_full< T, n >::covar_ [protected]

The covariance matrix.

Definition at line 82 of file bsta_gaussian_full.h.

template<class T, unsigned n>
T bsta_gaussian_full< T, n >::det_covar_ [protected]

The cached covariance determinant.

Definition at line 85 of file bsta_gaussian_full.h.

template<class T, unsigned n>
vnl_matrix_fixed<T,n,n>* bsta_gaussian_full< T, n >::inv_covar_ [mutable, private]

cache for inverse of the covariance matrix.

Definition at line 92 of file bsta_gaussian_full.h.

template<class T, unsigned n>
vector_ bsta_gaussian< T, n >::mean_ [protected, inherited]

The mean.

Definition at line 56 of file bsta_gaussian.h.


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