public final class StoredIntVector extends IStateIntVector
| Modifier and Type | Field and Description |
|---|---|
protected StoredIntVectorTrail |
myTrail |
int[] |
worldStamps
Contains time stamps for all entries (the world index of the last update for each entry)
|
elementData, environment, MIN_CAPACITY, size| Constructor and Description |
|---|
StoredIntVector(EnvironmentTrailing env,
int[] entries)
Deprecated.
|
StoredIntVector(EnvironmentTrailing env,
int initialSize,
int initialValue)
Constructs a stored search vector with an initial size, and initial values.
|
| Modifier and Type | Method and Description |
|---|---|
int |
_set(int index,
int val,
int stamp)
Sets an element without storing the previous value.
|
void |
add(int i)
Adds a new search at the end of the vector.
|
void |
ensureCapacity(int minCapacity)
Checks if the capacity is great enough, else the capacity
is extended.
|
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. |
contains, deepCopy, get, isEmpty, quickGet, rangeCheck, sizepublic int[] worldStamps
protected final StoredIntVectorTrail myTrail
public StoredIntVector(EnvironmentTrailing env, int initialSize, int initialValue)
env - The current environment.initialSize - The initial size.initialValue - The initial common value.@Deprecated public StoredIntVector(EnvironmentTrailing env, int[] entries)
public void ensureCapacity(int minCapacity)
minCapacity - the necessary capacity.public void add(int i)
add in class IStateIntVectori - The search to add.public void remove(int i)
remove in class IStateIntVectori - The search to remove.public void removeLast()
removeLast in class IStateIntVectorpublic int set(int index,
int val)
val to the element index.set in class IStateIntVectorpublic final int quickSet(int index,
int val)
IStateIntVectorquickSet in class IStateIntVectorindex - the index where the value is modifiedval - the new valuepublic int _set(int index,
int val,
int stamp)
Copyright © 2017. All rights reserved.