org.lsmp.djep.vectorJep.function
Class MPower
java.lang.Object
org.nfunk.jep.function.PostfixMathCommand
org.lsmp.djep.vectorJep.function.MPower
- All Implemented Interfaces:
- BinaryOperatorI, PostfixMathCommandI
- public class MPower
- extends PostfixMathCommand
- implements BinaryOperatorI
An overloaded power function, if both arguments are vectors returns
the exteriour product, else return standard power.
- Author:
- Rich Morris
Created on 26-Nov-2003
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MPower
public MPower()
calcDim
public Dimensions calcDim(Dimensions ldim,
Dimensions rdim)
throws ParseException
- Description copied from interface:
BinaryOperatorI
- Find the dimensions of this operator when applied to arguments with given dimensions.
- Specified by:
calcDim
in interface BinaryOperatorI
- Throws:
ParseException
calcValue
public MatrixValueI calcValue(MatrixValueI res,
MatrixValueI lhs,
MatrixValueI rhs)
throws ParseException
- Description copied from interface:
BinaryOperatorI
- Calculates the value of this operator for given input with results stored in res.
res is returned. Using this method is slightly faster
than the standard run method as it eliminates the construction
of tempoary objects.
- Specified by:
calcValue
in interface BinaryOperatorI
- Throws:
ParseException
run
public void run(java.util.Stack inStack)
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 PostfixMathCommand
- Throws:
ParseException
http://www.singularsys.com/jep Copyright © 2004 Singular Systems