commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1306133 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ConjugateGradient.java
Date Wed, 28 Mar 2012 03:00:33 GMT
Author: celestin
Date: Wed Mar 28 03:00:33 2012
New Revision: 1306133

URL: http://svn.apache.org/viewvc?rev=1306133&view=rev
Log:
Changed o.a.c.m3.linear.ConjugateGradient according to MATH-771.

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ConjugateGradient.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ConjugateGradient.java?rev=1306133&r1=1306132&r2=1306133&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ConjugateGradient.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/ConjugateGradient.java
Wed Mar 28 03:00:33 2012
@@ -139,10 +139,10 @@ public class ConjugateGradient
     /** {@inheritDoc} */
     @Override
     public RealVector solveInPlace(final RealLinearOperator a,
-        final RealLinearOperator minv, final RealVector b, final RealVector x0)
+        final RealLinearOperator m, final RealVector b, final RealVector x0)
         throws NullArgumentException, NonSquareOperatorException,
         DimensionMismatchException, MaxCountExceededException {
-        checkParameters(a, minv, b, x0);
+        checkParameters(a, m, b, x0);
         final IterationManager manager = getIterationManager();
         // Initialization of default stopping criterion
         manager.resetIterationCount();
@@ -163,7 +163,7 @@ public class ConjugateGradient
         final RealVector rro = RealVector.unmodifiableRealVector(r);
         double rnorm = r.getNorm();
         RealVector z;
-        if (minv == null) {
+        if (m == null) {
             z = r;
         } else {
             z = null;
@@ -182,15 +182,15 @@ public class ConjugateGradient
             evt = new DefaultIterativeLinearSolverEvent(this,
                 manager.getIterations(), xro, bro, rro, rnorm);
             manager.fireIterationStartedEvent(evt);
-            if (minv != null) {
-                z = minv.operate(r);
+            if (m != null) {
+                z = m.operate(r);
             }
             final double rhoNext = r.dotProduct(z);
             if (check && (rhoNext <= 0.)) {
                 final NonPositiveDefiniteOperatorException e;
                 e = new NonPositiveDefiniteOperatorException();
                 final ExceptionContext context = e.getContext();
-                context.setValue(OPERATOR, minv);
+                context.setValue(OPERATOR, m);
                 context.setValue(VECTOR, r);
                 throw e;
             }



Mime
View raw message