Template Class discrete_RNG

Inheritance Relationships

Base Type

Class Documentation

template<class FloatType = double, class Generator = std::mt19937>
class discrete_RNG : public RandomGenerator<FloatType>

Public Types

typedef FloatType result_type
typedef Generator generator_type
typedef std::discrete_distribution<int> distribution_type

Public Functions

inline explicit discrete_RNG(std::vector<FloatType> _values, std::vector<FloatType> _weights, Generator &&_eng = Generator{std::random_device{}()})
inline explicit discrete_RNG(std::vector<FloatType> _values, std::vector<FloatType> _weights, const Generator &_eng)
inline virtual result_type draw()
inline virtual std::vector<result_type> draw(size_t n)
inline virtual result_type operator()()