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) |
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, size
public 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.public StoredIntVector(EnvironmentTrailing env, int[] entries)
public void ensureCapacity(int minCapacity)
minCapacity
- the necessary capacity.public void add(int i)
add
in class IStateIntVector
i
- The search to add.public void remove(int i)
remove
in class IStateIntVector
i
- The search to remove.public void removeLast()
removeLast
in class IStateIntVector
public int set(int index, int val)
val
to the element index
.set
in class IStateIntVector
public final int quickSet(int index, int val)
IStateIntVector
quickSet
in class IStateIntVector
index
- the index where the value is modifiedval
- the new valuepublic int _set(int index, int val, int stamp)
Copyright © 2015. All rights reserved.