Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lacop/edmonds
Implementation of the Edmonds' algorithm for minimum weight perfect matching
https://github.com/lacop/edmonds
Last synced: 16 days ago
JSON representation
Implementation of the Edmonds' algorithm for minimum weight perfect matching
- Host: GitHub
- URL: https://github.com/lacop/edmonds
- Owner: lacop
- License: mit
- Created: 2015-02-08T21:24:04.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-08T22:39:42.000Z (almost 10 years ago)
- Last Synced: 2023-03-10T23:08:20.558Z (almost 2 years ago)
- Language: C++
- Size: 793 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Edmonds' algorithm
==================Implementation of Edmonds' blossom algorithm for finding minimum weight perfect matching on graphs in less than 1k SLOC.
Written as project for a class. Licensed under the MIT License.
Measurements
------------Timed and verified with `(time ./main < input > out) && head -n 1 out`.
|Vertices | Edges | Time |
|--------:|------:|-----:|
| 1 000 | 10 495 | 500ms|
| 1 002 | 501 501| 18s |
| 10 000 | 504 929| 4m 27s|Testing
-------File `test.cpp` implements simple "unit" testing with the 25 provided test cases, with the expected outcomes computed by an independent implementation:
![Testing interface](test.png)
Tested with Valgrind for memory leaks and invalid memory reads/writes.
Code coverage tested with `lcov`, implementation has 100% coverage but is reported slightly lower, see the [report](https://lacop.github.io/edmonds/).
Usage
-----I don't recommend using this for anything serious since there are faster and more tested implementations. If you still wish to do so, refer to `main.cpp`.
To build simply run `cmake .` and then `make`. If you don't have/like cmake just build and link `main.cpp` or `test.cpp` with all other files.