Public Types | Public Member Functions | Public Attributes
vpdt_gaussian< F, Covar, Metric > Class Template Reference

A Gaussian with variance independent in each dimension. More...

#include <vpdt_gaussian.h>

Inheritance diagram for vpdt_gaussian< F, Covar, Metric >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef F field_type
 The field type.
typedef Covar covar_type
 The covariance type.
typedef Metric metric_type
 The metric type.
typedef vpdt_field_traits< F >
::scalar_type 
T
 the data type used for scalars.
typedef vpdt_field_traits< F >
::vector_type 
vector
 the data type used for vectors.
typedef vpdt_field_traits< F >
::matrix_type 
matrix
 the data type used for matrices.

Public Member Functions

 vpdt_gaussian (unsigned int var_dim=vpdt_field_traits< F >::dimension)
 Constructor.
 vpdt_gaussian (const F &m, const covar_type &c)
 Constructor - from mean and variance.
unsigned int dimension () const
 Return the dimension.
T density (const F &pt) const
 Evaluate the unnormalized density at a point pt.
T gradient_density (const F &pt, vector &g) const
 Compute the gradient of the density function, returned in g.
T norm_const () const
 compute the normalization constant (independent of sample point).
T sqr_mahal_dist (const F &pt) const
 The squared Mahalanobis distance to this point.
T cumulative_prob (const F &pt) const
 Evaluate the cumulative distribution function at a point.
void compute_mean (vector &m) const
 Compute the mean of the distribution.
void compute_covar (matrix &c) const
 Compute the covariance matrix of the distribution.

Public Attributes

mean
 the mean.
covar_type covar
 the matrix covariance.

Detailed Description

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
class vpdt_gaussian< F, Covar, Metric >

A Gaussian with variance independent in each dimension.

Definition at line 35 of file vpdt_gaussian.h.


Member Typedef Documentation

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
typedef Covar vpdt_gaussian< F, Covar, Metric >::covar_type

The covariance type.

Definition at line 41 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
typedef F vpdt_gaussian< F, Covar, Metric >::field_type

The field type.

Definition at line 39 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
typedef vpdt_field_traits<F>::matrix_type vpdt_gaussian< F, Covar, Metric >::matrix

the data type used for matrices.

Definition at line 50 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
typedef Metric vpdt_gaussian< F, Covar, Metric >::metric_type

The metric type.

Definition at line 43 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
typedef vpdt_field_traits<F>::scalar_type vpdt_gaussian< F, Covar, Metric >::T

the data type used for scalars.

Definition at line 46 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
typedef vpdt_field_traits<F>::vector_type vpdt_gaussian< F, Covar, Metric >::vector

the data type used for vectors.

Definition at line 48 of file vpdt_gaussian.h.


Constructor & Destructor Documentation

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
vpdt_gaussian< F, Covar, Metric >::vpdt_gaussian ( unsigned int  var_dim = vpdt_field_traits<F>::dimension) [inline]

Constructor.

Optionally initialize the dimension for when n==0. Otherwise var_dim is ignored

Definition at line 55 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
vpdt_gaussian< F, Covar, Metric >::vpdt_gaussian ( const F &  m,
const covar_type c 
) [inline]

Constructor - from mean and variance.

Definition at line 64 of file vpdt_gaussian.h.


Member Function Documentation

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
void vpdt_gaussian< F, Covar, Metric >::compute_covar ( matrix c) const [inline]

Compute the covariance matrix of the distribution.

Definition at line 115 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
void vpdt_gaussian< F, Covar, Metric >::compute_mean ( vector m) const [inline]

Compute the mean of the distribution.

Definition at line 112 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
T vpdt_gaussian< F, Covar, Metric >::cumulative_prob ( const F &  pt) const [inline]

Evaluate the cumulative distribution function at a point.

This is the integral of the density function from negative infinity (in all dimensions) to the point in question

Definition at line 105 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
T vpdt_gaussian< F, Covar, Metric >::density ( const F &  pt) const [inline]

Evaluate the unnormalized density at a point pt.

This must be multiplied by norm_const() to integrate to 1

Definition at line 72 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
unsigned int vpdt_gaussian< F, Covar, Metric >::dimension ( ) const [inline]

Return the dimension.

Definition at line 68 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
T vpdt_gaussian< F, Covar, Metric >::gradient_density ( const F &  pt,
vector g 
) const [inline]

Compute the gradient of the density function, returned in g.

The return value of the function is the density itself

Definition at line 79 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
T vpdt_gaussian< F, Covar, Metric >::norm_const ( ) const [inline]

compute the normalization constant (independent of sample point).

Can be precomputed when evaluating at multiple points

Definition at line 89 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
T vpdt_gaussian< F, Covar, Metric >::sqr_mahal_dist ( const F &  pt) const [inline]

The squared Mahalanobis distance to this point.

Non-virtual for efficiency

Definition at line 97 of file vpdt_gaussian.h.


Member Data Documentation

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
covar_type vpdt_gaussian< F, Covar, Metric >::covar

the matrix covariance.

Definition at line 127 of file vpdt_gaussian.h.

template<class F, class Covar = typename vpdt_eigen_sym_matrix_gen<F>::type, class Metric = vpdt_norm_metric<F,Covar>>
F vpdt_gaussian< F, Covar, Metric >::mean

the mean.

Definition at line 125 of file vpdt_gaussian.h.


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