STXXL  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::random_number32 Struct Reference

Detailed Description

Fast uniform [0, 2^32) pseudo-random generator with period 2^32, random bits: 32.

Warning
Uses a global state and is not reentrant or thread-safe!
Examples:
examples/containers/deque2.cpp, examples/containers/queue2.cpp, and examples/containers/sorter2.cpp.

Definition at line 46 of file rand.h.

Public Types

typedef unsigned value_type
 

Public Member Functions

value_type operator() () const
 Returns a random number from [0, 2^32) More...
 
value_type operator() (const value_type &N) const
 Returns a random number from [0, N) More...
 

Member Typedef Documentation

Definition at line 48 of file rand.h.

Member Function Documentation

value_type stxxl::random_number32::operator() ( ) const
inline

Returns a random number from [0, 2^32)

Definition at line 51 of file rand.h.

References stxxl::ran32State.

value_type stxxl::random_number32::operator() ( const value_type N) const
inline

Returns a random number from [0, N)

Definition at line 57 of file rand.h.


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