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

A Gaussian distribution, independent in each dimension. More...

#include <bsta_gaussian_indep.h>

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

List of all members.

Public Types

typedef vnl_vector_fixed< T, n > covar_type
typedef bsta_gaussian< T, n >
::vector_type 
vector_
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_indep ()
 Constructor.
 bsta_gaussian_indep (const vnl_vector_fixed< T, n > &mean, const covar_type &covar)
 Constructor.
const covar_typediag_covar () const
 The diagonal covariance of the distribution.
const covar_typecovar () const
 Generic access to covariance or variance across Gaussian subtypes.
void set_covar (const covar_type &covar)
 generic set covariance across Gaussian subtypes.
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 > &min_pt, const vnl_vector_fixed< T, n > &max_pt) const
 The probability that a sample lies inside a n-d 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.
vector_ sample (vnl_random &ran_gen) const
 sample from the distribution.
covar_type gradient (const vnl_vector_fixed< T, n > &pt) const
 Gradient vector at this point.
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 diag_covar_
 The diagonal covariance matrix stored as a vector.
det_covar_
 The cached covariance determinant.
vector_ mean_
 The mean.

Private Member Functions

void compute_det ()
 compute the determinant of the covariance.

Detailed Description

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

A Gaussian distribution, independent in each dimension.

Thus, the covariance matrix is diagonal

Definition at line 24 of file bsta_gaussian_indep.h.


Member Typedef Documentation

template<class T, unsigned n>
typedef vnl_vector_fixed<T,n> bsta_gaussian_indep< T, n >::covar_type

Definition at line 27 of file bsta_gaussian_indep.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 bsta_gaussian<T,n>::vector_type bsta_gaussian_indep< T, n >::vector_

Reimplemented from bsta_gaussian< T, n >.

Definition at line 28 of file bsta_gaussian_indep.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_indep< T, n >::bsta_gaussian_indep ( ) [inline]

Constructor.

Definition at line 31 of file bsta_gaussian_indep.h.

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

Constructor.

Definition at line 35 of file bsta_gaussian_indep.h.


Member Function Documentation

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

compute the determinant of the covariance.

The determinant of the covariance matrix.

Definition at line 72 of file bsta_gaussian_indep.txx.

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

Generic access to covariance or variance across Gaussian subtypes.

Definition at line 45 of file bsta_gaussian_indep.h.

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

Compute the determinant of the covariance matrix.

Definition at line 75 of file bsta_gaussian_indep.h.

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

The diagonal covariance of the distribution.

Definition at line 41 of file bsta_gaussian_indep.h.

template<class T, unsigned n>
T bsta_gaussian_indep< 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 53 of file bsta_gaussian_indep.h.

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

Gradient vector at this point.

Definition at line 135 of file bsta_gaussian_indep.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_indep< T, n >::prob_density ( const vnl_vector_fixed< T, n > &  pt) const [inline]

The probability density at this sample.

Definition at line 62 of file bsta_gaussian_indep.h.

template<class T , unsigned int n>
T bsta_gaussian_indep< T, n >::probability ( const vnl_vector_fixed< T, n > &  min_pt,
const vnl_vector_fixed< T, n > &  max_pt 
) const

The probability that a sample lies inside a n-d box.

The probability that a sample lies inside a n-d bounding box.

Note:
min_pt and max_pt are the corners of the box

Definition at line 123 of file bsta_gaussian_indep.txx.

template<class T, unsigned n>
vector_ bsta_gaussian_indep< T, n >::sample ( vnl_random &  ran_gen) const [inline]

sample from the distribution.

Definition at line 78 of file bsta_gaussian_indep.h.

template<class T, unsigned n>
void bsta_gaussian_indep< T, n >::set_covar ( const covar_type covar) [inline]

generic set covariance across Gaussian subtypes.

Definition at line 49 of file bsta_gaussian_indep.h.

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_indep< T, n >::sqr_mahalanobis_dist ( const vnl_vector_fixed< T, n > &  pt) const

The squared Mahalanobis distance to this point.

Definition at line 60 of file bsta_gaussian_indep.txx.


Member Data Documentation

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

The cached covariance determinant.

Definition at line 97 of file bsta_gaussian_indep.h.

template<class T, unsigned n>
covar_type bsta_gaussian_indep< T, n >::diag_covar_ [protected]

The diagonal covariance matrix stored as a vector.

Definition at line 94 of file bsta_gaussian_indep.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: