Debian Codegraph @

src/dr/math/distributions/Distribution.java

raw symbols SCIP
1 /*
2 * Distribution.java
3 *
4 * Copyright (c) 2002-2015 Alexei Drummond, Andrew Rambaut and Marc Suchard
5 *
6 * This file is part of BEAST.
7 * See the NOTICE file distributed with this work for additional
8 * information regarding copyright ownership and licensing.
9 *
10 * BEAST is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as
12 * published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * BEAST is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with BEAST; if not, write to the
22 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23 * Boston, MA 02110-1301 USA
24 */
25
26 package dr.math.distributions;
27
28 import dr.math.UnivariateFunction;
29
30 /**
31 * an interface for a distribution.
32 *
33 * @author Alexei Drummond
34 * @author Andrew Rambaut
35 * @version $Id: Distribution.java,v 1.7 2005/05/24 20:26:00 rambaut Exp $
36 */
37 public interface Distribution {
38 /**
39 * probability density function of the distribution
40 *
41 * @param x argument
42 * @return pdf value
43 */
44 public double pdf(double x);
45
46 /**
47 * the natural log of the probability density function of the distribution
48 *
49 * @param x argument
50 * @return log pdf value
51 */
52 public double logPdf(double x);
53
54 /**
55 * cumulative density function of the distribution
56 *
57 * @param x argument
58 * @return cdf value
59 */
60 public double cdf(double x);
61
62 /**
63 * quantile (inverse cumulative density function) of the distribution
64 *
65 * @param y argument
66 * @return icdf value
67 */
68 public double quantile(double y);
69
70 /**
71 * mean of the distribution
72 *
73 * @return mean
74 */
75 public double mean();
76
77 /**
78 * variance of the distribution
79 *
80 * @return variance
81 */
82 public double variance();
83
84 /**
85 * @return a probability density function representing this distribution
86 */
87 public UnivariateFunction getProbabilityDensityFunction();
88
89 }