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

scv_random Class Reference

#include <scv_random.h>

Inheritance diagram for scv_random:

Inheritance graph
[legend]
Collaboration diagram for scv_random:

Collaboration graph
[legend]
List of all members.

Public Types

typedef unsigned int(* alg_func )(unsigned long long &next)
enum  value_generation_algorithm { RAND, RAND32, RAND48, CUSTOM }

Public Methods

 scv_random (const char *name=NULL)
 scv_random (unsigned long long seed)
 scv_random (const char *name, unsigned long long seed)
 scv_random (const scv_random &other, const char *name=NULL, unsigned long long seed=0)
virtual ~scv_random ()
unsigned int next (void)
void set_algorithm (value_generation_algorithm m=RAND48, alg_func algorithm=NULL)
unsigned long long get_initial_seed () const
unsigned long long get_current_seed () const
void set_current_seed (unsigned long long seed)
const char * kind () const
void print (ostream &o=scv_out, int details=0, int indent=0) const
void show (int details=0, int indent=0) const

Static Public Methods

void set_global_seed (unsigned long long=1)
unsigned long long get_global_seed (void)
unsigned long long pick_random_seed (unsigned long job_number=0)
void set_default_algorithm (value_generation_algorithm alg, alg_func customAlg=NULL)
void get_generators (list< scv_random * > &genList)
void print_initial_seeds (const char *fileName)
void print_initial_seeds (ostream &=scv_out)
void print_current_seeds (const char *fileName)
void print_current_seeds (ostream &=scv_out)
void seed_monitor_on (bool retrieve, const char *fileName)
void seed_monitor_on (bool retrieve, const char *monitorName, FILE *file)
void seed_monitor_off ()
int get_debug ()
void set_debug (int i)

Member Typedef Documentation

typedef unsigned int(* scv_random::alg_func)(unsigned long long& next)
 

Definition at line 81 of file scv_random.h.

Referenced by _scv_random_impl::_scv_random_impl().


Member Enumeration Documentation

enum scv_random::value_generation_algorithm
 

Enumeration values:
RAND 
RAND32 
RAND48 
CUSTOM 

Definition at line 74 of file scv_random.h.

Referenced by _scv_random_impl::_scv_random_impl().


Constructor & Destructor Documentation

scv_random::scv_random const char *    name = NULL
 

Definition at line 336 of file scv_random.cpp.

References _scv_data_structure::_name.

Referenced by set_global_seed().

scv_random::scv_random unsigned long long    seed
 

Definition at line 344 of file scv_random.cpp.

References _scv_data_structure::_name.

scv_random::scv_random const char *    name,
unsigned long long    seed
 

Definition at line 352 of file scv_random.cpp.

References _scv_data_structure::_name.

scv_random::scv_random const scv_random &    other,
const char *    name = NULL,
unsigned long long    seed = 0
 

Definition at line 360 of file scv_random.cpp.

References _scv_data_structure::_name.

scv_random::~scv_random   [virtual]
 

Definition at line 369 of file scv_random.cpp.


Member Function Documentation

unsigned long long scv_random::get_current_seed  
 

Definition at line 396 of file scv_random.cpp.

References _scv_random_impl::_alg_type, _scv_random_impl::_algorithm, RAND, RAND32, RAND48, and _scv_random_impl::u.

Referenced by print().

int scv_random::get_debug   [static]
 

Reimplemented from _scv_data_structure.

Definition at line 635 of file scv_random.cpp.

References _scv_random_impl::get_debug().

void scv_random::get_generators list< scv_random * > &    genList [static]
 

Definition at line 321 of file scv_random.cpp.

unsigned long long scv_random::get_global_seed void    [static]
 

Definition at line 304 of file scv_random.cpp.

Referenced by _scv_get_global_seed().

unsigned long long scv_random::get_initial_seed  
 

Definition at line 391 of file scv_random.cpp.

References _scv_random_impl::_seed.

const char * scv_random::kind   [virtual]
 

Reimplemented from _scv_data_structure.

Definition at line 639 of file scv_random.cpp.

unsigned int scv_random::next void   
 

Definition at line 379 of file scv_random.cpp.

References _scv_random_impl::next().

Referenced by scv_bag< pair< T, T > >::peekRandom().

unsigned long long scv_random::pick_random_seed unsigned long    job_number = 0 [static]
 

Definition at line 308 of file scv_random.cpp.

References _scv_default_global_init_seed().

void scv_random::print ostream &    o = scv_out,
int    details = 0,
int    indent = 0
const [virtual]
 

Reimplemented from _scv_data_structure.

Definition at line 644 of file scv_random.cpp.

References _scv_random_impl::_alg_type, _scv_random_impl::_seed, CUSTOM, get_current_seed(), _scv_data_structure::get_name(), RAND, RAND32, RAND48, strcpy(), and _scv_random_impl::testNext().

Referenced by show().

void scv_random::print_current_seeds ostream &    = scv_out [static]
 

Definition at line 512 of file scv_random.cpp.

References _scv_data_structure::get_name(), and s.

void scv_random::print_current_seeds const char *    fileName [static]
 

Definition at line 488 of file scv_random.cpp.

References _scv_data_structure::get_name(), and s.

void scv_random::print_initial_seeds ostream &    = scv_out [static]
 

Definition at line 472 of file scv_random.cpp.

References _scv_data_structure::get_name(), and s.

void scv_random::print_initial_seeds const char *    fileName [static]
 

Definition at line 449 of file scv_random.cpp.

References _scv_data_structure::get_name(), and s.

void scv_random::seed_monitor_off   [static]
 

Definition at line 603 of file scv_random.cpp.

References _scv_associative_array< Key, Data, container_type >::clear(), and scv_random_error::seed_not_exhausted().

Referenced by seed_monitor_on().

void scv_random::seed_monitor_on bool    retrieve,
const char *    monitorName,
FILE *    file
[static]
 

Definition at line 576 of file scv_random.cpp.

References file, scv_random_error::seed_monitor_not_off(), and seed_monitor_off().

void scv_random::seed_monitor_on bool    retrieve,
const char *    fileName
[static]
 

Definition at line 543 of file scv_random.cpp.

References scv_random_error::cannot_open_seed_file(), scv_random_error::seed_monitor_not_off(), and seed_monitor_off().

void scv_random::set_algorithm value_generation_algorithm    m = RAND48,
alg_func    algorithm = NULL
 

Definition at line 384 of file scv_random.cpp.

References _scv_random_impl::_alg_type, _scv_random_impl::_algorithm, and _scv_data_structure::get_name().

void scv_random::set_current_seed unsigned long long    seed
 

Definition at line 425 of file scv_random.cpp.

References _scv_random_impl::_alg_type, _scv_random_impl::_algorithm, RAND, RAND32, RAND48, and _scv_random_impl::u.

void scv_random::set_debug int    i [static]
 

Reimplemented from _scv_data_structure.

Definition at line 670 of file scv_random.cpp.

References _scv_random_impl::set_debug().

void scv_random::set_default_algorithm value_generation_algorithm    alg,
alg_func    customAlg = NULL
[static]
 

Definition at line 312 of file scv_random.cpp.

void scv_random::set_global_seed unsigned long    long = 1 [static]
 

Definition at line 286 of file scv_random.cpp.

References _scv_default_global_init_seed(), and scv_random().

Referenced by _scv_random_impl::_scv_random_impl().

void scv_random::show int    details = 0,
int    indent = 0
const [virtual]
 

Reimplemented from _scv_data_structure.

Definition at line 674 of file scv_random.cpp.

References print(), and scv_out.


The documentation for this class was generated from the following files:
Generated on Fri Jan 14 08:32:21 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18