|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.data.random.AbstractRandomNumberGenerator<T>
adams.data.random.AbstractSeededRandomNumberGenerator<Integer>
adams.data.random.JMathArrayInt
public class JMathArrayInt
Random generator that generates random integers using JMathArray's randInt method.
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
-min-value <int> (property: minValue) The smallest number that could be generated. default: 1
-max-value <int> (property: maxValue) The largest number that could be generated. default: 1000
Random.randInt(int, int),
Serialized Form| Field Summary | |
|---|---|
protected int |
m_MaxValue
the maximum value for the numbers to generate. |
protected int |
m_MinValue
the minimum value for the numbers to generate. |
protected Random |
m_Random
the random number generator to use. |
| Fields inherited from class adams.data.random.AbstractSeededRandomNumberGenerator |
|---|
m_Seed |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
JMathArrayInt()
|
|
| Method Summary | |
|---|---|
protected void |
check()
Performs optional checks. |
void |
defineOptions()
Adds options to the internal list of options. |
protected Integer |
doNext()
Returns the next random number. |
int |
getMaxValue()
Returns the maximum value of the numbers to generate. |
int |
getMinValue()
Returns the minimum value of the numbers to generate. |
String |
globalInfo()
Returns a string describing the object. |
String |
maxValueTipText()
Returns the tip text for this property. |
String |
minValueTipText()
Returns the tip text for this property. |
void |
reset()
Resets the generator. |
void |
setMaxValue(int value)
Sets the maximum value of the numbers to generate. |
void |
setMinValue(int value)
Sets the minimum value of the numbers to generate. |
| 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, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int m_MinValue
protected int m_MaxValue
protected Random m_Random
| Constructor Detail |
|---|
public JMathArrayInt()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractSeededRandomNumberGenerator<Integer>public void reset()
reset in class AbstractRandomNumberGenerator<Integer>public void setMinValue(int value)
value - the minimumpublic int getMinValue()
public String minValueTipText()
public void setMaxValue(int value)
value - the maximumpublic int getMaxValue()
public String maxValueTipText()
protected void check()
check in class AbstractRandomNumberGenerator<Integer>protected Integer doNext()
doNext in class AbstractRandomNumberGenerator<Integer>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||