1 | initial version |
The substitute command is a generic interface to the rewrite engine in Pynac/GiNaC. You can replace an arbitrary subexpression, also containing wildcards (see the documentation of the match()
method of symbolic expressions), with another expression.
Consider the case where a subexpression occurs in several places and you have a better formula or value for it derived from other sources. You can just replace the existing subexpression with the new formula using the substitute()
function.