Template Class MultivariateNormalDistributionParam

Class Documentation

template<class Vector, class Matrix>
class MultivariateNormalDistributionParam

Multivariate normal distribution parameter set class.

Public Types

using scalar_type = typename Vector::Scalar

The scalar type.

using vector_type = Vector

The vector type.

using matrix_type = Matrix

The covariance matrix from Vector.

Public Functions

MultivariateNormalDistributionParam() = default

Constructs a parameter set instance.

inline explicit MultivariateNormalDistributionParam(matrix_type covariance)

Constructs a parameter set instance.

Parameters:

covariance – Real symmetric matrix that represents the covariance of the random variable.

Throws:

std::runtime_error – If the provided covariance is invalid.

inline MultivariateNormalDistributionParam(vector_type mean, matrix_type covariance)

Constructs a parameter set instance.

Parameters:
  • mean – A vector that represents the mean value of the random variable.

  • covariance – Real symmetric matrix that represents the covariance of the random variable.

Throws:

std::runtime_error – If the provided covariance is invalid.

inline bool operator==(const MultivariateNormalDistributionParam &other) const

Compares this object with other parameter set object.

Parameters:

other – Parameter set object to compare against.

Returns:

True if the objects are equal, false otherwise.

inline bool operator!=(const MultivariateNormalDistributionParam &other) const

Compares this object with other parameter set object.

Parameters:

other – Parameter set object to compare against.

Returns:

True if the objects are not equal, false otherwise.

template<class Generator>
inline auto operator()(std::normal_distribution<scalar_type> &distribution, Generator &generator) const

Generates a new random object from the distribution.

Template Parameters:

Generator – The generator type that must meet the requirements of UniformRandomBitGenerator.

Parameters:
  • distribution – A reference to a standard normal distribution instance.

  • generator – An uniform random bit generator object.

Returns:

The generated random object.