Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Matching.h File Reference

Declares simple matching functions. More...

#include <ogdf/basic/Graph.h>
#include <ogdf/basic/GraphList.h>
#include <ogdf/basic/basic.h>
#include <array>

Go to the source code of this file.

Classes

class  ogdf::ArrayBuffer< E, INDEX >
 An array that keeps track of the number of inserted elements; also usable as an efficient stack. More...
 
class  ogdf::List< E >
 Doubly linked lists (maintaining the length of the list). More...
 

Namespaces

 ogdf
 The namespace for all OGDF objects.
 
 ogdf::Matching
 Simple algorithms for matchings.
 

Functions

void ogdf::Matching::findMaximalMatching (const Graph &graph, ArrayBuffer< edge > &matching)
 Obtains a maximal matching in O(|E|) time. More...
 
int ogdf::Matching::findMaximumCardinalityMatching (const Graph &G, const List< node > &U, const List< node > &V, EdgeArray< bool > &matching)
 Finds a maximum cardinality matching in the bipartite graph G = (U+V, E) in O(sqrt(|U+V|) * |E|) time by using the Hopcroft-Karp-Karzanov algorithm. More...
 
template<typename EdgeContainer >
bool ogdf::Matching::isMatching (const Graph &graph, const EdgeContainer &matching)
 Checks in time O(|V| + size of matching) if the given set of edges represents a matching. More...
 
template<typename EdgeContainer >
bool ogdf::Matching::isMaximal (const Graph &graph, const EdgeContainer &matching)
 Checks in time O(|E|) if there are edges that could be added to matching. More...
 
template<typename EdgeContainer >
bool ogdf::Matching::isMaximal (const Graph &graph, const EdgeContainer &matching, edge &addable)
 Checks in time O(|E|) if there are edges that could be added to matching. More...
 
template<typename EdgeContainer >
bool ogdf::Matching::isMaximalMatching (const Graph &graph, const EdgeContainer &matching)
 Checks in O(|V| + |E|) time if matching is a maximal matching. More...
 
template<typename EdgeContainer >
bool ogdf::Matching::isPerfect (const Graph &graph, const EdgeContainer &matching)
 Checks in O(1) if matching (assuming it is a matching and the graph is simple and connected) is perfect. More...
 
template<typename EdgeContainer >
bool ogdf::Matching::isPerfectMatching (const Graph &graph, const EdgeContainer &matching)
 Checks in O(|V| + size of matching) if matching is a perfect matching. More...
 

Detailed Description

Declares simple matching functions.

Author
Stephan Beyer, Thomas Klein
License:
This file is part of the Open Graph Drawing Framework (OGDF).
Copyright (C)
See README.md in the OGDF root directory for details.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 or 3 as published by the Free Software Foundation; see the file LICENSE.txt included in the packaging of this file for details.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/copyleft/gpl.html

Definition in file Matching.h.