public class Polynomial extends AbstractPNode
Monomials, but can be any AbstractPNode. The order of the terms is specified by the total ordering.pc| Modifier and Type | Method and Description |
|---|---|
PNodeI |
add(PNodeI node)
Adds a node to this one.
|
PNodeI |
add(Polynomial p) |
int |
compareTo(PNodeI node)
this < arg ---> -1
this > arg ---> 1
|
int |
compareTo(Polynomial p) |
PNodeI |
div(PNodeI node)
Divides this by the argument.
|
boolean |
equals(PNodeI node)
True is nodes represent the same parse trees
|
PNodeI |
expand()
complete expansion. (1+x)^2 --> 1+2*x+x^2
|
PNodeI |
mul(PNodeI node)
Multiplies this by the argument.
|
PNodeI |
negate()
negates node i.e.
|
PNodeI |
sub(PNodeI node)
Subtracts the argument from this.
|
PNodeI |
sub(Polynomial p) |
Node |
toNode()
Converts the node to standard JEP format.
|
java.lang.String |
toString()
Produces a string representation of the argument.
|
invert, isOne, isZero, powpublic PNodeI add(PNodeI node) throws ParseException
PNodeIadd in interface PNodeIadd in class AbstractPNodeParseExceptionpublic PNodeI sub(PNodeI node) throws ParseException
PNodeIsub in interface PNodeIsub in class AbstractPNodeParseExceptionpublic PNodeI add(Polynomial p) throws ParseException
ParseExceptionpublic PNodeI sub(Polynomial p) throws ParseException
ParseExceptionpublic PNodeI negate() throws ParseException
PNodeInegate in interface PNodeInegate in class AbstractPNodeParseExceptionpublic PNodeI mul(PNodeI node) throws ParseException
PNodeImul in interface PNodeImul in class AbstractPNodeParseExceptionpublic PNodeI div(PNodeI node) throws ParseException
PNodeIdiv in interface PNodeIdiv in class AbstractPNodeParseExceptionpublic boolean equals(PNodeI node)
PNodeIequals in interface PNodeIequals in class AbstractPNodepublic int compareTo(PNodeI node)
compareTo in interface PNodeIcompareTo in class AbstractPNodepublic int compareTo(Polynomial p)
public java.lang.String toString()
PNodeIpublic Node toNode() throws ParseException
PNodeIParseExceptionpublic PNodeI expand() throws ParseException
PNodeIParseExceptionhttp://www.singularsys.com/jep Copyright © 2007 Singular Systems