lppl
v2.0.0
|
#include "distributions.hpp"
Public Member Functions | |
Categorical (int dim) | |
template<typename... Vs> | |
Categorical (std::variant< Vs... > probs) | |
Categorical (std::vector< double > probs) | |
double | at (size_t ix) |
Get the probability at the ix-th index. | |
unsigned long | get_dim () |
std::vector< double > | get_probs () |
double | logprob (unsigned long value) const |
template<typename RNG > | |
unsigned long | sample (RNG &rng) |
std::string | string () const |
Public Attributes | |
std::discrete_distribution< int > | dist |
std::vector< double > | probs |
A dynamic categorical distribution parameterized by a std::vector<double> of probabilities