Beispiel #1
0
 static void MergeMonomial(Monomial leftMonomial, Monomial rightMonomial)
 {
     //Console.WriteLine($"{leftMonomial.Value} {leftMonomial.Action} {rightMonomial.Value} {rightMonomial.Action}");
     leftMonomial.Value  = operation[leftMonomial.Action].func(leftMonomial.Value, rightMonomial.Value);
     leftMonomial.Action = rightMonomial.Action;
 }
Beispiel #2
0
 static bool CanMergeMonomial(Monomial leftMonomial, Monomial rightMonomial)
 {
     return(GetPriority(leftMonomial.Action) >= GetPriority(rightMonomial.Action));
 }