public interface ArrayModifiableDBIDs extends ModifiableDBIDs, ArrayDBIDs
Modifier and Type | Method and Description |
---|---|
void |
insert(int i,
DBIDRef newval)
Insert at position i (starting at 0, moving the remainder by one position).
|
DBIDArrayMIter |
iter()
Get a modifiable DBID iterator (a more efficient API).
|
DBID |
remove(int i)
Remove the i'th entry (starting at 0)
|
DBID |
set(int i,
DBIDRef newval)
Replace the i'th entry (starting at 0)
|
void |
sort()
Sort the DBID set.
|
void |
sort(Comparator<? super DBIDRef> comparator)
Sort the DBID set.
|
void |
sort(int start,
int end,
Comparator<? super DBIDRef> comparator)
Sort the DBID set.
|
void |
swap(int a,
int b)
Swap DBIDs add positions a and b.
|
add, addDBIDs, clear, pop, remove, removeDBIDs
assignVar, binarySearch, get, size, slice
void sort()
void sort(Comparator<? super DBIDRef> comparator)
comparator
- Comparator to usevoid sort(int start, int end, Comparator<? super DBIDRef> comparator)
start
- Starting index, for partial sortingend
- End index, for partial sorting (exclusive)comparator
- Comparator to useDBID remove(int i)
i
- IndexDBID set(int i, DBIDRef newval)
i
- Indexnewval
- New valuevoid insert(int i, DBIDRef newval)
i
- Indexnewval
- New valuevoid swap(int a, int b)
a
- First positionb
- Second positionDBIDArrayMIter iter()
ModifiableDBIDs
for(DBIDMIter iter = ids.iter(); iter.valid(); iter.advance()) {
DBID id = iter.getDBID();
iter.remove();
}
iter
in interface ArrayDBIDs
iter
in interface DBIDs
iter
in interface ModifiableDBIDs
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.