|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.solver.constraints.integer.bool.sat.Vec<T>
public final class Vec<T>
Constructor Summary | |
---|---|
Vec()
Create a Vector with an initial capacity of 5 elements. |
|
Vec(int size)
Create a Vector with a given capacity. |
|
Vec(int size,
T pad)
Construit un vecteur contenant de taille size rempli ? |
|
Vec(T[] elts)
Adapter method to translate an array of int into an IVec. |
Method Summary | |
---|---|
void |
clear()
|
T |
delete(int i)
Delete the ith element of the vector. |
void |
ensure(int nsize)
|
boolean |
equals(Object obj)
|
T |
get(int i)
|
void |
growTo(int newsize,
T pad)
|
int |
hashCode()
|
void |
insertFirst(T elem)
Insert an element at the very begining of the vector. |
void |
insertFirstWithShifting(T elem)
|
Iterator<T> |
iterator()
|
T |
last()
return the latest element on the stack. |
void |
pop()
Pop the last element on the stack. |
Vec<T> |
push(T elem)
|
void |
remove(T elem)
Enleve un element qui se trouve dans le vecteur!!! |
void |
set(int i,
T o)
|
void |
shrink(int nofelems)
Remove nofelems from the Vector. |
void |
shrinkTo(int newsize)
reduce the Vector to exactly newsize elements |
int |
size()
|
void |
sort(Comparator<T> comparator)
|
void |
sortUnique(Comparator<T> cmp)
|
String |
toString()
|
void |
unsafePush(T elem)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Vec()
public Vec(T[] elts)
elts
- a filled array of T.public Vec(int size)
size
- the capacity of the vector.public Vec(int size, T pad)
size
- la taille du vecteurpad
- l'objet servant ? remplir le vecteurMethod Detail |
---|
public int size()
public void shrink(int nofelems)
nofelems
- the number of elements to remove.public void shrinkTo(int newsize)
newsize
- the new size of the vector.public void pop()
public void growTo(int newsize, T pad)
public final void ensure(int nsize)
public Vec<T> push(T elem)
public void unsafePush(T elem)
public void insertFirst(T elem)
elem
- the element to put first in the vector.public void insertFirstWithShifting(T elem)
public void clear()
public T last()
public T get(int i)
public void set(int i, T o)
public void remove(T elem)
elem
- un element du vecteurpublic T delete(int i)
i
- the indexer of the element in the vector
public String toString()
toString
in class Object
public void sort(Comparator<T> comparator)
comparator
- public void sortUnique(Comparator<T> cmp)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Iterator<T> iterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |