Files
Upsilon/apps/probability/calculation/calculation.h
Émilie Feral 761be1c8c7 [apps/probability] Comments to explain the 0.001 precision is proba
Change-Id: Id5618802f9a08967b2fa0d68b35ff2a4f0b5a116
2017-02-17 16:35:07 +01:00

31 lines
840 B
C++

#ifndef PROBABILITE_CALCULATION_H
#define PROBABILITE_CALCULATION_H
#include "../law/law.h"
namespace Probability {
class Calculation {
public:
Calculation();
virtual ~Calculation() {};
void setLaw(Law * law);
virtual int numberOfParameters() = 0;
virtual const char * legendForParameterAtIndex(int index) = 0;
virtual void setParameterAtIndex(float f, int index) = 0;
virtual float parameterAtIndex(int index) = 0;
virtual float lowerBound();
virtual float upperBound();
protected:
/* Parameters in probability application are rounded to 3 decimals. This is
* due to the limited precision of some calculation (e. g. standard normal
* cumulative distributive function or inverse). */
constexpr static float k_precision = 0.001f;
virtual void compute(int indexKnownElement) = 0;
Law * m_law;
};
}
#endif