|
| | RandomGenerator ()=delete |
| | RandomGenerator (const RandomEngineT &rng)=delete |
| | RandomGenerator (std::initializer_list< std::uint32_t > seed) |
| unsigned long | operator() (std::uniform_int_distribution< unsigned long > &d) override |
| | Calls the provided distribution with the wrapped RNG engine.
|
| double | operator() (std::uniform_real_distribution<> &d) override |
| double | operator() (std::normal_distribution<> &d) override |
| double | operator() (std::lognormal_distribution<> &d) override |
| unsigned long | operator() (std::binomial_distribution< unsigned long > &d) override |
| double | operator() (std::gamma_distribution<> &d) override |
| double | operator() (std::exponential_distribution<> &d) override |
| unsigned long | operator() (std::discrete_distribution< unsigned long > &d) override |
| unsigned long | operator() (std::poisson_distribution< unsigned long > &d) override |
| unsigned long | operator() (std::uniform_int_distribution< unsigned long > &d, std::uniform_int_distribution< unsigned long >::param_type &p) override |
| | Calls the provided distribution with the wrapped RNG engine, using provided distribution parameters.
|
| double | operator() (std::uniform_real_distribution<> &d, std::uniform_real_distribution<>::param_type &p) override |
| double | operator() (std::normal_distribution<> &d, std::normal_distribution<>::param_type &p) override |
| double | operator() (std::lognormal_distribution<> &d, std::lognormal_distribution<>::param_type &p) override |
| unsigned long | operator() (std::binomial_distribution< unsigned long > &d, std::binomial_distribution< unsigned long >::param_type &p) override |
| double | operator() (std::gamma_distribution<> &d, std::gamma_distribution<>::param_type &p) override |
| double | operator() (std::exponential_distribution<> &d, std::exponential_distribution<>::param_type &p) override |
| unsigned long | operator() (std::discrete_distribution< unsigned long > &d, std::discrete_distribution< unsigned long >::param_type &p) override |
| unsigned long | operator() (std::poisson_distribution< unsigned long > &d, std::poisson_distribution< unsigned long >::param_type &p) override |
| double | drand () override |
| | Uses the wrapped RNG engine to draw a double from a uniform distribution in the range [0, 1).
|
| unsigned long | ulrand (unsigned long N) override |
| | Uses the wrapped RNG engine to draw an unsigned long from a uniform distribution in the range [0, N).
|
| void | stable_sample (NodeCollection::const_iterator first, NodeCollection::const_iterator last, std::back_insert_iterator< std::vector< NodeIDTriple > > dest, size_t n) override |
| | Wrap std::sample for selection from NodeCollection.
|
| void | partial_shuffle (std::vector< size_t > &data, const size_t n) override |
| | Select randomly shuffled elements from vector.
|
| Public Member Functions inherited from nest::BaseRandomGenerator |
| virtual | ~BaseRandomGenerator () |
template<typename RandomEngineT>
class nest::RandomGenerator< RandomEngineT >
Wrapper for RNG engines.
- Template Parameters
-
| RandomEngineT | Type of the wrapped engine, must conform with the C++11 random engine interface. |
template<typename RandomEngineT>
| void nest::RandomGenerator< RandomEngineT >::partial_shuffle |
( |
std::vector< size_t > & | data, |
|
|
const size_t | n ) |
|
inlineoverridevirtual |
Select randomly shuffled elements from vector.
Places n elements chosen from data without replacement, in random order, at the beginning of data and then reduces the size of data to n. If n exceeds data.size(), all elements are kept and only shuffled.
- Parameters
-
| data | Vector to be shuffled and possibly shortened. |
| n | Number of elements to select. |
Implements nest::BaseRandomGenerator.
References ulrand().
template<typename RandomEngineT>