ns2 Network Simulator      C++ Class Hierarchy of version ns-snapshot-20040722
Home |  Source Code |  Manual |  FAQ |  Mailing List Archive |  Search |  Download | 

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

RNG Class Reference

#include <rng.h>

Inheritance diagram for RNG:

TclObject List of all members.

Public Types


Public Member Functions

 RNG (const char *name="")
 RNG (long seed)
void init ()
long seed ()
void set_seed (long seed)
long next ()
double next_double ()
 RNG (RNGSources source, int seed=1)
void set_seed (RNGSources source, int seed=1)
void reset_start_stream ()
void reset_start_substream ()
void reset_next_substream ()
void set_antithetic (bool a)
void increased_precis (bool incp)
void set_seed (const unsigned long seed[6])
void advance_state (long e, long c)
void get_state (unsigned long seed[6]) const
void write_state () const
void write_state_full () const
double rand_u01 ()
long rand_int (long i, long j)
int command (int argc, const char *const *argv)
int uniform_positive_int ()
double uniform_double ()
int random ()
double uniform ()
int uniform (int k)
double uniform (double r)
double uniform (double a, double b)
double exponential ()
double exponential (double r)
double pareto (double scale, double shape)
double paretoII (double scale, double shape)
double normal (double avg, double std)
double lognormal (double avg, double std)

Static Public Member Functions

RNG * defaultrng ()
void set_package_seed (const unsigned long seed[6])

Protected Member Functions

double U01 ()
double U01d ()

Protected Attributes

double Cg_ [6]
double Bg_ [6]
double Ig_ [6]
bool anti_
bool inc_prec_
char name_ [100]

Static Protected Attributes

double next_seed_ [6]
RNG * default_ = NULL

Member Enumeration Documentation

enum RNG::RNGSources

Enumeration values:

Constructor & Destructor Documentation

RNG::RNG const char *    name = ""

RNG::RNG long    seed

RNG::RNG RNGSources    source,
int    seed = 1

Member Function Documentation

void RNG::advance_state long    e,
long    c

int RNG::command int    argc,
const char *const *    argv

Reimplemented from TclObject.

RNG* RNG::defaultrng   [inline, static]

double RNG::exponential double    r [inline]

double RNG::exponential   [inline]

void RNG::get_state unsigned long    seed[6] const

void RNG::increased_precis bool    incp

void RNG::init  

double RNG::lognormal double    avg,
double    std

long RNG::next  

double RNG::next_double  

double RNG::normal double    avg,
double    std

double RNG::pareto double    scale,
double    shape

double RNG::paretoII double    scale,
double    shape

long RNG::rand_int long    i,
long    j

double RNG::rand_u01  

int RNG::random   [inline]

void RNG::reset_next_substream  

void RNG::reset_start_stream  

void RNG::reset_start_substream  

long RNG::seed  

void RNG::set_antithetic bool    a

void RNG::set_package_seed const unsigned long    seed[6] [static]

void RNG::set_seed const unsigned long    seed[6]

void RNG::set_seed RNGSources    source,
int    seed = 1

void RNG::set_seed long    seed

double RNG::U01   [protected]

double RNG::U01d   [protected]

double RNG::uniform double    a,
double    b

double RNG::uniform double    r [inline]

int RNG::uniform int    k [inline]

double RNG::uniform   [inline]

double RNG::uniform_double   [inline]

int RNG::uniform_positive_int   [inline]

void RNG::write_state   const

void RNG::write_state_full   const

Member Data Documentation

bool RNG::anti_ [protected]

double RNG::Bg_[6] [protected]

double RNG::Cg_[6] [protected]

RNG * RNG::default_ = NULL [static, protected]

double RNG::Ig_[6] [protected]

bool RNG::inc_prec_ [protected]

char RNG::name_[100] [protected]

Reimplemented from TclObject.

double RNG::next_seed_ [static, protected]

Initial value:

        12345.0, 12345.0, 12345.0, 12345.0, 12345.0, 12345.0 

The documentation for this class was generated from the following files:
This document is generated by doxygen.