1 16 package org.apache.commons.math.distribution; 17 18 import java.io.Serializable ; 19 20 import org.apache.commons.math.MathException; 21 22 27 public abstract class AbstractDistribution 28 implements Distribution, Serializable { 29 30 31 static final long serialVersionUID = -38038050983108802L; 32 33 36 protected AbstractDistribution() { 37 super(); 38 } 39 40 57 public double cumulativeProbability(double x0, double x1) 58 throws MathException { 59 if (x0 > x1) { 60 throw new IllegalArgumentException 61 ("lower endpoint must be less than or equal to upper endpoint"); 62 } 63 return cumulativeProbability(x1) - cumulativeProbability(x0); 64 } 65 } 66 | Popular Tags |