|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lsmp.djep.sjep.AbstractPNode
org.lsmp.djep.sjep.PConstant
public class PConstant
Represents a constant.
| Field Summary |
|---|
| Fields inherited from class org.lsmp.djep.sjep.AbstractPNode |
|---|
pc |
| Constructor Summary | |
|---|---|
PConstant(PolynomialCreator pc,
java.lang.Object o)
|
|
| Method Summary | |
|---|---|
PNodeI |
add(PNodeI c)
Adds a node to this one. |
int |
compareTo(PConstant c)
|
PNodeI |
div(PNodeI c)
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 |
int |
intValue()
|
PNodeI |
invert()
inverts node i.e. 1/x |
boolean |
isInfinity()
|
boolean |
isInteger()
|
boolean |
isMinusOne()
|
boolean |
isNan()
|
boolean |
isNegative()
|
boolean |
isOne()
True if node represents one |
boolean |
isPositive()
|
boolean |
isZero()
True if node represents zero |
PNodeI |
mul(PNodeI c)
Multiplies this by the argument. |
PNodeI |
negate()
negates node i.e. |
PNodeI |
pow(PNodeI c)
Raise this to the argument. |
PNodeI |
sub(PNodeI c)
Subtracts the argument from this. |
Node |
toNode()
Converts the node to standard JEP format. |
java.lang.String |
toString()
Produces a string representation of the argument. |
| Methods inherited from class org.lsmp.djep.sjep.AbstractPNode |
|---|
compareTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.lsmp.djep.sjep.PNodeI |
|---|
equals |
| Constructor Detail |
|---|
public PConstant(PolynomialCreator pc,
java.lang.Object o)
| Method Detail |
|---|
public PNodeI negate()
throws ParseException
PNodeI
negate in interface PNodeInegate in class AbstractPNodeParseException
public PNodeI add(PNodeI c)
throws ParseException
PNodeI
add in interface PNodeIadd in class AbstractPNodeParseException
public PNodeI sub(PNodeI c)
throws ParseException
PNodeI
sub in interface PNodeIsub in class AbstractPNodeParseException
public PNodeI mul(PNodeI c)
throws ParseException
PNodeI
mul in interface PNodeImul in class AbstractPNodeParseException
public PNodeI div(PNodeI c)
throws ParseException
PNodeI
div in interface PNodeIdiv in class AbstractPNodeParseException
public PNodeI invert()
throws ParseException
PNodeI
invert in interface PNodeIinvert in class AbstractPNodeParseException
public PNodeI pow(PNodeI c)
throws ParseException
PNodeI
pow in interface PNodeIpow in class AbstractPNodeParseExceptionpublic java.lang.String toString()
PNodeI
toString in interface PNodeItoString in class java.lang.Objectpublic boolean isZero()
PNodeI
isZero in interface PNodeIisZero in class AbstractPNodepublic boolean isOne()
PNodeI
isOne in interface PNodeIisOne in class AbstractPNodepublic boolean isMinusOne()
public boolean isInfinity()
public boolean isNan()
public boolean isPositive()
public boolean isNegative()
public boolean isInteger()
public int intValue()
public Node toNode()
throws ParseException
PNodeI
ParseExceptionpublic int compareTo(PConstant c)
public boolean equals(PNodeI node)
PNodeI
equals in interface PNodeIequals in class AbstractPNodepublic PNodeI expand()
PNodeI
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||