You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ps...@apache.org on 2004/12/04 21:47:46 UTC

cvs commit: jakarta-commons/math/src/java/org/apache/commons/math/stat/inference ChiSquareTestImpl.java

psteitz     2004/12/04 12:47:46

  Modified:    math/src/java/org/apache/commons/math/stat/inference
                        ChiSquareTestImpl.java
  Log:
  Fixed bug in ChiSquareTest isNonNegative function that was incorrectly
  rejecting 2-way tables with zero counts.
  Fixes PR #32531
  Reported by: Hans van der Heijden
  
  Revision  Changes    Path
  1.11      +2 -2      jakarta-commons/math/src/java/org/apache/commons/math/stat/inference/ChiSquareTestImpl.java
  
  Index: ChiSquareTestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/inference/ChiSquareTestImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ChiSquareTestImpl.java	26 Jun 2004 22:08:02 -0000	1.10
  +++ ChiSquareTestImpl.java	4 Dec 2004 20:47:46 -0000	1.11
  @@ -268,7 +268,7 @@
       private boolean isNonNegative(long[][] in) {
           for (int i = 0; i < in.length; i ++) {
               for (int j = 0; j < in[i].length; j++) {
  -                if (in[i][j] <= 0) {
  +                if (in[i][j] < 0) {
                       return false;
                   }
               }
  
  
  

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