1
0
Fork 0
Commit Graph

128 Commits

Author SHA1 Message Date
Joris van Rantwijk 4670cf1dca Add testcases to force big values for dual/slack 2024-07-28 11:38:05 +02:00
Joris van Rantwijk c731c32473 Separate function top_level_blossom() 2024-07-21 15:32:41 +02:00
Joris van Rantwijk e8490010d6 Implement ConcatenableQueue as 2-3 tree 2024-07-21 15:32:41 +02:00
Joris van Rantwijk dc8cdae225 Minor simplification in UnionFindQueue 2024-07-21 15:32:41 +02:00
Joris van Rantwijk e2f5b63a01 Fix README 2024-07-11 21:28:41 +02:00
Joris van Rantwijk 6bf04df77b Update README 2024-07-11 21:27:01 +02:00
Joris van Rantwijk 99f8a2d822 Add benchmark script 2024-07-10 21:01:21 +02:00
Joris van Rantwijk ed70402310 Separate C++ test script 2024-07-10 20:52:59 +02:00
Joris van Rantwijk 54f59db753 Add tox.ini for Python testing 2024-07-10 20:19:12 +02:00
Joris van Rantwijk c58374e6fb Remove debug checks of alternating tree 2024-07-09 21:18:53 +02:00
Joris van Rantwijk 658a393bb8 Test script for Python code 2024-07-09 21:10:38 +02:00
Joris van Rantwijk c19fa9a76c Add pyproject.toml 2024-07-09 21:10:38 +02:00
Joris van Rantwijk d3475834ab Add from __future__ import annotations
This makes the code work on Python versions 3.7 and 3.8.
2024-07-09 21:10:38 +02:00
Joris van Rantwijk 147640329f Restructure Python code as package 2024-07-09 21:10:38 +02:00
Joris van Rantwijk f2e8ca1357 Remove redundant type annotations "int|float" 2024-07-09 21:10:38 +02:00
Joris van Rantwijk b2d4de41f9 Add __slots__ in datastruct.py
It does not make a clear difference for performance.
But it should at least reduce memory usage a bit.
2024-07-09 21:10:38 +02:00
Joris van Rantwijk d2debb6d6f Minor changes to docstrings 2024-07-09 21:10:38 +02:00
Joris van Rantwijk bbe19a6798 Run all unittests in run_checks.sh 2024-07-09 21:10:38 +02:00
Joris van Rantwijk 50ef772271 Improve test coverage 2024-07-09 21:10:38 +02:00
Joris van Rantwijk 6a75ffaf63 Avoid leaking reference cycles 2024-07-09 21:10:38 +02:00
Joris van Rantwijk 4c6115fb2f Improve comments and docstrings 2024-07-09 21:10:38 +02:00
Joris van Rantwijk 0e76e6472b Minor cleanup in scanning and delta steps 2024-07-09 21:10:38 +02:00
Joris van Rantwijk f35a640e43 Clean up management of the alternating tree 2024-07-09 21:10:38 +02:00
Joris van Rantwijk b960a85b6c Clean up magagement of blossom labels 2024-07-09 21:10:38 +02:00
Joris van Rantwijk f8c6b99842 Clean up least-slack edge tracking 2024-07-09 21:10:38 +02:00
Joris van Rantwijk 1a98624f2b Solve slow maintanance of blossom list 2024-07-09 21:10:38 +02:00
Joris van Rantwijk 61524990d7 Keep alternating trees between stages
Delete only the trees that are involved in an augmenting path.
Keep the other trees and reuse them in the next stage.

This gives a big speedup on many cases such as random graphs.
The code is a mess, needs to be cleaned up.
2024-07-09 21:10:38 +02:00
Joris van Rantwijk 73641d7b70 Add method PriorityQueue.increase_prio 2024-07-09 21:10:38 +02:00
Joris van Rantwijk 0675230692 Code style cleanups 2024-07-09 21:10:38 +02:00
Joris van Rantwijk de30ac3c5e Track blossoms in each alternating tree 2024-07-09 21:10:38 +02:00
Joris van Rantwijk aab2acd78e Remove redundant clearing of scan queue 2024-07-09 21:10:38 +02:00
Joris van Rantwijk e9baa88c70 Fix bug in delta2 tracking 2024-07-09 21:10:38 +02:00
Joris van Rantwijk 73479532ac Implement scan queue as a list instead of deque 2024-07-09 21:10:38 +02:00
Joris van Rantwijk 04b6908449 Do not check edge slack during scan
Tight edges are not used immediately during the scan.
Just like other edges, tight edges are tracked in priority queues
and are used later through a zero-delta step.

This simplifies slack calculations.
2024-07-09 21:10:38 +02:00
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 77dac28056 Moved repository to Gitea 2024-03-08 12:09:30 +01:00
Joris van Rantwijk 9cabdce600 Test C++ code in Github Actions workflow 2023-07-07 23:27:55 +02:00
Joris van Rantwijk 327e83e701 Update README to mention C++ code 2023-07-07 22:41:27 +02:00
Joris van Rantwijk d8d44f6171 Add corner cases to C++ unit test 2023-07-07 22:33:33 +02:00
Joris van Rantwijk 4b7fab3f43 Add struct Graph to represent input graph 2023-07-07 22:33:33 +02:00