Blame view

build3/apps/probability/law_curve_view.h 809 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
  #ifndef PROBABILITY_LAW_CURVE_VIEW_H
  #define PROBABILITY_LAW_CURVE_VIEW_H
  
  #include "../shared/curve_view.h"
  #include "../constant.h"
  #include "law/law.h"
  #include "calculation/calculation.h"
  #include <escher.h>
  #include <poincare.h>
  
  namespace Probability {
  
  class LawCurveView : public Shared::CurveView {
  public:
    LawCurveView(Law * law, Calculation * calculation);
    void reload() override;
    void drawRect(KDContext * ctx, KDRect rect) const override;
  protected:
    char * label(Axis axis, int index) const override;
  private:
    char m_labels[k_maxNumberOfXLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
    static float EvaluateAtAbscissa(float abscissa, void * model, void * context);
    Law * m_law;
    Calculation * m_calculation;
  };
  
  }
  
  #endif