Commit Graph

5 Commits

Author SHA1 Message Date
Jeroen van Rijn
a0a48bfe34 Fix alignment. 2024-06-27 21:56:26 +02:00
destroycomputers
de44dd5412 Loosen constraint on the Key type in rb & avl tree
The current constraint on the `init_ordered' function accepts only
numeric types. While one still can init a non-numerically-keyed tree by
passing a comparator explicitly, the reason to disallow non-numeric
ordered types is nowhere to be found.
2024-06-18 13:31:45 +02:00
Jeroen van Rijn
11e57fd3fd Address concerns. 2024-05-24 13:58:30 +02:00
Jeroen van Rijn
c43d189a33 Fix package line. 2024-05-24 01:43:17 +02:00
Jeroen van Rijn
410876b36a Add core:container/rbtree
Add a red-black tree with configurable $Key and $Value.
Also includes tests that verify it maintains RB invariants, doesn't leak.

Originally based on the CC0 implementation from literateprograms.org.
But reworked to the same API used by @Yawning's excellent `core:container/avl` for ease of use.
2024-05-23 23:00:00 +02:00