org.lsmp.djep.vectorJep.function
Class MDot

java.lang.Object
  extended by org.nfunk.jep.function.PostfixMathCommand
      extended by org.nfunk.jep.function.Multiply
          extended by org.lsmp.djep.vectorJep.function.MMultiply
              extended by 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

Field Summary
 
Fields inherited from class org.lsmp.djep.vectorJep.function.MMultiply
add, sub
 
Fields inherited from class org.nfunk.jep.function.PostfixMathCommand
curNumberOfParameters, numberOfParameters
 
Constructor Summary
MDot()
           
 
Method Summary
 Dimensions calcDim(Dimensions l, Dimensions r)
          Find the dimensions of this operator when applied to arguments with given dimensions.
 MatrixValueI calcValue(MatrixValueI res, MatrixValueI lhs, MatrixValueI rhs)
          calculates the value.
 Scaler calcValue(Scaler res, MVector lhs, MVector rhs)
           
 java.lang.Object dot(MVector lhs, MVector rhs)
          returns lhs . rhs
 java.lang.Object dot(java.lang.Object param1, java.lang.Object param2)
          returns param1 . param2.
 void run(java.util.Stack stack)
          need to redo this as the standard jep version assumes commutivity.
 
Methods inherited from class org.lsmp.djep.vectorJep.function.MMultiply
mul, mul
 
Methods inherited from class org.nfunk.jep.function.Multiply
mul, mul, mul, mul, mul
 
Methods inherited from class org.nfunk.jep.function.PostfixMathCommand
checkNumberOfParameters, checkStack, getNumberOfParameters, setCurNumberOfParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nfunk.jep.function.PostfixMathCommandI
checkNumberOfParameters, getNumberOfParameters, setCurNumberOfParameters
 

Constructor Detail

MDot

public MDot()
Method Detail

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 object
lhs - - lhs value
rhs - - 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 class: MMultiply
need to redo this as the standard jep version assumes commutivity.

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 multiplication 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 © 2007 Singular Systems