org.sat4j.tools
Class SearchEnumeratorListener

java.lang.Object
  extended by org.sat4j.tools.SearchListenerAdapter<ISolverService>
      extended by org.sat4j.tools.SearchEnumeratorListener
All Implemented Interfaces:
Serializable, SearchListener<ISolverService>

public class SearchEnumeratorListener
extends SearchListenerAdapter<ISolverService>

That class allows to iterate over the models from the inside: conflicts are created to ask the solver to backtrack.

Author:
leberre
See Also:
Serialized Form

Constructor Summary
SearchEnumeratorListener()
           
 
Method Summary
 void end(Lbool result)
          End the search.
 int getNumberOfSolutionFound()
           
 void init(ISolverService solverService)
          Provide access to the solver's controllable interface.
 void solutionFound(int[] model)
          a solution is found.
 
Methods inherited from class org.sat4j.tools.SearchListenerAdapter
adding, assuming, backjump, backtracking, beginLoop, cleaning, conflictFound, conflictFound, delete, learn, propagating, restarting, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchEnumeratorListener

public SearchEnumeratorListener()
Method Detail

init

public void init(ISolverService solverService)
Description copied from interface: SearchListener
Provide access to the solver's controllable interface.

Specified by:
init in interface SearchListener<ISolverService>
Overrides:
init in class SearchListenerAdapter<ISolverService>
Parameters:
solverService - a way to safely control the solver.

solutionFound

public void solutionFound(int[] model)
Description copied from interface: SearchListener
a solution is found.

Specified by:
solutionFound in interface SearchListener<ISolverService>
Overrides:
solutionFound in class SearchListenerAdapter<ISolverService>
Parameters:
model - the model found

end

public void end(Lbool result)
Description copied from interface: SearchListener
End the search.

Specified by:
end in interface SearchListener<ISolverService>
Overrides:
end in class SearchListenerAdapter<ISolverService>
Parameters:
result - the result of the search.

getNumberOfSolutionFound

public int getNumberOfSolutionFound()


Copyright © 2012 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.