Template Class discrete_RNG¶
Defined in File random_generator.h
Inheritance Relationships¶
Base Type¶
public RandomGenerator< FloatType >
(Template Class RandomGenerator)
Class Documentation¶
-
template<class FloatType = double, class Generator = std::mt19937>
class discrete_RNG : public RandomGenerator<FloatType>¶ Public Types
-
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()()¶
-
typedef std::discrete_distribution<int> distribution_type¶