public class PConstant extends AbstractPNode
pc| Constructor and Description |
|---|
PConstant(PolynomialCreator pc,
Object o) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
int |
intValue() |
PNodeI |
invert()
inverts node i.e.
|
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.
|
String |
toString()
Produces a string representation of the argument.
|
compareTopublic PConstant(PolynomialCreator pc, Object o)
public PNodeI negate() throws ParseException
PNodeInegate in interface PNodeInegate in class AbstractPNodeParseExceptionpublic PNodeI add(PNodeI c) throws ParseException
PNodeIadd in interface PNodeIadd in class AbstractPNodeParseExceptionpublic PNodeI sub(PNodeI c) throws ParseException
PNodeIsub in interface PNodeIsub in class AbstractPNodeParseExceptionpublic PNodeI mul(PNodeI c) throws ParseException
PNodeImul in interface PNodeImul in class AbstractPNodeParseExceptionpublic PNodeI div(PNodeI c) throws ParseException
PNodeIdiv in interface PNodeIdiv in class AbstractPNodeParseExceptionpublic PNodeI invert() throws ParseException
PNodeIinvert in interface PNodeIinvert in class AbstractPNodeParseExceptionpublic PNodeI pow(PNodeI c) throws ParseException
PNodeIpow in interface PNodeIpow in class AbstractPNodeParseExceptionpublic String toString()
PNodeIpublic boolean isZero()
PNodeIisZero in interface PNodeIisZero in class AbstractPNodepublic boolean isOne()
PNodeIisOne 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
PNodeIParseExceptionpublic int compareTo(PConstant c)
public boolean equals(PNodeI node)
PNodeIequals in interface PNodeIequals in class AbstractPNodeCopyright © 2018. All rights reserved.