001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.commons.math.distribution;
018    
019    import org.apache.commons.math.MathException;
020    
021    /**
022     * <p>Base interface for continuous distributions.</p>
023     *
024     * <p>Note: this interface will be extended in version 3.0 to include
025     * <br/><code>public double density(double x)</code><br/>
026     * that is, from version 3.0 forward, continuous distributions <strong>must</strong>
027     * include implementations of probability density functions. As of version
028     * 2.1, all continuous distribution implementations included in commons-math
029     * provide implementations of this method.</p>
030     *
031     * @version $Revision: 924362 $ $Date: 2010-03-17 12:45:31 -0400 (Wed, 17 Mar 2010) $
032     */
033    public interface ContinuousDistribution extends Distribution {
034    
035        /**
036         * For this distribution, X, this method returns x such that P(X &lt; x) = p.
037         * @param p the cumulative probability.
038         * @return x.
039         * @throws MathException if the inverse cumulative probability can not be
040         *            computed due to convergence or other numerical errors.
041         */
042        double inverseCumulativeProbability(double p) throws MathException;
043    }