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

#include <mckl/random/dirichlet_distribution.hpp>

Classes

class  param_type
 

Public Types

using distribution_type = DirichletDistribution< RealType >
 
using result_type = RealType
 

Public Member Functions

 DirichletDistribution (std::size_t dim=1)
 Construct a distribution with scalar shape. More...
 
 DirichletDistribution (std::size_t dim, result_type alpha)
 Construct a distribution with scalar shape. More...
 
 DirichletDistribution (std::size_t dim, const result_type *alpha)
 Construct a distribution with vector shapes. More...
 
 DirichletDistribution (const param_type &param)
 
 DirichletDistribution (param_type &&param)
 
const result_typealpha () const
 
std::size_t dim () const
 
template<typename OutputIter >
OutputIter max (OutputIter first) 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::DirichletDistribution< RealType >

Definition at line 98 of file dirichlet_distribution.hpp.

Member Typedef Documentation

◆ distribution_type

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

Definition at line 104 of file dirichlet_distribution.hpp.

◆ result_type

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

Definition at line 103 of file dirichlet_distribution.hpp.

Constructor & Destructor Documentation

◆ DirichletDistribution() [1/5]

template<typename RealType>
mckl::DirichletDistribution< RealType >::DirichletDistribution ( std::size_t  dim = 1)
inline

Construct a distribution with scalar shape.

Definition at line 206 of file dirichlet_distribution.hpp.

◆ DirichletDistribution() [2/5]

template<typename RealType>
mckl::DirichletDistribution< RealType >::DirichletDistribution ( std::size_t  dim,
result_type  alpha 
)
inline

Construct a distribution with scalar shape.

Definition at line 209 of file dirichlet_distribution.hpp.

◆ DirichletDistribution() [3/5]

template<typename RealType>
mckl::DirichletDistribution< RealType >::DirichletDistribution ( std::size_t  dim,
const result_type alpha 
)
inline

Construct a distribution with vector shapes.

Definition at line 216 of file dirichlet_distribution.hpp.

◆ DirichletDistribution() [4/5]

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

Definition at line 222 of file dirichlet_distribution.hpp.

◆ DirichletDistribution() [5/5]

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

Definition at line 227 of file dirichlet_distribution.hpp.

Member Function Documentation

◆ alpha()

template<typename RealType>
const result_type* mckl::DirichletDistribution< RealType >::alpha ( ) const
inline

Definition at line 249 of file dirichlet_distribution.hpp.

◆ dim()

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

Definition at line 247 of file dirichlet_distribution.hpp.

◆ max()

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

Definition at line 240 of file dirichlet_distribution.hpp.

◆ min()

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

Definition at line 234 of file dirichlet_distribution.hpp.

◆ operator()() [1/4]

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

Definition at line 266 of file dirichlet_distribution.hpp.

◆ operator()() [2/4]

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

Definition at line 272 of file dirichlet_distribution.hpp.

◆ operator()() [3/4]

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

Definition at line 278 of file dirichlet_distribution.hpp.

◆ operator()() [4/4]

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

Definition at line 284 of file dirichlet_distribution.hpp.

◆ param() [1/3]

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

Definition at line 251 of file dirichlet_distribution.hpp.

◆ param() [2/3]

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

Definition at line 253 of file dirichlet_distribution.hpp.

◆ param() [3/3]

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

Definition at line 259 of file dirichlet_distribution.hpp.

◆ reset()

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

Definition at line 245 of file dirichlet_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 303 of file dirichlet_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 310 of file dirichlet_distribution.hpp.

◆ operator==

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

Definition at line 294 of file dirichlet_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 323 of file dirichlet_distribution.hpp.