Interface EmpiricalDistributionInterface

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractEmpiricalDistribution, DiscreteEmpiricalDistribution, InterpolatedEmpiricalDistribution

public interface EmpiricalDistributionInterface extends Serializable
The EmpiricalDistributionInterface describes a cumulative distribution function for an empirical distribution. In other words, it describes an ordered list of pairs (cumulative probability, value) from which values can be drawn using the inverse function method with a Uniform(0, 1) random distribution.

Copyright (c) 2021-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Author:
Alexander Verbraeck
  • Method Summary

    Modifier and Type
    Method
    Description
    getCeilingEntry(double cumulativeProbability)
    Return the cumulative probability and number above or at the given probability, or null when the cumulative probability is larger than the highest cumulative probability (1.0).
    Return the cumulative probability and number above or at the given value, or null when the value is larger than the highest value in the distribution.
    Returns the cumulative probabilities as a list.
    getFloorEntry(double cumulativeProbability)
    Return the cumulative probability and number below or at the given probability, or null when the cumulative probability is smaller than the lowest cumulative probability.
    Return the cumulative probability and number below or at the given value, or null when the value is smaller than the lowest value in the distribution.
    Return the highest value that this empirical distribution can return.
    Return the lowest value that this empirical distribution can return.
    getNextEntry(double cumulativeProbability)
    Return the cumulative probability and number that follows in the sequence with respect to the given probability, or null when the cumulative probability is larger than the highest cumulative probability.
    getPrevEntry(double cumulativeProbability)
    Return the cumulative probability and number that precedes in the sequence with respect to the given probability, or null when the cumulative probability is smaller than the lowest cumulative probability.
    Returns the values as a list.
    int
    Returns the number of probability-value mappings in this structure.
  • Method Details

    • size

      int size()
      Returns the number of probability-value mappings in this structure.
      Returns:
      int; the number of probability-value mappings in this structure.
    • getValues

      List<Number> getValues()
      Returns the values as a list.
      Returns:
      the list of values
    • getCumulativeProbabilities

      List<Double> getCumulativeProbabilities()
      Returns the cumulative probabilities as a list.
      Returns:
      the list of cumulative probabilities
    • getFloorEntry

      DistributionEntry getFloorEntry(double cumulativeProbability)
      Return the cumulative probability and number below or at the given probability, or null when the cumulative probability is smaller than the lowest cumulative probability.
      Parameters:
      cumulativeProbability - double; the cumulative probability to look up
      Returns:
      DistributionEntry; an entry object with the probability and corresponding value below or at the provided cumulative probability. Return null when the cumulative probability is smaller than the lowest cumulative probability
    • getCeilingEntry

      DistributionEntry getCeilingEntry(double cumulativeProbability)
      Return the cumulative probability and number above or at the given probability, or null when the cumulative probability is larger than the highest cumulative probability (1.0).
      Parameters:
      cumulativeProbability - double; the cumulative probability to look up
      Returns:
      DistributionEntry; an entry object with the probability and corresponding value above or at the provided cumulative probability. Return null when the cumulative probability is larger than the highest cumulative probability (1.0)
    • getPrevEntry

      DistributionEntry getPrevEntry(double cumulativeProbability)
      Return the cumulative probability and number that precedes in the sequence with respect to the given probability, or null when the cumulative probability is smaller than the lowest cumulative probability. When cumulativeProbability is not a key, the floorEntry is returned instead.
      Parameters:
      cumulativeProbability - double; the cumulative probability to look up
      Returns:
      DistributionEntry; the first entry object with the probability and corresponding value below (but not at) the provided cumulative probability. Return null when the cumulative probability is smaller than the lowest cumulative probability
    • getNextEntry

      DistributionEntry getNextEntry(double cumulativeProbability)
      Return the cumulative probability and number that follows in the sequence with respect to the given probability, or null when the cumulative probability is larger than the highest cumulative probability. When cumulativeProbability is not a key, the ceilingEntry is returned instead.
      Parameters:
      cumulativeProbability - double; the cumulative probability to look up
      Returns:
      DistributionEntry; the first entry object with the probability and corresponding value above (but not at) the provided cumulative probability. Return null when the cumulative probability is larger than the highest cumulative probability
    • getFloorEntryForValue

      DistributionEntry getFloorEntryForValue(Number value)
      Return the cumulative probability and number below or at the given value, or null when the value is smaller than the lowest value in the distribution.
      Parameters:
      value - Number; the value to look up
      Returns:
      DistributionEntry; an entry object with the probability and corresponding value below or at the provided cumulative probability. Return null when the cumulative probability is smaller than the lowest cumulative probability
    • getCeilingEntryForValue

      DistributionEntry getCeilingEntryForValue(Number value)
      Return the cumulative probability and number above or at the given value, or null when the value is larger than the highest value in the distribution.
      Parameters:
      value - Number; the value to look up
      Returns:
      DistributionEntry; an entry object with the probability and corresponding value above or at the provided cumulative probability. Return null when the cumulative probability is larger than the highest cumulative probability
    • getHighestValue

      Number getHighestValue()
      Return the highest value that this empirical distribution can return.
      Returns:
      Number; the highest value that this empirical distribution can return
    • getLowestValue

      Number getLowestValue()
      Return the lowest value that this empirical distribution can return.
      Returns:
      Number; the lowest value that this empirical distribution can return