JaCoP.search
Class IndomainHierarchical<T extends Var>
java.lang.Object
JaCoP.search.IndomainHierarchical<T>
- Type Parameters:
T - type of variable being used in the search.
- All Implemented Interfaces:
- Indomain<T>
public class IndomainHierarchical<T extends Var>
- extends java.lang.Object
- implements Indomain<T>
IndomainHierarchical - implements enumeration method based on the selection
of the preferred indomain for each variable. The initial idea of having such
functionality was proposed by Ben Weiner.
- Version:
- 3.1
- Author:
- Radoslaw Szymanek
|
Constructor Summary |
IndomainHierarchical(java.util.HashMap<T,Indomain<T>> hashmap,
Indomain<T> defIndomain)
Constructor which specifies the mapping and default indomain to be used
if mapping does not give specific indomain for some variables. |
|
Method Summary |
int |
indomain(T v)
It returns value within a variable which should be used in current
assignment. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndomainHierarchical
public IndomainHierarchical(java.util.HashMap<T,Indomain<T>> hashmap,
Indomain<T> defIndomain)
- Constructor which specifies the mapping and default indomain to be used
if mapping does not give specific indomain for some variables.
- Parameters:
hashmap - a mapping from variable to indomain heuristic used.defIndomain - default indomain used if hashmap does not contain an entry.
indomain
public int indomain(T v)
throws java.lang.RuntimeException
- Description copied from interface:
Indomain
- It returns value within a variable which should be used in current
assignment. This function only returns value, it is not required to do
any changes to variable, its domain, etc.
- Specified by:
indomain in interface Indomain<T extends Var>
- Parameters:
v - defines variable for which value for assignment is suggested.
- Returns:
- defines value for current assignment.
- Throws:
java.lang.RuntimeException