public interface ModifiableDoubleDBIDList extends DoubleDBIDList
Modifier and Type | Method and Description |
---|---|
void |
add(DoubleDBIDPair pair)
Add an element.
|
void |
add(double distance,
DBIDRef id)
Add an object to this result.
|
void |
clear()
Clear the list contents.
|
DoubleDBIDListMIter |
iter()
Get a DBID iterator (a more efficient API).
|
void |
remove(int p)
Remove the entry at position p by shifting the remainder forward.
|
void |
removeSwap(int p)
Remove the entry at position p by swapping with the last (not preserving
the order).
|
void |
sort()
Sort the result in ascending order
|
void |
swap(int i,
int j)
Swap to entries in the list.
|
get, size
void add(double distance, DBIDRef id)
distance
- Distance to addid
- DBID to addvoid add(DoubleDBIDPair pair)
pair
- Pair to addvoid clear()
void sort()
void swap(int i, int j)
i
- First entryj
- Second entryvoid remove(int p)
p
- Entry offset to removevoid removeSwap(int p)
p
- Entry offset to removeDoubleDBIDListMIter iter()
DBIDs
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
DBID id = iter.getDBID();
}
iter
in interface DBIDs
iter
in interface DoubleDBIDList
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.