20 for (
int i = 0; i < input->numberOfOperands(); i++) {
23 operands[i] =
new Complex<T>(compute(*
c, angleUnit));
40 intermediateResult =
new Complex<T>(computeOnComplexes(*
c, *d));
44 const Matrix * n =
static_cast<const Matrix *
>(nextOperandEvaluation);
45 intermediateResult = computeOnComplexAndMatrix(
c, n);
50 intermediateResult = computeOnMatrixAndComplex(m, d);
55 const Matrix * n =
static_cast<const Matrix *
>(nextOperandEvaluation);
56 intermediateResult = computeOnMatrices(m, n);
59 delete nextOperandEvaluation;
60 result = intermediateResult;
61 if (result ==
nullptr) {
72 operands[i] =
new Complex<T>(computeOnComplexes(*d, *
c));
87 operands[i] =
new Complex<T>(computeOnComplexes(*
c, *d));
int numberOfColumns() const
Expression * approximate(Context &context, AngleUnit angleUnit=AngleUnit::Default) const
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)
virtual int numberOfOperands() const =0
Matrix *(*)(const Matrix *m, const Complex< T > *c) MatrixAndComplexReduction
constexpr uint8_t numberOfColumns
static Complex< T > Float(T x)
Complex< T >(*)(const Complex< T >, Expression::AngleUnit angleUnit) ComplexCompute
Matrix *(*)(const Matrix *m, const Matrix *n) MatrixAndMatrixReduction
constexpr uint8_t numberOfRows
int numberOfOperands() const override
const Expression * operand(int i) const
virtual Type type() const =0
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)