Numworks Epsilon  1.4.1
Graphing Calculator Operating System
permute_coefficient.h
Go to the documentation of this file.
1 #ifndef POINCARE_PERMUTE_COEFFICIENT_H
2 #define POINCARE_PERMUTE_COEFFICIENT_H
3 
6 #include <poincare/complex.h>
7 
8 namespace Poincare {
9 
12 public:
13  Type type() const override;
14  Expression * clone() const override;
15 private:
16  constexpr static int k_maxNValue = 100;
17  /* Layout */
18  ExpressionLayout * privateCreateLayout(PrintFloat::Mode floatDisplayMode, ComplexFormat complexFormat) const override {
19  return LayoutEngine::createPrefixLayout(this, floatDisplayMode, complexFormat, name());
20  }
21  int writeTextInBuffer(char * buffer, int bufferSize, int numberOfSignificantDigits = PrintFloat::k_numberOfStoredSignificantDigits) const override {
22  return LayoutEngine::writePrefixExpressionTextInBuffer(this, buffer, bufferSize, numberOfSignificantDigits, name());
23  }
24  const char * name() const { return "permute"; }
25  /* Simplification */
26  Expression * shallowReduce(Context& context, AngleUnit angleUnit) override;
27  /* Evaluation */
28  Expression * privateApproximate(SinglePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedApproximate<float>(context, angleUnit); }
29  Expression * privateApproximate(DoublePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedApproximate<double>(context, angleUnit); }
30  template<typename T> Complex<T> * templatedApproximate(Context& context, AngleUnit angleUnit) const;
31 };
32 
33 }
34 
35 #endif
36 
Expression * clone() const override
static ExpressionLayout * createPrefixLayout(const Expression *expression, PrintFloat::Mode floatDisplayMode, Expression::ComplexFormat complexFormat, const char *operatorName)
static int writePrefixExpressionTextInBuffer(const Expression *expression, char *buffer, int bufferSize, int numberOfDigits, const char *operatorName)