Interface VectorialConvergenceChecker

  • All Known Implementing Classes:
    SimpleVectorialPointChecker, SimpleVectorialValueChecker

    public interface VectorialConvergenceChecker
    This interface specifies how to check if a optimization algorithm has converged.

    Deciding if convergence has been reached is a problem-dependent issue. The user should provide a class implementing this interface to allow the optimization algorithm to stop its search according to the problem at hand.

    For convenience, two implementations that fit simple needs are already provided: SimpleVectorialValueChecker and SimpleVectorialPointChecker. The first one considers convergence is reached when the objective function value does not change much anymore, it does not use the point set at all. The second one considers convergence is reached when the input point set does not change much anymore, it does not use objective function value at all.

    Since:
    2.0
    • Method Detail

      • converged

        boolean converged​(int iteration,
                          VectorialPointValuePair previous,
                          VectorialPointValuePair current)
        Check if the optimization algorithm has converged considering the last points.

        This method may be called several time from the same algorithm iteration with different points. This can be detected by checking the iteration number at each call if needed. Each time this method is called, the previous and current point correspond to points with the same role at each iteration, so they can be compared. As an example, simplex-based algorithms call this method for all points of the simplex, not only for the best or worst ones.

        Parameters:
        iteration - index of current iteration
        previous - point from previous iteration
        current - point from current iteration
        Returns:
        true if the algorithm is considered to have converged