org.lsmp.djep.vectorJep.function
Class MDivide
java.lang.Object
org.nfunk.jep.function.PostfixMathCommand
org.nfunk.jep.function.Divide
org.lsmp.djep.vectorJep.function.MDivide
- All Implemented Interfaces:
- BinaryOperatorI, PostfixMathCommandI
public class MDivide
- extends Divide
- implements BinaryOperatorI
An extension of the Divide class with vectors and matricies.
Must faster (1/3) if used with MatrixJep and calcValue routines.
- Since:
- 2.3.2 Improved error reporting
- Author:
- Rich Morris
Created on 27-Jul-2003
TODO add handeling of tensors
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
add
protected Add add
sub
protected Subtract sub
MDivide
public MDivide()
run
public void run(java.util.Stack stack)
throws ParseException
- Need to redo this as the standard jep version assumes commutivity.
- Specified by:
run
in interface PostfixMathCommandI
- Overrides:
run
in class Divide
- Throws:
ParseException
div
public java.lang.Object div(java.lang.Object param1,
java.lang.Object param2)
throws ParseException
- Divide two objects.
- Overrides:
div
in class Divide
- Throws:
ParseException
div
public java.lang.Object div(MatrixValueI param1,
MatrixValueI param2)
throws ParseException
- Divide two objects.
- Throws:
ParseException
calcDim
public Dimensions calcDim(Dimensions l,
Dimensions r)
throws ParseException
- Description copied from interface:
BinaryOperatorI
- Find the dimensions of this operator when applied to arguments with given dimensions.
- Specified by:
calcDim
in interface BinaryOperatorI
- Throws:
ParseException
calcValue
public MatrixValueI calcValue(MatrixValueI res,
MatrixValueI param1,
MatrixValueI param2)
throws ParseException
- Description copied from interface:
BinaryOperatorI
- Calculates the value of this operator for given input with results stored in res.
res is returned. Using this method is slightly faster
than the standard run method as it eliminates the construction
of tempoary objects.
- Specified by:
calcValue
in interface BinaryOperatorI
- Throws:
ParseException
http://www.singularsys.com/jep Copyright © 2007 Singular Systems