Package org.apache.lucene.util.hnsw
Class HnswGraph.CollectionNodesIterator
java.lang.Object
org.apache.lucene.util.hnsw.HnswGraph.NodesIterator
org.apache.lucene.util.hnsw.HnswGraph.CollectionNodesIterator
- All Implemented Interfaces:
Iterator<Integer>
,PrimitiveIterator<Integer,
,IntConsumer> PrimitiveIterator.OfInt
- Enclosing class:
HnswGraph
Nodes iterator based on set representation of nodes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
-
Field Summary
Fields inherited from class org.apache.lucene.util.hnsw.HnswGraph.NodesIterator
size
-
Constructor Summary
ConstructorDescriptionCollectionNodesIterator
(Collection<Integer> nodes) Constructor for iterator based on collection representing nodes -
Method Summary
Methods inherited from class org.apache.lucene.util.hnsw.HnswGraph.NodesIterator
getSortedNodes, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.PrimitiveIterator.OfInt
forEachRemaining, forEachRemaining, next
-
Constructor Details
-
CollectionNodesIterator
Constructor for iterator based on collection representing nodes
-
-
Method Details
-
consume
public int consume(int[] dest) Description copied from class:HnswGraph.NodesIterator
Consume integers from the iterator and place them into the `dest` array.- Specified by:
consume
in classHnswGraph.NodesIterator
- Parameters:
dest
- where to put the integers- Returns:
- The number of integers written to `dest`
-
nextInt
public int nextInt() -
hasNext
public boolean hasNext()
-