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.
|
compareTo
public PConstant(PolynomialCreator pc, java.lang.Object o)
public PNodeI negate() throws ParseException
PNodeI
ParseException
public PNodeI add(PNodeI c) throws ParseException
PNodeI
add
in interface PNodeI
add
in class AbstractPNode
ParseException
public PNodeI sub(PNodeI c) throws ParseException
PNodeI
sub
in interface PNodeI
sub
in class AbstractPNode
ParseException
public PNodeI mul(PNodeI c) throws ParseException
PNodeI
mul
in interface PNodeI
mul
in class AbstractPNode
ParseException
public PNodeI div(PNodeI c) throws ParseException
PNodeI
div
in interface PNodeI
div
in class AbstractPNode
ParseException
public PNodeI invert() throws ParseException
PNodeI
invert
in interface PNodeI
invert
in class AbstractPNode
ParseException
public PNodeI pow(PNodeI c) throws ParseException
PNodeI
pow
in interface PNodeI
pow
in class AbstractPNode
ParseException
public java.lang.String toString()
PNodeI
public boolean isZero()
PNodeI
isZero
in interface PNodeI
isZero
in class AbstractPNode
public boolean isOne()
PNodeI
isOne
in interface PNodeI
isOne
in class AbstractPNode
public 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
ParseException
public Node toCompactNode() throws ParseException
PNodeI
ParseException
public int compareToPConstant(PConstant c)
public boolean equalsPNode(PNodeI node)
PNodeI
equalsPNode
in interface PNodeI
equalsPNode
in class AbstractPNode
public PNodeI expand()
PNodeI
public java.lang.Object getValue()
public void convertToPolyArray(java.lang.String var, java.util.Map<java.lang.Integer,PNodeI> polyArray) throws ParseException
PNodeI
var
- variable namepolyArray
- results added to this mapParseException
Copyright © 2018 Singular Systems http://www.singularsys.com/jep