|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.memory.copy.RcDoubleVector
public class RcDoubleVector
Field Summary | |
---|---|
static int |
MIN_CAPACITY
Minimal capacity of a vector |
Fields inherited from interface choco.kernel.memory.IStateDoubleVector |
---|
LOGGER |
Fields inherited from interface choco.kernel.memory.copy.RecomputableElement |
---|
BOOL, DOUBLE, DOUBLEVECTOR, INT, INTVECTOR, LONG, LONGVECTOR, NB_TYPE, OBJECT, VECTOR |
Constructor Summary | |
---|---|
RcDoubleVector(EnvironmentCopying env)
Constructs an empty stored search vector. |
|
RcDoubleVector(EnvironmentCopying env,
double[] entries)
|
|
RcDoubleVector(EnvironmentCopying env,
int initialSize,
double initialValue)
Constructs a stored search vector with an initial size, and initial values. |
Method Summary | |
---|---|
void |
_set(double[] vals)
|
void |
_set(double[] vals,
int timeStamp)
|
void |
add(double i)
Adds a new search at the end of the vector. |
double[] |
deepCopy()
|
void |
ensureCapacity(int minCapacity)
Checks if the capacity is great enough, else the capacity is extended. |
double |
get(int index)
Returns the index th element of the vector. |
DisposableIntIterator |
getIterator()
|
int |
getTimeStamp()
|
int |
getType()
|
boolean |
isEmpty()
Checks if the vector is empty. |
double |
quickGet(int index)
return the indexth element of the vector without an bound check. |
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 . |
int |
size()
Returns the current size of the stored search vector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MIN_CAPACITY
Constructor Detail |
---|
public RcDoubleVector(EnvironmentCopying env, int initialSize, double initialValue)
env
- The current environment.initialSize
- The initial size.initialValue
- The initial common value.public RcDoubleVector(EnvironmentCopying env, double[] entries)
public RcDoubleVector(EnvironmentCopying env)
env
- The current environment.Method Detail |
---|
public int size()
size
in interface IStateDoubleVector
public boolean isEmpty()
isEmpty
in interface IStateDoubleVector
public void ensureCapacity(int minCapacity)
minCapacity
- the necessary capacity.public void add(double i)
add
in interface IStateDoubleVector
i
- The search to add.public void removeLast()
removeLast
in interface IStateDoubleVector
public double get(int index)
index
th element of the vector.
get
in interface IStateDoubleVector
public final double quickGet(int index)
IStateDoubleVector
quickGet
in interface IStateDoubleVector
index
- index
public double set(int index, double val)
val
to the element index
.
set
in interface IStateDoubleVector
public double quickSet(int index, double val)
IStateDoubleVector
quickSet
in interface IStateDoubleVector
index
- the index of the replaced valueval
- the new value
public void remove(int i)
IStateDoubleVector
remove
in interface IStateDoubleVector
i
- The search to remove.public void _set(double[] vals)
public void _set(double[] vals, int timeStamp)
public double[] deepCopy()
public int getType()
getType
in interface RecomputableElement
public int getTimeStamp()
getTimeStamp
in interface RecomputableElement
public DisposableIntIterator getIterator()
getIterator
in interface IStateDoubleVector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |