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)
Compares this expression to argument.
|
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.
|
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.
|
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)
PNodeIcompareTo in interface PNodeIcompareTo in class AbstractPNodepublic int compareTo(Polynomial p)
public String toString()
PNodeIpublic Node toNode() throws ParseException
PNodeIParseExceptionpublic PNodeI expand() throws ParseException
PNodeIParseExceptionCopyright © 2018. All rights reserved.