psteitz     2004/07/22 22:20:26

  Modified:    math/src/java/org/apache/commons/math/distribution
                        AbstractDiscreteDistribution.java
  Log:
  Changed to allow p=1 as argument to inverseCumulativeProbability.
  
  Revision  Changes    Path
  1.18      +4 -4      
jakarta-commons/math/src/java/org/apache/commons/math/distribution/AbstractDiscreteDistribution.java
  
  Index: AbstractDiscreteDistribution.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/distribution/AbstractDiscreteDistribution.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- AbstractDiscreteDistribution.java 23 Jun 2004 16:26:15 -0000      1.17
  +++ AbstractDiscreteDistribution.java 23 Jul 2004 05:20:26 -0000      1.18
  @@ -65,12 +65,12 @@
        * @return the largest x such that P(X &le; x) <= p
        * @throws MathException if the inverse cumulative probability can not be
        *            computed due to convergence or other numerical errors.
  -     * @throws IllegalArgumentException if p < 0 or p >= 1
  +     * @throws IllegalArgumentException if p < 0 or p > 1
        */
       public int inverseCumulativeProbability(final double p) throws MathException{
  -        if (p < 0.0 || p >= 1.0) {
  +        if (p < 0.0 || p > 1.0) {
               throw new IllegalArgumentException(
  -                "p must be greater than or equal to 0.0 and strictly less than 
1.0");
  +                "p must be between 0 and 1.0 (inclusive)");
           }
           
           // by default, do simple bisection.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to