mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
The solutions of equations that need numerical approximations to be solved are now computed base on the undeveloped equation (instead of fully the expended one used to identify polynomials) This allow (x-10)^7=0 to yield x=10 as result (9.95 before) Change-Id: Ia8acbe57a9cfebf0b5016e9c896d21c8ddac7a64
33 lines
1.2 KiB
C++
33 lines
1.2 KiB
C++
#ifndef SOLVER_EQUATION_h
|
|
#define SOLVER_EQUATION_h
|
|
|
|
#include "../shared/expression_model_handle.h"
|
|
|
|
namespace Solver {
|
|
|
|
class Equation : public Shared::ExpressionModelHandle {
|
|
public:
|
|
Equation(Ion::Storage::Record record = Record()) : ExpressionModelHandle(record) {}
|
|
bool shouldBeClearedBeforeRemove() override {
|
|
return false;
|
|
}
|
|
Poincare::Expression standardForm(Poincare::Context * context, bool replaceFunctionsButNotSymbols, Poincare::ExpressionNode::ReductionTarget reductionTarget) const { return m_model.standardForm(this, context, replaceFunctionsButNotSymbols, reductionTarget); }
|
|
bool containsIComplex(Poincare::Context * context) const;
|
|
|
|
private:
|
|
class Model : public Shared::ExpressionModel {
|
|
public:
|
|
Poincare::Expression standardForm(const Ion::Storage::Record * record, Poincare::Context * context, bool replaceFunctionsButNotSymbols, Poincare::ExpressionNode::ReductionTarget reductionTarget) const;
|
|
private:
|
|
void * expressionAddress(const Ion::Storage::Record * record) const override;
|
|
size_t expressionSize(const Ion::Storage::Record * record) const override;
|
|
};
|
|
size_t metaDataSize() const override { return 0; }
|
|
const Shared::ExpressionModel * model() const override { return &m_model; }
|
|
Model m_model;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|