CoCoALib-0.9905 date: 23 May 2007

CoCoA::RandomBitStream Class Reference

#include <random.H>

Collaboration diagram for CoCoA::RandomBitStream:

Collaboration graph
List of all members.

Public Member Functions

 RandomBitStream (unsigned long seed=1)
bool operator * () const
RandomBitStreamoperator++ ()
RandomBitStream operator++ (int)
std::size_t myIndex () const
void myOutputSelf (std::ostream &out) const

Private Member Functions

void myFillBuffer ()

Private Attributes

long myBitMask
long myBuffer
std::size_t myCounter
const unsigned long mySeed
std::vector< char > myState

Static Private Attributes

static const std::size_t ourStateBytes = 64

Detailed Description

Definition at line 35 of file random.H.

Constructor & Destructor Documentation

CoCoA::RandomBitStream::RandomBitStream unsigned long  seed = 1  )  [explicit]

Member Function Documentation

bool CoCoA::RandomBitStream::operator *  )  const [inline]

Definition at line 64 of file random.H.

References myBitMask, and myBuffer.

RandomBitStream & CoCoA::RandomBitStream::operator++  )  [inline]

Definition at line 70 of file random.H.

References myBitMask, myCounter, and myFillBuffer().

RandomBitStream CoCoA::RandomBitStream::operator++ int   ) 

std::size_t CoCoA::RandomBitStream::myIndex  )  const

void CoCoA::RandomBitStream::myOutputSelf std::ostream &  out  )  const

void CoCoA::RandomBitStream::myFillBuffer  )  [private]

Referenced by operator++().

Member Data Documentation

const std::size_t CoCoA::RandomBitStream::ourStateBytes = 64 [static, private]

Definition at line 47 of file random.H.

long CoCoA::RandomBitStream::myBitMask [private]

Definition at line 50 of file random.H.

Referenced by operator *(), and operator++().

long CoCoA::RandomBitStream::myBuffer [private]

Definition at line 51 of file random.H.

Referenced by operator *().

std::size_t CoCoA::RandomBitStream::myCounter [private]

Definition at line 52 of file random.H.

Referenced by operator++().

const unsigned long CoCoA::RandomBitStream::mySeed [private]

Definition at line 53 of file random.H.

std::vector<char> CoCoA::RandomBitStream::myState [private]

Definition at line 54 of file random.H.

The documentation for this class was generated from the following file:
Generated on Wed May 23 13:44:42 2007 for CoCoALib by  doxygen 1.4.6