Class Beta

java.lang.Object
edu.cmu.tetrad.util.dist.Beta
All Implemented Interfaces:
Distribution, TetradSerializable, Serializable

public class Beta extends Object implements Distribution
Implements a Beta distribution for purposes of drawing random numbers. The parameters are alpha and beta. See Wikipedia.
Author:
josephramsey
See Also:
  • Method Details

    • serializableInstance

      public static Beta serializableInstance()
      Generates a simple exemplar of this class to test serialization.
      Returns:
      Ibid.
    • nextRandom

      public double nextRandom()
      Returns the next random.
      Specified by:
      nextRandom in interface Distribution
      Returns:
      Ibid.
    • setParameter

      public void setParameter(int index, double value)
      The order of parameters is alpha = 0, beta = 1.
      Specified by:
      setParameter in interface Distribution
      Parameters:
      index - the index of the parameter.
      value - the value.
    • getParameter

      public double getParameter(int index)
      The order of parameters is alpha = 0, beta = 1.
      Specified by:
      getParameter in interface Distribution
      Parameters:
      index - the index.
      Returns:
      The Ibid.
    • getParameterName

      public String getParameterName(int index)
      The order of parameters is alpha = 0, beta = 1.
      Specified by:
      getParameterName in interface Distribution
      Parameters:
      index - the index.
      Returns:
      Ibid.
    • getNumParameters

      public int getNumParameters()
      Uh, there are 2 parameters...
      Specified by:
      getNumParameters in interface Distribution
      Returns:
      Ibid.
    • getName

      public String getName()
      Please don't make me say it...
      Specified by:
      getName in interface Distribution
      Returns:
      the name.
    • toString

      public String toString()
      A string representation of the distribution.
      Overrides:
      toString in class Object