LCOV - code coverage report
Current view: top level - builds/DaniloBorquez/flex-net-sim/src - exp_variable.cpp (source / functions) Hit Total Coverage
Test: commit SHA1 Lines: 8 8 100.0 %
Date: 2025-08-25 21:30:02 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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