#include <ranvar.h>
Inheritance diagram for RandomVariable:


Public Member Functions | |
| virtual double | value ()=0 |
| virtual double | avg ()=0 |
| int | command (int argc, const char *const *argv) |
| RandomVariable () | |
| int | seed (char *) |
Protected Attributes | |
| RNG * | rng_ |
|
|
Definition at line 27 of file ranvar.cc. References RNG::defaultrng(), and rng_.
00028 {
00029 rng_ = RNG::defaultrng();
00030 }
|
Here is the call graph for this function:

|
|
||||||||||||
|
Reimplemented in EmpiricalRandomVariable. Definition at line 32 of file ranvar.cc. Referenced by EmpiricalRandomVariable::command().
00033 {
00034 Tcl& tcl = Tcl::instance();
00035
00036 if (argc == 2) {
00037 if (strcmp(argv[1], "value") == 0) {
00038 tcl.resultf("%6e", value());
00039 return(TCL_OK);
00040 }
00041 }
00042 if (argc == 3) {
00043 if (strcmp(argv[1], "use-rng") == 0) {
00044 rng_ = (RNG*)TclObject::lookup(argv[2]);
00045 if (rng_ == 0) {
00046 tcl.resultf("no such RNG %s", argv[2]);
00047 return(TCL_ERROR);
00048 }
00049 return(TCL_OK);
00050 }
00051 }
00052 return(TclObject::command(argc, argv));
00053 }
|
Here is the call graph for this function:

|
|
Definition at line 60 of file ranvar.cc. References rng_. Referenced by EXPOO_Traffic::command().
|
|
|
|
Definition at line 41 of file ranvar.h. Referenced by command(), RandomVariable(), seed(), EmpiricalRandomVariable::value(), LogNormalRandomVariable::value(), NormalRandomVariable::value(), ParetoIIRandomVariable::value(), ParetoRandomVariable::value(), ExponentialRandomVariable::value(), and UniformRandomVariable::value(). |
1.3.3