Package algs13.xbacktrack.xframework
Interface XBacktrackProblem<T>
- Type Parameters:
- T- The type of the choices made in the backtracking problem.
- All Known Implementing Classes:
- MySudoku
public interface XBacktrackProblem<T>
A interface defining a backtracking problem to be solved with the backtracking
 framework.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanDetermine if the backtracking driver can advance in searching for a solution from the state represented by previous choice.voidinitialize(MyBacktrackDriver<T> driver) Initialize the problem.
- 
Method Details- 
initializeInitialize the problem. The initialize method must call the track method on the driver to track the starting state.- Parameters:
- driver- The driver orchestrating the search for the solution.
 
- 
advanceDetermine if the backtracking driver can advance in searching for a solution from the state represented by previous choice. If it can, this method must either call the track method on the driver to track the next choice, or it must call the driver's setDone() method.- Parameters:
- state- The previous choice
- Returns:
- true if the current state consists of a valid partial solution, or the current state represents a complete solution (i.e. the last choice required to solve the problem has been made).
 
 
-