org.hipparchus.stat.descriptive

## Interface WeightedEvaluation

• All Known Implementing Classes:
Mean, Product, Sum, Variance

public interface WeightedEvaluation
Weighted evaluation for statistics.
• ### Method Summary

All Methods
Modifier and Type Method and Description
default double evaluate(double[] values, double[] weights)
Returns the result of evaluating the statistic over the input array, using the supplied weights.
double evaluate(double[] values, double[] weights, int begin, int length)
Returns the result of evaluating the statistic over the specified entries in the input array, using corresponding entries in the supplied weights array.
• ### Method Detail

• #### evaluate

default double evaluate(double[] values,
double[] weights)
throws MathIllegalArgumentException
Returns the result of evaluating the statistic over the input array, using the supplied weights.

The default implementation delegates to evaluate(double[], double[], int, int) in the natural way.

Parameters:
values - input array
weights - array of weights
Returns:
the value of the weighted statistic applied to the input array
Throws:
MathIllegalArgumentException - if either array is null, lengths do not match, weights contain NaN, negative or infinite values, or weights does not include at least on positive value
• #### evaluate

double evaluate(double[] values,
double[] weights,
int begin,
int length)
throws MathIllegalArgumentException
Returns the result of evaluating the statistic over the specified entries in the input array, using corresponding entries in the supplied weights array.
Parameters:
values - the input array
weights - array of weights
begin - the index of the first element to include
length - the number of elements to include
Returns:
the value of the weighted statistic applied to the included array entries
Throws:
MathIllegalArgumentException - if either array is null, lengths do not match, indices are invalid, weights contain NaN, negative or infinite values, or weights does not include at least on positive value