Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

RazorBack::Randombase_ Class Reference

Randombase_: random number generator abstract base class. More...

#include <Random.hh>

Inheritance diagram for RazorBack::Randombase_:

Inheritance graph
[legend]
List of all members.

Public Methods

 Randombase_ (int S1=0, int S2=0)
 Init with the seeds S1, S2. More...

virtual ~Randombase_ ()
 destructor.

void reset (int S1=0, int S2=0)
 reset(S1, S2): resets the generator with S1, S2. More...

virtual double operator() (void) const=0
 operator(): this call should return a random double in the derived classes.


Protected Methods

int int_rand (void) const
double dbl_rand (void) const

Private Attributes

int Seed1
int Seed2

Detailed Description

Randombase_: random number generator abstract base class.

Definition at line 22 of file Random.hh.


Constructor & Destructor Documentation

RazorBack::Randombase_::Randombase_ ( int S1 = 0,
int S2 = 0 ) [inline, explicit]
 

Init with the seeds S1, S2.

If S1==0 (default), then getpid() is used as seed. If S2==0 (default), then time(NULL) is used as seed.

Definition at line 37 of file Random.hh.

RazorBack::Randombase_::~Randombase_ ( ) [inline, virtual]
 

destructor.

Definition at line 43 of file Random.hh.


Member Function Documentation

void RazorBack::Randombase_::reset ( int S1 = 0,
int S2 = 0 )
 

reset(S1, S2): resets the generator with S1, S2.

If S1==0 (default), then getpid() is used as seed. If S2==0 (default), then time(NULL) is used as seed.

Referenced by Randombase_().

double RazorBack::Randombase_::operator() ( void ) const [pure virtual]
 

operator(): this call should return a random double in the derived classes.

Reimplemented in RazorBack::Randomuni_, and RazorBack::Randomnorm_.

int RazorBack::Randombase_::int_rand ( void ) const [protected]
 

double RazorBack::Randombase_::dbl_rand ( void ) const [protected]
 

Referenced by RazorBack::Randomuni_::operator()(), and RazorBack::Randomuni_::rnd_lim().


Member Data Documentation

int RazorBack::Randombase_::Seed1 [private]
 

Definition at line 27 of file Random.hh.

int RazorBack::Randombase_::Seed2 [private]
 

Definition at line 27 of file Random.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:18 2002 for The Razorback C++ Library: Statistics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001