21 ExpDist::ExpDist(
double maxDecimal, std::mt19937_64 &_generator) : generator(_generator) {
49 std::cout <<
"ERROR: Attempted to input random value of greater than 1 to the exponential " 50 <<
"distribution class's getValue() function. Input must be on [0,1] interval.\n";
56 return -std::log(1-rv)/lambda;
83 if ( maxVal > 1 || minVal > 1) {
85 std::cout <<
"ERROR: Passed min, or max, input value of greater than 1 to getValue()" 86 <<
" in expDist.cpp. Input must be in [0,1] interval.\n";
95 return -std::log(1-randVar)/lambda;
116 return -std::log(1-
maxInput)/lambda;
130 return 1.0 - std::exp(-lambda*output);
double getValue(double lambda, double rv)
double unifRandom(double, double)
double getMaxValue(double lambda)
double computeInput(double output, double lambda)
std::mt19937_64 & generator
ExpDist(double maxDecimal, std::mt19937_64 &_generator)