mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
30 lines
821 B
C++
30 lines
821 B
C++
#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/print_float.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
|