Package adams.data.random
Class Beta
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.random.AbstractRandomNumberGenerator<T>
-
- adams.data.random.AbstractSeededRandomNumberGenerator<Double>
-
- adams.data.random.Beta
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.Randomizable,adams.core.ShallowCopySupporter<adams.data.random.RandomNumberGenerator>,adams.core.SizeOfHandler,adams.data.random.RandomNumberGenerator<Double>,adams.data.random.SeededRandomNumberGenerator<Double>,Serializable
public class Beta extends adams.data.random.AbstractSeededRandomNumberGenerator<Double>
Generates random numbers from a Beta random variable.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-seed <long> (property: seed) The seed value for the random number generator. default: 1
-a <double> (property: a) The first parameter for the beta random variable. default: 1.0
-b <double> (property: b) The second parameter for the beta random variable. default: 2.0
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
Random.beta(double, double), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Beta()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaTipText()Returns the tip text for this property.StringbTipText()Returns the tip text for this property.protected voidcheck()Performs optional checks.voiddefineOptions()Adds options to the internal list of options.protected DoubledoNext()Returns the next random number.doublegetA()Returns the first parameter for the beta random variable.doublegetB()Returns the second parameter for the beta random variable.StringglobalInfo()Returns a string describing the object.voidreset()Resets the generator.voidsetA(double value)Sets the first parameter for the beta random variable.voidsetB(double value)Sets the second parameter for the beta random variable.-
Methods inherited from class adams.data.random.AbstractSeededRandomNumberGenerator
getSeed, seedTipText, setSeed
-
Methods inherited from class adams.data.random.AbstractRandomNumberGenerator
forCommandLine, forName, getGenerators, next, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
m_A
protected double m_A
the first parameter of the beta random variable.
-
m_B
protected double m_B
the second parameter of the beta random variable.
-
m_Random
protected Random m_Random
the random number generator to use.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.data.random.AbstractSeededRandomNumberGenerator<Double>
-
reset
public void reset()
Resets the generator.
-
setA
public void setA(double value)
Sets the first parameter for the beta random variable.- Parameters:
value- the first parameter
-
getA
public double getA()
Returns the first parameter for the beta random variable.- Returns:
- the first parameter
-
aTipText
public String aTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setB
public void setB(double value)
Sets the second parameter for the beta random variable.- Parameters:
value- the second parameter
-
getB
public double getB()
Returns the second parameter for the beta random variable.- Returns:
- the second parameter
-
bTipText
public String bTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
check
protected void check()
Performs optional checks.
Initializes the random number generator.- Overrides:
checkin classadams.data.random.AbstractRandomNumberGenerator<Double>
-
-