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.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptiongetName()Please don't make me say it...intUh, there are 2 parameters...doublegetParameter(int index) Returns the index'th parameter.getParameterName(int index) The name of the index'th parameter, for display purposes.doubleReturns the next random.static BetaGenerates a simple exemplar of this class to test serialization.voidsetParameter(int index, double value) Sets the index'th parameter to the given value.toString()A string representation of the distribution.
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.- Returns:
- Ibid.
 
- 
nextRandompublic double nextRandom()Returns the next random.- Specified by:
- nextRandomin interface- Distribution
- Returns:
- Ibid.
 
- 
setParameterpublic void setParameter(int index, double value) Sets the index'th parameter to the given value.The order of parameters is alpha = 0, beta = 1. - Specified by:
- setParameterin interface- Distribution
- Parameters:
- index- Ibid. Must be >= 0 and < # parameters.
- value- Ibid.
 
- 
getParameterpublic double getParameter(int index) Returns the index'th parameter.The order of parameters is alpha = 0, beta = 1. - Specified by:
- getParameterin interface- Distribution
- Parameters:
- index- Ibid. Muist be <= 0 and < # parameters.
- Returns:
- The Ibid.
 
- 
getParameterNameThe name of the index'th parameter, for display purposes.The order of parameters is alpha = 0, beta = 1. - Specified by:
- getParameterNamein interface- Distribution
- Parameters:
- index- Ibid. Must be >= 0 and < # parameters.
- Returns:
- Ibid.
 
- 
getNumParameterspublic int getNumParameters()Uh, there are 2 parameters...- Specified by:
- getNumParametersin interface- Distribution
- Returns:
- Ibid.
 
- 
getNamePlease don't make me say it...- Specified by:
- getNamein interface- Distribution
- Returns:
- a Stringobject
 
- 
toStringA string representation of the distribution.
 
-