1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.math.stat.descriptive;
17
18 /**
19 * Base evaluation interface implemented by all statistics.
20 * <p>
21 * Includes "stateless" <code>evaluate</code> methods that take
22 * <code>double[]</code> arrays as input and return the value of the statistic
23 * applied to the input values.
24 *
25 * @version $Revision: 155427 $ $Date: 2005-02-26 06:11:52 -0700 (Sat, 26 Feb 2005) $
26 */
27 public interface UnivariateStatistic {
28
29 /**
30 * Returns the result of evaluating the statistic over the input array.
31 *
32 * @param values input array
33 * @return the value of the statistic applied to the input array
34 */
35 double evaluate(double[] values);
36
37 /**
38 * Returns the result of evaluating the statistic over the specified entries
39 * in the input array.
40 *
41 * @param values the input array
42 * @param begin the index of the first element to include
43 * @param length the number of elements to include
44 * @return the value of the statistic applied to the included array entries
45 */
46 double evaluate(double[] values, int begin, int length);
47
48 }