Interface Distribution

All Superinterfaces:
Serializable, TetradSerializable
All Known Implementing Classes:
Beta, ChiSquare, Discrete, Exponential, Gamma, GaussianPower, Indicator, LogNormal, MixtureOfGaussians, Normal, Poisson, SingleValue, Split, TruncatedNormal, Uniform

public interface Distribution extends TetradSerializable
Interface for a statistical distribution from which random values can be drawn. Methods are provided for setting/getting parameters in the interface. A single random number generator is used throughout Tetrad to ensure randomness.
Author:
josephramsey
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of the distribution.
    int
    Returns the number of parameters in the distribution.
    double
    getParameter(int index)
    Returns the index'th parameter.
    getParameterName(int index)
    The name of the index'th parameter, for display purposes.
    double
    Returns the next random number from the distribution.
    void
    setParameter(int index, double value)
    Sets the index'th parameter to the given value.
  • Field Details

  • Method Details

    • getNumParameters

      int getNumParameters()
      Returns the number of parameters in the distribution.
      Returns:
      the number of parameters.
    • getName

      String getName()
      Returns the name of the distribution.
      Returns:
      the name.
    • setParameter

      void setParameter(int index, double value)
      Sets the index'th parameter to the given value.
      Parameters:
      index - Ibid. Must be >= 0 and < # parameters.
      value - Ibid.
    • getParameter

      double getParameter(int index)
      Returns the index'th parameter.
      Parameters:
      index - Ibid. Muist be <= 0 and < # parameters.
      Returns:
      The Ibid.
    • getParameterName

      String getParameterName(int index)
      The name of the index'th parameter, for display purposes.
      Parameters:
      index - Ibid. Must be >= 0 and < # parameters.
      Returns:
      Ibid.
    • nextRandom

      double nextRandom()
      Returns the next random number from the distribution.
      Returns:
      Ibid.