[poincare/n_ary_expression] Add TODO about mergeSameTypeChildrenInPlace

This commit is contained in:
Ruben Dashyan
2020-03-24 15:39:35 +01:00
committed by Émilie Feral
parent 965e3b1d9a
commit f224ac31e3
2 changed files with 8 additions and 2 deletions

View File

@@ -143,7 +143,10 @@ Expression Addition::shallowReduce(ExpressionNode::ReductionContext reductionCon
}
/* Step 1: Addition is associative, so let's start by merging children which
* are additions. */
* are additions.
* TODO If the parent Expression is an Addition, one should perhaps
* return now and let the parent do the reduction.
*/
mergeSameTypeChildrenInPlace();
const int childrenCount = numberOfChildren();

View File

@@ -504,7 +504,10 @@ Expression Multiplication::privateShallowReduce(ExpressionNode::ReductionContext
}
/* Step 1: MultiplicationNode is associative, so let's start by merging children
* which also are multiplications themselves. */
* which also are multiplications themselves.
* TODO If the parent Expression is a Multiplication, one should perhaps
* return now and let the parent do the reduction.
*/
mergeSameTypeChildrenInPlace();
Context * context = reductionContext.context();