Package repast.simphony.parameter
Class ByteSteppedSetter
java.lang.Object
repast.simphony.parameter.AbstractSweepParameterSetter<Byte>
repast.simphony.parameter.ByteSteppedSetter
- All Implemented Interfaces:
OptimizableParameterSetter,ParameterSetter
-
Field Summary
Fields inherited from class repast.simphony.parameter.AbstractSweepParameterSetter
LAST_VALUE_INDEX, lastValue, parameterName, RESET_INDEX, revertValue -
Constructor Summary
ConstructorsConstructorDescriptionByteSteppedSetter(String parameterName, byte base, byte max, byte step) Constructs this with the given base value, step size, and maximum value. -
Method Summary
Modifier and TypeMethodDescriptionbooleanatBeginning(Byte prevValue) booleanprotected ByteRetrieves the next value in the space (previous value + step size).protected BytepreviousValue(Byte prevValue) protected ByteResets the next value to the base value.toString()Methods inherited from class repast.simphony.parameter.AbstractSweepParameterSetter
atBeginning, atEnd, getParameterName, next, previous, randDouble, randInt, random, reset, revert
-
Constructor Details
-
ByteSteppedSetter
Constructs this with the given base value, step size, and maximum value.- Parameters:
parameterName- the name of the parameterbase- the beginning valuemax- the maximum value (inclusive)step- the step size
-
-
Method Details
-
resetValue
Resets the next value to the base value.- Specified by:
resetValuein classAbstractSweepParameterSetter<Byte>
-
atEnd
- Specified by:
atEndin classAbstractSweepParameterSetter<Byte>- Returns:
- true if the next value is greater than the max value
-
atBeginning
- Specified by:
atBeginningin classAbstractSweepParameterSetter<Byte>
-
nextValue
Retrieves the next value in the space (previous value + step size).- Specified by:
nextValuein classAbstractSweepParameterSetter<Byte>- Returns:
- the next value
-
randomValue
- Specified by:
randomValuein classAbstractSweepParameterSetter<Byte>
-
previousValue
- Specified by:
previousValuein classAbstractSweepParameterSetter<Byte>
-
toString
-