summaryrefslogtreecommitdiff
path: root/AK/RedBlackTree.h
AgeCommit message (Collapse)Author
2022-12-03Everywhere: Run clang-formatLinus Groh
2022-11-26AK: Make it possible to not `using` AK classes into the global namespaceAndreas Kling
This patch adds the `USING_AK_GLOBALLY` macro which is enabled by default, but can be overridden by build flags. This is a step towards integrating Jakt and AK types.
2022-04-21AK: Expose RedBlackTree::find_smallest_not_below()Tim Schumacher
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-02-10AK: Clear minimum when removing last node of RedBlackTreedavidot
2022-02-10AK: Fix RedBlackTree::find_smallest_not_below_iteratordavidot
Before this was incorrectly assuming that if the current node `n` was at least the key and the left child of `n` was below the key that `n` was always correct. However, the right child(ren) of the left child of `n` could still be at least the key. Also added some tests which produced the wrong results before this.
2022-02-09AK: Add RBTree::find_smallest_above_iterator(Key)Ali Mohammad Pur
2022-01-26Kernel: Support try-inserting RedBlackTree entry values by referenceIdan Horowitz
2022-01-12AK: Remove unnecessary null checks in RedBlackTreeAndreas Kling
2021-11-18AK: Make RedBlackTree::try_insert() return ErrorOr<void> instead of boolAndreas Kling
2021-11-14AK: Avoid else after return in files commonly included by the KernelAndrew Kaster
2021-09-16AK: Use default constructor/destructor instead of declaring an empty oneBrian Gianforcaro
Default implementations allow for more optimizations. See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-13AK: Allow RBTree::find_largest_not_above_iterator() to failAli Mohammad Pur
Previously this function would've crashed if the key failed to match any entry.
2021-09-08AK: Set IntrusiveRBTree Node key on insertion instead of constructionIdan Horowitz
This makes the API look much nicer.
2021-08-06Kernel: Rename Kernel/VM/ to Kernel/Memory/Andreas Kling
This directory isn't just about virtual memory, it's about all kinds of memory management.
2021-07-17AK: Mark RedBlackTree functions as [[nodiscard]]Brian Gianforcaro
2021-07-17AK: Mark RedBlackTree as finalBrian Gianforcaro
2021-07-17AK: Mark RedBlackTree find APIs as [[nodiscard]]Brian Gianforcaro
2021-07-15AK: Allow getting the key from a RedBlackTree iteratorAndreas Kling
2021-07-15AK: Make RedBlackTree non-copyable and non-movableAndreas Kling
2021-07-15AK: Expose RedBlackTree allocation failures via try_insertIdan Horowitz
This should help with using the RedBlackTree in a more OOM-safe way in the kernel.
2021-06-19AK: Add RedBlackTree::find_largest_not_above_iteratorItamar
It's a version of find_largest_not_above that returns an iterator.
2021-04-23Revert "AK: Remove virtual destructors from non-virtual classes"Idan Horowitz
This reverts commit 4378d36f6701e0f4efe71ff1a301e3cd0776d5bf.
2021-04-23AK: Remove virtual destructors from non-virtual classesLenny Maiorani
Problem: - Some classes have `virtual` destructors despite not having any virtual functions. This causes the classes to have a v-table and perform extra jumps at destruction time when there is no need. Solution: - Remove `virtual` keyword from destructors where there are no other virtual functions. - Remove the destructor completely when the default destructor can be used.
2021-04-22AK+Userland: Use idan.horowitz@serenityos.org for my copyright headersIdan Horowitz
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-18Everywhere: Fix a bunch of typosLinus Groh
2021-04-12AK: Implement RedBlackTree containerIdan Horowitz
This container is based on a balanced binary search tree, and as such allows for O(logn) worst-case insertion, removal, and search, as well as O(n) sorted iteration.