source node of the directed graph
use the original direction or the reversed direction
Breadth first search on the graph.
Breadth first search on the graph. Note that this is a directed BFS. Although eachs node contains both previous and next nodes, only one direction is used.
An iterator to go through nodes in the graph in a BFS order
Depth first search on the graph.
Depth first search on the graph. Note that this is a directed DFS. Although eachs node contains both previous and next nodes, only one direction is used.
An iterator to go through nodes in the graph in a DFS order
How many edges in the graph
How many edges in the graph
use the original direction or the reversed direction
How many nodes in the graph
How many nodes in the graph
source node of the directed graph
Topology sort.
Topology sort.
A sequence of sorted graph nodes
Provides useful graph operations for a directed graph.
The node connection in the graph has direction. This class stores a source node. Note that it doesn't maintain the topology. The topology of the graph is stored in the connection of the nodes.
Node element type