STXXL  1.4-dev
 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.

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

Definition at line 48 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 50 of file rand.h.

Member Function Documentation

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

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

Definition at line 53 of file rand.h.

References stxxl::ran32State.

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

Returns a random number from [0, N)

Definition at line 59 of file rand.h.

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