choco.kernel.model.constraints
Class ConstraintManager<V extends Variable>
java.lang.Object
choco.kernel.model.constraints.ConstraintManager<V>
- All Implemented Interfaces:
- ExpressionManager
- Direct Known Subclasses:
- BooleanManager, IntConstraintManager, MixedConstraintManager, RealConstraintManager, SetConstraintManager, TreeManager, UseResourcesManager
public abstract class ConstraintManager<V extends Variable>
- extends Object
- implements ExpressionManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstraintManager
public ConstraintManager()
makeConstraint
public abstract SConstraint makeConstraint(Solver solver,
V[] variables,
Object parameters,
List<String> options)
- Build a constraint for the given solver and "model variables"
- Parameters:
solver
- solver to build constraint invariables
- array of variablesparameters
- Object defining the paramatersoptions
- set of options
- Returns:
- One SConstraint
makeConstraintAndOpposite
public abstract SConstraint[] makeConstraintAndOpposite(Solver solver,
V[] variables,
Object parameters,
List<String> options)
- Build a constraint and its opposite for the given solver and "model variables"
- Parameters:
solver
- solver to build constraint invariables
- array of variablesparameters
- Object defining the paramatersoptions
- set of options
- Returns:
- array of 2 SConstraint object, the constraint and its opposite
getFavoriteDomains
public abstract int[] getFavoriteDomains(List<String> options)
- Parameters:
options
- : the set of options on the constraint (Typically the level of consistency)
- Returns:
- a list of domains accepted by the constraint and sorted
by order of preference
getACFavoriteIntDomains
protected static int[] getACFavoriteIntDomains()
getBCFavoriteIntDomains
protected static int[] getBCFavoriteIntDomains()
checkParameter
protected static boolean checkParameter(Object[] o,
int idx)
fail
protected static SConstraint fail()
fail
protected static SConstraint fail(String cname)
Copyright © 2012. All Rights Reserved.