1
0
Fork 0
Commit Graph

138 Commits

Author SHA1 Message Date
Joris van Rantwijk 2271df1897 Lazy updates of blossom duals 2024-11-16 14:23:13 +01:00
Joris van Rantwijk 228da75495 Lazy updates of vertex duals 2024-11-16 10:32:35 +01:00
Joris van Rantwijk 5500750c13 Reorganize code that handles labeling 2024-11-14 23:31:11 +01:00
Joris van Rantwijk 39eaea451e Minor code rearrangement 2024-11-10 00:10:26 +01:00
Joris van Rantwijk 7ea1562cc7 Use tight edges only during delta steps 2024-11-09 21:39:52 +01:00
Joris van Rantwijk 55a98238aa Implement heap-based tracking for delta3 2024-11-09 00:11:07 +01:00
Joris van Rantwijk b17ca1a364 Require signed type for edge weight 2024-11-08 20:30:53 +01:00
Joris van Rantwijk 67ca294840 Rework data structures 2024-11-08 18:38:20 +01:00
Joris van Rantwijk efb238ff8e C++ datastructures for O(n*m*log(n)) 2024-11-02 09:43:33 +01:00
Joris van Rantwijk e103a493fc Update Algorithm.md 2024-07-28 11:38:05 +02:00
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