View Javadoc
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-2025 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/dsol/manual/" target="_blank">DSOL Manual</a>. The DSOL
12   * project is distributed under a three-clause BSD-style license, which can be found at
13   * <a href="https://simulation.tudelft.nl/dsol/docs/latest/license.html" target="_blank">DSOL License</a>.
14   * </p>
15   * @author <a href="https://www.linkedin.com/in/peterhmjacobs">Peter Jacobs </a>
16   * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
17   */
18  public abstract class DistContinuous extends Dist
19  {
20      /**
21       * constructs a new continuous distribution.
22       * @param stream the stream
23       */
24      public DistContinuous(final StreamInterface stream)
25      {
26          super(stream);
27      }
28  
29      /**
30       * draws the next stream value according to the probability of this this distribution.
31       * @return the next double value drawn.
32       */
33      public abstract double draw();
34  
35      /**
36       * returns the probability density value of a value x.
37       * @param x the value for which the density function needs to be calculated
38       * @return the probability density for value x
39       */
40      public abstract double getProbabilityDensity(double x);
41  }