public class PolynomialVisitor extends DoNothingVisitor
Constructor and Description |
---|
PolynomialVisitor(JEP j) |
Modifier and Type | Method and Description |
---|---|
Polynomial |
calcPolynomial(Node node,
FreeGroup fg)
calculates a polynomial representing the node.
|
Object |
visit(ASTConstant node,
Object data) |
Object |
visit(ASTFunNode node,
Object data) |
Object |
visit(ASTVarNode node,
Object data) |
visit, visit
public PolynomialVisitor(JEP j)
public Polynomial calcPolynomial(Node node, FreeGroup fg) throws ParseException
node
- The top node of the expressionfg
- The group the polynomial is an element of.ParseException
- if the node cannot be converted to a Polynomialpublic Object visit(ASTFunNode node, Object data) throws ParseException
visit
in interface ParserVisitor
visit
in class DoNothingVisitor
ParseException
public Object visit(ASTVarNode node, Object data) throws ParseException
visit
in interface ParserVisitor
visit
in class DoNothingVisitor
ParseException
public Object visit(ASTConstant node, Object data) throws ParseException
visit
in interface ParserVisitor
visit
in class DoNothingVisitor
ParseException
Jas4pp 1.5 © Java Analysis Studio for Particle Physics