public interface IVecInt extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
contains(int e) |
int |
containsAt(int e)
returns the index of the first occurrence of e, else -1.
|
int |
containsAt(int e,
int from)
returns the index of the first occurence of e occurring after from
(excluded), else -1.
|
void |
copyTo(int[] is) |
void |
copyTo(IVecInt copy)
C'est operations devraient se faire en temps constant.
|
int |
delete(int i)
Delete the ith element of the vector.
|
void |
ensure(int nsize) |
int |
get(int i) |
void |
growTo(int newsize,
int pad) |
int |
indexOf(int e) |
void |
insertFirst(int elem)
Insert an element at the very begining of the vector.
|
boolean |
isEmpty()
To know if a vector is empty
|
IteratorInt |
iterator() |
int |
last() |
void |
moveTo(int[] dest) |
void |
moveTo(int dest,
int source)
Move elements inside the vector.
|
void |
moveTo(int sourceStartingIndex,
int[] dest) |
void |
moveTo(IVecInt dest) |
void |
moveTo2(IVecInt dest) |
IVecInt |
pop()
depile le dernier element du vecteur.
|
IVecInt |
push(int elem) |
void |
remove(int elem)
Enleve un element qui se trouve dans le vecteur!!!
|
void |
set(int i,
int o) |
void |
shrink(int nofelems)
Remove the latest nofelems elements from the vector
|
void |
shrinkTo(int newsize) |
int |
size() |
void |
sort() |
void |
sortUnique() |
IVecInt[] |
subset(int k)
Compute all subsets of cardinal k of the vector.
|
int[] |
toArray()
Allow to access the internal representation of the vector as an array.
|
int |
unsafeGet(int eleem) |
void |
unsafePush(int elem)
Push the element in the Vector without verifying if there is room for it.
|
int size()
void shrink(int nofelems)
nofelems
- void shrinkTo(int newsize)
IVecInt pop()
void growTo(int newsize, int pad)
void ensure(int nsize)
IVecInt push(int elem)
void unsafePush(int elem)
elem
- int unsafeGet(int eleem)
void clear()
int last()
int get(int i)
void set(int i, int o)
boolean contains(int e)
int indexOf(int e)
e
- int containsAt(int e)
e
- an integerint containsAt(int e, int from)
e
- an integerfrom
- the index to start from (excluded).void copyTo(IVecInt copy)
copy
- void copyTo(int[] is)
is
- void moveTo(IVecInt dest)
void moveTo(int sourceStartingIndex, int[] dest)
void moveTo2(IVecInt dest)
void moveTo(int[] dest)
void moveTo(int dest, int source)
vec[dest] = vec[source]
dest
- the index of the destinationsource
- the index of the sourcevoid insertFirst(int elem)
elem
- the element to put first in the vector.void remove(int elem)
elem
- un element du vecteurint delete(int i)
i
- the indexer of the element in the vectorvoid sort()
void sortUnique()
boolean isEmpty()
IteratorInt iterator()
int[] toArray()
IVecInt[] subset(int k)
k
- a cardinal (k<= vec.size())Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.