Class DoubleLongMinHeap.UnsortedIter
- java.lang.Object
-
- elki.utilities.datastructures.heap.DoubleLongMinHeap.UnsortedIter
-
- All Implemented Interfaces:
DoubleLongHeap.UnsortedIter,Iter
- Enclosing class:
- DoubleLongMinHeap
private class DoubleLongMinHeap.UnsortedIter extends java.lang.Object implements DoubleLongHeap.UnsortedIter
Unsorted iterator - in heap order. Does not poll the heap.Use this class as follows:
for (DoubleLongHeap.UnsortedIter iter = heap.unsortedIter(); iter.valid(); iter.next()) { doSomething(iter.get()); }- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected intposIterator position.
-
Constructor Summary
Constructors Modifier Constructor Description privateUnsortedIter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleLongMinHeap.UnsortedIteradvance()Moves the iterator forward to the next entry.doublegetKey()Get the current key.longgetValue()Get the current value.booleanvalid()Returns true if the iterator currently points to a valid object.
-
-
-
Method Detail
-
valid
public boolean valid()
Description copied from interface:IterReturns true if the iterator currently points to a valid object.
-
advance
public DoubleLongMinHeap.UnsortedIter advance()
Description copied from interface:IterMoves the iterator forward to the next entry.
-
getKey
public double getKey()
Description copied from interface:DoubleLongHeap.UnsortedIterGet the current key.- Specified by:
getKeyin interfaceDoubleLongHeap.UnsortedIter- Returns:
- Current key
-
getValue
public long getValue()
Description copied from interface:DoubleLongHeap.UnsortedIterGet the current value.- Specified by:
getValuein interfaceDoubleLongHeap.UnsortedIter- Returns:
- Current value
-
-