Base class for RNG engine wrappers. More...
#include <random_generators.h>
Public Member Functions | |
| virtual | ~BaseRandomGenerator () |
| virtual unsigned long | operator() (std::uniform_int_distribution< unsigned long > &d)=0 |
| Calls the provided distribution with the wrapped RNG engine. | |
| virtual double | operator() (std::uniform_real_distribution<> &d)=0 |
| virtual double | operator() (std::normal_distribution<> &d)=0 |
| virtual double | operator() (std::lognormal_distribution<> &d)=0 |
| virtual unsigned long | operator() (std::binomial_distribution< unsigned long > &d)=0 |
| virtual double | operator() (std::gamma_distribution<> &d)=0 |
| virtual double | operator() (std::exponential_distribution<> &d)=0 |
| virtual unsigned long | operator() (std::discrete_distribution< unsigned long > &d)=0 |
| virtual unsigned long | operator() (std::poisson_distribution< unsigned long > &d)=0 |
| virtual unsigned long | operator() (std::uniform_int_distribution< unsigned long > &d, std::uniform_int_distribution< unsigned long >::param_type &p)=0 |
| Calls the provided distribution with the wrapped RNG engine, using provided distribution parameters. | |
| virtual double | operator() (std::uniform_real_distribution<> &d, std::uniform_real_distribution<>::param_type &p)=0 |
| virtual double | operator() (std::normal_distribution<> &d, std::normal_distribution<>::param_type &p)=0 |
| virtual double | operator() (std::lognormal_distribution<> &d, std::lognormal_distribution<>::param_type &p)=0 |
| virtual unsigned long | operator() (std::binomial_distribution< unsigned long > &d, std::binomial_distribution< unsigned long >::param_type &p)=0 |
| virtual double | operator() (std::gamma_distribution<> &d, std::gamma_distribution<>::param_type &p)=0 |
| virtual double | operator() (std::exponential_distribution<> &d, std::exponential_distribution<>::param_type &p)=0 |
| virtual unsigned long | operator() (std::discrete_distribution< unsigned long > &d, std::discrete_distribution< unsigned long >::param_type &p)=0 |
| virtual unsigned long | operator() (std::poisson_distribution< unsigned long > &d, std::poisson_distribution< unsigned long >::param_type &p)=0 |
| virtual double | drand ()=0 |
| Uses the wrapped RNG engine to draw a double from a uniform distribution in the range [0, 1). | |
| virtual unsigned long | ulrand (unsigned long N)=0 |
| Uses the wrapped RNG engine to draw an unsigned long from a uniform distribution in the range [0, N). | |
| virtual void | stable_sample (NodeCollection::const_iterator first, NodeCollection::const_iterator last, std::back_insert_iterator< std::vector< NodeIDTriple > > dest, size_t n)=0 |
| Wrap std::sample for selection from NodeCollection. | |
| virtual void | partial_shuffle (std::vector< size_t > &data, const size_t n)=0 |
| Select randomly shuffled elements from vector. | |
Base class for RNG engine wrappers.
|
inlinevirtual |
|
pure virtual |
Uses the wrapped RNG engine to draw a double from a uniform distribution in the range [0, 1).
Implemented in nest::RandomGenerator< RandomEngineT >.
Referenced by nest::RandomManager::check_rng_synchrony(), nest::ConnectionCreator::connect_to_target_(), nest::mip_generator::event_hook(), nest::poisson_generator_ps::event_hook(), nest::BernoulliBuilder::inner_connect_(), nest::gainfunction_erfc::operator()(), nest::gainfunction_ginzburg::operator()(), nest::bernoulli_synapse< targetidentifierT >::send(), nest::quantal_stp_synapse< targetidentifierT >::send(), nest::ThirdBernoulliWithPoolBuilder::third_connect(), nest::iaf_psc_exp::update(), nest::iaf_tum_2000::update(), nest::gif_psc_exp::update(), nest::gif_psc_exp_multisynapse::update(), nest::pp_psc_delta::update(), nest::UniformParameter::value(), and nest::ExponentialParameter::value().
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Calls the provided distribution with the wrapped RNG engine.
One operator per distribution must be defined.
| d | Distribution that will be called. |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Calls the provided distribution with the wrapped RNG engine, using provided distribution parameters.
One operator per distribution must be defined.
| d | Distribution that will be called. |
| p | Distribution parameters. |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
Implemented in nest::RandomGenerator< RandomEngineT >.
|
pure virtual |
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.
| data | Vector to be shuffled and possibly shortened. |
| n | Number of elements to select. |
Implemented in nest::RandomGenerator< RandomEngineT >.
Referenced by nest::SPManager::create_synapses(), nest::SPManager::delete_synapses_from_post(), and nest::SPManager::delete_synapses_from_pre().
|
pure virtual |
Wrap std::sample for selection from NodeCollection.
Inserts random stable sample without replacement of size n from range [first, last)into dest.
n == nc.size(), then dest will contain the original node collection (as an explicit vector). Implemented in nest::RandomGenerator< RandomEngineT >.
Referenced by nest::ThirdBernoulliWithPoolBuilder::third_connect().
|
pure virtual |
Uses the wrapped RNG engine to draw an unsigned long from a uniform distribution in the range [0, N).
| N | Maximum value that can be drawn. |
Implemented in nest::RandomGenerator< RandomEngineT >.
Referenced by nest::FixedOutDegreeBuilder::connect_(), nest::FixedTotalNumberBuilder::connect_(), nest::SymmetricBernoulliBuilder::connect_(), nest::ConnectionCreator::fixed_indegree_(), nest::FixedInDegreeBuilder::inner_connect_(), nest::ThirdBernoulliWithPoolBuilder::third_connect(), and nest::UniformIntParameter::value().