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
public class CrossWord.PrintListener<T extends Var> extends SimpleSolutionListener<T>
It is a simple print listener to print every tenth solution encountered.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) char[][]
crossWordTemplate
-
Fields inherited from class org.jacop.search.SimpleSolutionListener
childrenSolutionListeners, noSolutions, parentSolutionListener, parentSolutionNo, solutionLimit, solutions, vars
-
-
Constructor Summary
Constructors Constructor Description PrintListener(char[][] crosswordTemplate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
executeAfterSolution(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
-
-
-
-
Method Detail
-
executeAfterSolution
public boolean executeAfterSolution(Search<T> search, SelectChoicePoint<T> select)
Description copied from interface:SolutionListener
It is executed by search after a solution is found.- Specified by:
executeAfterSolution
in interfaceSolutionListener<T extends Var>
- Overrides:
executeAfterSolution
in 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.
-
-