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


Public Member Functions | |
| virtual double | value () |
| ExponentialRandomVariable () | |
| ExponentialRandomVariable (double) | |
| double * | avgp () |
| virtual double | avg () |
| void | setavg (double d) |
| int | command (int argc, const char *const *argv) |
| int | seed (char *) |
Protected Attributes | |
| RNG * | rng_ |
Private Attributes | |
| double | avg_ |
|
|
Definition at line 108 of file ranvar.cc. References avg_.
00109 {
00110 bind("avg_", &avg_);
00111 }
|
|
|
Definition at line 113 of file ranvar.cc. References avg_.
00114 {
00115 avg_ = avg;
00116 }
|
|
|
Implements RandomVariable. Definition at line 67 of file ranvar.h. References avg_.
00067 { return avg_; };
|
|
|
Definition at line 66 of file ranvar.h. References avg_. Referenced by EXPOO_Traffic::EXPOO_Traffic().
00066 { return &avg_; };
|
|
||||||||||||
|
Reimplemented in EmpiricalRandomVariable. Definition at line 32 of file ranvar.cc. References RandomVariable::rng_, and RandomVariable::value(). 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 RandomVariable::rng_. Referenced by EXPOO_Traffic::command().
|
|
|
Definition at line 68 of file ranvar.h. References avg_. Referenced by EXPOO_Traffic::init().
00068 { avg_ = d; };
|
|
|
Implements RandomVariable. Definition at line 118 of file ranvar.cc. References avg_, RNG::exponential(), and RandomVariable::rng_. Referenced by EXPOO_Traffic::next_interval().
00119 {
00120 return(rng_->exponential(avg_));
00121 }
|
Here is the call graph for this function:

|
|
Definition at line 70 of file ranvar.h. Referenced by avg(), avgp(), ExponentialRandomVariable(), setavg(), and value(). |
|
1.3.3