Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ categorical_logit_rng()

template<class RNG >
int stan::math::categorical_logit_rng ( const Eigen::VectorXd &  beta,
RNG &  rng 
)
inline

Return a draw from a Categorical distribution given a a vector of unnormalized log probabilities and a psuedo-random number generator.

This is a convenience wrapper around categorical_rng(softmax(beta), rng).

Template Parameters
RNGType of pseudo-random number generator.
Parameters
betaVector of unnormalized log probabilities.
rngPseudo-random number generator.
Returns
Categorical random variate

Definition at line 29 of file categorical_logit_rng.hpp.