Public Types | Public Member Functions | Private Attributes | Friends | List of all members
beluga::MultivariateNormalDistribution< T > Class Template Reference

Multivariate normal distribution. More...

#include <multivariate_normal_distribution.hpp>

Public Types

using covariance_type = typename multivariate_distribution_traits< T >::covariance_type
 The covariance matrix from T. More...
 
using param_type = MultivariateNormalDistributionParam< vector_type, covariance_type >
 The type of the parameter set. More...
 
using result_type = typename multivariate_distribution_traits< T >::result_type
 The result type from T. More...
 
using scalar_type = typename multivariate_distribution_traits< T >::scalar_type
 The scalar type. More...
 
using vector_type = typename multivariate_distribution_traits< T >::vector_type
 The Eigen vector type corresponding to T. More...
 

Public Member Functions

 MultivariateNormalDistribution ()=default
 Construct with zero mean and circularly symmetric unitary covariance. More...
 
template<class U >
 MultivariateNormalDistribution (const MultivariateNormalDistribution< U > &other)
 Copy construct from another compatible distribution. More...
 
 MultivariateNormalDistribution (const param_type &params)
 Construct from distribution parameters. More...
 
 MultivariateNormalDistribution (covariance_type covariance)
 Construct with zero mean and the given covariance. More...
 
template<class U >
 MultivariateNormalDistribution (MultivariateNormalDistribution< U > &&other) noexcept
 Move construct from another compatible distribution. More...
 
 MultivariateNormalDistribution (result_type mean, covariance_type covariance)
 Construct with the given mean and covariance. More...
 
bool operator!= (const MultivariateNormalDistribution< T > &other) const
 Compares this object with other distribution object. More...
 
template<class Generator >
result_type operator() (Generator &generator)
 Generates the next random object in the distribution. More...
 
template<class Generator >
result_type operator() (Generator &generator, const param_type &params)
 Generates the next random object in the distribution. More...
 
template<class U >
MultivariateNormalDistributionoperator= (const MultivariateNormalDistribution< U > &other)
 Copy assign from another compatible distribution. More...
 
template<class U >
MultivariateNormalDistributionoperator= (MultivariateNormalDistribution< U > &&other)
 Move assign from another compatible distribution. More...
 
bool operator== (const MultivariateNormalDistribution< T > &other) const
 Compares this object with other distribution object. More...
 
const param_typeparam () const
 Returns the associated parameter set. More...
 
void param (const param_type &params)
 Sets the associated parameter set to params. More...
 
void reset ()
 Resets the internal state of the distribution. More...
 

Private Attributes

std::normal_distribution< scalar_typedistribution_
 
param_type params_
 

Friends

template<class U >
class MultivariateNormalDistribution
 

Detailed Description

template<class T>
class beluga::MultivariateNormalDistribution< T >

Multivariate normal distribution.

MultivariateNormalDistribution<T> is an implementation of Beluga named requirements: RandomStateDistribution that represents a multi-dimensional normal distribution of real-valued random variables.

Template Parameters
TThe result type for the distribution.

Definition at line 137 of file multivariate_normal_distribution.hpp.

Member Typedef Documentation

◆ covariance_type

The covariance matrix from T.

Definition at line 149 of file multivariate_normal_distribution.hpp.

◆ param_type

The type of the parameter set.

Definition at line 155 of file multivariate_normal_distribution.hpp.

◆ result_type

The result type from T.

Definition at line 152 of file multivariate_normal_distribution.hpp.

◆ scalar_type

The scalar type.

Definition at line 143 of file multivariate_normal_distribution.hpp.

◆ vector_type

The Eigen vector type corresponding to T.

Definition at line 146 of file multivariate_normal_distribution.hpp.

Constructor & Destructor Documentation

◆ MultivariateNormalDistribution() [1/6]

Construct with zero mean and circularly symmetric unitary covariance.

◆ MultivariateNormalDistribution() [2/6]

template<class T >
beluga::MultivariateNormalDistribution< T >::MultivariateNormalDistribution ( const param_type params)
inlineexplicit

Construct from distribution parameters.

Parameters
paramsThe distribution parameter set.

Definition at line 164 of file multivariate_normal_distribution.hpp.

◆ MultivariateNormalDistribution() [3/6]

template<class T >
beluga::MultivariateNormalDistribution< T >::MultivariateNormalDistribution ( covariance_type  covariance)
inlineexplicit

Construct with zero mean and the given covariance.

Parameters
covarianceReal symmetric matrix that represents the covariance of the random variable.
Exceptions
std::runtime_errorIf the provided covariance is invalid.

Definition at line 172 of file multivariate_normal_distribution.hpp.

◆ MultivariateNormalDistribution() [4/6]

template<class T >
beluga::MultivariateNormalDistribution< T >::MultivariateNormalDistribution ( result_type  mean,
covariance_type  covariance 
)
inline

Construct with the given mean and covariance.

Parameters
meanAn object that represents the mean value of the random variable.
covarianceReal symmetric matrix that represents the covariance of the random variable.
Exceptions
std::runtime_errorIf the provided covariance is invalid.

Definition at line 181 of file multivariate_normal_distribution.hpp.

◆ MultivariateNormalDistribution() [5/6]

template<class T >
template<class U >
beluga::MultivariateNormalDistribution< T >::MultivariateNormalDistribution ( const MultivariateNormalDistribution< U > &  other)
inline

Copy construct from another compatible distribution.

Template Parameters
UThe result type for the other distribution.
Parameters
otherAnother instance of a multivariate normal distribution.

Definition at line 190 of file multivariate_normal_distribution.hpp.

◆ MultivariateNormalDistribution() [6/6]

template<class T >
template<class U >
beluga::MultivariateNormalDistribution< T >::MultivariateNormalDistribution ( MultivariateNormalDistribution< U > &&  other)
inlinenoexcept

Move construct from another compatible distribution.

Template Parameters
UThe result type for the other distribution.
Parameters
otherAnother instance of a multivariate normal distribution.

Definition at line 199 of file multivariate_normal_distribution.hpp.

Member Function Documentation

◆ operator!=()

template<class T >
bool beluga::MultivariateNormalDistribution< T >::operator!= ( const MultivariateNormalDistribution< T > &  other) const
inline

Compares this object with other distribution object.

Two distribution objects are equal when parameter values and internal state are the same. In other words, if they are invoked with equal generators, they generate the same sequence.

Parameters
otherDistribution object to compare against.
Returns
True if the objects are not equal, false otherwise.

Definition at line 285 of file multivariate_normal_distribution.hpp.

◆ operator()() [1/2]

template<class T >
template<class Generator >
result_type beluga::MultivariateNormalDistribution< T >::operator() ( Generator &  generator)
inline

Generates the next random object in the distribution.

Template Parameters
GeneratorThe generator type that must meet the requirements of UniformRandomBitGenerator.
Parameters
generatorAn uniform random bit generator object.
Returns
The generated random object.

Definition at line 248 of file multivariate_normal_distribution.hpp.

◆ operator()() [2/2]

template<class T >
template<class Generator >
result_type beluga::MultivariateNormalDistribution< T >::operator() ( Generator &  generator,
const param_type params 
)
inline

Generates the next random object in the distribution.

Template Parameters
GeneratorThe generator type that must meet the requirements of UniformRandomBitGenerator.
Parameters
generatorAn uniform random bit generator object.
paramsDistribution parameter set to use instead of the associated one.
Returns
The generated random object.

Definition at line 261 of file multivariate_normal_distribution.hpp.

◆ operator=() [1/2]

template<class T >
template<class U >
MultivariateNormalDistribution& beluga::MultivariateNormalDistribution< T >::operator= ( const MultivariateNormalDistribution< U > &  other)
inline

Copy assign from another compatible distribution.

Template Parameters
UThe result type for the other distribution.
Parameters
otherAnother instance of a multivariate normal distribution.

Definition at line 208 of file multivariate_normal_distribution.hpp.

◆ operator=() [2/2]

template<class T >
template<class U >
MultivariateNormalDistribution& beluga::MultivariateNormalDistribution< T >::operator= ( MultivariateNormalDistribution< U > &&  other)
inline

Move assign from another compatible distribution.

Template Parameters
UThe result type for the other distribution.
Parameters
otherAnother instance of a multivariate normal distribution.

Definition at line 220 of file multivariate_normal_distribution.hpp.

◆ operator==()

template<class T >
bool beluga::MultivariateNormalDistribution< T >::operator== ( const MultivariateNormalDistribution< T > &  other) const
inline

Compares this object with other distribution object.

Two distribution objects are equal when parameter values and internal state are the same. In other words, if they are invoked with equal generators, they generate the same sequence.

Parameters
otherDistribution object to compare against.
Returns
True if the objects are equal, false otherwise.

Definition at line 273 of file multivariate_normal_distribution.hpp.

◆ param() [1/2]

template<class T >
const param_type& beluga::MultivariateNormalDistribution< T >::param ( ) const
inline

Returns the associated parameter set.

Definition at line 230 of file multivariate_normal_distribution.hpp.

◆ param() [2/2]

template<class T >
void beluga::MultivariateNormalDistribution< T >::param ( const param_type params)
inline

Sets the associated parameter set to params.

This doesn't reset the internal state of the distribution.

Parameters
paramsNew contents of the associated parameter set.

Definition at line 238 of file multivariate_normal_distribution.hpp.

◆ reset()

template<class T >
void beluga::MultivariateNormalDistribution< T >::reset ( )
inline

Resets the internal state of the distribution.

Definition at line 227 of file multivariate_normal_distribution.hpp.

Friends And Related Function Documentation

◆ MultivariateNormalDistribution

template<class T >
template<class U >
friend class MultivariateNormalDistribution
friend

Definition at line 140 of file multivariate_normal_distribution.hpp.

Member Data Documentation

◆ distribution_

template<class T >
std::normal_distribution<scalar_type> beluga::MultivariateNormalDistribution< T >::distribution_
private

Definition at line 289 of file multivariate_normal_distribution.hpp.

◆ params_

template<class T >
param_type beluga::MultivariateNormalDistribution< T >::params_
private

Definition at line 288 of file multivariate_normal_distribution.hpp.


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


beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:54