Author: luc Date: Sun Jun 1 12:40:16 2008 New Revision: 662274 URL: http://svn.apache.org/viewvc?rev=662274&view=rev Log: avoid array copy Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/estimation/AbstractEstimator.java Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/estimation/AbstractEstimator.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/estimation/AbstractEstimator.java?rev=662274&r1=662273&r2=662274&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/estimation/AbstractEstimator.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/estimation/AbstractEstimator.java Sun Jun 1 12:40:16 2008 @@ -179,7 +179,7 @@ try { // compute the covariances matrix - return new RealMatrixImpl(jTj).inverse().getData(); + return ((RealMatrixImpl) new RealMatrixImpl(jTj, false).inverse()).getDataRef(); } catch (InvalidMatrixException ime) { throw new EstimationException("unable to compute covariances: singular problem", new Object[0]);