Package org.planit.gap
Class StopCriterionConfigurator
- java.lang.Object
-
- org.planit.utils.builder.Configurator<StopCriterion>
-
- org.planit.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 StringSET_EPSILONstatic StringSET_MAX_ITERATIONS-
Fields inherited from class org.planit.utils.builder.Configurator
delayedMethodCalls
-
-
Constructor Summary
Constructors Constructor Description StopCriterionConfigurator()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(StopCriterion stopCriterion)Needed to avoid issues with generics, although it should be obvious that T extends GapFunctiondoublegetEpsilon()Return the epsilon of this stopping criterionintgetMaxIterations()Return the maximum allowable number of iterationsvoidsetEpsilon(double epsilon)Set the epsilon of this stopping criterionvoidsetMaxIterations(int maxIterations)Set the maximum allowable number of iterations-
Methods inherited from class org.planit.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:
configurein 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
-
-