public final class StoredDoubleVector extends IStateDoubleVector
| Modifier and Type | Field and Description |
|---|---|
protected StoredDoubleVectorTrail |
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 |
|---|
StoredDoubleVector(EnvironmentTrailing env,
int initialSize,
double initialValue)
Constructs a stored search vector with an initial size, and initial values.
|
| Modifier and Type | Method and Description |
|---|---|
double |
_set(int index,
double val,
int stamp)
Sets an element without storing the previous value.
|
void |
add(double 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.
|
double |
quickSet(int index,
double val)
Unsafe setter => don't do bound verification
|
void |
remove(int i)
Removes an int.
|
void |
removeLast()
removes the search at the end of the vector.
|
double |
set(int index,
double val)
Assigns a new value
val to the element index. |
get, quickGet, rangeCheckpublic int[] worldStamps
protected final StoredDoubleVectorTrail myTrail
public StoredDoubleVector(EnvironmentTrailing env, int initialSize, double initialValue)
env - The current environment.initialSize - The initial size.initialValue - The initial common value.public void ensureCapacity(int minCapacity)
minCapacity - the necessary capacity.public void add(double i)
i - The search to add.public void remove(int i)
i - The search to remove.public void removeLast()
public double set(int index,
double val)
val to the element index.public double quickSet(int index,
double val)
IStateDoubleVectorquickSet in class IStateDoubleVectorindex - the index of the replaced valueval - the new valuepublic double _set(int index,
double val,
int stamp)
index - Index where to setval - value to be changedstamp - world when the modification is doneCopyright © 2018. All rights reserved.