81 void seed_(
unsigned long);
87 static const long KK_;
88 static const long LL_;
89 static const long MM_;
90 static const long TT_;
99 const std::vector<long>::const_iterator
end_;
100 std::vector<long>::const_iterator
next_;
138 return ( x - y ) & (
MM_ - 1 );
static const double I2DFactor_
int to double factor
Definition: knuthlfg.h:92
void ran_start_(long seed)
initializes buffer
Definition: knuthlfg.cpp:84
static const long KK_
the long lag
Definition: knuthlfg.h:87
void self_test_()
Perform minimal self-test given by Knuth.
Definition: knuthlfg.cpp:114
const unsigned long seed
Definition: randomtest.cpp:52
static const long LL_
the short lag
Definition: knuthlfg.h:88
static const long MM_
the modulus
Definition: knuthlfg.h:89
void seed(const unsigned long)
set random seed to a new value
Definition: randomgen.cpp:58
std::vector< long > ran_x_
the generator state
Definition: knuthlfg.h:97
void seed_(unsigned long)
implements seeding for RandomGen
Definition: knuthlfg.h:121
static bool is_odd_(long)
Definition: knuthlfg.h:142
RngPtr clone(unsigned long s)
clone a random number generator of same type initialized with given seed
Definition: knuthlfg.h:74
static const long QUALITY_
number of RNGs to fill for each cycle
Definition: knuthlfg.h:91
const Name y("y")
Definition: topology_names.h:52
lockPTR< RandomGen > RngPtr
Common lock-pointer type for RNG.
Definition: randomgen.h:208
const std::vector< long >::const_iterator end_
marker past last to deliver
Definition: knuthlfg.h:99
Built-in implementation of Knuth's Lagged Fibonacci generator.
Definition: knuthlfg.h:66
static long mod_diff_(long, long)
subtraction module MM
Definition: knuthlfg.h:135
const Name x("x")
current scaling factor of the synaptic weight [0...1] (Tsodyks2_connection)
Definition: nest_names.h:356
void ran_array_(std::vector< long > &rbuff)
Generates numbers, refilling buffer.
Definition: knuthlfg.cpp:72
Abstract base class for all random generator objects.
Definition: randomgen.h:238
long ran_draw_()
deliver integer random number from ran_buffer_
Definition: knuthlfg.h:147
~KnuthLFG()
Definition: knuthlfg.h:72
std::vector< long >::const_iterator next_
next number to deliver
Definition: knuthlfg.h:100
static const long TT_
guaranteed separation between streams
Definition: knuthlfg.h:90
double drand_()
implements drawing a single [0,1) number for RandomGen
Definition: knuthlfg.h:128
KnuthLFG(unsigned long)
Create generator with given seed.
Definition: knuthlfg.cpp:62
std::vector< long > ran_buffer_
generated numbers, 0..KK-1 are shipped
Definition: knuthlfg.h:98