public abstract class IStateIntVector extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
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.
|
| Constructor and Description |
|---|
IStateIntVector(IEnvironment env,
int[] entries) |
IStateIntVector(IEnvironment env,
int initialSize,
int initialValue) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
add(int i)
Adds a new search at the end of the vector.
|
int |
quickGet(int index)
access an element without any bound check
|
abstract int |
quickSet(int index,
int val)
Assigns a new value val to the element indexth and return the old value without bound check
|
protected boolean |
rangeCheck(int index) |
abstract int |
set(int index,
int val)
Assigns a new value
val to the element index and returns
the old value |
public static final int MIN_CAPACITY
protected int[] elementData
protected IStateInt size
protected final IEnvironment environment
public IStateIntVector(IEnvironment env, int initialSize, int initialValue)
public IStateIntVector(IEnvironment env, int[] entries)
protected boolean rangeCheck(int index)
public abstract void add(int i)
i - The search to add.public int quickGet(int index)
index - index of the elementpublic abstract int set(int index,
int val)
val to the element index and returns
the old valuepublic abstract int quickSet(int index,
int val)
index - the index where the value is modifiedval - the new valueCopyright © 2018. All rights reserved.