All Projects → dilsonpereira → Minimum Cost Perfect Matching

dilsonpereira / Minimum Cost Perfect Matching

Licence: mit
C++ implementation of algorithms for finding perfect matchings in general graphs

Labels

Projects that are alternatives of or similar to Minimum Cost Perfect Matching

Stonks
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal. See how fast your stonks will crash.
Stars: ✭ 405 (+1296.55%)
Mutual labels:  graphs
Grafterm
Metrics dashboards on terminal (a grafana inspired terminal version)
Stars: ✭ 613 (+2013.79%)
Mutual labels:  graphs
Giin
Graph-based Image Inpainting
Stars: ✭ 7 (-75.86%)
Mutual labels:  graphs
Simit
A language for computing on sparse systems
Stars: ✭ 439 (+1413.79%)
Mutual labels:  graphs
Neography
A thin Ruby wrapper to the Neo4j Rest API
Stars: ✭ 606 (+1989.66%)
Mutual labels:  graphs
Uplot
📈 A small, fast chart for time series, lines, areas, ohlc & bars
Stars: ✭ 6,808 (+23375.86%)
Mutual labels:  graphs
Cracking The Coding Interview
📚 C++ and Python solutions with automated tests for Cracking the Coding Interview 6th Edition.
Stars: ✭ 396 (+1265.52%)
Mutual labels:  graphs
React Native Pathjs Charts
Android and iOS charts based on react-native-svg and paths-js
Stars: ✭ 877 (+2924.14%)
Mutual labels:  graphs
Quickqanava
C++14 network/graph visualization library / Qt node editor.
Stars: ✭ 611 (+2006.9%)
Mutual labels:  graphs
Mycodo
An environmental monitoring and regulation system
Stars: ✭ 936 (+3127.59%)
Mutual labels:  graphs
Chart
Quick & smart charting for STDIN
Stars: ✭ 521 (+1696.55%)
Mutual labels:  graphs
React D3 Graph
Interactive and configurable graphs with react and d3 effortlessly
Stars: ✭ 541 (+1765.52%)
Mutual labels:  graphs
Netlist Graph
Java library for parsing and manipulating graph representations of gate-level Verilog netlists
Stars: ✭ 7 (-75.86%)
Mutual labels:  graphs
Amoco
yet another tool for analysing binaries
Stars: ✭ 413 (+1324.14%)
Mutual labels:  graphs
Hotcold
Smart touch typing learning with instant key glow indications, live statistics, live graphs and dynamic course creation.
Stars: ✭ 12 (-58.62%)
Mutual labels:  graphs
Kglib
Grakn Knowledge Graph Library (ML R&D)
Stars: ✭ 405 (+1296.55%)
Mutual labels:  graphs
Archarts
Lovely Augmented Reality Charts for iOS - Built with ARKit
Stars: ✭ 679 (+2241.38%)
Mutual labels:  graphs
Pepper Robot Programming
Pepper Programs : Object Detection Real Time without ROS
Stars: ✭ 29 (+0%)
Mutual labels:  graphs
Leaderboardx
A tool for building graphs quickly
Stars: ✭ 13 (-55.17%)
Mutual labels:  graphs
Vue Apexcharts
📊 Vue.js component for ApexCharts
Stars: ✭ 889 (+2965.52%)
Mutual labels:  graphs

Algorithms for Maximum Cardinality Matching and Minimum Cost Perfect Matching Problems in General Graphs

I implemented these algorithms during my PhD, in 2011, following the description in:

Gerards, A.M.H. (1995). Matching. In Ball, M., Magnanti, T., Monma, C., and Nemhauser, G., editors, Network Models, volume 7 of Handbooks in Operations Research and Management Science, chapter 3, pages 135-224. Elsevier.

See Example.cpp for examples of how to use the API.

Compilation with G++:

g++ -O3 Example.cpp BinaryHeap.cpp Matching.cpp Graph.cpp -o example

To use as a matching solver:

./example -f <filename> <--minweight | --max>

--minweight for minimum weight perfect matching

--max for maximum cardinality matching

File format:

the first two lines give n (number of vertices) and m (number of edges), respectively, followed by m lines, each with a tuple (u, v [, c]) representing the edges. In each tuple, u and v are the endpoints (0-based indexing) of the edge and c is its cost. The cost is optional if --max is specified.

Example, input.txt:

10
16
0 1 10
0 2 4
1 2 3
1 5 2
1 6 2
2 3 1
2 4 2
3 4 5
4 6 4
4 7 1
4 8 3
5 6 1
6 7 2
7 8 3
7 9 2
8 9 1
./example -f input.txt --minweight

Output:

Optimal matching cost: 14
Edges in the matching:
0 1
2 3
4 7
5 6
8 9

Feel free to contact me if you have any problem.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].