| LCOV - code coverage report | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Line data Source code 1 : #include "exp_variable.hpp" 2 : 3 56 : ExpVariable::ExpVariable(void) : RandomVariable() {} 4 : 5 38 : ExpVariable::ExpVariable(unsigned int seed, double parameter1) 6 38 : : RandomVariable(seed, parameter1) { 7 38 : if (parameter1 <= 0) { 8 3 : throw std::runtime_error("Lambda parameter must be positive."); 9 : } 10 35 : } 11 : 12 6106543 : double ExpVariable::getNextValue() { 13 6106543 : return (-log(1 - dist(this->generator)) / this->parameter1); 14 : } |
| Generated by: LCOV version 1.13 |