Numworks Epsilon  1.4.1
Graphing Calculator Operating System
sequence.h
Go to the documentation of this file.
1 #ifndef POINCARE_SEQUENCE_H
2 #define POINCARE_SEQUENCE_H
3 
7 
8 namespace Poincare {
9 
10 class Sequence : public StaticHierarchy<3> {
12 private:
13  ExpressionLayout * privateCreateLayout(PrintFloat::Mode floatDisplayMode, ComplexFormat complexFormat) const override;
14  int writeTextInBuffer(char * buffer, int bufferSize, int numberOfSignificantDigits = PrintFloat::k_numberOfStoredSignificantDigits) const override {
15  return LayoutEngine::writePrefixExpressionTextInBuffer(this, buffer, bufferSize, numberOfSignificantDigits, name());
16  }
17  virtual ExpressionLayout * createSequenceLayoutWithArgumentLayouts(ExpressionLayout * subscriptLayout, ExpressionLayout * superscriptLayout, ExpressionLayout * argumentLayout) const = 0;
18  virtual const char * name() const = 0;
19  /* Evaluation */
20  Expression * privateApproximate(SinglePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedApproximate<float>(context, angleUnit); }
21  Expression * privateApproximate(DoublePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedApproximate<double>(context, angleUnit); }
22  template<typename T> Expression * templatedApproximate(Context& context, AngleUnit angleUnit) const;
23  virtual int emptySequenceValue() const = 0;
24  virtual Expression * evaluateWithNextTerm(SinglePrecision p, Expression * a, Expression * b) const = 0;
25  virtual Expression * evaluateWithNextTerm(DoublePrecision p, Expression * a, Expression * b) const = 0;
26 };
27 
28 }
29 
30 #endif
Definition: app.cpp:7
static int writePrefixExpressionTextInBuffer(const Expression *expression, char *buffer, int bufferSize, int numberOfDigits, const char *operatorName)