public abstract class IStateDoubleVector extends Object
Modifier and Type | Field and Description |
---|---|
protected double[] |
elementData
Contains the elements of the vector.
|
protected IEnvironment |
environment
The current environment.
|
static int |
MIN_CAPACITY
Minimal capacity of a vector
|
protected IStateInt |
size
A backtrackable search with the size of the vector.
|
Modifier | Constructor and Description |
---|---|
protected |
IStateDoubleVector(IEnvironment env,
double[] entries) |
protected |
IStateDoubleVector(IEnvironment env,
int initialSize,
double initialValue) |
Modifier and Type | Method and Description |
---|---|
double |
get(int index)
Returns the
index th element of the vector. |
double |
quickGet(int index)
return the indexth element of the vector without an bound check.
|
abstract double |
quickSet(int index,
double val)
Unsafe setter => don't do bound verification
|
protected boolean |
rangeCheck(int index) |
public static final int MIN_CAPACITY
protected double[] elementData
protected IStateInt size
protected final IEnvironment environment
protected IStateDoubleVector(IEnvironment env, int initialSize, double initialValue)
protected IStateDoubleVector(IEnvironment env, double[] entries)
public final double get(int index)
index
th element of the vector.public final double quickGet(int index)
index
- indexprotected boolean rangeCheck(int index)
public abstract double quickSet(int index, double val)
index
- the index of the replaced valueval
- the new valueCopyright © 2018. All rights reserved.