|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.memory.structure.StoredIntBipartiteList
public final class StoredIntBipartiteList
A stored list dedicated to two operations : - iteration - removal of an element during iteration It only requires a StoredInt to denote the first element of the list and proceeds by swapping element with the first one to remove them and incrementing the index of the first element. IT DOES NOT PRESERVE THE ORDER OF THE LIST
Field Summary |
---|
Fields inherited from interface choco.kernel.memory.IStateIntVector |
---|
LOGGER, MIN_CAPACITY |
Constructor Summary | |
---|---|
StoredIntBipartiteList(IEnvironment environment,
int[] values)
|
Method Summary | |
---|---|
void |
add(int i)
Adds a new search at the end of the vector. |
boolean |
contain(int val)
|
int |
get(int index)
Returns the index th element of the vector. |
DisposableIntIterator |
getIterator()
|
DisposableIntIterator |
getRemIterator()
|
boolean |
isEmpty()
Checks if the vector is empty. |
String |
pretty()
|
int |
quickGet(int index)
access an element without any bound check |
int |
quickSet(int index,
int val)
Assigns a new value val to the element indexth and return the old value without bound check |
void |
remove(int i)
Removes an int. |
void |
removeLast()
removes the search at the end of the vector. |
int |
set(int index,
int val)
Assigns a new value val to the element index and returns
the old value |
int |
size()
Returns the current size of the stored search vector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StoredIntBipartiteList(IEnvironment environment, int[] values)
Method Detail |
---|
public int size()
IStateIntVector
size
in interface IStateIntVector
public boolean isEmpty()
IStateIntVector
isEmpty
in interface IStateIntVector
public void add(int i)
IStateIntVector
add
in interface IStateIntVector
i
- The search to add.public void remove(int i)
IStateIntVector
remove
in interface IStateIntVector
i
- The search to remove.public void removeLast()
IStateIntVector
removeLast
in interface IStateIntVector
public int get(int index)
IStateIntVector
index
th element of the vector.
get
in interface IStateIntVector
public int quickGet(int index)
IStateIntVector
quickGet
in interface IStateIntVector
public boolean contain(int val)
contain
in interface IStateIntVector
public int set(int index, int val)
IStateIntVector
val
to the element index
and returns
the old value
set
in interface IStateIntVector
public int quickSet(int index, int val)
IStateIntVector
quickSet
in interface IStateIntVector
index
- the index where the value is modifiedval
- the new value
public DisposableIntIterator getIterator()
getIterator
in interface IStateIntVector
public DisposableIntIterator getRemIterator()
public String pretty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |