| Modifier and Type | Method and Description |
|---|---|
Node |
DiffRulesI.differentiate(ASTFunNode node,
String var,
Node[] children,
Node[] dchildren,
DJep djep)
Returns the top node of of the derivative of this function
wrt to variable var.
|
Node |
DJep.differentiate(Node node,
String name)
Differentiate an equation with respect to a variable.
|
Node |
DifferentiationVisitor.differentiate(Node node,
String var,
DJep djep)
Differentiates an expression tree wrt a variable var.
|
PartialDerivative |
PartialDerivative.findDerivative(String dname,
DJep jep) |
Node |
Diff.process(Node node,
Node[] children,
XJep xjep)
Process the differentiation specified by node.
|
void |
Diff.run(Stack inStack)
Should never be evaluated!
|
Object |
DifferentiationVisitor.visit(ASTConstant node,
Object data)
Differentiates a constant.
|
Object |
DifferentiationVisitor.visit(ASTFunNode node,
Object data)
Applies differentiation to a function.
|
Object |
DPrintVisitor.visit(ASTVarNode node,
Object data)
Prints the variable or its equation.
|
Object |
DifferentiationVisitor.visit(ASTVarNode node,
Object data)
Differentiates a variable.
|
| Modifier and Type | Method and Description |
|---|---|
Node |
SubtractDiffRule.differentiate(ASTFunNode node,
String var,
Node[] children,
Node[] dchildren,
DJep djep) |
Node |
PowerDiffRule.differentiate(ASTFunNode node,
String var,
Node[] children,
Node[] dchildren,
DJep djep) |
Node |
PassThroughDiffRule.differentiate(ASTFunNode node,
String var,
Node[] children,
Node[] dchildren,
DJep djep) |
Node |
MultiplyDiffRule.differentiate(ASTFunNode node,
String var,
Node[] children,
Node[] dchildren,
DJep djep) |
Node |
DivideDiffRule.differentiate(ASTFunNode node,
String var,
Node[] children,
Node[] dchildren,
DJep djep) |
Node |
ChainRuleDiffRules.differentiate(ASTFunNode node,
String var,
Node[] children,
Node[] dchildren,
DJep djep)
Use the chain rule to differentiate.
|
Node |
AdditionDiffRule.differentiate(ASTFunNode node,
String var,
Node[] children,
Node[] dchildren,
DJep djep) |
| Constructor and Description |
|---|
MacroDiffRules(DJep djep,
String inName,
Node node)
Create a differention rule for function with 1 argument
|
MacroDiffRules(DJep djep,
String inName,
PostfixMathCommandI inPfmc,
String rule)
Create a differention rule for function with 1 argument
|
MacroDiffRules(DJep djep,
String inName,
PostfixMathCommandI inPfmc,
String[] inRules)
Create a differentation rule for function with n arguments.
|
MacroDiffRules(DJep djep,
String inName,
PostfixMathCommandI inPfmc,
String rule1,
String rule2)
Create a differention rule for function with 2 arguments.
|
MacroDiffRules(DJep djep,
String inName,
String rule)
Create a differention rule for function with 1 argument
|
MacroDiffRules(DJep djep,
String inName,
String[] inRules)
Create a differentation rule for function with n arguments.
|
MacroDiffRules(DJep djep,
String inName,
String rule1,
String rule2)
Create a differention rule for function with 2 arguments.
|
MacroFunctionDiffRules(DJep djep,
MacroFunction fun)
Calculates the rules for the given function.
|
| Modifier and Type | Method and Description |
|---|---|
Polynomial |
PolynomialVisitor.calcPolynomial(Node node,
FreeGroup fg)
calculates a polynomial representing the node.
|
Object |
PolynomialVisitor.visit(ASTConstant node,
Object data) |
Object |
PolynomialVisitor.visit(ASTFunNode node,
Object data) |
Object |
PolynomialVisitor.visit(ASTVarNode node,
Object data) |
| Modifier and Type | Method and Description |
|---|---|
Object |
GAdd.add(Object param1,
Object param2) |
Object |
GDivide.div(Object param1,
Object param2) |
Object |
GMod.mod(Object param1,
Object param2) |
Object |
GMultiply.mul(Object param1,
Object param2) |
Object |
GPower.pow(Object param1,
Object param2) |
void |
GUMinus.run(Stack stack)
Calculates the result of applying the "+" operator to the arguments from
the stack and pushes it back on the stack.
|
void |
GSubtract.run(Stack stack)
Calculates the result of applying the "+" operator to the arguments from
the stack and pushes it back on the stack.
|
void |
GPower.run(Stack stack)
Calculates the result of applying the "+" operator to the arguments from
the stack and pushes it back on the stack.
|
void |
GNot.run(Stack inStack) |
void |
GMultiply.run(Stack stack)
Calculates the result of applying the "*" operator to the arguments from
the stack and pushes it back on the stack.
|
void |
GMod.run(Stack stack)
Calculates the result of applying the "+" operator to the arguments from
the stack and pushes it back on the stack.
|
void |
GLogical.run(Stack inStack) |
void |
GList.run(Stack stack) |
void |
GDivide.run(Stack stack)
Calculates the result of applying the "/" operator to the arguments from
the stack and pushes it back on the stack.
|
void |
GComparative.run(Stack inStack) |
void |
GAdd.run(Stack stack)
Calculates the result of applying the "+" operator to the arguments from
the stack and pushes it back on the stack.
|
Object |
GSubtract.sub(Object param1,
Object param2) |
Object |
GUMinus.uminus(Object param1) |
| Modifier and Type | Method and Description |
|---|---|
MatrixValueI |
Rank.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
Inverse.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
Solve.calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs) |
void |
Solve.run(Stack s) |
void |
Rank.run(Stack s) |
void |
Inverse.run(Stack s) |
static Jama.Matrix |
JamaUtil.toJama(Matrix m) |
static Jama.Matrix |
JamaUtil.toJamaCol(MVector m) |
static Jama.Matrix |
JamaUtil.toJamaRow(MVector m) |
| Modifier and Type | Method and Description |
|---|---|
ASTConstant |
MatrixNodeFactory.buildConstantNode(Object value)
Creates an ASTConstant node with specified value.
|
ASTFunNode |
MatrixNodeFactory.buildFunctionNode(ASTFunNode node,
Node[] children)
Builds a function with n arguments
|
ASTFunNode |
MatrixNodeFactory.buildFunctionNode(String name,
PostfixMathCommandI pfmc,
Node[] arguments)
Builds a function with n arguments
|
ASTFunNode |
MatrixNodeFactory.buildOperatorNode(Operator op,
Node[] arguments)
Builds a operator node with n arguments
|
ASTVarNode |
MatrixNodeFactory.buildVariableNode(Variable var)
Creates a ASTVariable node with specified value.
|
Dimensions |
MatrixNodeFactory.calcDim(Operator op,
Node[] arguments)
Calculates the dimension of node using the dimensions
of the children.
|
Dimensions |
MatrixNodeFactory.calcDim(String name,
PostfixMathCommandI pfmc,
Node[] arguments)
Calculates the dimension of node using the dimensions
of the children.
|
Object |
MatrixEvaluator.eval(Node node) |
MatrixValueI |
MatrixSpecialEvaluationI.evaluate(MatrixNodeI node,
MatrixEvaluator visitor,
MatrixJep jep)
Returns the result of evaluating this node and the tree below.
|
MatrixValueI |
MatrixEvaluator.evaluate(MatrixNodeI node,
MatrixJep mj) |
Object |
MatrixJep.evaluate(Node node)
Evaluate a node.
|
Object |
MatrixJep.evaluateRaw(Node node)
Evaluate a node.
|
MatrixNodeI |
SpecialPreProcessorI.preprocess(ASTFunNode node,
MatrixPreprocessor visitor,
MatrixJep jep,
MatrixNodeFactory nf)
Subverts the preprocessing stage.
|
Node |
MatrixJep.preprocess(Node node)
Pre-processes an equation to allow the diff and eval operators to be used.
|
MatrixNodeI |
MatrixPreprocessor.preprocess(Node node,
MatrixJep mdjep)
Main entry point: pre-process a node.
|
Object |
MatrixPreprocessor.visit(ASTConstant node,
Object data)
constants
|
Object |
MatrixPreprocessor.visit(ASTFunNode node,
Object data)
visit functions and operators
|
Object |
MatrixEvaluator.visit(ASTFunNode node,
Object data)
other functions
|
Object |
MatrixPreprocessor.visit(ASTVarNode node,
Object data)
multi-dimensional differentiable variables
|
Object |
MatrixEvaluator.visit(ASTVarNode node,
Object data)
multi dimensional differentiable variables
|
MatrixNodeI[] |
MatrixPreprocessor.visitChildrenAsArray(Node node,
Object data)
Returns an array of matrix nodes which are the results of visiting each child.
|
Object |
MatrixPreprocessor.visitOp(ASTFunNode node,
Object data)
operators +,-,*,/
|
| Modifier and Type | Method and Description |
|---|---|
void |
MList.append(Node node,
PrintVisitor pv)
Used to print the TensorNode with all its children.
|
void |
MArrayAccess.append(Node node,
PrintVisitor pv) |
protected void |
MList.bufferAppend(MatrixNodeI node,
PrintVisitor pv,
int currank)
recursive procedure to print the tensor with lots of brackets.
|
Dimensions |
MSum.calcDim(Dimensions[] dims) |
Dimensions |
MIf.calcDim(Dimensions[] dims)
Find the dimension of this node.
|
MatrixValueI |
MSum.calcValue(MatrixValueI res,
MatrixValueI[] inputs) |
MatrixValueI |
MList.calcValue(MatrixValueI res,
MatrixValueI[] inputs) |
MatrixValueI |
MIf.calcValue(MatrixValueI res,
MatrixValueI[] inputs)
This method should not be called.
|
MatrixValueI |
MMap.evaluate(MatrixNodeI node,
MatrixEvaluator visitor,
MatrixJep jep) |
MatrixValueI |
MIf.evaluate(MatrixNodeI node,
MatrixEvaluator visitor,
MatrixJep j)
Evaluate the node, uses lazy evaluation.
|
MatrixValueI |
MAssign.evaluate(MatrixNodeI node,
MatrixEvaluator visitor,
MatrixJep j)
A special methods for evaluating an assignment.
|
MatrixNodeI |
MPower.preprocess(ASTFunNode node,
MatrixPreprocessor visitor,
MatrixJep jep,
MatrixNodeFactory nf)
During preprocessing sets the function to the Cross function if necessary.
|
MatrixNodeI |
MMap.preprocess(ASTFunNode node,
MatrixPreprocessor visitor,
MatrixJep jep,
MatrixNodeFactory nf) |
MatrixNodeI |
MList.preprocess(ASTFunNode node,
MatrixPreprocessor visitor,
MatrixJep jep,
MatrixNodeFactory nf) |
MatrixNodeI |
MDiff.preprocess(ASTFunNode node,
MatrixPreprocessor visitor,
MatrixJep jep,
MatrixNodeFactory nf) |
MatrixNodeI |
MAssign.preprocess(ASTFunNode node,
MatrixPreprocessor visitor,
MatrixJep mjep,
MatrixNodeFactory nf) |
void |
MAssign.run(Stack s)
The run method should not be called.
|
| Modifier and Type | Method and Description |
|---|---|
MRpCommandList |
MRpEval.compile(MatrixVariableI var,
Node node)
compile an expression of the type var = node.
|
MRpCommandList |
MRpEval.compile(Node node)
Compile the expressions to produce a set of commands in reverse Polish notation.
|
abstract void |
MRpRes.copyToVecMat(MatrixValueI res)
Copy the value into res.
|
int |
MRpEval.getVarRef(MatrixVariableI var)
Finds the reference number used for this variable.
|
int |
MRpEval.getVarRef(Variable var)
Finds the reference number used for this variable.
|
void |
MRpEval.setVarValue(int ref,
MatrixValueI val)
Sets value of rpe variable.
|
MatrixValueI |
MRpRes.toVecMat()
Converts to a MatrixValueI object.
|
Object |
MRpEval.visit(ASTConstant node,
Object data) |
Object |
MRpEval.visit(ASTFunNode node,
Object data) |
Object |
MRpEval.visit(ASTStart node,
Object data) |
Object |
MRpEval.visit(ASTVarNode node,
Object data) |
Object |
MRpEval.visit(SimpleNode node,
Object data) |
| Modifier and Type | Method and Description |
|---|---|
Node |
RewriteRuleI.apply(ASTFunNode node,
Node[] children)
Rewrites the node
|
Node |
ExpandPower.apply(ASTFunNode node,
Node[] children) |
Node |
ExpandBrackets.apply(ASTFunNode node,
Node[] children) |
Node |
CollectPowers.apply(ASTFunNode node,
Node[] children) |
Node |
RewriteVisitor.rewrite(Node node,
XJep xjep,
RewriteRuleI[] inrules,
boolean simplify)
must be implemented for subclasses.
|
Object |
RewriteVisitor.visit(ASTFunNode node,
Object data) |
| Modifier and Type | Method and Description |
|---|---|
RpCommandList |
RpEval.compile(Node node)
Compile the expressions to produce a set of commands in reverse Polish notation.
|
double |
RpCommand.getConstantValue() |
String |
RpCommand.getFunction() |
Variable |
RpCommand.getVariable() |
Object |
RpEval.visit(ASTConstant node,
Object data) |
Object |
RpEval.visit(ASTFunNode node,
Object data) |
Object |
RpEval.visit(ASTStart node,
Object data) |
Object |
RpEval.visit(ASTVarNode node,
Object data) |
Object |
RpEval.visit(SimpleNode node,
Object data) |
| Modifier and Type | Method and Description |
|---|---|
PNodeI |
Polynomial.add(PNodeI node) |
PNodeI |
PNodeI.add(PNodeI node)
Adds a node to this one.
|
PNodeI |
PConstant.add(PNodeI c) |
void |
MutiablePolynomial.add(PNodeI term) |
PNodeI |
Monomial.add(PNodeI node) |
PNodeI |
AbstractPNode.add(PNodeI node) |
PNodeI |
Polynomial.add(Polynomial p) |
int |
PolynomialCreator.compare(Node node1,
Node node2)
Compares two nodes.
|
PNodeI |
PolynomialCreator.createPoly(Node node)
Converts an expression into the polynomial representation.
|
void |
MutiableMonomial.div(PConstant c) |
PNodeI |
Polynomial.div(PNodeI node) |
PNodeI |
PNodeI.div(PNodeI node)
Divides this by the argument.
|
PNodeI |
PConstant.div(PNodeI c) |
PNodeI |
Monomial.div(PNodeI node) |
PNodeI |
AbstractPNode.div(PNodeI node) |
boolean |
PolynomialCreator.equals(Node node1,
Node node2)
Compares two nodes.
|
PNodeI |
POperator.expand() |
PNodeI |
Polynomial.expand() |
PNodeI |
PNodeI.expand()
complete expansion.
|
PNodeI |
PFunction.expand() |
PNodeI |
Monomial.expand() |
Node |
PolynomialCreator.expand(Node node)
Expands an expression.
|
PNodeI |
PNodeI.invert()
inverts node i.e.
|
PNodeI |
PConstant.invert() |
PNodeI |
Monomial.invert() |
PNodeI |
AbstractPNode.invert() |
void |
MutiableMonomial.mul(PConstant c) |
PNodeI |
Polynomial.mul(PNodeI node) |
PNodeI |
PNodeI.mul(PNodeI node)
Multiplies this by the argument.
|
PNodeI |
PConstant.mul(PNodeI c) |
PNodeI |
Monomial.mul(PNodeI node) |
PNodeI |
AbstractPNode.mul(PNodeI node) |
void |
MutiableMonomial.mul(PNodeI term,
PNodeI power) |
PNodeI |
Polynomial.negate() |
PNodeI |
PNodeI.negate()
negates node i.e.
|
PNodeI |
PConstant.negate() |
PNodeI |
Monomial.negate() |
PNodeI |
AbstractPNode.negate() |
PNodeI |
PNodeI.pow(PNodeI node)
Raise this to the argument.
|
PNodeI |
PConstant.pow(PNodeI c) |
PNodeI |
Monomial.pow(PNodeI pow) |
PNodeI |
AbstractPNode.pow(PNodeI node) |
Node |
PolynomialCreator.simplify(Node node)
Simplifies an expression.
|
PNodeI |
Polynomial.sub(PNodeI node) |
PNodeI |
PNodeI.sub(PNodeI node)
Subtracts the argument from this.
|
PNodeI |
PConstant.sub(PNodeI c) |
PNodeI |
Monomial.sub(PNodeI node) |
PNodeI |
AbstractPNode.sub(PNodeI node) |
PNodeI |
Polynomial.sub(Polynomial p) |
Node |
PVariable.toNode() |
Node |
POperator.toNode() |
Node |
Polynomial.toNode() |
Node |
PNodeI.toNode()
Converts the node to standard JEP format.
|
Node |
PFunction.toNode() |
Node |
PConstant.toNode() |
Node |
Monomial.toNode() |
Object |
PolynomialCreator.visit(ASTConstant node,
Object data) |
Object |
PolynomialCreator.visit(ASTFunNode node,
Object data) |
Object |
PolynomialCreator.visit(ASTVarNode node,
Object data) |
| Modifier and Type | Method and Description |
|---|---|
Object |
VectorJep.evaluate(Node node)
Evaluate a node.
|
Object |
VectorEvaluator.visit(ASTFunNode node,
Object data)
Visit a function node.
|
| Modifier and Type | Method and Description |
|---|---|
Matrix |
MAdd.add(Matrix lhs,
Matrix rhs)
Adds two matrices.
|
MVector |
MAdd.add(MVector lhs,
MVector rhs)
Adds two vectors.
|
Object |
MAdd.add(Object param1,
Object param2)
Adds two objects.
|
Tensor |
MAdd.add(Tensor lhs,
Tensor rhs)
Adds two tensors.
|
Dimensions |
VRange.calcDim(Dimensions[] dims)
Calculates the dimension of this node with given dimensions of children.
|
Dimensions |
VMap.calcDim(Dimensions[] dims) |
Dimensions |
VList.calcDim(Dimensions[] dims)
Calculates the dimension of this node with given dimensions of children.
|
Dimensions |
NaryOperatorI.calcDim(Dimensions[] dims)
Find the dimensions of this operator when applied to arguments with given dimensions.
|
Dimensions |
ElementMultiply.calcDim(Dimensions[] dims) |
Dimensions |
VPower.calcDim(Dimensions ldim,
Dimensions rdim) |
Dimensions |
VEle.calcDim(Dimensions ldim,
Dimensions rdim) |
Dimensions |
MMultiply.calcDim(Dimensions l,
Dimensions r) |
Dimensions |
MDivide.calcDim(Dimensions l,
Dimensions r) |
Dimensions |
ExteriorProduct.calcDim(Dimensions ldim,
Dimensions rdim) |
Dimensions |
Ele.calcDim(Dimensions ldim,
Dimensions rdim) |
Dimensions |
BinaryOperatorI.calcDim(Dimensions ldim,
Dimensions rdim)
Find the dimensions of this operator when applied to arguments with given dimensions.
|
MatrixValueI |
VSum.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
UnaryOperatorI.calcValue(MatrixValueI res,
MatrixValueI lhs)
Calculates the value of this operator for given input with results stored in res.
|
MatrixValueI |
Transpose.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
Trace.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
Size.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
MUMinus.calcValue(MatrixValueI res,
MatrixValueI lhs)
calculates the value.
|
MatrixValueI |
Length.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
GetDiagonal.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
Diagonal.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
Determinant.calcValue(MatrixValueI res,
MatrixValueI lhs) |
MatrixValueI |
VRange.calcValue(MatrixValueI res,
MatrixValueI[] inputs)
Calculates the value of this node.
|
MatrixValueI |
VMap.calcValue(MatrixValueI res,
MatrixValueI[] inputs) |
MatrixValueI |
VList.calcValue(MatrixValueI res,
MatrixValueI[] inputs)
Calculates the value of this node.
|
MatrixValueI |
NaryOperatorI.calcValue(MatrixValueI res,
MatrixValueI[] inputs)
Calculates the value of this operator for given input with results stored in res.
|
MatrixValueI |
ElementMultiply.calcValue(MatrixValueI res,
MatrixValueI[] inputs)
Multiply the inputs element by element putting the results in res.
|
MatrixValueI |
VPower.calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs) |
MatrixValueI |
VEle.calcValue(MatrixValueI res,
MatrixValueI param1,
MatrixValueI param2) |
MatrixValueI |
MSubtract.calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs)
calculates the value.
|
MatrixValueI |
MMultiply.calcValue(MatrixValueI res,
MatrixValueI param1,
MatrixValueI param2) |
MatrixValueI |
MDot.calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs)
calculates the value.
|
MatrixValueI |
MDivide.calcValue(MatrixValueI res,
MatrixValueI param1,
MatrixValueI param2) |
MatrixValueI |
MAdd.calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs)
calculates the value.
|
MatrixValueI |
ExteriorProduct.calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs) |
MatrixValueI |
ElementDivide.calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs)
Multiply the inputs element by element putting the results in res.
|
MatrixValueI |
ElementComparative.calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs)
Multiply the inputs element by element putting the results in res.
|
MatrixValueI |
Ele.calcValue(MatrixValueI res,
MatrixValueI param1,
MatrixValueI param2) |
MatrixValueI |
BinaryOperatorI.calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs)
Calculates the value of this operator for given input with results stored in res.
|
Scaler |
MDot.calcValue(Scaler res,
MVector lhs,
MVector rhs) |
Object |
ExteriorProduct.crosspower(Object param1,
Object param2) |
Object |
Determinant.det(Object[][] mat)
Calculates the determinant of an array
Uses the fact that
| a b c |
| d e f | = a | e f | - b | d f | + c | d e |
| g h i | | h i | | g i | | g i |
|
Object |
MDivide.div(MatrixValueI param1,
MatrixValueI param2)
Divide two objects.
|
Object |
ElementDivide.div(MatrixValueI param1,
MatrixValueI param2) |
Object |
MDivide.div(Object param1,
Object param2)
Divide two objects.
|
Object |
ElementDivide.div(Object param1,
Object param2)
Multiply arguments element by element.
|
Object |
MDot.dot(MVector lhs,
MVector rhs)
returns lhs .
|
Object |
MDot.dot(Object param1,
Object param2)
returns param1 .
|
Object |
VMap.evaluate(Node node,
EvaluatorI pv) |
Object |
GenMat.evaluate(Node node,
EvaluatorI pv) |
Object |
ExteriorProduct.exteriorProduct(MVector lhs,
MVector rhs) |
static Variable[] |
VMap.getVars(Node varsNode) |
Object |
MMultiply.mul(MatrixValueI param1,
MatrixValueI param2)
Multiply two objects.
|
Object |
ElementMultiply.mul(MatrixValueI param1,
MatrixValueI param2) |
Object |
MMultiply.mul(Object param1,
Object param2)
Multiply two objects.
|
Object |
ElementMultiply.mul(Object param1,
Object param2)
Multiply arguments element by element.
|
void |
VSum.run(Stack s) |
void |
VPower.run(Stack inStack) |
void |
VList.run(Stack inStack) |
void |
VEle.run(Stack stack) |
void |
Transpose.run(Stack s) |
void |
Trace.run(Stack s) |
void |
Size.run(Stack s) |
void |
MMultiply.run(Stack stack)
need to redo this as the standard jep version assumes commutivity.
|
void |
MDot.run(Stack stack) |
void |
MDivide.run(Stack stack)
Need to redo this as the standard jep version assumes commutivity.
|
void |
Length.run(Stack aStack) |
void |
Id.run(Stack s) |
void |
GetDiagonal.run(Stack s) |
void |
ExteriorProduct.run(Stack inStack) |
void |
ElementComparative.run(Stack inStack) |
void |
Ele.run(Stack stack) |
void |
Diagonal.run(Stack s) |
void |
Determinant.run(Stack s) |
void |
ArrayAccess.set(EvaluatorI pv,
Node node,
Object value)
Sets the LValue.
|
Matrix |
MSubtract.sub(Matrix lhs,
Matrix rhs)
Adds two matrices.
|
MVector |
MSubtract.sub(MVector lhs,
MVector rhs)
Adds two vectors.
|
Object |
MSubtract.sub(Object param1,
Object param2)
Adds two objects.
|
Tensor |
MSubtract.sub(Tensor lhs,
Tensor rhs)
Adds two matrices.
|
Matrix |
MUMinus.umin(Matrix lhs)
negate a matrix.
|
MVector |
MUMinus.umin(MVector lhs)
negate a vector.
|
Object |
MUMinus.umin(Object param1)
Negate an objects.
|
Tensor |
MUMinus.umin(Tensor lhs)
negate a tensor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Node[] |
DoNothingVisitor.acceptChildrenAsArray(Node node,
Object data)
Gets the result of visiting children of a array of nodes.
|
void |
PrintVisitor.PrintRulesI.append(Node node,
PrintVisitor pv)
The method called to append data for the rule.
|
ASTConstant |
NodeFactory.buildConstantNode(ASTConstant node)
Create an ASTConstant with same value as argument.
|
ASTConstant |
NodeFactory.buildConstantNode(Object value)
Creates an ASTConstant node with specified value.
|
ASTConstant |
NodeFactory.buildConstantNode(Operator op,
Node child1)
Creates a ASTConstant whose value of applying a unary operator to its arguments.
|
ASTConstant |
NodeFactory.buildConstantNode(Operator op,
Node[] children)
Creates a ASTConstant whose value of applying the operator to its arguments.
|
ASTConstant |
NodeFactory.buildConstantNode(Operator op,
Node child1,
Node child2)
Creates a ASTConstant whose value of applying binary operator to its arguments.
|
ASTConstant |
NodeFactory.buildConstantNode(PostfixMathCommandI pfmc,
Node[] children)
Creates a ASTConstant whose value of applying the operator to its arguments.
|
ASTFunNode |
NodeFactory.buildFunctionNode(ASTFunNode node,
Node[] arguments)
Builds a function with n arguments and same fun as specified in arguments.
|
ASTFunNode |
NodeFactory.buildFunctionNode(String name,
PostfixMathCommandI pfmc,
Node[] arguments)
Builds a function with n arguments
This method should be sub-classed
|
ASTFunNode |
NodeFactory.buildOperatorNode(Operator op,
Node child)
creates a unary function.
|
ASTFunNode |
NodeFactory.buildOperatorNode(Operator op,
Node[] arguments)
Builds a operator node with n arguments
This method should be sub-classed
|
ASTFunNode |
NodeFactory.buildOperatorNode(Operator op,
Node lhs,
Node rhs)
creates a binary function.
|
ASTVarNode |
NodeFactory.buildVariableNode(ASTVarNode node)
creates a new ASTVarNode with the same name as argument.
|
ASTVarNode |
NodeFactory.buildVariableNode(String name,
Object value) |
ASTVarNode |
NodeFactory.buildVariableNode(Variable var)
creates a new ASTVarNode with a given variable.
|
Node |
XJep.continueParsing()
Continue parsing without re-initilising the stream.
|
static Node |
TreeUtils.copyChildrenIfNeeded(Node node,
Node[] children)
Sets the children of a node if they have changed for it current children.
|
Node |
XJep.deepCopy(Node node)
Returns a deep copy of an expression tree.
|
Node |
DeepCopyVisitor.deepCopy(Node node,
XJep xj)
Creates a deepCopy of a Node
|
Object |
XJep.evaluate(PostfixMathCommandI pfmc,
Node node) |
Node |
XJep.preprocess(Node node)
Pre-processes an equation to allow the diff and eval operators to be used.
|
Node |
Eval.process(Node node,
Node[] children,
XJep xjep) |
Node |
CommandVisitorI.process(Node node,
Node[] children,
XJep xjep)
Performs the specified action on an expression tree.
|
Node |
CommandVisitor.process(Node node,
XJep xj)
Descends the tree processing all diff, eval and simplify options
|
Vector |
XJep.recursiveGetVarsInEquation(Node n,
Vector v)
Finds all the variables in an equation and if any of those
variables are defined by equations find the variables
in those equations as well.
|
void |
MacroFunction.run(Stack stack)
Calculates the value of the expression.
|
void |
Eval.run(Stack s)
Should not be called by evaluator
|
Node |
XJep.simplify(Node node)
Returns a simplification of an expression tree.
|
Node |
SimplificationVisitor.simplify(Node node,
XJep xjep)
must be implemented for subclasses.
|
Node |
SimplificationVisitor.simplifyAdd(Node lhs,
Node rhs)
Simplifies an addition.
|
Node |
SimplificationVisitor.simplifyBuiltOperatorNode(Operator op,
Node lhs,
Node rhs)
First create a new node and then simplify it.
|
Node |
SimplificationVisitor.simplifyDivide(Node child1,
Node child2)
Simplifies a division.
|
Node |
SimplificationVisitor.simplifyMultiply(Node child1,
Node child2)
Simplifies a multiplication.
|
Node |
SimplificationVisitor.simplifyOp(ASTFunNode node,
Node[] children)
simplifies operators, does not descend into children
|
Node |
SimplificationVisitor.simplifyPower(Node child1,
Node child2)
Simplify a power.
|
Node |
SimplificationVisitor.simplifySubtract(Node lhs,
Node rhs)
Simplifies a subtraction.
|
Node |
SimplificationVisitor.simplifyTripple(XOperator op,
Node lhs,
Node rhs)
Simplifies expressions like 2+(3+x) or (2+x)+3
|
Node |
XJep.substitute(Node orig,
String[] names,
Node[] replacements)
Substitute all occurrences of a set of named variable with a set of expression tree.
|
Node |
SubstitutionVisitor.substitute(Node orig,
String[] names,
Node[] replacements,
XJep xj)
Substitutes all occurrences of a set of variable var with a set of replacements.
|
Node |
XJep.substitute(Node orig,
String name,
Node replacement)
Substitute all occurrences of a named variable with an expression tree.
|
Node |
SubstitutionVisitor.substitute(Node orig,
String name,
Node replacement,
XJep xj)
Substitutes all occurrences of variable var with replacement.
|
Object |
DoNothingVisitor.visit(ASTConstant node,
Object data) |
Object |
DeepCopyVisitor.visit(ASTConstant node,
Object data) |
Object |
SimplificationVisitor.visit(ASTFunNode node,
Object data) |
Object |
PrintVisitor.visit(ASTFunNode node,
Object data) |
Object |
DoNothingVisitor.visit(ASTFunNode node,
Object data) |
Object |
DeepCopyVisitor.visit(ASTFunNode node,
Object data) |
Object |
CommandVisitor.visit(ASTFunNode node,
Object data) |
Object |
DoNothingVisitor.visit(ASTStart node,
Object data) |
Object |
XEvaluatorVisitor.visit(ASTVarNode node,
Object data)
Visit a variable node.
|
Object |
SubstitutionVisitor.visit(ASTVarNode node,
Object data) |
Object |
PrintVisitor.visit(ASTVarNode node,
Object data) |
Object |
DoNothingVisitor.visit(ASTVarNode node,
Object data) |
Object |
DeepCopyVisitor.visit(ASTVarNode node,
Object data) |
Object |
DoNothingVisitor.visit(SimpleNode node,
Object data) |
| Constructor and Description |
|---|
MacroFunction(String inName,
int nargs,
String expression,
XJep jep)
Create a function specified by a string.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
SumType.evaluate(Node node,
EvaluatorI pv)
Evaluates the operator in given context.
|
Object |
Trapezium.evaluate(Node node,
Variable var,
double min,
double max,
double inc,
EvaluatorI pv) |
Object |
SumType.evaluate(Node node,
Variable var,
double min,
double max,
double inc,
EvaluatorI pv)
Evaluates the node by repeatibly setting the value of the variable from min to max, and calculating the value of the first argument.
|
Object |
MinArg.evaluate(Node node,
Variable var,
double min,
double max,
double inc,
EvaluatorI pv) |
Object |
MaxArg.evaluate(Node node,
Variable var,
double min,
double max,
double inc,
EvaluatorI pv) |
Object |
Trapezium.evaluate(Object[] elements) |
abstract Object |
SumType.evaluate(Object[] elements)
Evaluates the function given the set of y values.
|
Object |
Sum.evaluate(Object[] elements) |
Object |
Simpson.evaluate(Object[] elements) |
Object |
Product.evaluate(Object[] elements) |
Object |
MinArg.evaluate(Object[] elements) |
Object |
Min.evaluate(Object[] elements) |
Object |
MaxArg.evaluate(Object[] elements) |
Object |
Max.evaluate(Object[] elements) |
Node |
XAssign.process(Node node,
Node[] children,
XJep xjep)
In the pre-process stage, set the equation of the lhs variable to the rhs equation.
|
Node |
Define.process(Node node,
Node[] children,
XJep xjep) |
void |
ToBase.run(Stack s) |
void |
SumType.run(Stack s)
run method.
|
void |
FromBase.run(Stack s) |
| Modifier and Type | Method and Description |
|---|---|
void |
MRpSurfExample.calcMJ() |
void |
MRpSurfExample.calcVJ() |
static void |
RpExample.extendedPrint(RpCommandList list) |
void |
XJepConsole.processEquation(Node node) |
void |
SJepConsole.processEquation(Node node) |
void |
MatrixConsole.processEquation(Node node) |
void |
GroupConsole.processEquation(Node node) |
void |
DJepConsole.processEquation(Node node) |
void |
Console.processEquation(Node node)
Performs the required operation on a node.
|
void |
BlockStatments.processEquation(Node node)
Evaluates a node, but only if the state corresponds to the conditionValue.
|
| Modifier and Type | Method and Description |
|---|---|
ParseException |
Parser.generateParseException() |
| Modifier and Type | Method and Description |
|---|---|
void |
Parser.AdditiveExpression() |
void |
Parser.AndExpression() |
void |
Parser.AnyConstant() |
void |
Parser.ArgumentList(int reqArguments,
String functionName) |
void |
Parser.ArrayAccess() |
void |
Parser.AssignExpression() |
Object |
SimpleNode.childrenAccept(ParserVisitor visitor,
Object data)
Accept the visitor.
|
Node |
Parser.continueParse()
Continue parsing without re-initilising stream.
|
void |
Parser.EqualExpression() |
Object |
EvaluatorVisitor.eval(Node node)
Evaluates a given node, in the current context.
|
Object |
EvaluatorI.eval(Node node)
Evaluates a node and returns and object with the value of the node.
|
Object |
EvaluatorVisitor.eval(PostfixMathCommandI pfmc,
Node[] children)
Evaluates a PostfixMathCommandI with given arguments.
|
Object |
JEP.evaluate(Node node)
Evaluate an expression.
|
void |
Parser.Expression() |
void |
Parser.Function() |
Object |
EvaluatorVisitor.getValue(Node topNode,
SymbolTable symTab_in)
Returns the value of the expression as an object.
|
String |
Parser.Identifier() |
Object |
SimpleNode.jjtAccept(ParserVisitor visitor,
Object data)
Accept the visitor.
|
Object |
Node.jjtAccept(ParserVisitor visitor,
Object data)
Accept the visitor.
|
Object |
ASTVarNode.jjtAccept(ParserVisitor visitor,
Object data)
Accept the visitor.
|
Object |
ASTStart.jjtAccept(ParserVisitor visitor,
Object data)
Accept the visitor.
|
Object |
ASTFunNode.jjtAccept(ParserVisitor visitor,
Object data)
Accept the visitor.
|
Object |
ASTConstant.jjtAccept(ParserVisitor visitor,
Object data)
Accept the visitor.
|
void |
Parser.ListExpression() |
void |
Parser.LValue() |
void |
Parser.MultiplicativeExpression() |
void |
Parser.OrExpression() |
Node |
JEP.parse(String expression)
Parses an expression.
|
Node |
Parser.parseStream(Reader stream,
JEP jep_in) |
void |
Parser.PowerExpression() |
Object |
Parser.RealConstant() |
void |
Parser.RelationalExpression() |
void |
Parser.RightExpression() |
ASTStart |
Parser.Start()
GRAMMAR START
|
void |
Parser.UnaryExpression() |
void |
Parser.UnaryExpressionNotPlusMinus() |
void |
Parser.Variable() |
Object |
ParserVisitor.visit(ASTConstant node,
Object data) |
Object |
ParserDumpVisitor.visit(ASTConstant node,
Object data) |
Object |
ParserVisitor.visit(ASTFunNode node,
Object data) |
Object |
ParserDumpVisitor.visit(ASTFunNode node,
Object data) |
Object |
EvaluatorVisitor.visit(ASTFunNode node,
Object data)
Visit a function node.
|
Object |
ParserVisitor.visit(ASTStart node,
Object data) |
Object |
ParserDumpVisitor.visit(ASTStart node,
Object data) |
Object |
EvaluatorVisitor.visit(ASTStart node,
Object data)
This method should never be called when evaluating a normal
expression.
|
Object |
ParserVisitor.visit(ASTVarNode node,
Object data) |
Object |
ParserDumpVisitor.visit(ASTVarNode node,
Object data) |
Object |
EvaluatorVisitor.visit(ASTVarNode node,
Object data)
Visit a variable node.
|
Object |
ParserVisitor.visit(SimpleNode node,
Object data) |
Object |
ParserDumpVisitor.visit(SimpleNode node,
Object data) |
Object |
EvaluatorVisitor.visit(SimpleNode node,
Object data)
This method should never be called when evaluation a normal
expression.
|
| Modifier and Type | Method and Description |
|---|---|
CommandElement[] |
ExpressionCompiler.compile(Node node) |
Object |
ExpressionCompiler.visit(ASTFunNode node,
Object data) |
| Modifier and Type | Method and Description |
|---|---|
Object |
Abs.abs(Object param) |
Object |
ArcCosine.acos(Object param) |
Object |
ArcCosineH.acosh(Object param) |
Object |
Add.add(Object param1,
Object param2)
Adds two numbers together.
|
Number |
Arg.arg(Object param) |
Object |
ArcSine.asin(Object param) |
Object |
ArcSineH.asinh(Object param) |
Object |
ArcTangent.atan(Object param) |
Object |
ArcTanH.atanh(Object param) |
Object |
Ceil.ceil(Object param) |
protected void |
PostfixMathCommand.checkStack(Stack inStack)
Check whether the stack is not null, throw a ParseException if it is.
|
Object |
Conjugate.conj(Object param) |
Object |
Cosine.cos(Object param) |
Object |
CosineH.cosh(Object param) |
Object |
Cross.cross(Object param1,
Object param2) |
Object |
Cross.cross(Vector lhs,
Vector rhs) |
Object |
Divide.div(Object param1,
Object param2) |
Object |
Dot.dot(Object param1,
Object param2) |
Object |
Dot.dot(Vector v1,
Vector v2) |
boolean |
Comparative.eq(Object param1,
Object param2) |
Object |
If.evaluate(Node node,
EvaluatorI pv) |
Object |
CallbackEvaluationI.evaluate(Node node,
EvaluatorI pv)
Performs some special evaluation on the node.
|
Object |
Assign.evaluate(Node node,
EvaluatorI pv)
For assignment set the value of the variable on the lhs to value returned by evaluating the righthand side.
|
Object |
SpecialEvaluationI.evaluate(Node node,
Object data,
ParserVisitor pv,
Stack stack,
SymbolTable symTab)
Deprecated.
Performs some special evaluation on the node.
|
Object |
Exp.exp(Object param) |
Object |
Floor.floor(Object param) |
boolean |
Comparative.ge(Object param1,
Object param2) |
boolean |
Comparative.gt(Object param1,
Object param2) |
Number |
Imaginary.im(Object param) |
boolean |
Comparative.le(Object param1,
Object param2) |
Object |
NaturalLogarithm.ln(Object param) |
Object |
Logarithm.log(Object param) |
boolean |
Comparative.lt(Object param1,
Object param2) |
Object |
Multiply.mul(Object param1,
Object param2) |
boolean |
Comparative.ne(Object param1,
Object param2) |
Object |
Power.power(Object param1,
Object param2) |
Number |
Real.re(Object param) |
Object |
Round.round(Object param) |
void |
UMinus.run(Stack inStack) |
void |
TanH.run(Stack inStack) |
void |
Tangent.run(Stack inStack) |
void |
Sum.run(Stack stack)
Calculates the result of summing up all parameters, which are assumed to
be of the Double type.
|
void |
Subtract.run(Stack inStack) |
void |
Str.run(Stack inStack) |
void |
SquareRoot.run(Stack inStack)
Applies the function to the parameters on the stack.
|
void |
SineH.run(Stack inStack) |
void |
Sine.run(Stack inStack) |
void |
Round.run(Stack inStack) |
void |
Real.run(Stack inStack) |
void |
Range.run(Stack inStack) |
void |
Random.run(Stack inStack) |
void |
Power.run(Stack inStack) |
void |
PostfixMathCommandI.run(Stack aStack)
Run the function on the stack.
|
void |
PostfixMathCommand.run(Stack s)
Throws an exception because this method should never be called under
normal circumstances.
|
void |
Polar.run(Stack inStack) |
void |
Not.run(Stack inStack) |
void |
NaturalLogarithm.run(Stack inStack) |
void |
Multiply.run(Stack stack) |
void |
Modulus.run(Stack inStack) |
void |
Logical.run(Stack inStack) |
void |
Logarithm.run(Stack inStack) |
void |
List.run(Stack inStack) |
void |
Imaginary.run(Stack inStack) |
void |
Floor.run(Stack inStack) |
void |
Exp.run(Stack inStack) |
void |
Ele.run(Stack s) |
void |
Dot.run(Stack inStack) |
void |
Divide.run(Stack inStack) |
void |
Cross.run(Stack inStack) |
void |
CosineH.run(Stack inStack) |
void |
Cosine.run(Stack inStack) |
void |
Conjugate.run(Stack inStack) |
void |
ComplexPFMC.run(Stack inStack) |
void |
Comparative.run(Stack inStack) |
void |
Ceil.run(Stack inStack) |
void |
Binomial.run(Stack s) |
void |
Arg.run(Stack inStack) |
void |
ArcTanH.run(Stack inStack) |
void |
ArcTangent2.run(Stack inStack) |
void |
ArcTangent.run(Stack inStack) |
void |
ArcSineH.run(Stack inStack) |
void |
ArcSine.run(Stack inStack) |
void |
ArcCosineH.run(Stack inStack) |
void |
ArcCosine.run(Stack inStack) |
void |
Add.run(Stack stack)
Calculates the result of applying the "+" operator to the arguments from
the stack and pushes it back on the stack.
|
void |
Abs.run(Stack inStack) |
void |
LValueI.set(EvaluatorI pv,
Node node,
Object value)
Performs appropriate action to set an LValue.
|
void |
Ele.set(EvaluatorI pv,
Node node,
Object value) |
Object |
Sine.sin(Object param) |
Object |
SineH.sinh(Object param) |
Object |
SquareRoot.sqrt(Object param)
Calculates the square root of the parameter.
|
Object |
Subtract.sub(Object param1,
Object param2) |
Object |
Tangent.tan(Object param) |
Object |
TanH.tanh(Object param) |
Object |
UMinus.umin(Object param) |
| Modifier and Type | Method and Description |
|---|---|
Object |
NumberFactory.createNumber(boolean value)
Create a number object with given boolean value
|
Object |
NumberFactory.createNumber(Complex value)
Create a number object with given Complex value
|
Object |
DoubleNumberFactory.createNumber(Complex value) |
Object |
NumberFactory.createNumber(double value)
Creates a number object with given double value.
|
Object |
NumberFactory.createNumber(float value)
Create a number object with given float value
|
Object |
NumberFactory.createNumber(int value)
Create a number object with given int value
|
Object |
NumberFactory.createNumber(Number value)
Creates a number object from a class implementing Number,
May actually just return the class.
|
Object |
NumberFactory.createNumber(short value)
Create a number object with given short value
|
Object |
NumberFactory.createNumber(String value)
Creates a number object and initializes its value.
|
Copyright © 2018. All rights reserved.