public interface ModifiableDoubleDBIDList extends DoubleDBIDList
DoubleDBIDList.Consumer
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.
|
assignVar, doubleValue, forEachDouble, size, slice
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
Example:
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
DBID id = iter.getDBID();
}
iter
in interface DBIDs
iter
in interface DoubleDBIDList
Copyright © 2019 ELKI Development Team. License information.