commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1296541 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldLUDecomposition.java
Date Sat, 03 Mar 2012 00:53:09 GMT
Author: sebb
Date: Sat Mar  3 00:53:08 2012
New Revision: 1296541

URL: http://svn.apache.org/viewvc?rev=1296541&view=rev
Log:
Use getter instead of direct array reference

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldLUDecomposition.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldLUDecomposition.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldLUDecomposition.java?rev=1296541&r1=1296540&r2=1296541&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldLUDecomposition.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/FieldLUDecomposition.java
Sat Mar  3 00:53:08 2012
@@ -346,8 +346,9 @@ public class FieldLUDecomposition<T exte
          */
         public ArrayFieldVector<T> solve(ArrayFieldVector<T> b) {
             final int m = pivot.length;
-            if (b.data.length != m) {
-                throw new DimensionMismatchException(b.data.length, m);
+            final int length = b.getDataRef().length;
+            if (length != m) {
+                throw new DimensionMismatchException(length, m);
             }
             if (singular) {
                 throw new SingularMatrixException();
@@ -360,7 +361,7 @@ public class FieldLUDecomposition<T exte
 
             // Apply permutations to b
             for (int row = 0; row < m; row++) {
-                bp[row] = b.data[pivot[row]];
+                bp[row] = b.getEntry(pivot[row]);
             }
 
             // Solve LY = b



Mime
View raw message