public class Polynomial extends AbstractPNode
Monomial
s, but can be any AbstractPNode
. The order of the terms is specified by the total ordering.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.
|
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, pow
public PNodeI add(PNodeI node) throws ParseException
PNodeI
add
in interface PNodeI
add
in class AbstractPNode
ParseException
public PNodeI sub(PNodeI node) throws ParseException
PNodeI
sub
in interface PNodeI
sub
in class AbstractPNode
ParseException
public PNodeI add(Polynomial p) throws ParseException
ParseException
public PNodeI sub(Polynomial p) throws ParseException
ParseException
public PNodeI negate() throws ParseException
PNodeI
negate
in interface PNodeI
negate
in class AbstractPNode
ParseException
public PNodeI mul(PNodeI node) throws ParseException
PNodeI
mul
in interface PNodeI
mul
in class AbstractPNode
ParseException
public PNodeI div(PNodeI node) throws ParseException
PNodeI
div
in interface PNodeI
div
in class AbstractPNode
ParseException
public boolean equals(PNodeI node)
PNodeI
equals
in interface PNodeI
equals
in class AbstractPNode
public int compareTo(PNodeI node)
compareTo
in interface PNodeI
compareTo
in class AbstractPNode
public int compareTo(Polynomial p)
public String toString()
PNodeI
public Node toNode() throws ParseException
PNodeI
ParseException
public PNodeI expand() throws ParseException
PNodeI
ParseException
Jas4pp 1.5 © Java Analysis Studio for Particle Physics