Skip to content

Commit

Permalink
fixed files form Math #61
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 9ed250b commit 8559d33
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.io.Serializable;

import org.apache.commons.math.MathException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.exception.NotStrictlyPositiveException;
import org.apache.commons.math.exception.util.LocalizedFormats;
import org.apache.commons.math.special.Gamma;
import org.apache.commons.math.util.MathUtils;
Expand Down Expand Up @@ -91,7 +91,7 @@ public PoissonDistributionImpl(double p) {
*/
public PoissonDistributionImpl(double p, double epsilon, int maxIterations) {
if (p <= 0) {
throw MathRuntimeException.createIllegalArgumentException(LocalizedFormats.NOT_POSITIVE_POISSON_MEAN, p);
throw new NotStrictlyPositiveException(LocalizedFormats.MEAN, p);
}
mean = p;
normal = new NormalDistributionImpl(p, FastMath.sqrt(p));
Expand Down

0 comments on commit 8559d33

Please sign in to comment.