choco.search
Class NodeLimit

java.lang.Object
  extended by choco.AbstractEntity
      extended by choco.search.AbstractGlobalSearchLimit
          extended by choco.search.NodeLimit
All Implemented Interfaces:
Entity, IGlobalSearchLimit

public final class NodeLimit
extends AbstractGlobalSearchLimit


Field Summary
 
Fields inherited from class choco.search.AbstractGlobalSearchLimit
nb, nbMax, nbTot, solver, unit
 
Fields inherited from class choco.AbstractEntity
hook, problem
 
Constructor Summary
NodeLimit(AbstractGlobalSearchSolver theSolver, int theLimit)
           
 
Method Summary
 boolean endNode(AbstractGlobalSearchSolver solver)
          notify the limit object whenever the search closes a node in the search tree
 boolean newNode(AbstractGlobalSearchSolver solver)
          notify the limit object whenever a new node is created in the search tree
 
Methods inherited from class choco.search.AbstractGlobalSearchLimit
getNb, getNbMax, getNbTot, pretty, reset, setNbMax
 
Methods inherited from class choco.AbstractEntity
getProblem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface choco.Entity
getProblem
 

Constructor Detail

NodeLimit

public NodeLimit(AbstractGlobalSearchSolver theSolver,
                 int theLimit)
Method Detail

newNode

public boolean newNode(AbstractGlobalSearchSolver solver)
Description copied from interface: IGlobalSearchLimit
notify the limit object whenever a new node is created in the search tree

Parameters:
solver - the controller of the search exploration, managing the limit
Returns:
true if the limit accepts the creation of the new node, false otherwise

endNode

public boolean endNode(AbstractGlobalSearchSolver solver)
Description copied from interface: IGlobalSearchLimit
notify the limit object whenever the search closes a node in the search tree

Parameters:
solver - the controller of the search exploration, managing the limit
Returns:
true if the limit accepts the death of the new node, false otherwise