Interface Problem<T extends Copyable<T>>

    • Method Detail

      • getSolutionCostPair

        SolutionCostPair<T> getSolutionCostPair​(T candidate)
        Computes the cost of a candidate solution to the problem instance. The lower the cost, the more optimal the candidate solution.
        Parameters:
        candidate - The candidate solution to evaluate.
        Returns:
        A SolutionCostPair object containing the candidate solution and the cost of that candidate solution. Lower cost means better solution.
      • costAsDouble

        double costAsDouble​(T candidate)
        Computes the cost of a candidate solution to the problem instance. The lower the cost, the more optimal the candidate solution. Note that subinterfaces provide methods for computing the cost as more specific types (e.g., as an int).
        Parameters:
        candidate - The candidate solution to evaluate.
        Returns:
        The cost of the candidate solution as a value of type double. Lower cost means better solution.