Class GraphMatchingExtensions
- Namespace
- Graph1x.Algorithms
- Assembly
- Graph1x.dll
Convenience entry points for matching queries.
public static class GraphMatchingExtensions
- Inheritance
-
GraphMatchingExtensions
- Inherited Members
Methods
MaximumBipartiteMatching<TVertex, TEdge>(IReadOnlyGraph<TVertex, TEdge>)
Computes a maximum-cardinality matching of an undirected bipartite graph using Hopcroft-Karp.
public static IReadOnlyList<TEdge> MaximumBipartiteMatching<TVertex, TEdge>(this IReadOnlyGraph<TVertex, TEdge> graph) where TVertex : notnull where TEdge : IEdge<TVertex>
Parameters
graphIReadOnlyGraph<TVertex, TEdge>The undirected bipartite graph.
Returns
- IReadOnlyList<TEdge>
The matched edges; no two share a vertex, and no larger matching exists.
Type Parameters
TVertexThe vertex type.
TEdgeThe edge type.
Exceptions
- ArgumentException
graphis directed or not bipartite.