A Gaussian distribution, independent in each dimension. More...
#include <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 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_type & | diag_covar () const |
The diagonal covariance of the distribution. | |
const covar_type & | covar () const |
Generic access to covariance or variance across Gaussian subtypes. | |
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 vnl_vector_fixed< T, n > &pt) const |
The probability density at this sample. | |
T | 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. | |
T | sqr_mahalanobis_dist (const vnl_vector_fixed< T, n > &pt) const |
The squared Mahalanobis distance to this point. | |
T | 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. | |
T | det_covar_ |
The cached covariance determinant. | |
vector_ | mean_ |
The mean. | |
Private Member Functions | |
void | compute_det () |
compute the determinant of the covariance. |
A Gaussian distribution, independent in each dimension.
Thus, the covariance matrix is diagonal
Definition at line 24 of file bsta_gaussian_indep.h.
typedef vnl_vector_fixed<T,n> bsta_gaussian_indep< T, n >::covar_type |
Definition at line 27 of file bsta_gaussian_indep.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_indep< T, n >::vector_ |
Reimplemented from bsta_gaussian< T, n >.
Definition at line 28 of file bsta_gaussian_indep.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_indep< T, n >::bsta_gaussian_indep | ( | ) | [inline] |
Constructor.
Definition at line 31 of file bsta_gaussian_indep.h.
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.
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.
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.
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.
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.
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.
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.
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_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.
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.
Definition at line 123 of file bsta_gaussian_indep.txx.
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.
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.
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.
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.
T bsta_gaussian_indep< T, n >::det_covar_ [protected] |
The cached covariance determinant.
Definition at line 97 of file bsta_gaussian_indep.h.
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.
vector_ bsta_gaussian< T, n >::mean_ [protected, inherited] |
The mean.
Definition at line 56 of file bsta_gaussian.h.