Package org.jacop.examples.fd.crosswords
Class CrossWord.PrintListener<T extends Var>
java.lang.Object
org.jacop.search.SimpleSolutionListener<T>
org.jacop.examples.fd.crosswords.CrossWord.PrintListener<T>
- All Implemented Interfaces:
SolutionListener<T>
- Enclosing class:
CrossWord
It is a simple print listener to print every tenth solution encountered.
-
Field Summary
FieldsFields inherited from class org.jacop.search.SimpleSolutionListener
childrenSolutionListeners, noSolutions, parentSolutionListener, parentSolutionNo, solutionLimit, solutions, vars -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecuteAfterSolution(Search<T> search, SelectChoicePoint<T> select) It is executed by search after a solution is found.Methods inherited from class org.jacop.search.SimpleSolutionListener
assignSolution, assignSolution, findSolutionMatchingParent, getParentSolution, getSolution, getSolutions, getVariables, isRecordingSolutions, printAllSolutions, recordSolution, recordSolutions, returnSolution, returnSolution, searchAll, setChildrenListeners, setChildrenListeners, setParentSolutionListener, setSolutionLimit, setSolutionsNo, setVariables, solutionLimitReached, solutionsNo, toString
-
Field Details
-
crossWordTemplate
char[][] crossWordTemplate
-
-
Constructor Details
-
PrintListener
public PrintListener(char[][] crosswordTemplate)
-
-
Method Details
-
executeAfterSolution
Description copied from interface:SolutionListenerIt is executed by search after a solution is found.- Specified by:
executeAfterSolutionin interfaceSolutionListener<T extends Var>- Overrides:
executeAfterSolutionin classSimpleSolutionListener<T extends Var>- Parameters:
search- the search which have found a solution.select- the select choice point heuristic- Returns:
- false forces the search to keep looking for a solution, true then the search will accept a solution.
-