commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1172470 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsNordsieckTransformer.java
Date Mon, 19 Sep 2011 06:15:54 GMT
Author: celestin
Date: Mon Sep 19 06:15:53 2011
New Revision: 1172470

URL: http://svn.apache.org/viewvc?rev=1172470&view=rev
Log:
Replaced call to FieldDecompositionSolver<T>.solve(T[]) by FieldDecompositionSolver<T>.solve(FieldVector<T>).
The code works, but might be improved (replace T[] with FieldVector<T> all over?).

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=1172470&r1=1172469&r2=1172470&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
Mon Sep 19 06:15:53 2011
@@ -24,6 +24,7 @@ import java.util.Map;
 import org.apache.commons.math.fraction.BigFraction;
 import org.apache.commons.math.linear.Array2DRowFieldMatrix;
 import org.apache.commons.math.linear.Array2DRowRealMatrix;
+import org.apache.commons.math.linear.ArrayFieldVector;
 import org.apache.commons.math.linear.FieldDecompositionSolver;
 import org.apache.commons.math.linear.FieldLUDecompositionImpl;
 import org.apache.commons.math.linear.FieldMatrix;
@@ -157,7 +158,8 @@ public class AdamsNordsieckTransformer {
 
         BigFraction[] u = new BigFraction[nSteps];
         Arrays.fill(u, BigFraction.ONE);
-        BigFraction[] bigC1 = pSolver.solve(u);
+        BigFraction[] bigC1 = pSolver
+            .solve(new ArrayFieldVector<BigFraction>(u, false)).toArray();
 
         // update coefficients are computed by combining transform from
         // Nordsieck to multistep, then shifting rows to represent step advance



Mime
View raw message