Graph sum of this
and that
Graph sum of this
and that
a second DiGraph[T]
a DiGraph[T] containing all vertices and edges of each graph
Performs breadth-first search on the directed graph, with a blacklist of nodes
Performs breadth-first search on the directed graph, with a blacklist of nodes
the start node
list of nodes to avoid visiting, if encountered
a Map[T,T] from each visited node to its predecessor in the traversal
Performs breadth-first search on the directed graph
Performs breadth-first search on the directed graph
the start node
a Map[T,T] from each visited node to its predecessor in the traversal
Check whether the graph contains vertex v
Finds a Seq of Nodes that form a loop
Finds a Seq of Nodes that form a loop
Node to start loop path search from.
The found Seq, the Seq is empty if there is no loop
Finds the strongly connected components in the graph
Finds the strongly connected components in the graph
a Seq of Seq[T], each containing nodes of an SCC in traversable order
Find all sinks in the graph
Find all sinks in the graph
a Set[T] of sink nodes
Find all sources in the graph
Find all sources in the graph
a Set[T] of source nodes
Get all edges of a node
Get all edges of a node
the specified node
a Set[T] of all vertices that v has edges to
Get all vertices in the graph
Get all vertices in the graph
a Set[T] of all vertices in the graph
Linearizes (topologically sorts) a DAG
Linearizes (topologically sorts) a DAG
a Seq[T] describing the topological order of the DAG traversal
CyclicException
if the graph is cyclic
Finds a path (if one exists) from one node to another, with a blacklist
Finds a path (if one exists) from one node to another, with a blacklist
the start node
the destination node
list of nodes which break path, if encountered
a Seq[T] of nodes defining an arbitrary valid path
Finds a path (if one exists) from one node to another
Finds a path (if one exists) from one node to another
the start node
the destination node
a Seq[T] of nodes defining an arbitrary valid path
Finds all paths starting at a particular node in a DAG
Finds all paths starting at a particular node in a DAG
WARNING: This is an exponential time algorithm (as any algorithm must be for this problem), but is useful for flattening circuit graph hierarchies. Each path is represented by a Seq[T] of nodes in a traversable order.
the node to start at
a Map[T,Seq[Seq[T]]] where the value associated with v is the Seq of all paths from start to v
Finds the set of nodes reachable from a particular node, with a blacklist.
Finds the set of nodes reachable from a particular node, with a blacklist. The semantics of
adding a node to the blacklist is that any of its inedges will be ignored in the traversal.
The root
node is *not* included in the returned set unless it is possible to reach root
along
a non-trivial path beginning at root
; i.e., if the graph has a cycle that contains root
.
the start node
list of nodes to stop searching, if encountered
a Set[T] of nodes reachable from root
Finds the set of nodes reachable from a particular node.
Finds the set of nodes reachable from a particular node. The root
node is *not* included in the
returned set unless it is possible to reach root
along a non-trivial path beginning at
root
; i.e., if the graph has a cycle that contains root
.
the start node
a Set[T] of nodes reachable from root
Returns a graph with all edges reversed
Return a simplified connectivity graph with only a subset of the nodes
Return a simplified connectivity graph with only a subset of the nodes
Any path between two non-deleted nodes (u,v) in the original graph will be transformed into an edge (u,v).
the Set[T] of desired vertices
the simplified graph
scala.IllegalArgumentException
if vprime is not a subset of V
Return a graph with only a subset of the nodes
Return a graph with only a subset of the nodes
Any edge including a deleted node will be deleted
the Set[T] of desired vertices
the subgraph
scala.IllegalArgumentException
if vprime is not a subset of V
Return a graph with all the nodes of the current graph transformed by a function.
Return a graph with all the nodes of the current graph transformed by a function. Edge connectivity will be the same as the current graph.
A function {(T) => Q} that transforms each node
a transformed DiGraph[Q]
Represents common behavior of all directed graphs