/** * This default implementation just calls {@link #increment} in a loop over * the specified portion of the input array. * <p> * Throws IllegalArgumentException if the input values array is null.</p> * * @param values array holding values to add * @param begin index of the first array element to add * @param length number of array elements to add * @throws IllegalArgumentException if values is null * @see org.apache.commons.math.stat.descriptive.StorelessUnivariateStatistic#incrementAll(double[], int, int) */ public void incrementAll(double[] values, int begin, int length) { if (test(values, begin, length)) { int k = begin + length; for (int i = begin; i < k; i++) { increment(values[i]); } } }
/** * This default implementation just calls {@link #increment} in a loop over * the specified portion of the input array. * <p> * Throws IllegalArgumentException if the input values array is null.</p> * * @param values array holding values to add * @param begin index of the first array element to add * @param length number of array elements to add * @throws IllegalArgumentException if values is null * @see org.apache.commons.math.stat.descriptive.StorelessUnivariateStatistic#incrementAll(double[], int, int) */ public void incrementAll(double[] values, int begin, int length) { if (test(values, begin, length)) { int k = begin + length; for (int i = begin; i < k; i++) { increment(values[i]); } } }
/** * This default implementation just calls {@link #increment} in a loop over * the specified portion of the input array. * <p> * Throws IllegalArgumentException if the input values array is null.</p> * * @param values array holding values to add * @param begin index of the first array element to add * @param length number of array elements to add * @throws IllegalArgumentException if values is null * @see org.apache.commons.math.stat.descriptive.StorelessUnivariateStatistic#incrementAll(double[], int, int) */ public void incrementAll(double[] values, int begin, int length) { if (test(values, begin, length)) { int k = begin + length; for (int i = begin; i < k; i++) { increment(values[i]); } } }