Lines Matching defs:values

27  * Computes the variance of the available values.  By default, the unbiased
44 * full array of values in memory to execute a two-pass algorithm.
48 * Note that adding values using <code>increment</code> or
51 * <code>evaluate</code> with the full array of values. The former approach
52 * should only be used when the full array of values is not available.</p>
149 * <p>If all values are available, it is more accurate to use
150 * {@link #evaluate(double[])} rather than adding values one at a time
153 * list of values together to execute a two-pass algorithm.
210 * @param values the input array
211 * @return the variance of the values or Double.NaN if length = 0
215 public double evaluate(final double[] values) {
216 if (values == null) {
219 return evaluate(values, 0, values.length);
235 * @param values the input array
238 * @return the variance of the values or Double.NaN if length = 0
243 public double evaluate(final double[] values, final int begin, final int length) {
247 if (test(values, begin, length)) {
253 double m = mean.evaluate(values, begin, length);
254 var = evaluate(values, m, begin, length);
266 * &Sigma;(weights[i]*(values[i] - weightedMean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1)
272 * weights are to be treated as "expansion values," as will be the case if for example
275 * <code>evaluate(values, MathUtils.normalizeArray(weights, values.length)); </code>
281 * <ul><li>the values array is null</li>
283 * <li>the weights array does not have the same length as the values array</li>
284 * <li>the weights array contains one or more infinite values</li>
285 * <li>the weights array contains one or more NaN values</li>
286 * <li>the weights array contains negative values</li>
294 * @param values the input array
298 * @return the weighted variance of the values or Double.NaN if length = 0
302 public double evaluate(final double[] values, final double[] weights,
307 if (test(values, weights,begin, length)) {
313 double m = mean.evaluate(values, weights, begin, length);
314 var = evaluate(values, weights, m, begin, length);
325 * &Sigma;(weights[i]*(values[i] - weightedMean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1)
331 * weights are to be treated as "expansion values," as will be the case if for example
334 * <code>evaluate(values, MathUtils.normalizeArray(weights, values.length)); </code>
340 * <ul><li>the values array is null</li>
342 * <li>the weights array does not have the same length as the values array</li>
343 * <li>the weights array contains one or more infinite values</li>
344 * <li>the weights array contains one or more NaN values</li>
345 * <li>the weights array contains negative values</li>
352 * @param values the input array
354 * @return the weighted variance of the values
358 public double evaluate(final double[] values, final double[] weights) {
359 return evaluate(values, weights, 0, values.length);
380 * @param values the input array
384 * @return the variance of the values or Double.NaN if length = 0
388 public double evaluate(final double[] values, final double mean,
393 if (test(values, begin, length)) {
401 dev = values[i] - mean;
436 * @param values the input array
438 * @return the variance of the values or Double.NaN if the array is empty
441 public double evaluate(final double[] values, final double mean) {
442 return evaluate(values, mean, 0, values.length);
451 * &Sigma;(weights[i]*(values[i] - mean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1)
461 * weights are to be treated as "expansion values," as will be the case if for example
464 * <code>evaluate(values, MathUtils.normalizeArray(weights, values.length), mean); </code>
470 * <ul><li>the values array is null</li>
472 * <li>the weights array does not have the same length as the values array</li>
473 * <li>the weights array contains one or more infinite values</li>
474 * <li>the weights array contains one or more NaN values</li>
475 * <li>the weights array contains negative values</li>
481 * @param values the input array
486 * @return the variance of the values or Double.NaN if length = 0
490 public double evaluate(final double[] values, final double[] weights,
495 if (test(values, weights, begin, length)) {
503 dev = values[i] - mean;
524 * <p>Returns the weighted variance of the values in the input array, using
528 * &Sigma;(weights[i]*(values[i] - mean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1)
538 * weights are to be treated as "expansion values," as will be the case if for example
541 * <code>evaluate(values, MathUtils.normalizeArray(weights, values.length), mean); </code>
547 * <ul><li>the values array is null</li>
549 * <li>the weights array does not have the same length as the values array</li>
550 * <li>the weights array contains one or more infinite values</li>
551 * <li>the weights array contains one or more NaN values</li>
552 * <li>the weights array contains negative values</li>
557 * @param values the input array
560 * @return the variance of the values or Double.NaN if length = 0
564 public double evaluate(final double[] values, final double[] weights, final double mean) {
565 return evaluate(values, weights, mean, 0, values.length);