Package edu.cmu.tetrad.util.dist
Class Beta
java.lang.Object
edu.cmu.tetrad.util.dist.Beta
- All Implemented Interfaces:
Distribution,TetradSerializable,Serializable
Implements a Beta distribution for purposes of drawing random numbers.
The parameters are alpha and beta. See Wikipedia.
- Author:
- Joseph Ramsey
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetName()Please don't make me say it...intUh, there are 2 parameters...doublegetParameter(int index) The order of parameters is alpha = 0, beta = 1.getParameterName(int index) The order of parameters is alpha = 0, beta = 1.doubleSee interface.static BetaGenerates a simple exemplar of this class to test serialization.voidsetParameter(int index, double value) The order of parameters is alpha = 0, beta = 1.toString()A string representation of the distribution.
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization. -
nextRandom
public double nextRandom()See interface.- Specified by:
nextRandomin interfaceDistribution- Returns:
- Ibid.
-
setParameter
public void setParameter(int index, double value) The order of parameters is alpha = 0, beta = 1.- Specified by:
setParameterin interfaceDistribution- Parameters:
index- Ibid. Must be >= 0 and < # parameters.value- Ibid.
-
getParameter
public double getParameter(int index) The order of parameters is alpha = 0, beta = 1.- Specified by:
getParameterin interfaceDistribution- Parameters:
index- Ibid. Muist be <= 0 and < # parameters.- Returns:
- The Ibid.
-
getParameterName
The order of parameters is alpha = 0, beta = 1.- Specified by:
getParameterNamein interfaceDistribution- Parameters:
index- Ibid. Must be >= 0 and < # parameters.- Returns:
- Ibid.
-
getNumParameters
public int getNumParameters()Uh, there are 2 parameters...- Specified by:
getNumParametersin interfaceDistribution- Returns:
- Ibid.
-
getName
Please don't make me say it...- Specified by:
getNamein interfaceDistribution- Returns:
- Ibid.
-
toString
A string representation of the distribution.
-