Package org.ddolib.util.io
Class SolutionPrinter
java.lang.Object
org.ddolib.util.io.SolutionPrinter
Utility class providing helper methods to display solutions found by a solver.
The SolutionPrinter is typically used as a callback or logging utility
during the search process to print newly found incumbent (best so far) solutions,
along with their associated search statistics.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprintSolution(SearchStatistics stats, int[] solution) Prints a newly found solution and its associated statistics to the standard output.
-
Constructor Details
-
SolutionPrinter
public SolutionPrinter()
-
-
Method Details
-
printSolution
Prints a newly found solution and its associated statistics to the standard output.This method is usually invoked each time a better solution is found during the solving process, displaying both the solver's performance information and the variable assignment.
- Parameters:
stats- theSearchStatisticsobject containing information about the current search statesolution- an array of integers representing the variable assignments of the new incumbent solution
-