STXXL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::random_number< UniformRGen > Struct Template Reference

Detailed Description

template<class UniformRGen = random_uniform_fast>
struct stxxl::random_number< UniformRGen >

Uniform [0, N) pseudo-random generator.

Examples:
examples/containers/stack2.cpp, and examples/containers/vector2.cpp.

Definition at line 247 of file rand.h.

+ Inheritance diagram for stxxl::random_number< UniformRGen >:

Public Types

typedef unsigned value_type
 

Public Member Functions

 random_number (unsigned seed=0)
 
value_type operator() (value_type N) const
 Returns a random number from [0, N) More...
 

Public Attributes

UniformRGen uniform
 

Member Typedef Documentation

template<class UniformRGen = random_uniform_fast>
typedef unsigned stxxl::random_number< UniformRGen >::value_type

Definition at line 249 of file rand.h.

Constructor & Destructor Documentation

template<class UniformRGen = random_uniform_fast>
stxxl::random_number< UniformRGen >::random_number ( unsigned  seed = 0)
inline

Definition at line 252 of file rand.h.

Member Function Documentation

template<class UniformRGen = random_uniform_fast>
value_type stxxl::random_number< UniformRGen >::operator() ( value_type  N) const
inline

Returns a random number from [0, N)

Definition at line 256 of file rand.h.

Member Data Documentation

template<class UniformRGen = random_uniform_fast>
UniformRGen stxxl::random_number< UniformRGen >::uniform

Definition at line 250 of file rand.h.


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