org.lsmp.djep.vectorJep.function
Class MUMinus

java.lang.Object
  extended byorg.nfunk.jep.function.PostfixMathCommand
      extended byorg.nfunk.jep.function.UMinus
          extended byorg.lsmp.djep.vectorJep.function.MUMinus
All Implemented Interfaces:
PostfixMathCommandI, UnaryOperatorI

public class MUMinus
extends UMinus
implements UnaryOperatorI

An extension of the Subtract command to allow it to add MVector's and Matrix's.

Author:
Rich Morris Created on 27-Jul-2003

Field Summary
 
Fields inherited from class org.nfunk.jep.function.PostfixMathCommand
curNumberOfParameters, numberOfParameters
 
Constructor Summary
MUMinus()
           
 
Method Summary
 Dimensions calcDim(Dimensions ldim)
          Find the dimensions of this operator when applied to arguments with given dimensions.
 MatrixValueI calcValue(MatrixValueI res, MatrixValueI lhs)
          calculates the value.
 Matrix umin(Matrix lhs)
          negate a matrix.
 MVector umin(MVector lhs)
          negate a vector.
 java.lang.Object umin(java.lang.Object param1)
          Negate an objects.
 Tensor umin(Tensor lhs)
          negate a tensor.
 
Methods inherited from class org.nfunk.jep.function.UMinus
run
 
Methods inherited from class org.nfunk.jep.function.PostfixMathCommand
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
getNumberOfParameters, run, setCurNumberOfParameters
 

Constructor Detail

MUMinus

public MUMinus()
Method Detail

calcDim

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

Specified by:
calcDim in interface UnaryOperatorI

calcValue

public MatrixValueI calcValue(MatrixValueI res,
                              MatrixValueI lhs)
                       throws ParseException
calculates the value.

Specified by:
calcValue in interface UnaryOperatorI
Parameters:
res - - results will be stored in this object
lhs - - lhs value
Returns:
res
Throws:
ParseException

umin

public java.lang.Object umin(java.lang.Object param1)
                      throws ParseException
Negate an objects.

Overrides:
umin in class UMinus
Throws:
ParseException

umin

public MVector umin(MVector lhs)
             throws ParseException
negate a vector.

Throws:
ParseException

umin

public Matrix umin(Matrix lhs)
            throws ParseException
negate a matrix.

Throws:
ParseException

umin

public Tensor umin(Tensor lhs)
            throws ParseException
negate a tensor.

Throws:
ParseException


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