MCKL
Monte Carlo Kernel Library
Classes | Public Types | Public Member Functions | Friends | List of all members
mckl::NormalMVDistribution< RealType > Class Template Reference

Multivariate Normal distribution. More...

#include <mckl/random/internal/common.hpp>

Classes

class  param_type
 

Public Types

using distribution_type = NormalMVDistribution< RealType >
 
using result_type = RealType
 

Public Member Functions

 NormalMVDistribution (std::size_t dim=1)
 Construct a distribution with scalar mean and scalar covariance. More...
 
 NormalMVDistribution (std::size_t dim, result_type mean, result_type chol)
 Construct a distribution with scalar mean and scalar covariance. More...
 
 NormalMVDistribution (std::size_t dim, result_type mean, const result_type *chol)
 Construct a distribution with scalar mean and vector covariance. More...
 
 NormalMVDistribution (std::size_t dim, const result_type *mean, result_type chol)
 Construct a distribution with vector mean and scalar covariance. More...
 
 NormalMVDistribution (std::size_t dim, const result_type *mean, const result_type *chol)
 Construct a distribution with vector mean and vector covariance. More...
 
 NormalMVDistribution (const param_type &param)
 
 NormalMVDistribution (param_type &&param)
 
const result_typechol () const
 
std::size_t dim () const
 
template<typename OutputIter >
OutputIter max (OutputIter first) const
 
const result_typemean () const
 
template<typename OutputIter >
OutputIter min (OutputIter first) const
 
template<typename RNGType >
void operator() (RNGType &rng, result_type *r)
 
template<typename RNGType >
void operator() (RNGType &rng, result_type *r, const param_type &param)
 
template<typename RNGType >
void operator() (RNGType &rng, std::size_t n, result_type *r)
 
template<typename RNGType >
void operator() (RNGType &rng, std::size_t n, result_type *r, const param_type &param)
 
const param_typeparam () const
 
void param (const param_type &param)
 
void param (param_type &&param)
 
void reset ()
 

Friends

bool operator!= (const distribution_type &dist1, const distribution_type &dist2)
 
template<typename CharT , typename Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const distribution_type &dist)
 
bool operator== (const distribution_type &dist1, const distribution_type &dist2)
 
template<typename CharT , typename Traits >
std::basic_istream< CharT, Traits > & operator>> (std::basic_istream< CharT, Traits > &is, distribution_type &dist)
 

Detailed Description

template<typename RealType>
class mckl::NormalMVDistribution< RealType >

Multivariate Normal distribution.

The distribution is parameterized by its mean vector and the lower triangular elements of the Cholesky decomposition of the covaraince matrix, packed row by row.

Definition at line 1057 of file random/internal/common.hpp.

Member Typedef Documentation

◆ distribution_type

template<typename RealType>
using mckl::NormalMVDistribution< RealType >::distribution_type = NormalMVDistribution<RealType>

Definition at line 145 of file normal_mv_distribution.hpp.

◆ result_type

template<typename RealType>
using mckl::NormalMVDistribution< RealType >::result_type = RealType

Definition at line 144 of file normal_mv_distribution.hpp.

Constructor & Destructor Documentation

◆ NormalMVDistribution() [1/7]

template<typename RealType>
mckl::NormalMVDistribution< RealType >::NormalMVDistribution ( std::size_t  dim = 1)
inlineexplicit

Construct a distribution with scalar mean and scalar covariance.

Definition at line 286 of file normal_mv_distribution.hpp.

◆ NormalMVDistribution() [2/7]

template<typename RealType>
mckl::NormalMVDistribution< RealType >::NormalMVDistribution ( std::size_t  dim,
result_type  mean,
result_type  chol 
)
inline

Construct a distribution with scalar mean and scalar covariance.

Definition at line 292 of file normal_mv_distribution.hpp.

◆ NormalMVDistribution() [3/7]

template<typename RealType>
mckl::NormalMVDistribution< RealType >::NormalMVDistribution ( std::size_t  dim,
result_type  mean,
const result_type chol 
)
inline

Construct a distribution with scalar mean and vector covariance.

Definition at line 299 of file normal_mv_distribution.hpp.

◆ NormalMVDistribution() [4/7]

template<typename RealType>
mckl::NormalMVDistribution< RealType >::NormalMVDistribution ( std::size_t  dim,
const result_type mean,
result_type  chol 
)
inline

Construct a distribution with vector mean and scalar covariance.

Definition at line 307 of file normal_mv_distribution.hpp.

◆ NormalMVDistribution() [5/7]

template<typename RealType>
mckl::NormalMVDistribution< RealType >::NormalMVDistribution ( std::size_t  dim,
const result_type mean,
const result_type chol 
)
inline

Construct a distribution with vector mean and vector covariance.

Definition at line 315 of file normal_mv_distribution.hpp.

◆ NormalMVDistribution() [6/7]

template<typename RealType>
mckl::NormalMVDistribution< RealType >::NormalMVDistribution ( const param_type param)
inlineexplicit

Definition at line 322 of file normal_mv_distribution.hpp.

◆ NormalMVDistribution() [7/7]

template<typename RealType>
mckl::NormalMVDistribution< RealType >::NormalMVDistribution ( param_type &&  param)
inlineexplicit

Definition at line 327 of file normal_mv_distribution.hpp.

Member Function Documentation

◆ chol()

template<typename RealType>
const result_type* mckl::NormalMVDistribution< RealType >::chol ( ) const
inline

Definition at line 353 of file normal_mv_distribution.hpp.

◆ dim()

template<typename RealType>
std::size_t mckl::NormalMVDistribution< RealType >::dim ( ) const
inline

Definition at line 349 of file normal_mv_distribution.hpp.

◆ max()

template<typename RealType>
template<typename OutputIter >
OutputIter mckl::NormalMVDistribution< RealType >::max ( OutputIter  first) const
inline

Definition at line 341 of file normal_mv_distribution.hpp.

◆ mean()

template<typename RealType>
const result_type* mckl::NormalMVDistribution< RealType >::mean ( ) const
inline

Definition at line 351 of file normal_mv_distribution.hpp.

◆ min()

template<typename RealType>
template<typename OutputIter >
OutputIter mckl::NormalMVDistribution< RealType >::min ( OutputIter  first) const
inline

Definition at line 334 of file normal_mv_distribution.hpp.

◆ operator()() [1/4]

template<typename RealType>
template<typename RNGType >
void mckl::NormalMVDistribution< RealType >::operator() ( RNGType &  rng,
result_type r 
)
inline

Definition at line 370 of file normal_mv_distribution.hpp.

◆ operator()() [2/4]

template<typename RealType>
template<typename RNGType >
void mckl::NormalMVDistribution< RealType >::operator() ( RNGType &  rng,
result_type r,
const param_type param 
)
inline

Definition at line 376 of file normal_mv_distribution.hpp.

◆ operator()() [3/4]

template<typename RealType>
template<typename RNGType >
void mckl::NormalMVDistribution< RealType >::operator() ( RNGType &  rng,
std::size_t  n,
result_type r 
)
inline

Definition at line 382 of file normal_mv_distribution.hpp.

◆ operator()() [4/4]

template<typename RealType>
template<typename RNGType >
void mckl::NormalMVDistribution< RealType >::operator() ( RNGType &  rng,
std::size_t  n,
result_type r,
const param_type param 
)
inline

Definition at line 388 of file normal_mv_distribution.hpp.

◆ param() [1/3]

template<typename RealType>
const param_type& mckl::NormalMVDistribution< RealType >::param ( ) const
inline

Definition at line 355 of file normal_mv_distribution.hpp.

◆ param() [2/3]

template<typename RealType>
void mckl::NormalMVDistribution< RealType >::param ( const param_type param)
inline

Definition at line 357 of file normal_mv_distribution.hpp.

◆ param() [3/3]

template<typename RealType>
void mckl::NormalMVDistribution< RealType >::param ( param_type &&  param)
inline

Definition at line 363 of file normal_mv_distribution.hpp.

◆ reset()

template<typename RealType>
void mckl::NormalMVDistribution< RealType >::reset ( )
inline

Definition at line 347 of file normal_mv_distribution.hpp.

Friends And Related Function Documentation

◆ operator!=

template<typename RealType>
bool operator!= ( const distribution_type dist1,
const distribution_type dist2 
)
friend

Definition at line 415 of file normal_mv_distribution.hpp.

◆ operator<<

template<typename RealType>
template<typename CharT , typename Traits >
std::basic_ostream<CharT, Traits>& operator<< ( std::basic_ostream< CharT, Traits > &  os,
const distribution_type dist 
)
friend

Definition at line 422 of file normal_mv_distribution.hpp.

◆ operator==

template<typename RealType>
bool operator== ( const distribution_type dist1,
const distribution_type dist2 
)
friend

Definition at line 406 of file normal_mv_distribution.hpp.

◆ operator>>

template<typename RealType>
template<typename CharT , typename Traits >
std::basic_istream<CharT, Traits>& operator>> ( std::basic_istream< CharT, Traits > &  is,
distribution_type dist 
)
friend

Definition at line 435 of file normal_mv_distribution.hpp.