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

RandomKernel1279 Class Reference

#include <abkrand.h>

Inheritance diagram for RandomKernel1279:

Inheritance graph
[legend]
Collaboration diagram for RandomKernel1279:

Collaboration graph
[legend]
List of all members.

Public Member Functions

unsigned getSeed () const
const char * getLocIdent () const
unsigned getCounter () const
const VerbositygetVerbosity () const

Static Public Member Functions

unsigned getExternalSeed ()

Static Public Attributes

const double randTick = 1/(0xffffffff + 1.0)
 author="Mike Oliver"


Protected Member Functions

 RandomKernel1279 (unsigned seed=UINT_MAX, Verbosity verb=Verbosity("silent"))
 RandomKernel1279 (const char *locIdent, unsigned counterOverride=UINT_MAX, Verbosity verb=Verbosity("silent"))
unsigned _getRawUnsigned ()
double _getRawDouble ()

Protected Attributes

unsigned * _preloads
unsigned _seed
Verbosity _verb

Constructor & Destructor Documentation

RandomKernel1279::RandomKernel1279 unsigned  seed = UINT_MAX,
Verbosity  verb = Verbosity("silent")
[protected]
 

RandomKernel1279::RandomKernel1279 const char *  locIdent,
unsigned  counterOverride = UINT_MAX,
Verbosity  verb = Verbosity("silent")
[protected]
 


Member Function Documentation

double Tausworthe::_getRawDouble  )  [inline, protected, inherited]
 

Definition at line 217 of file abkrand.h.

References Tausworthe::_getRawUnsigned(), and RandomRoot::randTick.

00217 {return randTick * _getRawUnsigned();}

Here is the call graph for this function:

unsigned Tausworthe::_getRawUnsigned  )  [inline, protected, inherited]
 

Definition at line 189 of file abkrand.h.

References Tausworthe::_buffer, Tausworthe::_bufferSize, Tausworthe::_cursor, and Tausworthe::_tauswortheQ.

Referenced by Tausworthe::_getRawDouble().

00190         {
00191                 //the function is the genuine "raw" engine for the RNG
00192                     {
00193                     unsigned retval;
00194                     int otherPoint = _cursor-_tauswortheQ;
00195                     if (otherPoint<0)
00196                         otherPoint += _bufferSize;
00197                 
00198                 #if defined(__SUNPRO_CC)
00199                 //|| defined(__GNUC__)
00200                     /* SUN compiler doesn't use "mutable" */
00201                     retval = const_cast<unsigned*>(_buffer)
00202                           [const_cast<Tausworthe*>(this)->_cursor] ^=
00203                         const_cast<unsigned*>(_buffer)[otherPoint];
00204                     if (++(const_cast<Tausworthe*>(this)->_cursor) >= _bufferSize)
00205                         const_cast<Tausworthe*>(this)->_cursor=0;
00206                 
00207                 #else
00208                     retval = _buffer[_cursor] ^= _buffer[otherPoint];
00209                     if (++_cursor >= _bufferSize)
00210                         _cursor=0;
00211                 #endif
00212                 
00213                     return retval;
00214                     }
00215                 
00216         }

unsigned RandomRoot::getCounter  )  const [inherited]
 

Definition at line 74 of file abkroot.cxx.

References SeedHandler::_counter, RandomRoot::_handler, SeedHandler::_isSeedMultipartite, and abkfatal.

Referenced by Tausworthe::_encryptBufMultipartiteSeed().

00075     {
00076     abkfatal(_handler._isSeedMultipartite,"Can't call getLocIdent() "
00077                                           "with old-style seed");
00078     return _handler._counter;
00079     }

unsigned RandomRoot::getExternalSeed  )  [static, inherited]
 

Definition at line 62 of file abkroot.cxx.

References SeedHandler::_externalSeed.

Referenced by Tausworthe::_encryptBufMultipartiteSeed().

00063     {
00064     return SeedHandler::_externalSeed;
00065     }

const char * RandomRoot::getLocIdent  )  const [inherited]
 

Definition at line 67 of file abkroot.cxx.

References RandomRoot::_handler, SeedHandler::_isSeedMultipartite, SeedHandler::_locIdent, and abkfatal.

Referenced by Tausworthe::_encryptBufMultipartiteSeed().

00068     {
00069     abkfatal(_handler._isSeedMultipartite,"Can't call getLocIdent() "
00070                                           "with old-style seed");
00071     return _handler._locIdent;
00072     }

unsigned RandomRoot::getSeed  )  const [inline, inherited]
 

Definition at line 122 of file abkrand.h.

References RandomRoot::_handler, SeedHandler::_isSeedMultipartite, RandomRoot::_seed, and abkfatal.

00123             {
00124             abkfatal(!_handler._isSeedMultipartite,"can't use getSeed() "
00125                        "with multipartite seed");
00126             return _seed;
00127             }

const Verbosity& RandomRoot::getVerbosity  )  const [inline, inherited]
 

Definition at line 133 of file abkrand.h.

References RandomRoot::_verb.

00133 {return _verb;}


Member Data Documentation

unsigned* Tausworthe::_preloads [protected, inherited]
 

Definition at line 218 of file abkrand.h.

Referenced by Tausworthe::_encryptBufMultipartiteSeed(), Tausworthe::_encryptBufWithSeed(), and Tausworthe::Tausworthe().

unsigned RandomRoot::_seed [protected, inherited]
 

Definition at line 105 of file abkrand.h.

Referenced by Tausworthe::_encryptWithSeed(), RandomRoot::getSeed(), and RandomRoot::RandomRoot().

Verbosity RandomRoot::_verb [protected, inherited]
 

Definition at line 106 of file abkrand.h.

Referenced by RandomRoot::getVerbosity(), and RandomRoot::RandomRoot().

const double RandomRoot::randTick = 1/(0xffffffff + 1.0) [static, inherited]
 

author="Mike Oliver"

Definition at line 48 of file abkroot.cxx.

Referenced by Tausworthe::_getRawDouble().


The documentation for this class was generated from the following file:
Generated on Mon Apr 25 01:15:21 2005 for Parquete by doxygen 1.3.2