|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.ints.AbstractIntIterator
it.unimi.dsi.webgraph.NodeIterator
public abstract class NodeIterator
This interface extends IntIterator
and is used to scan a graph, that is, to read its nodes and their successor lists
sequentially. The AbstractIntIterator.nextInt()
method returns the node that will be scanned. After a call to this method, calling
successors()
or successorArray()
will return the list of successors.
Implementing subclasses can override either successors()
or
successorArray()
, but at least one of them must be implemented.
Constructor Summary | |
---|---|
NodeIterator()
|
Method Summary | |
---|---|
abstract int |
outdegree()
Returns the outdegree of the current node. |
int[] |
successorArray()
Returns a reference to an array containing the successors of the current node. |
LazyIntIterator |
successors()
Returns a lazy iterator over the successors of the current node. |
Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntIterator |
---|
next, nextInt, remove, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Iterator |
---|
hasNext |
Constructor Detail |
---|
public NodeIterator()
Method Detail |
---|
public abstract int outdegree()
public LazyIntIterator successors()
This implementation just wraps the array returned by successorArray()
.
public int[] successorArray()
The returned array may contain more entries than the outdegree of the current node. However, only those with indices from 0 (inclusive) to the outdegree of the current node (exclusive) contain valid data.
This implementation just unwrap the iterator returned by successors()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |