Class Solution

java.lang.Object
org.ddolib.nolayer.solver.Solution

public class Solution extends Object
Wrapper defining a solution for a no-layer problem.
  • Constructor Details

    • Solution

      public Solution(List<Integer> solution, SearchStatistics statistics)
      Creates a new solution wrapping the given labels and search statistics.
      Parameters:
      solution - the ordered list of labels leading to this solution from the initial state
      statistics - the search statistics associated with this solution
  • Method Details

    • value

      public double value()
      Returns the evaluation of the objective value of this solution.
      Returns:
      the evaluation of the objective value of this solution
    • solution

      public List<Integer> solution()
      Returns the ordered list of labels leading to the best solution from the initial state.
      Returns:
      the ordered list of labels leading to the best solution from the initial state
    • isEmpty

      public boolean isEmpty()
      Returns whether this solution is empty, i.e. no solution was found.
      Returns:
      true if this solution does not contain any label
    • statistics

      public SearchStatistics statistics()
      Returns the statistics associated to this solution.
      Returns:
      the statistics associated to this solution
    • searchTime

      public String searchTime()
      Returns a readable string for the search time needed to find this solution.
      Returns:
      a readable string for the search time needed to find this solution
    • toString

      public String toString()
      Overrides:
      toString in class Object