You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ce...@apache.org on 2011/09/08 07:59:22 UTC

svn commit: r1166533 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsNordsieckTransformer.java

Author: celestin
Date: Thu Sep  8 05:59:22 2011
New Revision: 1166533

URL: http://svn.apache.org/viewvc?rev=1166533&view=rev
Log:
Removed call to double[][] solve(double[][]) from initializeHighOrderDerivatives.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsNordsieckTransformer.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsNordsieckTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsNordsieckTransformer.java?rev=1166533&r1=1166532&r2=1166533&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsNordsieckTransformer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsNordsieckTransformer.java Thu Sep  8 05:59:22 2011
@@ -30,6 +30,7 @@ import org.apache.commons.math.linear.Fi
 import org.apache.commons.math.linear.MatrixUtils;
 import org.apache.commons.math.linear.QRDecomposition;
 import org.apache.commons.math.linear.QRDecompositionImpl;
+import org.apache.commons.math.linear.RealMatrix;
 
 /** Transformer to Nordsieck vectors for Adams integrators.
  * <p>This class is used by {@link AdamsBashforthIntegrator Adams-Bashforth} and
@@ -289,8 +290,8 @@ public class AdamsNordsieckTransformer {
         // solve the rectangular system in the least square sense
         // to get the best estimate of the Nordsieck vector [s2 ... sk]
         QRDecomposition decomposition = new QRDecompositionImpl(new Array2DRowRealMatrix(a, false));
-        return new Array2DRowRealMatrix(decomposition.getSolver().solve(b), false);
-
+        RealMatrix x = decomposition.getSolver().solve(new Array2DRowRealMatrix(b, false));
+        return new Array2DRowRealMatrix(x.getData(), false);
     }
 
     /** Update the high order scaled derivatives for Adams integrators (phase 1).