KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lsmp > djep > vectorJep > function > BinaryOperatorI


1 /* @author rich
2  * Created on 02-Nov-2003
3  *
4  * This code is covered by a Creative Commons
5  * Attribution, Non Commercial, Share Alike license
6  * <a HREF="http://creativecommons.org/licenses/by-nc-sa/1.0">License</a>
7  */

8 package org.lsmp.djep.vectorJep.function;
9 import org.lsmp.djep.vectorJep.*;
10 import org.lsmp.djep.vectorJep.values.*;
11 import org.nfunk.jep.ParseException;
12 import org.nfunk.jep.function.PostfixMathCommandI;
13
14 /**
15  * A matrix enabled binary operator.
16  * This interface is primarilary used in the matrixJep package
17  * but is here for convienience.
18  *
19  * @author Rich Morris
20  * Created on 02-Nov-2003
21  */

22 public interface BinaryOperatorI extends PostfixMathCommandI {
23     /** Find the dimensions of this operator when applied to arguments with given dimensions. */
24     public Dimensions calcDim(Dimensions ldim,Dimensions rdim) throws ParseException;
25     /** Calculates the value of this operator for given input with results stored in res.
26      * res is returned. Using this method is slightly faster
27      * than the standard run method as it eliminates the construction
28      * of tempoary objects.
29      */

30     public MatrixValueI calcValue(
31         MatrixValueI res,
32         MatrixValueI lhs,
33         MatrixValueI rhs) throws ParseException;
34 }
35
Popular Tags