Containers: AVL tree node helpers and a map that reuses deleted slots #4

Open
agent wants to merge 3 commits from Containers into master
Collaborator

Base: master @ e63b7dd. Three commits, 5 files, +150/−24, no dependency branches merged.

  1. AVL tree — insertAfter() places a node beside a known predecessor, removeNode() removes a node the caller already holds, refreshNode() rebalances after a key changed in place, next()/prev() walk in order. findSubTree() now descends with the transformed query instead of the original key.
  2. Map — the table counts deleted slots: probing returns a tombstone instead of walking past it, the load factor counts tombstones, and a rehash also runs when live entries become sparse. Tests cover reinsert after erase and the growth policy.
  3. Linear ring — pulls in <utility> for std::pair.

CMakeLists.txt untouched: the test gate from the port (MODULES_BUILD_TESTS) does not exist on master and would have silently dropped the module's tests.

**Base:** `master` @ `e63b7dd`. Three commits, 5 files, +150/−24, no dependency branches merged. 1. **AVL tree** — `insertAfter()` places a node beside a known predecessor, `removeNode()` removes a node the caller already holds, `refreshNode()` rebalances after a key changed in place, `next()`/`prev()` walk in order. `findSubTree()` now descends with the transformed query instead of the original key. 2. **Map** — the table counts deleted slots: probing returns a tombstone instead of walking past it, the load factor counts tombstones, and a rehash also runs when live entries become sparse. Tests cover reinsert after erase and the growth policy. 3. **Linear ring** — pulls in `<utility>` for `std::pair`. `CMakeLists.txt` untouched: the test gate from the port (`MODULES_BUILD_TESTS`) does not exist on `master` and would have silently dropped the module's tests.
agent added 3 commits 2026-10-27 02:03:25 +03:00
insertAfter() places a node next to a known predecessor, removeNode() removes a
node the caller already holds, refreshNode() rebalances after a key changed in
place, and next()/prev() walk the tree in order. findSubTree() now descends with
the transformed query instead of the original key.
The table tracks deleted slots: probing hands a tombstone back instead of
walking past it, the load factor counts tombstones as well as entries, and a
rehash also runs when the live entries become sparse. The tests cover reinsert
after erase and the growth policy.
Containers: include the utility header for the ring buffer
Some checks are pending
Windows / build (pull_request) Waiting to run
CMake on a single platform / build (pull_request) Waiting to run
CMake / build (pull_request) Waiting to run
db120562c3
requested review from ilusha 2026-10-27 02:11:52 +03:00
Some checks are pending
Windows / build (pull_request) Waiting to run
CMake on a single platform / build (pull_request) Waiting to run
CMake / build (pull_request) Waiting to run
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin Containers:Containers
git checkout Containers

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout master
git merge --no-ff Containers
git checkout Containers
git rebase master
git checkout master
git merge --ff-only Containers
git checkout Containers
git rebase master
git checkout master
git merge --no-ff Containers
git checkout master
git merge --squash Containers
git checkout master
git merge --ff-only Containers
git checkout master
git merge Containers
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ilusha/Modules#4
No description provided.