__gnu_cxx::subtractive_rng Class Reference
[SGIextensions]

Inheritance diagram for __gnu_cxx::subtractive_rng:

std::unary_function< _Arg, _Result > List of all members.

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

Detailed Description

The 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.


Constructor & Destructor Documentation

__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().


Member Function Documentation

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]

Returns a number less than the argument.

Definition at line 361 of file ext/functional.

References _M_index1, _M_index2, and _M_table.


Member Data Documentation

size_t __gnu_cxx::subtractive_rng::_M_index1 [private]

Definition at line 355 of file ext/functional.

Referenced by _M_initialize(), and operator()().

size_t __gnu_cxx::subtractive_rng::_M_index2 [private]

Definition at line 356 of file ext/functional.

Referenced by _M_initialize(), and operator()().

unsigned int __gnu_cxx::subtractive_rng::_M_table[55] [private]

Definition at line 354 of file ext/functional.

Referenced by _M_initialize(), and operator()().


The documentation for this class was generated from the following file:
Generated on Tue Feb 2 16:57:55 2010 for GNU C++ STL by  doxygen 1.4.7