org.lsmp.djep.vectorJep.function
Class MDot
java.lang.Object
org.nfunk.jep.function.PostfixMathCommand
org.nfunk.jep.function.Multiply
org.lsmp.djep.vectorJep.function.MMultiply
org.lsmp.djep.vectorJep.function.MDot
- All Implemented Interfaces:
- BinaryOperatorI, PostfixMathCommandI
- public class MDot
- extends MMultiply
- implements BinaryOperatorI
The MDot operator.
- Author:
- Rich Morris
Created on 23-Feb-2004
Fields inherited from class org.lsmp.djep.vectorJep.function.MMultiply |
add, sub |
Constructor Summary |
MDot()
|
Methods inherited from class org.lsmp.djep.vectorJep.function.MMultiply |
mul, mul |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MDot
public MDot()
calcDim
public Dimensions calcDim(Dimensions l,
Dimensions r)
- Description copied from interface:
BinaryOperatorI
- Find the dimensions of this operator when applied to arguments with given dimensions.
- Specified by:
calcDim
in interface BinaryOperatorI
- Overrides:
calcDim
in class MMultiply
calcValue
public MatrixValueI calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs)
throws ParseException
- calculates the value.
- Specified by:
calcValue
in interface BinaryOperatorI
- Overrides:
calcValue
in class MMultiply
- Parameters:
res
- - results will be stored in this objectlhs
- - lhs valuerhs
- - rhs value
- Returns:
- res
- Throws:
ParseException
calcValue
public Scaler calcValue(Scaler res,
MVector lhs,
MVector rhs)
throws ParseException
- Throws:
ParseException
run
public void run(java.util.Stack stack)
throws ParseException
- Description copied from interface:
PostfixMathCommandI
- Run the function on the stack. Pops the arguments from the stack, and
pushes the result on the top of the stack.
- Specified by:
run
in interface PostfixMathCommandI
- Overrides:
run
in class MMultiply
- Throws:
ParseException
dot
public java.lang.Object dot(java.lang.Object param1,
java.lang.Object param2)
throws ParseException
- returns param1 . param2. Defaults to scaler mult if parameters are not vectors.
- Throws:
ParseException
dot
public java.lang.Object dot(MVector lhs,
MVector rhs)
throws ParseException
- returns lhs . rhs
- Throws:
ParseException
http://www.singularsys.com/jep Copyright © 2004 Singular Systems