commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r731285 - /commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
Date Sun, 04 Jan 2009 16:14:34 GMT
Author: luc
Date: Sun Jan  4 08:14:34 2009
New Revision: 731285

URL: http://svn.apache.org/viewvc?rev=731285&view=rev
Log:
fixed a block width computation error

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java?rev=731285&r1=731284&r2=731285&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
Sun Jan  4 08:14:34 2009
@@ -700,7 +700,7 @@
                 final int      outIndex = iBlock * out.blockColumns + jBlock;
                 final double[] outBlock = out.blocks[outIndex];
                 final int      index    = pBlock * blockColumns + qBlock;
-                final int      width    = blockWidth(index);
+                final int      width    = blockWidth(qBlock);
 
                 final int heightExcess = iHeight + rowsShift - BLOCK_SIZE;
                 final int widthExcess  = jWidth + columnsShift - BLOCK_SIZE;
@@ -708,7 +708,7 @@
                     // the submatrix block spans on two blocks rows from the original matrix
                     if (widthExcess > 0) {
                         // the submatrix block spans on two blocks columns from the original
matrix
-                        final int width2 = blockWidth(index + 1);
+                        final int width2 = blockWidth(qBlock + 1);
                         copyBlockPart(blocks[index], width,
                                       rowsShift, BLOCK_SIZE,
                                       columnsShift, BLOCK_SIZE,
@@ -740,7 +740,7 @@
                     // the submatrix block spans on one block row from the original matrix
                     if (widthExcess > 0) {
                         // the submatrix block spans on two blocks columns from the original
matrix
-                        final int width2 = blockWidth(index + 1);
+                        final int width2 = blockWidth(qBlock + 1);
                         copyBlockPart(blocks[index], width,
                                       rowsShift, iHeight + rowsShift,
                                       columnsShift, BLOCK_SIZE,



Mime
View raw message