3 #if MATRIX_EXACT_REDUCING 7 Expression * SimplificationEngine::map(Expression * e, Context & context,
Expression::AngleUnit angleUnit) {
9 Expression * op = e->editableOperand(0);
10 for (
int i = 0; i < op->numberOfOperands(); i++) {
11 Expression * entry = op->editableOperand(i);
12 Expression * eCopy = e->clone();
13 eCopy->replaceOperand(eCopy->editableOperand(0), entry,
true);
14 op->replaceOperand(entry, eCopy,
false);
15 eCopy->shallowReduce(context, angleUnit);
17 return e->replaceWith(op,
true)->shallowReduce(context, angleUnit);