mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 13:50:28 +01:00
[probability] ExponentialLaw: fix
cumulativeDistributiveFunctionAtAbscissa for value < 0
This commit is contained in:
@@ -47,6 +47,9 @@ bool ExponentialLaw::authorizedValueAtIndex(float x, int index) const {
|
||||
}
|
||||
|
||||
double ExponentialLaw::cumulativeDistributiveFunctionAtAbscissa(double x) const {
|
||||
if (x < 0.0) {
|
||||
return 0.0;
|
||||
}
|
||||
return 1.0 - std::exp((double)(-m_parameter1 * x));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user