public class IndexDomainView extends Object
Modifier and Type | Field and Description |
---|---|
int[] |
indexToValue
It specifies mapping of the index value onto value in the domain of the variable.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public int[] indexToValue
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.public void intializeSupportSweep()
public void removeUnSupportedValues(Store store)
store
- current storepublic 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()
Copyright © 2022. All rights reserved.