PROFASI  Version 1.5
Public Member Functions | List of all members
prf::Ran3nEngine Class Reference

Ran3nEngine is the default random number generator class for profasi. More...

#include <Ran3nEngine.hh>

Inheritance diagram for prf::Ran3nEngine:
Inheritance graph
[legend]

Public Member Functions

double shoot ()
 Generates a random number distributed uniformly between 0 and 1.
 
void ResetDefaultState (long seedd)
 Initialize with a given seed.
 
- Public Member Functions inherited from prf::RandomNumberBase
int createSeed (int inpseed)
 Generate a seed from process id, time ...
 
double shoot (double a, double b)
 As above, but between a and b.
 
double shoot (double width)
 Between 0 and width.
 
int shootBit ()
 Create a random bit, 0 or 1 with equal probabilities.
 
virtual void WriteTo (FILE *cnfil)
 Write to a file.
 
virtual void ReadFrom (FILE *cnfil)
 Read in the state of the generator from a file.
 
virtual void WriteTo_text (FILE *cnfil)
 Write to a file in text form.
 
virtual void ReadFrom_text (FILE *cnfil)
 Read in the state of the generator from a file in text form.
 
virtual void RandomizeState (int irnk=0)
 Randomize State based on a given "rank".
 
virtual void retrace (std::string sttfile="")
 Retrace history.
 
void set_seed_and_ncalls (long sd, unsigned long ncl)
 Set seed and num_calls (to later call retrace)
 
unsigned long num_calls ()
 Retrieve number of calls.
 
virtual void setSeed (long i)
 Sets seed and Initializes with it.
 
long Seed () const
 Returns the seed.
 
virtual void saveState (std::string sttfile)
 Save complete state for faster recovery.
 
virtual int recoverState (std::string sttfile)
 Recover complete state from file.
 

Detailed Description

Ran3nEngine inherits from RandomNumberBase and implements a method given in Numerical Recipes in C. It overrides the shoot() function which

Returns
a random number between 0 and 1.

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

PROFASI: Protein Folding and Aggregation Simulator, Version 1.5
© (2005-2016) Anders Irbäck and Sandipan Mohanty
Documentation generated on Mon Jul 18 2016 using Doxygen version 1.8.2