Numworks Epsilon  1.4.1
Graphing Calculator Operating System
approximation_engine.h
Go to the documentation of this file.
1 #ifndef POINCARE_APPROXIMATION_ENGINE_H
2 #define POINCARE_APPROXIMATION_ENGINE_H
3 
4 #include <poincare/expression.h>
5 #include <poincare/complex.h>
6 #include <poincare/matrix.h>
7 
8 namespace Poincare {
9 
11 public:
12  template <typename T> using ComplexCompute = Complex<T>(*)(const Complex<T>, Expression::AngleUnit angleUnit);
13  template<typename T> static Expression * map(const Expression * expression, Context& context, Expression::AngleUnit angleUnit, ComplexCompute<T> compute);
14 
15  template <typename T> using ComplexAndComplexReduction = Complex<T>(*)(const Complex<T>, const Complex<T>);
16  template <typename T> using ComplexAndMatrixReduction = Matrix * (*)(const Complex<T> * c, const Matrix * m);
17  template <typename T> using MatrixAndComplexReduction = Matrix * (*)(const Matrix * m, const Complex<T> * c);
18  template <typename T> using MatrixAndMatrixReduction = Matrix * (*)(const Matrix * m, const Matrix * n);
19  template<typename T> static Expression * mapReduce(const Expression * expression, Context& context, Expression::AngleUnit angleUnit, ComplexAndComplexReduction<T> computeOnComplexes, ComplexAndMatrixReduction<T> computeOnComplexAndMatrix, MatrixAndComplexReduction<T> computeOnMatrixAndComplex, MatrixAndMatrixReduction<T> computeOnMatrices);
20 
21  template<typename T> static Matrix * elementWiseOnComplexAndComplexMatrix(const Complex<T> * c, const Matrix * n, ComplexAndComplexReduction<T> computeOnComplexes);
22  template<typename T> static Matrix * elementWiseOnComplexMatrices(const Matrix * m, const Matrix * n, ComplexAndComplexReduction<T> computeOnComplexes);
23 
24 };
25 
26 }
27 
28 #endif
Matrix *(*)(const Complex< T > *c, const Matrix *m) ComplexAndMatrixReduction
static Expression * mapReduce(const Expression *expression, Context &context, Expression::AngleUnit angleUnit, ComplexAndComplexReduction< T > computeOnComplexes, ComplexAndMatrixReduction< T > computeOnComplexAndMatrix, MatrixAndComplexReduction< T > computeOnMatrixAndComplex, MatrixAndMatrixReduction< T > computeOnMatrices)
static Matrix * elementWiseOnComplexAndComplexMatrix(const Complex< T > *c, const Matrix *n, ComplexAndComplexReduction< T > computeOnComplexes)
c(generic_all_nodes)
Matrix *(*)(const Matrix *m, const Complex< T > *c) MatrixAndComplexReduction
Complex< T >(*)(const Complex< T >, Expression::AngleUnit angleUnit) ComplexCompute
Matrix *(*)(const Matrix *m, const Matrix *n) MatrixAndMatrixReduction
static Matrix * elementWiseOnComplexMatrices(const Matrix *m, const Matrix *n, ComplexAndComplexReduction< T > computeOnComplexes)
static Expression * map(const Expression *expression, Context &context, Expression::AngleUnit angleUnit, ComplexCompute< T > compute)