Class GapFunction

    • 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