|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sat4j.core.VecInt
public class VecInt
A vector specific for primitive integers, widely used in the solver.
Field Summary | |
---|---|
static IVecInt |
EMPTY
|
Constructor Summary | |
---|---|
VecInt()
|
|
VecInt(int size)
|
|
VecInt(int size,
int pad)
Construit un vecteur contenant de taille size rempli � l'aide de size pad. |
Method Summary | |
---|---|
void |
clear()
|
boolean |
contains(int e)
|
void |
copyTo(int[] is)
|
void |
copyTo(IVecInt copy)
C'est op�rations devraient se faire en temps constant. |
int |
delete(int i)
Delete the ith element of the vector. |
void |
ensure(int nsize)
|
boolean |
equals(java.lang.Object obj)
|
int |
get(int i)
|
void |
growTo(int newsize,
int pad)
|
int |
hashCode()
|
void |
insertFirst(int elem)
Insert an element at the very begining of the vector. |
boolean |
isSubsetOf(IVecInt vec)
|
java.util.Iterator<java.lang.Integer> |
iterator()
|
int |
last()
|
void |
moveTo(int[] dest)
|
void |
moveTo(int dest,
int source)
Move elements inside the vector. |
void |
moveTo(IVecInt dest)
|
void |
moveTo2(IVecInt dest)
|
IVecInt |
pop()
d�pile le dernier �l�ment du vecteur. |
IVecInt |
push(int elem)
|
void |
pushAll(IVecInt vec)
|
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()
sort the vector using a custom quicksort. |
void |
sortUnique()
|
java.lang.String |
toString()
|
int |
unsafeGet(int i)
|
void |
unsafePush(int elem)
Push the element in the Vector without verifying if there is room for it. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final IVecInt EMPTY
Constructor Detail |
---|
public VecInt()
public VecInt(int size)
public VecInt(int size, int pad)
size
- la taille du vecteurpad
- l'objet servant � remplir le vecteurMethod Detail |
---|
public int size()
size
in interface IVecInt
public void shrink(int nofelems)
shrink
in interface IVecInt
nofelems
- public void shrinkTo(int newsize)
shrinkTo
in interface IVecInt
public IVecInt pop()
pop
in interface IVecInt
public void growTo(int newsize, int pad)
growTo
in interface IVecInt
public void ensure(int nsize)
ensure
in interface IVecInt
public IVecInt push(int elem)
push
in interface IVecInt
public void unsafePush(int elem)
IVecInt
unsafePush
in interface IVecInt
public void clear()
clear
in interface IVecInt
public int last()
last
in interface IVecInt
public int get(int i)
get
in interface IVecInt
public int unsafeGet(int i)
unsafeGet
in interface IVecInt
public void set(int i, int o)
set
in interface IVecInt
public boolean contains(int e)
contains
in interface IVecInt
public void copyTo(IVecInt copy)
copyTo
in interface IVecInt
copy
- public void copyTo(int[] is)
copyTo
in interface IVecInt
is
- public void moveTo(IVecInt dest)
moveTo
in interface IVecInt
public void moveTo2(IVecInt dest)
moveTo2
in interface IVecInt
public void moveTo(int dest, int source)
IVecInt
vec[dest] = vec[source]
moveTo
in interface IVecInt
dest
- the index of the destinationsource
- the index of the sourcepublic void moveTo(int[] dest)
moveTo
in interface IVecInt
public void insertFirst(int elem)
insertFirst
in interface IVecInt
elem
- the element to put first in the vector.public void remove(int elem)
remove
in interface IVecInt
elem
- un element du vecteurpublic int delete(int i)
delete
in interface IVecInt
i
- the indexer of the element in the vector
public java.lang.String toString()
toString
in class java.lang.Object
public void sort()
sort
in interface IVecInt
public void sortUnique()
sortUnique
in interface IVecInt
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void pushAll(IVecInt vec)
public boolean isSubsetOf(IVecInt vec)
public java.util.Iterator<java.lang.Integer> iterator()
iterator
in interface java.lang.Iterable<java.lang.Integer>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |