public interface ForEachSuccessorFunction<N>
Consumer
-based interface for graph operations/traversals (based on Guava's
`SuccessorsFunction`).
This interface is meant to be used as a parameter to graph algorithms that only need a way of consuming the successors of a node in a graph.
Modifier and Type | Method and Description |
---|---|
void |
forEachSuccessor(N node,
java.util.function.Consumer<N> consumer)
Runs
consumer on all nodes in this graph adjacent to node which can be reached by
traversing node's outgoing edges in the direction (if any) of the edge. |
void forEachSuccessor(N node, java.util.function.Consumer<N> consumer)
consumer
on all nodes in this graph adjacent to node which can be reached by
traversing node's outgoing edges in the direction (if any) of the edge.node
- consumer
-