Inheritance diagram for __gnu_cxx::subtractive_rng:
Public Member Functions | |
unsigned int | operator() (unsigned int __limit) |
Returns a number less than the argument. | |
void | _M_initialize (unsigned int __seed) |
subtractive_rng (unsigned int __seed) | |
Ctor allowing you to initialize the seed. | |
subtractive_rng () | |
Default ctor; initializes its state with some number you don't see. | |
Private Attributes | |
unsigned int | _M_table [55] |
size_t | _M_index1 |
size_t | _M_index2 |
subtractive_rng
class is documented on SGI's site. Note that this code assumes that int
is 32 bits.
Definition at line 350 of file ext/functional.
__gnu_cxx::subtractive_rng::subtractive_rng | ( | unsigned int | __seed | ) | [inline] |
Ctor allowing you to initialize the seed.
Definition at line 392 of file ext/functional.
References _M_initialize().
__gnu_cxx::subtractive_rng::subtractive_rng | ( | ) | [inline] |
Default ctor; initializes its state with some number you don't see.
Definition at line 396 of file ext/functional.
References _M_initialize().
void __gnu_cxx::subtractive_rng::_M_initialize | ( | unsigned int | __seed | ) | [inline] |
Definition at line 370 of file ext/functional.
References _M_index1, _M_index2, and _M_table.
Referenced by subtractive_rng().
unsigned int __gnu_cxx::subtractive_rng::operator() | ( | unsigned int | __limit | ) | [inline] |
size_t __gnu_cxx::subtractive_rng::_M_index1 [private] |
size_t __gnu_cxx::subtractive_rng::_M_index2 [private] |
unsigned int __gnu_cxx::subtractive_rng::_M_table[55] [private] |