Package org.goplanit.gap
Class StopCriterionConfigurator
- java.lang.Object
-
- org.goplanit.utils.builder.Configurator<StopCriterion>
-
- org.goplanit.gap.StopCriterionConfigurator
-
public class StopCriterionConfigurator extends Configurator<StopCriterion>
Base class for all stop criterion configurator implementations- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static String
SET_EPSILON
static String
SET_MAX_ITERATIONS
-
Fields inherited from class org.goplanit.utils.builder.Configurator
delayedMethodCalls
-
-
Constructor Summary
Constructors Constructor Description StopCriterionConfigurator()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(StopCriterion stopCriterion)
Needed to avoid issues with generics, although it should be obvious that T extends GapFunctiondouble
getEpsilon()
Return the epsilon of this stopping criterionint
getMaxIterations()
Return the maximum allowable number of iterationsvoid
setEpsilon(double epsilon)
Set the epsilon of this stopping criterionvoid
setMaxIterations(int maxIterations)
Set the maximum allowable number of iterations-
Methods inherited from class org.goplanit.utils.builder.Configurator
callVoidMethod, collectParameterTypes, getClassTypeToConfigure, getFirstParameterOfDelayedMethodCall, registerDelayedMethodCall
-
-
-
-
Field Detail
-
SET_MAX_ITERATIONS
public static final String SET_MAX_ITERATIONS
- See Also:
- Constant Field Values
-
SET_EPSILON
public static final String SET_EPSILON
- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
public void configure(StopCriterion stopCriterion) throws PlanItException
Needed to avoid issues with generics, although it should be obvious that T extends GapFunction- Overrides:
configure
in classConfigurator<StopCriterion>
- Parameters:
stopCriterion
- the instance to configure- Throws:
PlanItException
- thrown if error
-
getMaxIterations
public int getMaxIterations()
Return the maximum allowable number of iterations- Returns:
- the maximum allowable number of iterations
-
setMaxIterations
public void setMaxIterations(int maxIterations)
Set the maximum allowable number of iterations- Parameters:
maxIterations
- the maximum allowable number of iterations
-
getEpsilon
public double getEpsilon()
Return the epsilon of this stopping criterion- Returns:
- the epsilon of this stopping criterion
-
setEpsilon
public void setEpsilon(double epsilon)
Set the epsilon of this stopping criterion- Parameters:
epsilon
- the epsilon of this stopping criterion
-
-