Package org.jacop.search
Class IndomainDefaultValue<T extends Var>
- java.lang.Object
-
- org.jacop.search.IndomainDefaultValue<T>
-
- Type Parameters:
T
- type of variable being used in the search.
- All Implemented Interfaces:
Indomain<T>
public class IndomainDefaultValue<T extends Var> extends java.lang.Object implements Indomain<T>
IndomainDefaultValue - implements enumeration method based on the selection of the default value for each variable first. If selection of this value will not succeed it will try to assign values with the default indomain method.This method works only for IntVar.
- Version:
- 4.7
-
-
Field Summary
Fields Modifier and Type Field Description private Indomain<T>
defIndomain
It defines the default indomain if there is no mapping provided.private java.util.Map<T,java.lang.Integer>
defValue
It defines for each variable and a value which should be used.
-
Constructor Summary
Constructors Constructor Description IndomainDefaultValue(java.util.Map<T,java.lang.Integer> defaultValue, Indomain<T> defaultIndomain)
Constructor which specifies default values to be used if values are not in the domain a defualt indomain is used.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
indomain(T v)
It returns value within a variable which should be used in current assignment.
-
-
-
Constructor Detail
-
IndomainDefaultValue
public IndomainDefaultValue(java.util.Map<T,java.lang.Integer> defaultValue, Indomain<T> defaultIndomain)
Constructor which specifies default values to be used if values are not in the domain a defualt indomain is used.- Parameters:
defaultIndomain
- default indomain heuristic used.defaultValue
- default value used for each variable.
-
-