commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject [math] Fixed ignored method parameters in QRDecomposition protected methods.
Date Fri, 10 Apr 2015 19:44:28 GMT
Repository: commons-math
Updated Branches:
  refs/heads/master 8937821b5 -> 8d210b4f8


Fixed ignored method parameters in QRDecomposition protected methods.

JIRA: MATH-1191

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/8d210b4f
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/8d210b4f
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/8d210b4f

Branch: refs/heads/master
Commit: 8d210b4f84b85e3d67933be3079e1ce51b60eeaa
Parents: 8937821
Author: Luc Maisonobe <luc@apache.org>
Authored: Fri Apr 10 21:36:04 2015 +0200
Committer: Luc Maisonobe <luc@apache.org>
Committed: Fri Apr 10 21:36:04 2015 +0200

----------------------------------------------------------------------
 src/changes/changes.xml                                   |  3 +++
 .../org/apache/commons/math4/linear/QRDecomposition.java  | 10 +++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/8d210b4f/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8214993..39fe6fe 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -54,6 +54,9 @@ If the output is not quite correct, check for invisible trailing spaces!
     </release>
 
     <release version="4.0" date="XXXX-XX-XX" description="">
+      <action dev="luc" type="fix" issue="MATH-1191">
+        Fixed ignored method parameters in QRDecomposition protected methods.
+      </action>    
       <action dev="luc" type="fix" issue="MATH-1212">
         Changed javadoc as the RandomDataGenerator class does not implement
         an interface anymore (the previous interface has been deprecated in

http://git-wip-us.apache.org/repos/asf/commons-math/blob/8d210b4f/src/main/java/org/apache/commons/math4/linear/QRDecomposition.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/linear/QRDecomposition.java b/src/main/java/org/apache/commons/math4/linear/QRDecomposition.java
index 26953c5..aca4098 100644
--- a/src/main/java/org/apache/commons/math4/linear/QRDecomposition.java
+++ b/src/main/java/org/apache/commons/math4/linear/QRDecomposition.java
@@ -109,8 +109,8 @@ public class QRDecomposition {
      * @since 3.2
      */
     protected void decompose(double[][] matrix) {
-        for (int minor = 0; minor < FastMath.min(qrt.length, qrt[0].length); minor++)
{
-            performHouseholderReflection(minor, qrt);
+        for (int minor = 0; minor < FastMath.min(matrix.length, matrix[0].length); minor++)
{
+            performHouseholderReflection(minor, matrix);
         }
     }
 
@@ -121,7 +121,7 @@ public class QRDecomposition {
      */
     protected void performHouseholderReflection(int minor, double[][] matrix) {
 
-        final double[] qrtMinor = qrt[minor];
+        final double[] qrtMinor = matrix[minor];
 
         /*
          * Let x be the first column of the minor, and a^2 = |x|^2.
@@ -162,8 +162,8 @@ public class QRDecomposition {
              * |v|^2 = -2a*(qr[minor][minor]), so
              * alpha = -<x,v>/(a*qr[minor][minor])
              */
-            for (int col = minor+1; col < qrt.length; col++) {
-                final double[] qrtCol = qrt[col];
+            for (int col = minor+1; col < matrix.length; col++) {
+                final double[] qrtCol = matrix[col];
                 double alpha = 0;
                 for (int row = minor; row < qrtCol.length; row++) {
                     alpha -= qrtCol[row] * qrtMinor[row];


Mime
View raw message