|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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 PNodeIParseException
public PNodeI sub(PNodeI node)
throws ParseException
PNodeI
sub in interface PNodeIParseException
public PNodeI negate()
throws ParseException
PNodeI
negate in interface PNodeIParseException
public PNodeI mul(PNodeI node)
throws ParseException
PNodeI
mul in interface PNodeIParseException
public PNodeI div(PNodeI node)
throws ParseException
PNodeI
div in interface PNodeIParseException
public PNodeI invert()
throws ParseException
PNodeI
invert in interface PNodeIParseException
public PNodeI pow(PNodeI node)
throws ParseException
PNodeI
pow in interface PNodeIParseExceptionpublic boolean equals(PNodeI node)
PNodeI
equals in interface PNodeIpublic boolean isZero()
PNodeI
isZero in interface PNodeIpublic boolean isOne()
PNodeI
isOne in interface PNodeIpublic int compareTo(PNodeI node)
compareTo in interface PNodeI
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||