- addEdge
void addEdge(ref Vertex left, ref Vertex right)
void addEdge(ref Vertex left, Vertex right)
void addEdge(Vertex left, ref Vertex right)
void addEdge(Vertex left, Vertex right)
Add an edge to the graph.
- addVertex
void addVertex(ref Vertex vertex)
void addVertex(Vertex vertex)
Add a vertex to the graph.
- directedEdgeCount
size_t directedEdgeCount()
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.
- edgeCount
size_t edgeCount()
Return the number of edges in this graph
in linear time.
- hasEdge
bool hasEdge(ref Vertex left, ref Vertex right)
bool hasEdge(ref Vertex left, Vertex right)
bool hasEdge(Vertex left, ref Vertex right)
bool hasEdge(Vertex left, Vertex right)
Check if an edge exists in the graph.
- hasVertex
bool hasVertex(ref Vertex vertex)
bool hasVertex(Vertex vertex)
- removeEdge
bool removeEdge(ref Vertex left, ref Vertex right)
bool removeEdge(ref Vertex left, Vertex right)
bool removeEdge(Vertex left, ref Vertex right)
bool removeEdge(Vertex left, Vertex right)
Remove an edge from the graph.
- removeVertex
bool removeVertex(ref Vertex vertex)
bool removeVertex(Vertex vertex)
Remove the given vertex from this 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.