1 package nl.tudelft.simulation.jstats.distributions;
2
3 import nl.tudelft.simulation.jstats.streams.StreamInterface;
4
5 /**
6 * The Continuous distribution. For more information on this distribution see
7 * <a href="https://mathworld.wolfram.com/ContinuousDistribution.html">
8 * https://mathworld.wolfram.com/ContinuousDistribution.html </a>
9 * <p>
10 * Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
11 * for project information <a href="https://simulation.tudelft.nl/" target="_blank"> https://simulation.tudelft.nl</a>. The DSOL
12 * project is distributed under a three-clause BSD-style license, which can be found at
13 * <a href="https://https://simulation.tudelft.nl/dsol/docs/latest/license.html" target="_blank">
14 * https://https://simulation.tudelft.nl/dsol/docs/latest/license.html</a>.
15 * </p>
16 * @author <a href="https://www.linkedin.com/in/peterhmjacobs">Peter Jacobs </a>
17 * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
18 */
19 public abstract class DistContinuous extends Dist
20 {
21 /** */
22 private static final long serialVersionUID = 20140805L;
23
24 /**
25 * constructs a new continuous distribution.
26 * @param stream StreamInterface; the stream
27 */
28 public DistContinuous(final StreamInterface stream)
29 {
30 super(stream);
31 }
32
33 /**
34 * draws the next stream value according to the probability of this this distribution.
35 * @return the next double value drawn.
36 */
37 public abstract double draw();
38
39 /**
40 * returns the probability density value of a value x.
41 * @param x double; the value for which the density function needs to be calculated
42 * @return double; the probability density for value x
43 */
44 public abstract double getProbabilityDensity(double x);
45 }