Numworks Epsilon  1.4.1
Graphing Calculator Operating System
product.h
Go to the documentation of this file.
1 #ifndef POINCARE_PRODUCT_H
2 #define POINCARE_PRODUCT_H
3 
4 #include <poincare/sequence.h>
5 
6 namespace Poincare {
7 
8 class Product : public Sequence {
9  using Sequence::Sequence;
10 public:
11  Type type() const override;
12  Expression * clone() const override;
13 private:
14  const char * name() const override;
15  int emptySequenceValue() const override;
16  ExpressionLayout * createSequenceLayoutWithArgumentLayouts(ExpressionLayout * subscriptLayout, ExpressionLayout * superscriptLayout, ExpressionLayout * argumentLayout) const override;
17  Expression * evaluateWithNextTerm(DoublePrecision p, Expression * a, Expression * b) const override {
18  return templatedApproximateWithNextTerm<double>(a, b);
19  }
20  Expression * evaluateWithNextTerm(SinglePrecision p, Expression * a, Expression * b) const override {
21  return templatedApproximateWithNextTerm<float>(a, b);
22  }
23  template<typename T> Expression * templatedApproximateWithNextTerm(Expression * a, Expression * b) const;
24 };
25 
26 }
27 
28 #endif
Definition: app.cpp:7
Type type() const override
Definition: product.cpp:12
Expression * clone() const override
Definition: product.cpp:16
friend class Sequence
Definition: expression.h:75