Class IntegerMaxHeap.UnsortedIter
- java.lang.Object
-
- elki.utilities.datastructures.heap.IntegerMaxHeap.UnsortedIter
-
- All Implemented Interfaces:
IntegerHeap.UnsortedIter
,Iter
- Enclosing class:
- IntegerMaxHeap
private class IntegerMaxHeap.UnsortedIter extends java.lang.Object implements IntegerHeap.UnsortedIter
Unsorted iterator - in heap order. Does not poll the heap.Use this class as follows:
for (IntegerHeap.UnsortedIter iter = heap.unsortedIter(); iter.valid(); iter.next()) { doSomething(iter.get()); }
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected int
pos
Iterator position.
-
Constructor Summary
Constructors Modifier Constructor Description private
UnsortedIter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerMaxHeap.UnsortedIter
advance()
Moves the iterator forward to the next entry.int
get()
Get the iterators current object.boolean
valid()
Returns true if the iterator currently points to a valid object.
-
-
-
Method Detail
-
valid
public boolean valid()
Description copied from interface:Iter
Returns true if the iterator currently points to a valid object.
-
advance
public IntegerMaxHeap.UnsortedIter advance()
Description copied from interface:Iter
Moves the iterator forward to the next entry.
-
get
public int get()
Description copied from interface:IntegerHeap.UnsortedIter
Get the iterators current object.- Specified by:
get
in interfaceIntegerHeap.UnsortedIter
- Returns:
- Current object
-
-