commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1175683 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear: IterativeLinearSolver.java PreconditionedIterativeLinearSolver.java
Date Mon, 26 Sep 2011 06:04:33 GMT
Author: celestin
Date: Mon Sep 26 06:04:33 2011
New Revision: 1175683

URL: http://svn.apache.org/viewvc?rev=1175683&view=rev
Log:
Completed a test which did not exhaust all possibilities. Also cosmetic changes (param naming).

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/IterativeLinearSolver.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/PreconditionedIterativeLinearSolver.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/IterativeLinearSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/IterativeLinearSolver.java?rev=1175683&r1=1175682&r2=1175683&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/IterativeLinearSolver.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/IterativeLinearSolver.java
Mon Sep 26 06:04:33 2011
@@ -88,10 +88,10 @@ public abstract class IterativeLinearSol
         }
         if (inPlace) {
             MathUtils.checkNotNull(x0);
-            if (x0.getDimension() != a.getColumnDimension()) {
-                throw new DimensionMismatchException(x0.getDimension(),
-                                                     a.getColumnDimension());
-            }
+        }
+        if ((x0 != null) && (x0.getDimension() != a.getColumnDimension())) {
+            throw new DimensionMismatchException(x0.getDimension(),
+                                                 a.getColumnDimension());
         }
     }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/PreconditionedIterativeLinearSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/PreconditionedIterativeLinearSolver.java?rev=1175683&r1=1175682&r2=1175683&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/PreconditionedIterativeLinearSolver.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/PreconditionedIterativeLinearSolver.java
Mon Sep 26 06:04:33 2011
@@ -126,10 +126,10 @@ public abstract class PreconditionedIter
     /** {@inheritDoc} */
     @Override
     public RealVector solve(final RealLinearOperator a, final RealVector b,
-                            final RealVector x, final boolean inPlace)
+                            final RealVector x0, final boolean inPlace)
         throws NullArgumentException, NonSquareLinearOperatorException,
         DimensionMismatchException, MaxCountExceededException {
-        checkParameters(a, b, x, inPlace);
-        return solve(a, null, b, x, inPlace);
+        checkParameters(a, b, x0, inPlace);
+        return solve(a, null, b, x0, inPlace);
     }
 }



Mime
View raw message