org.lsmp.djep.groupJep
Class PolynomialVisitor
java.lang.Object
org.lsmp.djep.xjep.DoNothingVisitor
org.lsmp.djep.groupJep.PolynomialVisitor
- All Implemented Interfaces:
- ParserVisitor
public class PolynomialVisitor
- extends DoNothingVisitor
Constructs a polynomial from a JEP equation.
- Author:
- Rich Morris
Created on 05-Oct-2004
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolynomialVisitor
public PolynomialVisitor(JEP j)
calcPolynomial
public Polynomial calcPolynomial(Node node,
FreeGroup fg)
throws ParseException
- calculates a polynomial representing the node.
- Parameters:
node
- The top node of the expressionfg
- The group the polynomial is an element of.
- Returns:
- the polynomial representing the equation
- Throws:
ParseException
- if the node cannot be converted to a Polynomial
visit
public java.lang.Object visit(ASTFunNode node,
java.lang.Object data)
throws ParseException
- Specified by:
visit
in interface ParserVisitor
- Overrides:
visit
in class DoNothingVisitor
- Throws:
ParseException
visit
public java.lang.Object visit(ASTVarNode node,
java.lang.Object data)
throws ParseException
- Specified by:
visit
in interface ParserVisitor
- Overrides:
visit
in class DoNothingVisitor
- Throws:
ParseException
visit
public java.lang.Object visit(ASTConstant node,
java.lang.Object data)
throws ParseException
- Specified by:
visit
in interface ParserVisitor
- Overrides:
visit
in class DoNothingVisitor
- Throws:
ParseException
http://www.singularsys.com/jep Copyright © 2007 Singular Systems