Blame view

build3/apps/probability/calculation/calculation.h 772 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  #ifndef PROBABILITE_CALCULATION_H
  #define PROBABILITE_CALCULATION_H
  
  #include "../law/law.h"
  
  namespace Probability {
  
  class Calculation {
  public:
    enum class Type : uint8_t{
      LeftIntegral,
      FiniteIntegral,
      RightIntegral,
      Discrete,
    };
    Calculation();
    virtual ~Calculation() = default;
    virtual Type type() = 0;
    void setLaw(Law * law);
    virtual int numberOfParameters() = 0;
    virtual int numberOfEditableParameters();
    virtual I18n::Message legendForParameterAtIndex(int index) = 0;
    virtual void setParameterAtIndex(double f, int index) = 0;
    virtual double parameterAtIndex(int index) = 0;
    virtual double lowerBound();
    virtual double upperBound();
  protected:
    virtual void compute(int indexKnownElement) = 0;
    Law * m_law;
  };
  
  }
  
  #endif