choco.cp.model.managers.constraints.global
Class RegularManager
java.lang.Object
choco.kernel.model.constraints.ConstraintManager<IntegerVariable>
choco.cp.model.managers.IntConstraintManager
choco.cp.model.managers.constraints.global.RegularManager
- All Implemented Interfaces:
- ExpressionManager
public final class RegularManager
- extends IntConstraintManager
A manager to build new regular constraint
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegularManager
public RegularManager()
makeConstraint
public SConstraint makeConstraint(Solver solver,
IntegerVariable[] vars,
Object parameters,
List<String> options)
- Description copied from class:
ConstraintManager
- Build a constraint for the given solver and "model variables"
- Specified by:
makeConstraint
in class ConstraintManager<IntegerVariable>
- Parameters:
solver
- solver to build constraint invars
- array of variablesparameters
- Object defining the paramatersoptions
- set of options
- Returns:
- One SConstraint
getFavoriteDomains
public int[] getFavoriteDomains(List<String> options)
- Overrides:
getFavoriteDomains
in class IntConstraintManager
- 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
knapsack
public SConstraint knapsack(Solver s,
IntegerVariable[] vars,
int goal,
int[] coeffs)
- Parameters:
vars
- Boolean variablesgoal
- Sumcoeffs
- An array Containing the coefficients
- Returns:
Copyright © 2012. All Rights Reserved.