choco.kernel.solver.search.limit
Class AbstractGlobalSearchLimit

java.lang.Object
  extended by choco.kernel.solver.search.limit.AbstractGlobalSearchLimit
All Implemented Interfaces:
IPretty
Direct Known Subclasses:
BackTrackLimit, FailLimit, NodeLimit, NoLimit, RestartLimit, SolutionLimit, TimeLimit

public abstract class AbstractGlobalSearchLimit
extends Object
implements IPretty

An abstract class for limiting tree search (imposing conditions on depth, ...)


Field Summary
protected  int nbMax
          maximal value limitting the search exploration
protected  AbstractGlobalSearchStrategy strategy
          the strategy that delegates the limit checking task to such AbstractGlobalSearchLimit objects
protected  Limit type
          type of limit
protected  String unit
          for pretty printing
 
Constructor Summary
AbstractGlobalSearchLimit(AbstractGlobalSearchStrategy theStrategy, int theLimit, Limit type)
           
AbstractGlobalSearchLimit(AbstractGlobalSearchStrategy theStrategy, int theLimit, String unit)
           
 
Method Summary
abstract  int getNb()
          get the current counter
 int getNbMax()
           
 AbstractGlobalSearchStrategy getSearchStrategy()
           
 Limit getType()
           
 String getUnit()
           
 String pretty()
          pretty printing of the object.
 void setNbMax(int nbMax)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

strategy

protected final AbstractGlobalSearchStrategy strategy
the strategy that delegates the limit checking task to such AbstractGlobalSearchLimit objects


unit

protected final String unit
for pretty printing


type

protected final Limit type
type of limit


nbMax

protected int nbMax
maximal value limitting the search exploration

Constructor Detail

AbstractGlobalSearchLimit

public AbstractGlobalSearchLimit(AbstractGlobalSearchStrategy theStrategy,
                                 int theLimit,
                                 String unit)

AbstractGlobalSearchLimit

public AbstractGlobalSearchLimit(AbstractGlobalSearchStrategy theStrategy,
                                 int theLimit,
                                 Limit type)
Method Detail

getSearchStrategy

public final AbstractGlobalSearchStrategy getSearchStrategy()

toString

public String toString()
Overrides:
toString in class Object

pretty

public String pretty()
Description copied from interface: IPretty
pretty printing of the object. This String is not constant and may depend on the context.

Specified by:
pretty in interface IPretty
Returns:
a readable string representation of the object

getNb

public abstract int getNb()
get the current counter


getNbMax

public final int getNbMax()
Returns:
the limit value

setNbMax

public void setNbMax(int nbMax)

getType

public final Limit getType()

getUnit

public final String getUnit()


Copyright © 2012. All Rights Reserved.