Source code: jmat/function/MatrixFunction.java
1 package jmat.function;
2
3 import jmat.data.Matrix;
4
5
6 /**
7 * <p>Titre : JAva MAtrix TOols</p>
8 * <p>Description : </p>
9 * @author Yann RICHET
10 * @version 1.0
11 */
12 public abstract class MatrixFunction
13 {
14 //~ Instance fields ////////////////////////////////////////////////////////
15
16 protected int argNumber;
17
18 //~ Methods ////////////////////////////////////////////////////////////////
19
20 public abstract Matrix eval(Matrix[] values);
21
22 public void checkArgNumber(int n)
23 {
24 if (argNumber != n)
25 {
26 throw new IllegalArgumentException(
27 "Number of arguments must equals " + n);
28 }
29 }
30 }
31 ///////////////////////////////////////////////////////////////////////////////
32 // END OF FILE.
33 ///////////////////////////////////////////////////////////////////////////////