EigenRand  0.5.0
 
Loading...
Searching...
No Matches
Eigen::Rand::MultinomialGen< _Scalar, Dim > Class Template Reference

Generator of real vectors on a multinomial distribution. More...

#include <Multinomial.h>

Inheritance diagram for Eigen::Rand::MultinomialGen< _Scalar, Dim >:
Collaboration diagram for Eigen::Rand::MultinomialGen< _Scalar, Dim >:

Public Member Functions

template<typename WeightTy >
 MultinomialGen (_Scalar _trials, const MatrixBase< WeightTy > &_weights)
 Construct a new multinomial generator. More...
 
 MultinomialGen (const MultinomialGen &)=default
 
 MultinomialGen (MultinomialGen &&)=default
 
MultinomialGenoperator= (const MultinomialGen &)=default
 
MultinomialGenoperator= (MultinomialGen &&)=default
 
Index dims () const
 
template<typename Urng >
Matrix< _Scalar, Dim, -1 > generate (Urng &&urng, Index samples)
 
template<typename Urng >
Matrix< _Scalar, Dim, 1 > generate (Urng &&urng)
 
- Public Member Functions inherited from Eigen::Rand::MvVecGenBase< DerivedGen, _Scalar, Dim >
Index dims () const
 returns the dimensions of vectors to be generated
 
template<typename Urng >
Matrix< _Scalar, Dim, -1 > generate (Urng &&urng, Index samples)
 generates multiple samples at once More...
 
template<typename Urng >
Matrix< _Scalar, Dim, 1 > generate (Urng &&urng)
 generates one sample More...
 

Detailed Description

template<typename _Scalar = int32_t, Index Dim = -1>
class Eigen::Rand::MultinomialGen< _Scalar, Dim >

Generator of real vectors on a multinomial distribution.

Template Parameters
_Scalar
Dimnumber of dimensions, or Eigen::Dynamic

Constructor & Destructor Documentation

◆ MultinomialGen()

template<typename _Scalar = int32_t, Index Dim = -1>
template<typename WeightTy >
Eigen::Rand::MultinomialGen< _Scalar, Dim >::MultinomialGen ( _Scalar  _trials,
const MatrixBase< WeightTy > &  _weights 
)
inline

Construct a new multinomial generator.

Template Parameters
WeightTy
Parameters
_trialsthe number of trials
_weightsthe weights of each category, (Dim, 1) shape matrix or vector

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