public class PConstant extends AbstractPNode
pc| Constructor and Description |
|---|
PConstant(PolynomialCreator pc,
java.lang.Object o) |
| Modifier and Type | Method and Description |
|---|---|
PNodeI |
add(PNodeI c)
Adds a node to this one.
|
int |
compareToPConstant(PConstant c) |
void |
convertToPolyArray(java.lang.String var,
java.util.Map<java.lang.Integer,PNodeI> polyArray)
Internal method for extracting coefficients
|
PNodeI |
div(PNodeI c)
Divides this by the argument.
|
boolean |
equalsPNode(PNodeI node)
True is nodes represent the same parse trees
|
PNodeI |
expand()
complete expansion. (1+x)^2 --> 1+2*x+x^2
|
java.lang.Object |
getValue() |
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 |
toCompactNode()
Converts to a more efficient Jep representation.
|
Node |
toNode()
Converts the node to standard Jep format.
|
java.lang.String |
toString()
Produces a string representation of the argument.
|
compareTopublic PConstant(PolynomialCreator pc, java.lang.Object o)
public PNodeI negate() throws ParseException
PNodeIParseExceptionpublic 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 java.lang.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 Node toCompactNode() throws ParseException
PNodeIParseExceptionpublic int compareToPConstant(PConstant c)
public boolean equalsPNode(PNodeI node)
PNodeIequalsPNode in interface PNodeIequalsPNode in class AbstractPNodepublic PNodeI expand()
PNodeIpublic java.lang.Object getValue()
public void convertToPolyArray(java.lang.String var,
java.util.Map<java.lang.Integer,PNodeI> polyArray)
throws ParseException
PNodeIvar - variable namepolyArray - results added to this mapParseExceptionCopyright © 2018 Singular Systems http://www.singularsys.com/jep