Package repast.simphony.parameter
Class DoubleSteppedSetter
java.lang.Object
repast.simphony.parameter.DoubleSteppedSetter
- All Implemented Interfaces:
OptimizableParameterSetter,ParameterSetter
This
ParameterSetter will run through a space of numbers. The space is
from the given base value through the given maximum value (including both: [base, max]). This
space is traversed using the given step value.- Author:
- Jerry Vos
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleSteppedSetter(String parameterName, double base, double max, double step) Constructs this with the given base value, step size, and maximum value. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanatEnd()Gets the name of the parameter that this setter is responsible for setting.protected doublegetValue()voidnext(Parameters params) voidprevious(Parameters parameters) voidrandom(Parameters parameters) voidreset(Parameters params) voidrevert(Parameters parameters) toString()
-
Constructor Details
-
DoubleSteppedSetter
Constructs this with the given base value, step size, and maximum value. This is guaranteed to produce Math.rint((max - base) / step) number of steps.- Parameters:
parameterName- the name of the parameterbase- the beginning valuemax- the maximum value (inclusive)step- the step size
-
-
Method Details
-
getParameterName
Gets the name of the parameter that this setter is responsible for setting.- Returns:
- the name of the parameter that this setter is responsible for setting.
-
next
- Specified by:
nextin interfaceParameterSetter
-
getValue
protected double getValue() -
previous
- Specified by:
previousin interfaceOptimizableParameterSetter
-
random
- Specified by:
randomin interfaceOptimizableParameterSetter
-
atBeginning
public boolean atBeginning()- Specified by:
atBeginningin interfaceOptimizableParameterSetter
-
atEnd
public boolean atEnd()- Specified by:
atEndin interfaceParameterSetter
-
toString
-
revert
- Specified by:
revertin interfaceOptimizableParameterSetter
-
reset
- Specified by:
resetin interfaceParameterSetter
-