public class Monomial extends AbstractPNode
pc| Modifier and Type | Method and Description |
|---|---|
PNodeI |
add(PNodeI node)
Adds a node to this one.
|
int |
compareTo(PNodeI node)
Compare this to argument. x < y 2 x < 3 x x < x^2 x^2 < x^3 x
< x y TODO x y < x^2
|
void |
convertToPolyArray(java.lang.String var,
java.util.Map<java.lang.Integer,PNodeI> polyArray)
Internal method for extracting coefficients
|
PNodeI |
div(PNodeI node)
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
|
PConstant |
getCoeff() |
int |
getNVars() |
PNodeI |
getPower(int i)
Returns the i-th power
|
PNodeI |
getVar(int i)
Returns the i-th variable
|
PNodeI |
invert()
inverts node i.e. 1/x
|
PNodeI |
mul(PNodeI node)
Multiplies this by the argument.
|
PNodeI |
negate()
negates node i.e.
|
PNodeI |
pow(PNodeI pow)
Raise this to the argument.
|
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.
|
static PNodeI |
valueOf(PolynomialCreator pc,
PConstant c,
PNodeI v) |
static PNodeI |
valueOf(PolynomialCreator pc,
PConstant coefficient,
PNodeI[] terms,
PNodeI[] pows) |
static PNodeI |
valueOf(PolynomialCreator pc,
PConstant c,
PNodeI node,
PNodeI power) |
isOne, isZeropublic static PNodeI valueOf(PolynomialCreator pc, PConstant c, PNodeI v)
public static PNodeI valueOf(PolynomialCreator pc, PConstant c, PNodeI node, PNodeI power)
public static PNodeI valueOf(PolynomialCreator pc, PConstant coefficient, PNodeI[] terms, PNodeI[] pows)
public PNodeI mul(PNodeI node) throws ParseException
PNodeImul in interface PNodeImul in class AbstractPNodeParseExceptionpublic PNodeI div(PNodeI node) throws ParseException
PNodeIdiv in interface PNodeIdiv in class AbstractPNodeParseExceptionpublic PNodeI pow(PNodeI pow) throws ParseException
PNodeIpow in interface PNodeIpow in class AbstractPNodeParseExceptionpublic PNodeI negate() throws ParseException
PNodeIParseExceptionpublic PNodeI invert() throws ParseException
PNodeIinvert in interface PNodeIinvert in class AbstractPNodeParseExceptionpublic PNodeI add(PNodeI node) throws ParseException
PNodeIadd in interface PNodeIadd in class AbstractPNodeParseExceptionpublic PNodeI sub(PNodeI node) throws ParseException
PNodeIsub in interface PNodeIsub in class AbstractPNodeParseExceptionpublic boolean equalsPNode(PNodeI node)
PNodeIequalsPNode in interface PNodeIequalsPNode in class AbstractPNodepublic int compareTo(PNodeI node)
compareTo in interface PNodeIcompareTo in interface java.lang.Comparable<PNodeI>compareTo in class AbstractPNodepublic java.lang.String toString()
PNodeIpublic Node toNode() throws ParseException
PNodeIParseExceptionpublic Node toCompactNode() throws ParseException
PNodeIParseExceptionpublic PNodeI expand() throws ParseException
PNodeIParseExceptionpublic PConstant getCoeff()
public int getNVars()
public PNodeI getVar(int i)
i - public PNodeI getPower(int i)
i - 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