Modifying expressions
Nancy.Expressions allows to apply equivalences to (sub-parts of) expressions that may reduce their computational complexity. Equivalences can be either user-defined ones or well-known ones (already reported in literature and implemented in the library). Furthermore, the user can also replace parts of expressions by specifying which sub-expression needs to be substituted (replacing all occurences) or using its position (replace only one occurence).
Applying a simplification​
The following code cell constructs the DNC expression .
var f = Expressions.FromCurve(
curve: new Curve(<args>),
name: "f");
var g = Expressions.FromCurve(
curve: new Curve(<args>),
name: "g");
var f_sac = f.SubAdditiveClosure();
var conv = Expressions.Convolution(f_sac, g);
var deconv = Expressions.Deconvolution(conv, f_sac);
The expression