Package org.ddolib.nolayer.solver
Class Solution
java.lang.Object
org.ddolib.nolayer.solver.Solution
Wrapper defining a solution for a no-layer problem.
-
Constructor Summary
ConstructorsConstructorDescriptionSolution(List<Integer> solution, SearchStatistics statistics) Creates a new solution wrapping the given labels and search statistics. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty()Returns whether this solution is empty, i.e.Returns a readable string for the search time needed to find this solution.solution()Returns the ordered list of labels leading to the best solution from the initial state.Returns the statistics associated to this solution.toString()doublevalue()Returns the evaluation of the objective value of this solution.
-
Constructor Details
-
Solution
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 statestatistics- 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
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:
trueif this solution does not contain any label
-
statistics
Returns the statistics associated to this solution.- Returns:
- the statistics associated to this solution
-
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
-