Add an edge to the graph.
Add a vertex to the graph.
Return the number of directed edges in this graph in linear time. If this graph is a graph with undirected edges, this will always be double the undirected edge count.
Return the number of edges in this graph in linear time.
Check if an edge exists in the graph.
Remove an edge from the graph.
Remove the given vertex from this graph.
Return the number of vertices in this graph in constant time.
true if this graph is a directed graph.
This struct represents a graph type as a reference type.
Graphs types have a type of vertex and a direction.
The graphs are represented by adjacency lists, which have good all-around performance characteristics for sparse graphs.