org.lsmp.djep.vectorJep.function
Class ElementDivide

java.lang.Object
  extended by org.nfunk.jep.function.PostfixMathCommand
      extended by org.nfunk.jep.function.Divide
          extended by org.lsmp.djep.vectorJep.function.ElementDivide
All Implemented Interfaces:
BinaryOperatorI, PostfixMathCommandI

public class ElementDivide
extends Divide
implements BinaryOperatorI

Multiplies any number of Vectors or Matrices 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
ElementDivide()
           
 
Method Summary
 Dimensions calcDim(Dimensions ldim, Dimensions rdim)
          Find the dimensions of this operator when applied to arguments with given dimensions.
 MatrixValueI calcValue(MatrixValueI res, MatrixValueI lhs, MatrixValueI rhs)
          Multiply the inputs element by element putting the results in res.
 java.lang.Object div(MatrixValueI param1, MatrixValueI param2)
           
 java.lang.Object div(java.lang.Object param1, java.lang.Object param2)
          Multiply arguments element by element.
 
Methods inherited from class org.nfunk.jep.function.Divide
div, div, div, div, div, div, div, div, 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

ElementDivide

public ElementDivide()
Method Detail

calcDim

public Dimensions calcDim(Dimensions ldim,
                          Dimensions rdim)
Description copied from interface: BinaryOperatorI
Find the dimensions of this operator when applied to arguments with given dimensions.

Specified by:
calcDim in interface BinaryOperatorI

calcValue

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

Specified by:
calcValue in interface BinaryOperatorI
Throws:
ParseException

div

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

Overrides:
div in class Divide
Throws:
ParseException

div

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


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