jopt.csp.search
Interface Search

All Superinterfaces:
java.lang.Cloneable

public interface Search
extends java.lang.Cloneable

Search objects are defined to control the order in which search operations are performed when executing actions such as generating variables.


Method Summary
 boolean nextSolution()
          Searches the tree for solutions.
 void setContinuallyImprove(boolean improve)
          True indicates that each solution returned should be as good or better than the last (determined by the goal that was given to the search).
 void setGoal(SearchGoal goal)
          Sets the goal that this search should attempt to satisfy
 

Method Detail

setGoal

public void setGoal(SearchGoal goal)
Sets the goal that this search should attempt to satisfy


setContinuallyImprove

public void setContinuallyImprove(boolean improve)
True indicates that each solution returned should be as good or better than the last (determined by the goal that was given to the search). False means that all solutions should be located during the first solution search and only the best solutions should be returned. This method requires a search goal to be assigned to the search to be effective.


nextSolution

public boolean nextSolution()
Searches the tree for solutions.

Returns:
True indicates a solution has been found. False means no (more) solutions exist.