Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Math Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWRandGenR250

Module:  Essential Math   Group:  Statistics classes


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/randr250.h>
RWRandGenR250 gen;

Description

Class RWRandGenR250 generates random numbers uniformly distributed over the interval [0, 1], and may be used instead of class RWRandGenerator as a template parameter to any of the distribution generators derived from abstract base class RWTRand<>. RWRandGenR250 is a generalized feedback shift register generator.

Unlike class RWRandGenerator, each instance of RWRandGenR250 contains and maintains its own, independent state. This can make it easier to use in some situations. The "internal state" of an instance of RWRandGenR250 consists of a seed, an array of unsigned longs known as the "state vector" and an integer index into that state vector. (S. Kirkpatrick and E. Stoll, Journal of Computational Physics, 40, p. 517 (1981).

Public Constructors

RWRandGenR250();
RWRandGenR250(const RWRandGenR250& x);
RWRandGenR250(unsigned long seed);

Public Member Functions

unsigned 
long seed() const;
void 
restart();
void 
restart(unsigned long seed);

Public Member Operators

double 
operator()();
void 
operator=(const RWRandGenR250& x);
bool 
operator==(const RWRandGenR250& x) const;
bool 
operator!=(const RWRandGenR250& x) const;
vvoid 
printOn(std::ostream& s) const; 
void 
scanFrom(std::istream& s);
void 
restoreFrom(RWvistream&);
void 
restoreFrom(RWFile&);
void 
saveOn(RWvostream&) const;
void 
saveOn(RWFile&) const;

Related Global Operator

std::ostream& rwmathexport
operator<< (std::ostream& s, const RWRandGenR250& rgen);
std::istream& rwmathexport
operator>> (std::istream& s, RWRandGenR250& rgen);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.