Numworks Epsilon  1.4.1
Graphing Calculator Operating System
simplification_root.h
Go to the documentation of this file.
1 #ifndef POINCARE_SIMPLIFICATION_ROOT_H
2 #define POINCARE_SIMPLIFICATION_ROOT_H
3 
5 
6 namespace Poincare {
7 
9 public:
11  e->setParent(this);
12  }
14  if (m_operands[0] != nullptr) {
16  }
17  /* We don't want to clone the expression provided at construction.
18  * So we don't want it to be deleted when we're destroyed (parent destructor). */
19  }
20  Expression * clone() const override { return nullptr; }
21  int polynomialDegree(char symbolName) const override { return -1; }
22  Type type() const override { return Expression::Type::SimplificationRoot; }
23  ExpressionLayout * privateCreateLayout(PrintFloat::Mode floatDisplayMode, ComplexFormat complexFormat) const override {
24  return nullptr;
25  }
26  int writeTextInBuffer(char * buffer, int bufferSize, int numberOfSignificantDigits = PrintFloat::k_numberOfStoredSignificantDigits) const override { return 0; }
27  Expression * privateApproximate(SinglePrecision p, Context& context, AngleUnit angleUnit) const override {
28  assert(false);
29  return nullptr;
30  }
31  Expression * privateApproximate(DoublePrecision p, Context& context, AngleUnit angleUnit) const override {
32  assert(false);
33  return nullptr;
34  }
35 private:
36  Expression * shallowReduce(Context & context, AngleUnit angleUnit) override { return this; }
37 };
38 
39 }
40 
41 #endif
#define assert(e)
Definition: assert.h:9
Expression * privateApproximate(SinglePrecision p, Context &context, AngleUnit angleUnit) const override
ExpressionLayout * privateCreateLayout(PrintFloat::Mode floatDisplayMode, ComplexFormat complexFormat) const override
Expression * clone() const override
Expression * privateApproximate(DoublePrecision p, Context &context, AngleUnit angleUnit) const override
const Expression * m_operands[T]
#define false
Definition: stdbool.h:9
void setParent(Expression *parent)
Definition: expression.h:186
void detachOperand(const Expression *e)
Definition: expression.cpp:115
int polynomialDegree(char symbolName) const override
const Expression * operand(int i) const
Definition: expression.cpp:78
int writeTextInBuffer(char *buffer, int bufferSize, int numberOfSignificantDigits=PrintFloat::k_numberOfStoredSignificantDigits) const override