SST/macro
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
RNG::Combo Class Reference

A random number generator combining several techniques by George Marsaglia (1999; internet posting). More...

#include <rng.h>

Inheritance diagram for RNG::Combo:
Inheritance graph
Collaboration diagram for RNG::Combo:
Collaboration graph

Public Member Functions

virtual std::string to_string () const
 
rngint_t value ()
 
 ~Combo ()
 
void vec_reseed (const std::vector< rngint_t > &seeds)
 
int nseed ()
 
- Public Member Functions inherited from RNG::UniformInteger
virtual ~UniformInteger ()
 
rngint_t value_in_range (rngint_t range)
 
virtual double realvalue (bool include_zero=true, bool include_one=true)
 Return a random value in the interval [0,1], (0,1], [0,1), or (0,1) More...
 
void reseed ()
 
void reseed (rngint_t)
 
void reseed (rngint_t, rngint_t)
 
void reseed (rngint_t, rngint_t, rngint_t)
 
void reseed (rngint_t, rngint_t, rngint_t, rngint_t)
 

Static Public Member Functions

static Comboconstruct ()
 
static Comboconstruct (const std::vector< rngint_t > &)
 

Protected Member Functions

 Combo ()
 

Private Attributes

SWBswb_
 
SimpleCombosimplecombo_
 

Detailed Description

A random number generator combining several techniques by George Marsaglia (1999; internet posting).

Here is an excerpt from the posting describing this generator: For the super cautious, (KISS+SWB) in an expression would provide a random 32-bit integer from a sequence with period > 27700, and would only add some 300 nanoseconds to the computing time for that expression.

Definition at line 494 of file rng.h.

Constructor & Destructor Documentation

RNG::Combo::~Combo ( )
RNG::Combo::Combo ( )
protected

Member Function Documentation

static Combo* RNG::Combo::construct ( )
static
static Combo* RNG::Combo::construct ( const std::vector< rngint_t > &  )
static
int RNG::Combo::nseed ( )
virtual

Implements RNG::UniformInteger.

virtual std::string RNG::Combo::to_string ( ) const
inlinevirtual

Definition at line 498 of file rng.h.

rngint_t RNG::Combo::value ( )
inlinevirtual

Implements RNG::UniformInteger.

Definition at line 509 of file rng.h.

References RNG::UniformInteger::nseed(), and RNG::UniformInteger::vec_reseed().

Here is the call graph for this function:

void RNG::Combo::vec_reseed ( const std::vector< rngint_t > &  seeds)
virtual

Implements RNG::UniformInteger.

Member Data Documentation

SimpleCombo* RNG::Combo::simplecombo_
private

Definition at line 525 of file rng.h.

SWB* RNG::Combo::swb_
private

Definition at line 524 of file rng.h.


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