Package adams.data.random
Class JavaRandomDoubleUnseeded
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.random.AbstractRandomNumberGenerator<Double>
-
- adams.data.random.JavaRandomDoubleUnseeded
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<RandomNumberGenerator>,SizeOfHandler,RandomNumberGenerator<Double>,Serializable
public class JavaRandomDoubleUnseeded extends AbstractRandomNumberGenerator<Double>
Random generator that generates random doubles (0-1) using Java's java.util.Random class (unseeded).
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
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
Random.nextDouble(), Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Randomm_Randomthe random number generator to use.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description JavaRandomDoubleUnseeded()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheck()Performs optional checks.protected DoubledoNext()Returns the next random number.StringglobalInfo()Returns a string describing the object.voidreset()Resets the generator.-
Methods inherited from class adams.data.random.AbstractRandomNumberGenerator
defineOptions, 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
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
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 interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
reset
public void reset()
Resets the generator.- Specified by:
resetin interfaceRandomNumberGenerator<Double>- Overrides:
resetin classAbstractRandomNumberGenerator<Double>
-
check
protected void check()
Performs optional checks.
Initializes the random number generator.- Overrides:
checkin classAbstractRandomNumberGenerator<Double>
-
doNext
protected Double doNext()
Returns the next random number. Does the actual computation.- Specified by:
doNextin classAbstractRandomNumberGenerator<Double>- Returns:
- the next number
-
-