mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 11:39:58 +02:00
22 lines
523 B
C++
22 lines
523 B
C++
#ifndef REGRESSION_LINEAR_MODEL_H
|
|
#define REGRESSION_LINEAR_MODEL_H
|
|
|
|
#include "model.h"
|
|
#include <poincare/expression_layout.h>
|
|
|
|
namespace Regression {
|
|
|
|
class LinearModel : public Model {
|
|
public:
|
|
using Model::Model;
|
|
static Poincare::ExpressionLayout * Layout();
|
|
double evaluate(double * modelCoefficients, double x) const override;
|
|
double partialDerivate(double * modelCoefficients, int derivateCoefficientIndex, double x) const override;
|
|
double numberOfCoefficients() const override { return 2; }
|
|
};
|
|
|
|
}
|
|
|
|
|
|
#endif
|