Package org.planit.gap
Class GapFunction
- java.lang.Object
-
- org.planit.gap.GapFunction
-
- Direct Known Subclasses:
LinkBasedRelativeDualityGapFunction
public abstract class GapFunction extends Object
Interface for computing gap functions- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected StopCriterion
stopCriterion
The stopCriterion to use
-
Constructor Summary
Constructors Constructor Description GapFunction(StopCriterion stopCriterion)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract double
getGap()
Returns the gap for the current iterationStopCriterion
getStopCriterion()
Return the StopCriterion objectboolean
hasConverged(int iterationIndex)
Verify if algorithm has convergedabstract void
reset()
Reset the gap function
-
-
-
Field Detail
-
stopCriterion
protected final StopCriterion stopCriterion
The stopCriterion to use
-
-
Constructor Detail
-
GapFunction
public GapFunction(StopCriterion stopCriterion)
Constructor- Parameters:
stopCriterion
- the StopCriterion object to be used
-
-
Method Detail
-
getGap
public abstract double getGap()
Returns the gap for the current iteration- Returns:
- gap for current iteration
-
reset
public abstract void reset()
Reset the gap function
-
hasConverged
public boolean hasConverged(int iterationIndex)
Verify if algorithm has converged- Parameters:
iterationIndex
- the index of the current iteration- Returns:
- true if stopping criterion has been met, false otherwise
-
getStopCriterion
public StopCriterion getStopCriterion()
Return the StopCriterion object- Returns:
- StopCriterion object being used
-
-