|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.search.SimpleSelect<T>
public class SimpleSelect<T extends Var>
It is simple and customizable selector of decisions (constraints) which will be enforced by search.
| Field Summary | |
|---|---|
boolean |
inputOrderTieBreaking
It chooses if input order tie breaking is used. |
java.util.IdentityHashMap<T,java.lang.Integer> |
position
It stores the original positions of variables to be used for input order tie-breaking. |
| Constructor Summary | |
|---|---|
SimpleSelect(T[] variables,
ComparatorVariable<T> varSelect,
ComparatorVariable<T> tieBreakerVarSelect,
Indomain<T> indomain)
It constructs a simple selection mechanism for choice points. |
|
SimpleSelect(T[] variables,
ComparatorVariable<T> varSelect,
Indomain<T> indomain)
The constructor to create a simple choice select mechanism. |
|
| Method Summary | |
|---|---|
PrimitiveConstraint |
getChoiceConstraint(int index)
It always returns null as choice point is obtained by getChoiceVariable and getChoiceValue. |
int |
getChoiceValue()
It returns a value which is the base of the next choice point. |
T |
getChoiceVariable(int index)
It returns the variable which is the base on the next choice point. |
int |
getIndex()
It returns the current index. |
java.util.IdentityHashMap<T,java.lang.Integer> |
getVariablesMapping()
It returns the variables for which assignment in the solution is given. |
T |
placeSearchVariable(int searchPosition,
int variablePosition)
It gets as input the index of the variable which is chosen by search to be instantiated at this stage. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public boolean inputOrderTieBreaking
public java.util.IdentityHashMap<T extends Var,java.lang.Integer> position
| Constructor Detail |
|---|
public SimpleSelect(T[] variables,
ComparatorVariable<T> varSelect,
Indomain<T> indomain)
variables - variables upon which the choice points are created.varSelect - the variable comparator to choose the variable.indomain - the value heuristic to choose a value for a given variable.
public SimpleSelect(T[] variables,
ComparatorVariable<T> varSelect,
ComparatorVariable<T> tieBreakerVarSelect,
Indomain<T> indomain)
variables - variables used as basis of the choice point.varSelect - the main variable comparator.tieBreakerVarSelect - secondary variable comparator employed if the first one gives the same metric.indomain - the heuristic to choose value assigned to a chosen variable.| Method Detail |
|---|
public T getChoiceVariable(int index)
getChoiceVariable in interface SelectChoicePoint<T extends Var>index - the position of the last variable in selection choice point heuristic.
public int getChoiceValue()
getChoiceValue in interface SelectChoicePoint<T extends Var>public PrimitiveConstraint getChoiceConstraint(int index)
getChoiceConstraint in interface SelectChoicePoint<T extends Var>index - the position of the last variable returned by selection choice point heuristic.
public java.util.IdentityHashMap<T,java.lang.Integer> getVariablesMapping()
getVariablesMapping in interface SelectChoicePoint<T extends Var>public int getIndex()
getIndex in interface SelectChoicePoint<T extends Var>
public T placeSearchVariable(int searchPosition,
int variablePosition)
searchPosition - position at which search store currently choosen variable.variablePosition - current position of the variable choosen by search.
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||