Collect and topologically order all reachable nodes starting form the given nodes and following the given neighbours relations.
Collect and topologically order all reachable nodes starting form the given nodes and following the given neighbours relations. Depth first search algorithm is used.
type of value representing node, should implement equality which is used in debox.Set
starting nodes for the search
a function representing the adjacency matrix of the graph
Topologically ordered sequence of nodes reachable from the starts
including starts
themselves
Build a set of reachable nodes starting form the given nodes and following the given neighbours relations.
Build a set of reachable nodes starting form the given nodes and following the given neighbours relations. Depth first search algorithm is used.
type of value representing node, should implement equality which is used in debox.Set
starting nodes for the search
a function representing the adjacency matrix of the graph
Set of nodes reachable from the starts
including starts
themselves