Merge the given context into the graph.
Merge the given context into the graph. The context consists of a vertex, its label, its successors, and its predecessors.
Add an edge to this graph.
Add an edge to this graph. Throws an error if the source and target nodes don't exist in the graph.
Add multiple edges to this graph
Add a node to this graph.
Add a node to this graph. If this node already exists with a different label, its label will be replaced with this new one.
Add multiple nodes to this graph
Utility function for breadth-first search tree.
Breadth-first search remembering predecessor information.
Breadth-first search remembering predecessor information. Gives transient edges in breadth-first order, starting from the given node.
Breadth-first search remembering predecessor information.
Breadth-first search remembering predecessor information. Gives transient edges starting from the targets of the given edges, in breadth-first order.
Breadth-first edges
Breadth-first search from the given node.
Breadth-first search from the given node. The result is ordered by distance
from the node v
.
Breadth-first search from the given node.
Breadth-first search from the given node. The result is a vector of results
of passing the context of each visited to the function f
.
Breadth-first search from the given nodes.
Breadth-first search from the given nodes. The result is the successors of
vs
, with immediate successors first.
Breadth-first search (nodes ordered by distance)
Breadth-first search from the given nodes.
Breadth-first search from the given nodes. The result is a vector of
results of passing the context of each visited node to the function f
.
Breadth-first search tree.
Breadth-first search tree. The result is a list of paths through the graph from the given vertex, in breadth-first order.
Returns true if the given node is in the graph, otherwise false
Find the context for the given node.
Find the context for the given node. Causes an error if the node is not present in the graph.
The number of nodes in this graph
Returns a context focused on the given node, if present, and the graph with that node removed.
Decompose this graph into the context for an arbitrarily chosen node and the rest of the graph.
The number of connections to and from the given node
Depth-first forest.
Depth-first forest. Follows successors of the given nodes. The result is a vector of trees of nodes where each path in each tree is a path through the graph.
Depth-first forest.
Depth-first forest. Follows successors of the given nodes. The result is
a vector of trees of results of passing the context of each node to the function f
.
Forward depth-first search.
Forward depth-first search.
A list of all the edges in the graph
Map a function over the edge labels in the graph
The shortest path from vertex s
to vertex t
Find an edge between two nodes
Fold a function over the graph
Map a function over the graph
The number of inbound edges from the given node
Find all inbound edges for the given node
All the inbound links of the given node, including self-edges
A list of all the edges in the graph and their labels
A list of all the nodes in the graph and their labels
Find the label for a node
Utility function for labeled breadth-first search tree
Breadth-first search tree with labeled paths
Shortest path from vertex s
to vertex t
, with labels
Breadth-first search giving the distance of each node from the node v
.
Breadth-first search giving the distance of each node from the search nodes.
Find the neighbors of a node
Map a function over the node labels in the grap
A list of all the nodes in the graph
The number of outbound edges from the given node
Find all outbound edges for the given node
All the outbound links of the given node, including self-edges
Find all nodes that have a link to the given node
Reverse depth-first search.
Reverse depth-first search. Follows predecessors.
Finds all the reachable nodes from a given node, using DFS
Remove an edge from this graph
Remove multiple edges from this graph
Remove an edge from this graph only if the label matches
Remove a node from this graph
Remove multiple nodes from this graph
Reverse the direction of all edges
Add an edge to this graph.
Add an edge to this graph. If the source and target nodes don't exist in this graph,
return the given failover
graph.
Add multiple edges to this graph, ignoring edges whose source and target nodes don't already exist in the graph.
Find all nodes that have a link from the given node
Finds the transitive closure of this graph.
Undirected depth-first search
Adds all the nodes and edges from one graph to another.
Replace an edge with a new one
Update multiple edges
Replace a node with a new one
Update multiple nodes
Map over the unique node identifiers in the graph
Generalized depth-first forest.
Generalized depth-first forest. Uses the function d
to decide which nodes to
visit next
Generalized depth-first forest.
Generalized depth-first forest. Uses the function d
to decide which nodes to
visit next.
Generalized depth-first search.
An implementation of an inductive graph where nodes of type
N
are labeled withA
, and edges are labeled withB
.