A (hyper-)spherical Gaussian distribution. More...
#include <bsta_gaussian_sphere.h>
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_type & | var () const |
The variance of the distribution. | |
void | set_var (const covar_type &var) |
Set the variance of the distribution. | |
const covar_type & | covar () const |
generic access to covariance or variance across Gaussians. | |
void | set_covar (const covar_type &covar) |
generic set covariance across Gaussian subtypes. | |
T | dist_prob_density (const T &sqr_mahal_dist) const |
The probability density at this sample given square mahalanobis distance. | |
T | prob_density (const vector_ &pt) const |
The probability density at this sample. | |
T | probability (const vector_ &min_pt, const vector_ &max_pt) const |
The probability integrated over a box. | |
T | sqr_mahalanobis_dist (const vector_ &pt) const |
The squared Mahalanobis distance to this point. | |
T | 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. | |
T | det_covar_ |
The cached covariance determinant. | |
vector_ | mean_ |
The mean. | |
Private Member Functions | |
void | compute_det () |
compute the determinant of the covariance. |
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.
typedef T bsta_gaussian_sphere< T, n >::covar_type |
Definition at line 27 of file bsta_gaussian_sphere.h.
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.
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.
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.
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.
anonymous enum [inherited] |
The dimension of the distribution.
Definition at line 23 of file bsta_distribution.h.
bsta_gaussian_sphere< T, n >::bsta_gaussian_sphere | ( | ) | [inline] |
Constructor.
Definition at line 29 of file bsta_gaussian_sphere.h.
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.
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.
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.
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.
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.
const vector_& bsta_gaussian< T, n >::mean | ( | ) | const [inline, inherited] |
The mean of the distribution.
Definition at line 46 of file bsta_gaussian.h.
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.
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.
Definition at line 141 of file bsta_gaussian_sphere.txx.
bsta_gaussian_sphere< T, n >::vector_ bsta_gaussian_sphere< T, n >::sample | ( | vnl_random & | rng | ) | const |
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.
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.
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.
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.
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.
T bsta_gaussian_sphere< T, n >::det_covar_ [protected] |
The cached covariance determinant.
Definition at line 83 of file bsta_gaussian_sphere.h.
vector_ bsta_gaussian< T, n >::mean_ [protected, inherited] |
The mean.
Definition at line 56 of file bsta_gaussian.h.
covar_type bsta_gaussian_sphere< T, n >::var_ [protected] |
The variance.
Definition at line 80 of file bsta_gaussian_sphere.h.