mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/probability] Forbid impossible value in parameters and calculation
parameters Change-Id: I47aae775dc031d5b78d6995ca63f49d537848cb1
This commit is contained in:
committed by
Romain Goyet
parent
f636974c0f
commit
9b2bc019e4
@@ -7,8 +7,14 @@ namespace Probability {
|
||||
|
||||
class Calculation {
|
||||
public:
|
||||
enum class Type : uint8_t{
|
||||
LeftIntegral,
|
||||
RightIntegral,
|
||||
FiniteIntegral
|
||||
};
|
||||
Calculation();
|
||||
virtual ~Calculation() {};
|
||||
virtual Type type() = 0;
|
||||
void setLaw(Law * law);
|
||||
virtual int numberOfParameters() = 0;
|
||||
virtual const char * legendForParameterAtIndex(int index) = 0;
|
||||
|
||||
@@ -14,6 +14,10 @@ FiniteIntegralCalculation::FiniteIntegralCalculation() :
|
||||
compute(0);
|
||||
}
|
||||
|
||||
Calculation::Type FiniteIntegralCalculation::type() {
|
||||
return Type::FiniteIntegral;
|
||||
}
|
||||
|
||||
int FiniteIntegralCalculation::numberOfParameters() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ class FiniteIntegralCalculation : public Calculation {
|
||||
public:
|
||||
FiniteIntegralCalculation();
|
||||
~FiniteIntegralCalculation() override {};
|
||||
Type type() override;
|
||||
int numberOfParameters() override;
|
||||
const char * legendForParameterAtIndex(int index) override;
|
||||
void setParameterAtIndex(float f, int index) override;
|
||||
|
||||
@@ -13,6 +13,10 @@ LeftIntegralCalculation::LeftIntegralCalculation() :
|
||||
compute(0);
|
||||
}
|
||||
|
||||
Calculation::Type LeftIntegralCalculation::type() {
|
||||
return Type::LeftIntegral;
|
||||
}
|
||||
|
||||
int LeftIntegralCalculation::numberOfParameters() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ class LeftIntegralCalculation : public Calculation {
|
||||
public:
|
||||
LeftIntegralCalculation();
|
||||
~LeftIntegralCalculation() override {};
|
||||
Type type() override;
|
||||
int numberOfParameters() override;
|
||||
const char * legendForParameterAtIndex(int index) override;
|
||||
void setParameterAtIndex(float f, int index) override;
|
||||
|
||||
@@ -13,6 +13,10 @@ RightIntegralCalculation::RightIntegralCalculation() :
|
||||
compute(0);
|
||||
}
|
||||
|
||||
Calculation::Type RightIntegralCalculation::type() {
|
||||
return Type::RightIntegral;
|
||||
}
|
||||
|
||||
int RightIntegralCalculation::numberOfParameters() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ class RightIntegralCalculation : public Calculation {
|
||||
public:
|
||||
RightIntegralCalculation();
|
||||
~RightIntegralCalculation() override {};
|
||||
Type type() override;
|
||||
int numberOfParameters() override;
|
||||
const char * legendForParameterAtIndex(int index) override;
|
||||
void setParameterAtIndex(float f, int index) override;
|
||||
|
||||
Reference in New Issue
Block a user