public class NrtOp extends OpNode
m_base, m_children, m_exponent, m_factor, m_isEdited, m_parent, MULTOP, POWEROP, PRINT_ALL, PRINT_EXPONENT, PRINT_EXPONENT_SIGN, PRINT_EXPRESSION, PRINT_FACTOR, PRINT_PARENTHESES, PRINT_SIGN, REPLACEMENT_IDENTIFIER
m_numberClass
Constructor and Description |
---|
NrtOp(java.lang.Class entryClass) |
NrtOp(java.lang.Class entryClass,
int n) |
NrtOp(OpNode child,
int n) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculate()
Simply calls MNumber.power(1/n, child)
|
protected void |
calculateDouble()
Simply calls Math.pow(child,1/n).
|
OpNode |
getDerivative(java.lang.String variable)
Implements (a(x)^(1/n))' = (1/n) * a(x) ^ (1/n-1) * a'(x).
|
org.w3c.dom.Node |
getMathMLNode(org.w3c.dom.Document doc,
byte precision) |
int |
getMaxChildrenNr()
Returns the minimum number of arguments for this operation.
|
int |
getMinChildrenNr()
Returns the minimum number of arguments for this operation.
|
RelNode |
getMonotonicDecreasingRel(OpNode operand)
Returns the relation that must be satisfied, so that this node
with
operand as child represents a monotonously
falling operation |
RelNode |
getMonotonicIncreasingRel(OpNode operand)
Returns the relation that must be satisfied, so that this node
with
operand as child represents a monotonously
rising operation. |
int |
getN() |
RelNode |
getNodeDefinedRel(OpNode operand)
Returns the relation subtree for which this operation with
operand as child is defined. |
RelNode |
getZeroRel(OpNode operand)
Returns the relation for which this operation with
operand as
child is zero. |
protected java.lang.String |
nodeToContentMathML()
Returns the value of the expression represented by this node
(without factor and exponent) to content MathML.
|
java.lang.String |
nodeToString()
Returns the string representation for this node (without children).
|
void |
setN(int n) |
OpNode[] |
solveStepFor(java.lang.String identifier)
Inverts the algebraic operation represented by this node with respect to
the children containing the given identifier.
|
java.lang.String |
toString(int printFlags,
java.text.DecimalFormat format)
Returns the string representation with or without sign, depending on the
value of
printFlags . |
children, clone, compareTo, containedConstants, containedVariables, deepCopy, deriveNode, equals, equalWithoutFactor, equalWithoutFactorAndExponent, extractNode, getAllNodesOfType, getChildren, getChildrenDefinedRel, getChildrenWithVariableCount, getChildrenWithVariablesCount, getChildrenWithVariablesCount, getContainedConstants, getContainedVariables, getDefinedRel, getExponent, getExponentString, getFactor, getFactorString, getFirstChildOfType, getFirstDescendantOfType, getLeaves, getMathMLNode, getMaxAbsPowerOfVariable, getMaxPowerOfVariable, getMonotonicDecreasingRel, getMonotonicIncreasingRel, getParent, getPolynomialHolder, getRationalHolder, getResult, getResult, getResultDouble, getSign, getZeroRel, insertNode, insertNodes, isAffine, isCommutativeOperation, isEdited, isIrreducibleFor, isNeutralElementFor, isOfLesserPrecedenceThan, isPolynomial, isRational, leafEquals, multiplyExponent, multiplyFactor, needsParanthesises, negateExponent, negateFactor, nodeToOpML, parent, parenthesesNeeded, printFactorAndExponent, replace, replace, replaced, replaceWith, setChildren, setChildren, setExponent, setFactor, setFactor, setParent, setParent, simpleSolveStepFor, toContentMathML, toDebugString, toOpML, toString, toString, transferFactorAndExponent, writeFactorAndExponent
contains, extractNode, getDepth, getNumberClass, insertNode, isLeaf, replace, replaceByValue, replaceWith
public NrtOp(OpNode child, int n)
public NrtOp(java.lang.Class entryClass)
public NrtOp(java.lang.Class entryClass, int n)
public void setN(int n)
public int getN()
public int getMinChildrenNr()
OpNode
getMinChildrenNr
in class OpNode
public int getMaxChildrenNr()
OpNode
getMaxChildrenNr
in class OpNode
public java.lang.String nodeToString()
OpNode
nodeToString
in class OpNode
public java.lang.String toString(int printFlags, java.text.DecimalFormat format)
OpNode
printFlags
.protected java.lang.String nodeToContentMathML()
OpNode
nodeToContentMathML
in class OpNode
OpNode.toContentMathML()
protected void calculate()
protected void calculateDouble()
calculateDouble
in class OpNode
public RelNode getMonotonicDecreasingRel(OpNode operand)
OpNode
operand
as child represents a monotonously
falling operationgetMonotonicDecreasingRel
in class OpNode
public RelNode getMonotonicIncreasingRel(OpNode operand)
OpNode
operand
as child represents a monotonously
rising operation.getMonotonicIncreasingRel
in class OpNode
public RelNode getNodeDefinedRel(OpNode operand)
OpNode
operand
as child is defined. It does not consider the
exponent of this node, which is be checked in OpNode.getDefinedRel()
.getNodeDefinedRel
in class OpNode
public RelNode getZeroRel(OpNode operand)
OpNode
operand
as
child is zero.getZeroRel
in class OpNode
public OpNode[] solveStepFor(java.lang.String identifier)
OpNode
this
is a NumberOp or a VariableOp, or this node is not
invertible. Otherwise it returns the operations to apply to this node in
order to perform a solving step towards the separation of terms containing
identifier
.identifier
or an
irreducible expression of identifier
remains on the left hand side.solveStepFor
in class OpNode
public OpNode getDerivative(java.lang.String variable)
getDerivative
in class OpNode
public org.w3c.dom.Node getMathMLNode(org.w3c.dom.Document doc, byte precision)
getMathMLNode
in class OpNode
Further documentation and examples can be found under www.mathletfactory.de.