|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sat4j.core.ReadOnlyVecInt
public final class ReadOnlyVecInt
Utility class to allow Read Only access only to an IVecInt.
Constructor Summary | |
---|---|
ReadOnlyVecInt(IVecInt vec)
|
Method Summary | |
---|---|
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()
|
VecInt[] |
subset(int cardinal)
Compute all subsets of cardinal k of the vector. |
int[] |
toArray()
Allow to access the internal representation of the vector as an array. |
String |
toString()
|
int |
unsafeGet(int eleem)
|
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReadOnlyVecInt(IVecInt vec)
Method Detail |
---|
public void clear()
clear
in interface IVecInt
public boolean contains(int e)
contains
in interface IVecInt
public int containsAt(int e)
IVecInt
containsAt
in interface IVecInt
e
- an integer
public int containsAt(int e, int from)
IVecInt
containsAt
in interface IVecInt
e
- an integerfrom
- the index to start from (excluded).
public void copyTo(IVecInt copy)
IVecInt
copyTo
in interface IVecInt
public void copyTo(int[] is)
copyTo
in interface IVecInt
public int delete(int i)
IVecInt
delete
in interface IVecInt
i
- the indexer of the element in the vector
public void ensure(int nsize)
ensure
in interface IVecInt
public int get(int i)
get
in interface IVecInt
public void growTo(int newsize, int pad)
growTo
in interface IVecInt
public void insertFirst(int elem)
IVecInt
insertFirst
in interface IVecInt
elem
- the element to put first in the vector.public boolean isEmpty()
IVecInt
isEmpty
in interface IVecInt
public IteratorInt iterator()
iterator
in interface IVecInt
public int last()
last
in interface IVecInt
public void moveTo(IVecInt dest)
moveTo
in interface IVecInt
public void moveTo(int[] dest)
moveTo
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 moveTo2(IVecInt dest)
moveTo2
in interface IVecInt
public IVecInt pop()
IVecInt
pop
in interface IVecInt
public IVecInt push(int elem)
push
in interface IVecInt
public void remove(int elem)
IVecInt
remove
in interface IVecInt
elem
- un element du vecteurpublic void set(int i, int o)
set
in interface IVecInt
public void shrink(int nofelems)
IVecInt
shrink
in interface IVecInt
public void shrinkTo(int newsize)
shrinkTo
in interface IVecInt
public int size()
size
in interface IVecInt
public void sort()
sort
in interface IVecInt
public void sortUnique()
sortUnique
in interface IVecInt
public int unsafeGet(int eleem)
unsafeGet
in interface IVecInt
public void unsafePush(int elem)
IVecInt
unsafePush
in interface IVecInt
public int[] toArray()
IVecInt
toArray
in interface IVecInt
public int indexOf(int e)
indexOf
in interface IVecInt
public String toString()
toString
in class Object
public void moveTo(int sourceStartingIndex, int[] dest)
moveTo
in interface IVecInt
public VecInt[] subset(int cardinal)
IVecInt
subset
in interface IVecInt
cardinal
- a cardinal (k<= vec.size())
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |