choco.cp.model.managers.variables
Class IntegerVariableManager
java.lang.Object
choco.cp.model.managers.variables.IntegerVariableManager
- All Implemented Interfaces:
- ExpressionManager, VariableManager<IntegerVariable>
public final class IntegerVariableManager
- extends Object
- implements VariableManager<IntegerVariable>
Created by IntelliJ IDEA.
User: charles
Date: 8 août 2008
Time: 10:14:01
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntegerVariableManager
public IntegerVariableManager()
makeConstant
protected static IntDomainVar makeConstant(CPSolver solver,
IntegerVariable iv)
makeVariable
public Var makeVariable(Solver solver,
IntegerVariable var)
- Build a integer variable for the given solver
- Specified by:
makeVariable
in interface VariableManager<IntegerVariable>
- Parameters:
solver
- the solver defining the variablevar
- model variable
- Returns:
- an integer variable
makeNode
public INode makeNode(Solver solver,
Constraint[] cstrs,
Variable[] vars)
- Build a expression node
- Specified by:
makeNode
in interface ExpressionManager
- Parameters:
solver
- associated solvercstrs
- constraintsvars
- variables
- Returns:
- a variable leaf or constant leaf (for expression tree)
getIntelligentDomain
public static int getIntelligentDomain(Model model,
IntegerVariable v)
- try to find the most suitable domain for v regarding constraints wish
a simple heuristic is applied to rank the domains
- Parameters:
v
- unknown domain type variable
- Returns:
- a domain type
possibleArgMin
public static int possibleArgMin(int[] tab,
BitSet posDom)
Copyright © 2012. All Rights Reserved.