|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.lsmp.djep.sjep.AbstractPNode
public abstract class AbstractPNode
Default methods, when more specific methods do not work.
Field Summary | |
---|---|
protected PolynomialCreator |
pc
A reference to the PolynomialCreator instance. |
Constructor Summary | |
---|---|
AbstractPNode(PolynomialCreator pc)
|
Method Summary | |
---|---|
PNodeI |
add(PNodeI node)
Adds a node to this one. |
int |
compareTo(PNodeI node)
this < arg ---> -1 this > arg ---> 1 |
PNodeI |
div(PNodeI node)
Divides this by the argument. |
boolean |
equals(PNodeI node)
True is nodes represent the same parse trees |
PNodeI |
invert()
inverts node i.e. 1/x |
boolean |
isOne()
True if node represents one |
boolean |
isZero()
True if node represents zero |
PNodeI |
mul(PNodeI node)
Multiplies this by the argument. |
PNodeI |
negate()
negates node i.e. |
PNodeI |
pow(PNodeI node)
Raise this to the argument. |
PNodeI |
sub(PNodeI node)
Subtracts the argument from this. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.lsmp.djep.sjep.PNodeI |
---|
equals, expand, toNode, toString |
Field Detail |
---|
protected PolynomialCreator pc
Constructor Detail |
---|
public AbstractPNode(PolynomialCreator pc)
Method Detail |
---|
public PNodeI add(PNodeI node) throws ParseException
PNodeI
add
in interface PNodeI
ParseException
public PNodeI sub(PNodeI node) throws ParseException
PNodeI
sub
in interface PNodeI
ParseException
public PNodeI negate() throws ParseException
PNodeI
negate
in interface PNodeI
ParseException
public PNodeI mul(PNodeI node) throws ParseException
PNodeI
mul
in interface PNodeI
ParseException
public PNodeI div(PNodeI node) throws ParseException
PNodeI
div
in interface PNodeI
ParseException
public PNodeI invert() throws ParseException
PNodeI
invert
in interface PNodeI
ParseException
public PNodeI pow(PNodeI node) throws ParseException
PNodeI
pow
in interface PNodeI
ParseException
public boolean equals(PNodeI node)
PNodeI
equals
in interface PNodeI
public boolean isZero()
PNodeI
isZero
in interface PNodeI
public boolean isOne()
PNodeI
isOne
in interface PNodeI
public int compareTo(PNodeI node)
compareTo
in interface PNodeI
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |