[apps/proba] Fisher distribution authorized parameter values

This commit is contained in:
Léa Saviot
2020-01-14 11:09:35 +01:00
parent 8c801392a5
commit 0260e2ffb4
2 changed files with 2 additions and 2 deletions

View File

@@ -53,12 +53,11 @@ float FisherDistribution::evaluateAtAbscissa(float x) const {
bool FisherDistribution::authorizedValueAtIndex(float x, int index) const {
assert(index == 0 || index == 1);
return x > FLT_MIN; // TODO LEA Add max limit? See NormalDistribution
return x > FLT_MIN && x <= k_maxParameter;
}
void FisherDistribution::setParameterAtIndex(float f, int index) {
TwoParameterDistribution::setParameterAtIndex(f, index);
// TODO LEA Adjust parameter if max definition ? See NormalDistribution
}
double FisherDistribution::cumulativeDistributiveFunctionAtAbscissa(double x) const {

View File

@@ -22,6 +22,7 @@ public:
double cumulativeDistributiveFunctionAtAbscissa(double x) const override;
double cumulativeDistributiveInverseForProbability(double * probability) override;
private:
constexpr static float k_maxParameter = 144.0f; // The display works badly for d1 = d2 > 144.
constexpr static float k_defaultMax = 3.0f;
float mode() const;
};