You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2014/06/22 21:07:56 UTC
svn commit: r1604641 -
/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java
Author: erans
Date: Sun Jun 22 19:07:55 2014
New Revision: 1604641
URL: http://svn.apache.org/r1604641
Log:
Reuse method from "MathArrays".
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java?rev=1604641&r1=1604640&r2=1604641&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java Sun Jun 22 19:07:55 2014
@@ -486,10 +486,7 @@ public class Percentile extends Abstract
*/
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);
}
/**