|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.memory.copy.RcIntVector
public final class RcIntVector
Field Summary | |
---|---|
static int |
MIN_CAPACITY
Minimal capacity of a vector |
Fields inherited from interface choco.kernel.memory.IStateIntVector |
---|
LOGGER |
Fields inherited from interface choco.kernel.memory.copy.RecomputableElement |
---|
BOOL, DOUBLE, DOUBLEVECTOR, INT, INTVECTOR, LONG, LONGVECTOR, NB_TYPE, OBJECT, VECTOR |
Constructor Summary | |
---|---|
RcIntVector(EnvironmentCopying env)
Constructs an empty stored search vector. |
|
RcIntVector(EnvironmentCopying env,
int[] entries)
|
|
RcIntVector(EnvironmentCopying env,
int initialSize,
int initialValue)
Constructs a stored search vector with an initial size, and initial values. |
Method Summary | |
---|---|
void |
_set(int[] vals)
|
void |
_set(int[] vals,
int timeStamp)
|
void |
add(int i)
Adds a new search at the end of the vector. |
boolean |
contain(int val)
|
int[] |
deepCopy()
|
void |
ensureCapacity(int minCapacity)
Checks if the capacity is great enough, else the capacity is extended. |
int |
get(int index)
Returns the index th element of the vector. |
DisposableIntIterator |
getIterator()
|
int |
getTimeStamp()
|
int |
getType()
|
boolean |
isEmpty()
Checks if the vector is empty. |
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 . |
int |
size()
Returns the current size of the stored search vector. |
int[] |
toArray(int[] tab)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MIN_CAPACITY
Constructor Detail |
---|
public RcIntVector(EnvironmentCopying env, int initialSize, int initialValue)
env
- The current environment.initialSize
- The initial size.initialValue
- The initial common value.public RcIntVector(EnvironmentCopying env, int[] entries)
public RcIntVector(EnvironmentCopying env)
env
- The current environment.Method Detail |
---|
public int size()
size
in interface IStateIntVector
public boolean isEmpty()
isEmpty
in interface IStateIntVector
public void ensureCapacity(int minCapacity)
minCapacity
- the necessary capacity.public void add(int i)
add
in interface IStateIntVector
i
- The search to add.public void removeLast()
removeLast
in interface IStateIntVector
public int get(int index)
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)
val
to the element index
.
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 int[] toArray(int[] tab)
public void remove(int i)
IStateIntVector
remove
in interface IStateIntVector
i
- The search to remove.public void _set(int[] vals)
public void _set(int[] vals, int timeStamp)
public int[] deepCopy()
public int getType()
getType
in interface RecomputableElement
public int getTimeStamp()
getTimeStamp
in interface RecomputableElement
public DisposableIntIterator getIterator()
getIterator
in interface IStateIntVector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |