AngouriMath
Complexity
Property
Example
using System;
using static AngouriMath.MathS;
var (x, y) = Var("x", "y");
var expr1 = x;
Console.WriteLine($"{expr1}: {expr1.Complexity}");
var expr2 = x * 2;
Console.WriteLine($"{expr2}: {expr2.Complexity}");
var expr3 = Sin(x);
Console.WriteLine($"{expr3}: {expr3.Complexity}");
var expr4 = Sin(x) + Cos(x + 2);
Console.WriteLine($"{expr4}: {expr4.Complexity}");
Prints
x: 1
x * 2: 3
sin(x): 2
sin(x) + cos(x + 2): 7
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online