commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject cvs commit: jakarta-commons/math/src/java/org/apache/commons/math/linear RealMatrixImpl.java
Date Mon, 25 Oct 2004 02:13:22 GMT
psteitz     2004/10/24 19:13:22

  Modified:    math/src/java/org/apache/commons/math/linear
                        RealMatrixImpl.java
  Log:
  Fixed hashcode computation so elements in first row, col contribute.
  
  Revision  Changes    Path
  1.34      +3 -3      jakarta-commons/math/src/java/org/apache/commons/math/linear/RealMatrixImpl.java
  
  Index: RealMatrixImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/linear/RealMatrixImpl.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- RealMatrixImpl.java	12 Oct 2004 06:19:50 -0000	1.33
  +++ RealMatrixImpl.java	25 Oct 2004 02:13:22 -0000	1.34
  @@ -861,10 +861,10 @@
           ret = ret * 31 + nCols;
           for (int row = 0; row < nRows; row++) {
              for (int col = 0; col < nCols; col++) {
  -               ret = ret * 31 + (11 * row + 17 * col) * 
  +               ret = ret * 31 + (11 * (row+1) + 17 * (col+1)) * 
                      MathUtils.hash(data[row][col]);
              }
  -        }   
  +        }
           return ret;
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message