Interface IGraph
- Namespace
- AlgorithmsSW.Graph
- Assembly
- AlgorithmsSW.dll
Represents a graph data structure.
public interface IGraph : IReadOnlyGraph, IEnumerable<(int vertex0, int vertex1)>, IEnumerable
- Inherited Members
- Extension Methods
Remarks
Self-loops are supported, but parallel edges are not.
Methods
AddEdge(int, int)
Adds an edge between two vertices in the graph.
void AddEdge(int vertex0, int vertex1)
Parameters
RemoveEdge(int, int)
Removes an edge between two vertices in the graph.
bool RemoveEdge(int vertex0, int vertex1)
Parameters
vertex0
intThe first vertex of the edge to remove.
vertex1
intThe second vertex of the edge to remove.