Package repast.simphony.parameter
Class ByteSteppedSetter
- java.lang.Object
-
- repast.simphony.parameter.AbstractSweepParameterSetter<Byte>
-
- repast.simphony.parameter.ByteSteppedSetter
-
- All Implemented Interfaces:
OptimizableParameterSetter
,ParameterSetter
public class ByteSteppedSetter extends AbstractSweepParameterSetter<Byte>
-
-
Field Summary
-
Fields inherited from class repast.simphony.parameter.AbstractSweepParameterSetter
LAST_VALUE_INDEX, lastValue, parameterName, RESET_INDEX, revertValue
-
-
Constructor Summary
Constructors Constructor Description ByteSteppedSetter(String parameterName, byte base, byte max, byte step)
Constructs this with the given base value, step size, and maximum value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
atBeginning(Byte prevValue)
boolean
atEnd(Byte prevValue)
protected Byte
nextValue(Byte prevValue)
Retrieves the next value in the space (previous value + step size).protected Byte
previousValue(Byte prevValue)
protected Byte
randomValue()
Byte
resetValue()
Resets the next value to the base value.String
toString()
-
Methods inherited from class repast.simphony.parameter.AbstractSweepParameterSetter
atBeginning, atEnd, getParameterName, next, previous, randDouble, randInt, random, reset, revert
-
-
-
-
Constructor Detail
-
ByteSteppedSetter
public ByteSteppedSetter(String parameterName, byte base, byte max, byte step)
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 Detail
-
resetValue
public Byte resetValue()
Resets the next value to the base value.- Specified by:
resetValue
in classAbstractSweepParameterSetter<Byte>
-
atEnd
public boolean atEnd(Byte prevValue)
- Specified by:
atEnd
in classAbstractSweepParameterSetter<Byte>
- Returns:
- true if the next value is greater than the max value
-
atBeginning
public boolean atBeginning(Byte prevValue)
- Specified by:
atBeginning
in classAbstractSweepParameterSetter<Byte>
-
nextValue
protected Byte nextValue(Byte prevValue)
Retrieves the next value in the space (previous value + step size).- Specified by:
nextValue
in classAbstractSweepParameterSetter<Byte>
- Returns:
- the next value
-
randomValue
protected Byte randomValue()
- Specified by:
randomValue
in classAbstractSweepParameterSetter<Byte>
-
previousValue
protected Byte previousValue(Byte prevValue)
- Specified by:
previousValue
in classAbstractSweepParameterSetter<Byte>
-
-