mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 08:47:28 +01:00
Plots are still rendered in float but computations are now in double Change-Id: I7e0a38effb780861b1443ee92a097cd319de3bc8
24 lines
456 B
C++
24 lines
456 B
C++
#include "two_parameter_distribution.h"
|
|
#include <assert.h>
|
|
|
|
namespace Probability {
|
|
|
|
double TwoParameterDistribution::parameterValueAtIndex(int index) {
|
|
assert(index >= 0 && index < 2);
|
|
if (index == 0) {
|
|
return m_parameter1;
|
|
}
|
|
return m_parameter2;
|
|
}
|
|
|
|
void TwoParameterDistribution::setParameterAtIndex(float f, int index) {
|
|
assert(index >= 0 && index < 2);
|
|
if (index == 0) {
|
|
m_parameter1 = f;
|
|
} else {
|
|
m_parameter2 = f;
|
|
}
|
|
}
|
|
|
|
}
|