org.lsmp.djep.vectorJep.function
Class MMultiply
java.lang.Object
org.nfunk.jep.function.PostfixMathCommand
org.nfunk.jep.function.Multiply
org.lsmp.djep.vectorJep.function.MMultiply
- All Implemented Interfaces:
- BinaryOperatorI, PostfixMathCommandI
- Direct Known Subclasses:
- MDot
- public class MMultiply
- extends Multiply
- implements BinaryOperatorI
An extension of the Multiply to with vectors and matricies.
Must faster (1/3) if used with MatrixJep and calcValue routines.
Note vector * vector treated as col_vec * row_vec -> matrix.
- 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
MMultiply
public MMultiply()
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 Multiply
- Throws:
ParseException
mul
public java.lang.Object mul(java.lang.Object param1,
java.lang.Object param2)
throws ParseException
- Multiply two objects.
- Overrides:
mul
in class Multiply
- Throws:
ParseException
mul
public java.lang.Object mul(MatrixValueI param1,
MatrixValueI param2)
throws ParseException
- Multiply 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 © 2004 Singular Systems