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

A (hyper-)spherical Gaussian distribution. More...

#include <bsta_gaussian_sphere.h>

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

List of all members.

Public Types

typedef bsta_gaussian< T, n >
::vector_type 
vector_
typedef T covar_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_sphere ()
 Constructor.
 bsta_gaussian_sphere (const vector_ &mean, const covar_type &var)
 Constructor.
const covar_typevar () const
 The variance of the distribution.
void set_var (const covar_type &var)
 Set the variance of the distribution.
const covar_typecovar () const
 generic access to covariance or variance across Gaussians.
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 vector_ &pt) const
 The probability density at this sample.
probability (const vector_ &min_pt, const vector_ &max_pt) const
 The probability integrated over a box.
sqr_mahalanobis_dist (const vector_ &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 var_
 The variance.
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_sphere< T, n >

A (hyper-)spherical Gaussian distribution.

Thus, the covariance matrix is the identity times a scalar variance

Definition at line 23 of file bsta_gaussian_sphere.h.


Member Typedef Documentation

template<class T, unsigned n>
typedef T bsta_gaussian_sphere< T, n >::covar_type

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

Reimplemented from bsta_gaussian< T, n >.

Definition at line 26 of file bsta_gaussian_sphere.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_sphere< T, n >::bsta_gaussian_sphere ( ) [inline]

Constructor.

Definition at line 29 of file bsta_gaussian_sphere.h.

template<class T, unsigned n>
bsta_gaussian_sphere< T, n >::bsta_gaussian_sphere ( const vector_ mean,
const covar_type var 
) [inline]

Constructor.

Definition at line 33 of file bsta_gaussian_sphere.h.


Member Function Documentation

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

compute the determinant of the covariance.

The determinant of the covariance matrix.

Definition at line 154 of file bsta_gaussian_sphere.txx.

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

generic access to covariance or variance across Gaussians.

Definition at line 45 of file bsta_gaussian_sphere.h.

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

Compute the determinant of the covariance matrix.

Definition at line 73 of file bsta_gaussian_sphere.h.

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

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_sphere< T, n >::prob_density ( const vector_ pt) const [inline]

The probability density at this sample.

Definition at line 60 of file bsta_gaussian_sphere.h.

template<class T , unsigned int n>
T bsta_gaussian_sphere< T, n >::probability ( const vector_ min_pt,
const vector_ max_pt 
) const

The probability integrated over a 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 141 of file bsta_gaussian_sphere.txx.

template<class T , unsigned int n>
bsta_gaussian_sphere< T, n >::vector_ bsta_gaussian_sphere< T, n >::sample ( vnl_random &  rng) const

sample from the distribution.

sample.

Definition at line 207 of file bsta_gaussian_sphere.txx.

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

generic set covariance across Gaussian subtypes.

Definition at line 48 of file bsta_gaussian_sphere.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 n>
void bsta_gaussian_sphere< T, n >::set_var ( const covar_type var) [inline]

Set the variance of the distribution.

Definition at line 42 of file bsta_gaussian_sphere.h.

template<class T , unsigned int n>
T bsta_gaussian_sphere< T, n >::sqr_mahalanobis_dist ( const vector_ pt) const

The squared Mahalanobis distance to this point.

Definition at line 67 of file bsta_gaussian_sphere.txx.

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

The variance of the distribution.

Definition at line 39 of file bsta_gaussian_sphere.h.


Member Data Documentation

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

The cached covariance determinant.

Definition at line 83 of file bsta_gaussian_sphere.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.

template<class T, unsigned n>
covar_type bsta_gaussian_sphere< T, n >::var_ [protected]

The variance.

Definition at line 80 of file bsta_gaussian_sphere.h.


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