libstdc++
__gnu_cxx::subtractive_rng Class Reference
Inheritance diagram for __gnu_cxx::subtractive_rng:
[legend]

Public Types

typedef unsigned int argument_type
 
typedef unsigned int result_type
 

Public Member Functions

 subtractive_rng ()
 
 subtractive_rng (unsigned int __seed)
 
void _M_initialize (unsigned int __seed)
 
unsigned int operator() (unsigned int __limit)
 

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 344 of file ext/functional.

Member Typedef Documentation

◆ argument_type

typedef unsigned int std::unary_function< unsigned int , unsigned int >::argument_type
inherited

argument_type is the type of the argument

Definition at line 120 of file stl_function.h.

◆ result_type

typedef unsigned int std::unary_function< unsigned int , unsigned int >::result_type
inherited

result_type is the return type

Definition at line 123 of file stl_function.h.

Constructor & Destructor Documentation

◆ subtractive_rng() [1/2]

__gnu_cxx::subtractive_rng::subtractive_rng ( unsigned int  __seed)
inline

Ctor allowing you to initialize the seed.

Definition at line 386 of file ext/functional.

◆ subtractive_rng() [2/2]

__gnu_cxx::subtractive_rng::subtractive_rng ( )
inline

Default ctor; initializes its state with some number you don't see.

Definition at line 390 of file ext/functional.

Member Function Documentation

◆ _M_initialize()

void __gnu_cxx::subtractive_rng::_M_initialize ( unsigned int  __seed)
inline

Definition at line 364 of file ext/functional.

◆ operator()()

unsigned int __gnu_cxx::subtractive_rng::operator() ( unsigned int  __limit)
inline

Returns a number less than the argument.

Definition at line 355 of file ext/functional.


The documentation for this class was generated from the following file: