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