choco.integer.search
Class MostConstrained

java.lang.Object
  extended by choco.search.AbstractSearchHeuristic
      extended by choco.integer.search.AbstractIntVarSelector
          extended by choco.integer.search.MostConstrained
All Implemented Interfaces:
IIntVarSelector, IVarSelector

public class MostConstrained
extends AbstractIntVarSelector

An heuristic to first instantiating most constrained variables.


Field Summary
 
Fields inherited from class choco.integer.search.AbstractIntVarSelector
vars
 
Fields inherited from class choco.search.AbstractSearchHeuristic
branching, problem
 
Constructor Summary
MostConstrained(Problem pb)
          Builds the heuristic for the given problem.
MostConstrained(Problem pb, IntDomainVar[] vs)
          Builds the heuristic for the given problem.
 
Method Summary
 IntDomainVar selectIntVar()
          Searches for a non instantiated variable with as much constraints posted on it as possible.
 
Methods inherited from class choco.integer.search.AbstractIntVarSelector
selectVar
 
Methods inherited from class choco.search.AbstractSearchHeuristic
getBranching
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface choco.search.IVarSelector
getBranching
 

Constructor Detail

MostConstrained

public MostConstrained(Problem pb)
Builds the heuristic for the given problem.

Parameters:
pb - the solved problem

MostConstrained

public MostConstrained(Problem pb,
                       IntDomainVar[] vs)
Builds the heuristic for the given problem.

Parameters:
pb - the solved problem
vs - a list of variables instead of all prolem integer variables
Method Detail

selectIntVar

public IntDomainVar selectIntVar()
Searches for a non instantiated variable with as much constraints posted on it as possible.

Returns:
a non instantiated search variable