Reuse method from "MathArrays".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1604641 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
71fd124ddb
commit
f08b05b15a
|
@ -486,10 +486,7 @@ public class Percentile extends AbstractUnivariateStatistic implements Serializa
|
|||
*/
|
||||
private static double[] copyOf(final double[] values, final int begin, final int length) {
|
||||
MathArrays.verifyValues(values, begin, length);
|
||||
final double[] copy = new double[length];
|
||||
System.arraycopy(values, begin, copy, 0,
|
||||
FastMath.min(length, values.length));
|
||||
return copy;
|
||||
return MathArrays.copyOfRange(values, begin, begin + length);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue