bsta_gaussian_indep< T, n > Class Template Reference

#include <bsta_gaussian_indep.h>

Inheritance diagram for bsta_gaussian_indep< T, n >:

Inheritance graph
[legend]

List of all members.


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.


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 compatiblity 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 &rng) const
 sample from 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 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.

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 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 T bsta_distribution< T, n >::math_type [inherited]

The type used for calculations.

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.

Definition at line 27 of file bsta_distribution.h.

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

for compatiblity with vpdl/vpdt.

Definition at line 29 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 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>
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>
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>
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 54 of file bsta_gaussian_indep.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 63 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 [inline]

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 int n>
T bsta_gaussian_indep< T, n >::sqr_mahalanobis_dist ( const vnl_vector_fixed< T, n > &  pt  )  const [inline]

The squared Mahalanobis distance to this point.

Definition at line 60 of file bsta_gaussian_indep.txx.

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 76 of file bsta_gaussian_indep.h.

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

sample from the distribution.

Definition at line 79 of file bsta_gaussian_indep.h.

template<class T, unsigned int n>
void bsta_gaussian_indep< T, n >::compute_det (  )  [inline, 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 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>
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.


Member Data Documentation

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 92 of file bsta_gaussian_indep.h.

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

The cached covariance determinant.

Definition at line 95 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:

Generated on Sun Nov 22 06:36:34 2009 for contrib/brl/bbas/bsta by  doxygen 1.5.5