|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.util.IndexDomainView
public class IndexDomainView
Defines index domain view for a variable and related operations on it.
| Field Summary | |
|---|---|
int[] |
indexToValue
It specifies mapping of the index value onto value in the domain of the variable. |
| Constructor Summary | |
|---|---|
IndexDomainView(IntVar var,
boolean forceSparse)
It creates an index domain view for a given variable. |
|
IndexDomainView(IntVar var,
int[] valuesInFocus)
It creates an index domain view with only given values being in focus of the index domain view. |
|
| Method Summary | |
|---|---|
boolean |
contains(int i)
It checks if the value of a given index is still in the domain. |
int |
getSize()
It returns size of the variable for which the index domain view is being created. |
int |
indexOfValue(int value)
It finds an index for a given value. |
void |
intializeSupportSweep()
It marks all values in focus of the index domain view as not supported and requiring support to be established. |
boolean |
isSupported()
It checks if all values are currently supported. |
void |
removeUnSupportedValues(Store store)
It removes all values for which no support was found since the initialization of the support sweep. |
boolean |
setSupport(int i)
It returns true if the ith-value was supported before. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int[] indexToValue
| Constructor Detail |
|---|
public IndexDomainView(IntVar var,
boolean forceSparse)
var - variable for which the index domain view is created.forceSparse - forces a sparse representation inside (one value has one entry within the mapping).
public IndexDomainView(IntVar var,
int[] valuesInFocus)
var - variable for which the index domain view is created.valuesInFocus - values which are of interest.| Method Detail |
|---|
public void intializeSupportSweep()
public void removeUnSupportedValues(Store store)
store - public boolean contains(int i)
i - index which is being checked if it is still contained within a variable.
public boolean setSupport(int i)
i - the position of the value which is being supported.
public boolean isSupported()
public int indexOfValue(int value)
value - value for which the indexed is searched for.
public int getSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||