Joris van Rantwijk
3a77749425
Simplify slack handling in delta2 tracking
2024-07-09 21:10:38 +02:00
Joris van Rantwijk
9ee26584ab
Use UnionFind to find top-level blossom of vertex
...
The run time should now be O(n*m*log(n))
2024-07-09 21:10:38 +02:00
Joris van Rantwijk
225311dae0
Implement heap-based tracking for delta2
2024-07-09 21:10:38 +02:00
Joris van Rantwijk
7cc1666cf2
Lazy delta updates of T-vertex duals
2024-07-09 21:10:38 +02:00
Joris van Rantwijk
6318de3b1f
Lazy delta updates of T-blossom duals
2024-07-09 21:10:38 +02:00
Joris van Rantwijk
b2e055b357
Lazy delta updates of S-blossom duals
2024-07-09 21:10:38 +02:00
Joris van Rantwijk
de03796d99
Lazy delta updates of S-vertex duals
2024-07-09 21:10:38 +02:00
Joris van Rantwijk
a23c38eb70
Implement heap-based tracking for delta4
2024-07-09 21:10:38 +02:00
Joris van Rantwijk
13b6b76d47
Implement heap-based edge tracking for delta3
2024-07-09 21:10:38 +02:00
Joris van Rantwijk
91d4afb271
Clean up redundant type annotations "int|float"
2024-07-09 21:10:00 +02:00
Joris van Rantwijk
c8a3f7f684
Datastructures for O(n*m*log(n)) algorithm
2024-05-25 11:50:07 +02:00
Joris van Rantwijk
a4da35d3aa
Fix bug in C++ matching code
2023-07-07 22:33:33 +02:00
Joris van Rantwijk
76de35471f
Simplify find_path_through_blossom
2023-05-12 18:12:25 +02:00
Joris van Rantwijk
be2b474873
Minor clarifications in comments
2023-05-10 20:54:29 +02:00
Joris van Rantwijk
d4b8cf2067
Fix mistaken comments about run times
2023-04-10 12:56:56 +02:00
Joris van Rantwijk
0e79e1d2f6
Use FIFO queue for S-vertices
2023-04-09 21:19:41 +02:00
Joris van Rantwijk
caac6825a6
Expand zero-dual blossom before assigning label T
2023-04-09 21:19:41 +02:00
Joris van Rantwijk
b8391ea319
Pylint cleanups
2023-03-12 12:16:29 +01:00
Joris van Rantwijk
5048bbaf99
Input has type Sequence[...] instead of list
2023-03-11 17:31:41 +01:00
Joris van Rantwijk
37aa0c605b
Read from stdin when no input file specified
2023-02-22 23:20:43 +01:00
Joris van Rantwijk
83d9e37db6
Rename to test_mwmatching.py
2023-02-22 23:20:43 +01:00
Joris van Rantwijk
64851c98c5
Test that edge/vertex order is irrelevant
2023-02-22 23:20:17 +01:00
Joris van Rantwijk
3f5d61d0e7
Rename Python module to "mwmatching"
2023-02-14 20:49:24 +01:00
Joris van Rantwijk
f0624fa2a5
Slightly rephrase docstring
2023-02-13 22:38:40 +01:00
Joris van Rantwijk
118007e953
Add testcases that are sensitive to specific bugs
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
8f81154169
Test coverage of verification routine
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
4dc7befd9d
Check that unmatched vertices have zero dual
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
be0f5c3881
Raise MatchingFailed when verify fails
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
f1a60febe7
Improve test coverage to 100%
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
fa524ce754
Simplify deletion of expanded blossoms
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
a1836a585f
Improve test coverage
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
a0ed8716ae
Remove distracting comment
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
4203b1e5cc
Optimize deletion of expanded blossoms
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
6d46a9d89a
Minor cleanups
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
8bef12559a
Improve performance of verification code
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
291d3ead8b
Mark static methods
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
d1b79c1cde
Clean up trace_alternating_paths()
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
f491d6dcec
Object oriented blossoms, first attempt
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
b42440784f
Clean up explicit-stack recursion
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
fc31657a56
Avoid redundant calls to edge_slack_2x()
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
14b5a032a7
Move least-slack edge tracking to separate class
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
0ad3020425
Use (x, y) instead of (i, j)
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
d063bbd45a
Merge StageData and PartialMatching
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
8950096df9
minor cleanup
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
4f62a15c06
Use (i, j) instead of (v, w)
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
0f7423e2b8
Simplify naming related to double weights
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
d4bfb712d2
Add a few tests for maximum cardinality
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
7617e68d59
Add command-line runner
2023-02-13 22:20:02 +01:00
Joris van Rantwijk
23c3e35865
Eliminate edges with negative weight
...
The base algorithm transparently ignores edges, but only if
the graph contains at least 1 edge with positive weight.
If ALL edges have negative weight, dual variables may be
initialized to negative values which leads to failure.
2023-02-13 22:17:48 +01:00
Joris van Rantwijk
99bc2912d8
Fix wrong assumption about subblossom labels
...
When a blossom forms, the labels of sub-blossoms do NOT strictly alternate between S and T when walking around the blossom.
2023-02-13 22:06:13 +01:00