60 std::function<int()>
GetDiscreteGenerator(
const std::vector<double>& weights,
unsigned int i = 0U);
72 void Shuffle(std::vector<unsigned int>& indices,
unsigned int i);
75 std::shared_ptr<RnEngine>
m_rn;
bool IsEmpty() const
Is this een empty (i.e. non-initialized Rn)?
std::function< int()> GetDiscreteGenerator(const std::vector< double > &weights, unsigned int i=0U)
Return generator for ints [0, n-1[ with non-negative weights p_j (i=0,..,n-1) using i-th random strea...
void Initialize(const RnInfo &info)
Initalize with data in Info.
std::function< int()> GetUniformIntGenerator(int a, int b, unsigned int i=0U)
Return a generator for uniform ints in [a, b[ (a < b) using i-th random stream.
void Shuffle(std::vector< unsigned int > &indices, unsigned int i)
Random shuffle of vector of int indices using i-th random stream.
RnMan()
Default constructor builds empty (uninitialized) manager.
bool operator==(const RnMan &other)
Equality of states.
std::function< double()> GetUniform01Generator(unsigned int i=0U)
Return a generator for uniform doubles in [0, 1[ using i-th random stream.
RnInfo GetInfo() const
Return the state of the random engines.
bool MakeWeightedCoinFlip(double fraction, unsigned int i=0U)
Make weighted coin flip: <fraction> of the flips need to come up true.
Namespace for the simulator and related classes.
Information on random number management state.
std::shared_ptr< RnEngine > m_rn