AngouriMath

Navigation

Transformation


← Back to list of classes

Description

Summary

A named mathematical operation that consumes an Entity and produces
one, together with enough about itself — what it claims, how well justified the
claim is — to be inspected and composed rather than only invoked.

Remarks

This is the layer the 1.x entry points sit on:
Simplify(System.Int32), Expand(System.Int32) and
Factorize(System.Int32) are adapters over the transformations named
below, and the algorithms underneath are unchanged. Callers who only want an answer
should keep using those methods; this type is for callers who want to know which
operation produced it, or to build an operation out of others.
Deterministic: the same transformation applied to the same expression under the same
Settings gives the same result. Composition is by explicit
ordering — there is no registry that decides what to run next, and nothing here
consults reflection, so the layer stays trimmable and AOT-publishable.
Experimental. The three concepts — a transformation, its relation, its
soundness tier — are meant to last; the catalogue of factories will grow and the
signatures here may still move. The stable surface is MathS and the
methods on Entity.

Example

using System;
using AngouriMath;
using AngouriMath.Core.Transformations;
            
Entity expr = "(x + 1) ^ 2";
var result = Transformation.Expansion.Apply(expr);
Console.WriteLine(result.Output);
Console.WriteLine(result.Relation);
Console.WriteLine(result.Soundness);

Prints
1 + 2 * x + x ^ 2
Equivalence
SoundUnderAssumptions

Members

























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