AngouriMath

Navigation

← Back to list of members

Alternate​(System.​Int32)

 Method (no overloads)

Summary

Finds all alternative forms of an expression sorted by their complexity

Example

using System;
using static AngouriMath.MathS;

var (x, y, a) = Var("x", "y", "a");
var expr = x * y + y + x + x / y + a * (x + y);
foreach (var alt in expr.Alternate(level: 3))
    Console.WriteLine(alt);
a * y + (1 + a + 1 / y + y) * x + y
a * (x + y) + x + x * (y + 1 / y) + y
a * (x + y) + x + x * (1 / y + y) + y
x * y + y + x + x / y + a * (x + y)
a * (x + y) + x + x * y + x / y + y
(x + y) * a + x + x * y + x / y + y
a * (x + y) + x + x * 1 / y + x * y + y

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online