If you want to manipulate IExpr objects in Symja the dedicated design pattern is the visitor.
IExpr
The visitor pattern is implemented in this package:
To simplify the manipulation of IExpr objects a pattern matching mechanism has been designed in the Matcher and Tester classes.
import static org.matheclipse.core.expression.F.*; import org.matheclipse.core.patternmatching.Matcher; Matcher matcher = new Matcher(); matcher.caseOf(Sin(x_), D(Sin(x), x)); // print Cos(y) System.out.println(matcher.apply(Sin(y)));
There was an error while loading. Please reload this page.