org.lsmp.djep.vectorJep.function
Class ElementMultiply

java.lang.Object
  extended by org.nfunk.jep.function.PostfixMathCommand
      extended by org.nfunk.jep.function.Multiply
          extended by org.lsmp.djep.vectorJep.function.ElementMultiply
All Implemented Interfaces:
NaryOperatorI, PostfixMathCommandI

public class ElementMultiply
extends Multiply
implements NaryOperatorI

Multiplies any number of Vectors or Matricies element by element. TODO could be much more efficient when called through run.

Author:
Rich Morris Created on 10-Dec-2004

Field Summary
 
Fields inherited from class org.nfunk.jep.function.PostfixMathCommand
curNumberOfParameters, numberOfParameters
 
Constructor Summary
ElementMultiply()
           
 
Method Summary
 Dimensions calcDim(Dimensions[] dims)
          Find the dimensions of this operator when applied to arguments with given dimensions.
 MatrixValueI calcValue(MatrixValueI res, MatrixValueI[] inputs)
          Multiply the inputs element by element putting the results in res.
 java.lang.Object mul(MatrixValueI param1, MatrixValueI param2)
           
 java.lang.Object mul(java.lang.Object param1, java.lang.Object param2)
          Multiply arguments element by element.
 
Methods inherited from class org.nfunk.jep.function.Multiply
mul, mul, mul, mul, mul, run
 
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, run, setCurNumberOfParameters
 

Constructor Detail

ElementMultiply

public ElementMultiply()
Method Detail

calcDim

public Dimensions calcDim(Dimensions[] dims)
                   throws ParseException
Description copied from interface: NaryOperatorI
Find the dimensions of this operator when applied to arguments with given dimensions.

Specified by:
calcDim in interface NaryOperatorI
Throws:
ParseException

calcValue

public MatrixValueI calcValue(MatrixValueI res,
                              MatrixValueI[] inputs)
                       throws ParseException
Multiply the inputs element by element putting the results in res.

Specified by:
calcValue in interface NaryOperatorI
Throws:
ParseException

mul

public java.lang.Object mul(java.lang.Object param1,
                            java.lang.Object param2)
                     throws ParseException
Multiply arguments element by element. Returns result.

Overrides:
mul in class Multiply
Throws:
ParseException

mul

public java.lang.Object mul(MatrixValueI param1,
                            MatrixValueI param2)
                     throws ParseException
Throws:
ParseException


http://www.singularsys.com/jep Copyright © 2007 Singular Systems