public class PVariable extends AbstractPNode
pc
Constructor and Description |
---|
PVariable(PolynomialCreator pc,
Variable var) |
Modifier and Type | Method and Description |
---|---|
PNodeI |
add(PNodeI node)
Adds a node to this one.
|
int |
compareTo(PVariable vf)
this < arg ---> -1
this > arg ---> 1
|
void |
convertToPolyArray(java.lang.String var,
java.util.Map<java.lang.Integer,PNodeI> polyArray)
Internal method for extracting coefficients
|
boolean |
equalsIgnoreConstant(PNodeI node) |
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.String |
getName() |
Variable |
getVariable() |
PNodeI |
negate()
negates node i.e.
|
PNodeI |
sub(PNodeI node)
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, div, invert, isOne, isZero, mul, pow
public PVariable(PolynomialCreator pc, Variable var)
public boolean equalsPNode(PNodeI node)
PNodeI
equalsPNode
in interface PNodeI
equalsPNode
in class AbstractPNode
public PNodeI add(PNodeI node) throws ParseException
PNodeI
add
in interface PNodeI
add
in class AbstractPNode
ParseException
public PNodeI sub(PNodeI node) throws ParseException
PNodeI
sub
in interface PNodeI
sub
in class AbstractPNode
ParseException
public int compareTo(PVariable vf)
public java.lang.String toString()
PNodeI
public Node toNode() throws ParseException
PNodeI
ParseException
public Node toCompactNode() throws ParseException
PNodeI
ParseException
public PNodeI expand()
PNodeI
public Variable getVariable()
public java.lang.String getName()
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
public PNodeI negate() throws ParseException
PNodeI
ParseException
public boolean equalsIgnoreConstant(PNodeI node)
Copyright © 2018 Singular Systems http://www.singularsys.com/jep