Class ComparableMinHeap.UnsortedIter
- java.lang.Object
-
- elki.utilities.datastructures.heap.ComparableMinHeap.UnsortedIter
-
- All Implemented Interfaces:
ObjectHeap.UnsortedIter<K>,Iter
- Enclosing class:
- ComparableMinHeap<K extends java.lang.Comparable<? super K>>
private class ComparableMinHeap.UnsortedIter extends java.lang.Object implements ObjectHeap.UnsortedIter<K>
Unsorted iterator - in heap order. Does not poll the heap.Use this class as follows:
for (ObjectHeap.UnsortedIter<K> 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 ComparableMinHeap.UnsortedIteradvance()Moves the iterator forward to the next entry.Kget()Get the iterators current object.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 ComparableMinHeap.UnsortedIter advance()
Description copied from interface:IterMoves the iterator forward to the next entry.
-
get
public K get()
Description copied from interface:ObjectHeap.UnsortedIterGet the iterators current object.- Specified by:
getin interfaceObjectHeap.UnsortedIter<K extends java.lang.Comparable<? super K>>- Returns:
- Current object
-
-