package patricia-tree
Patricia Tree data structure in OCaml for maps and sets. Supports generic key-value pairs
Install
Dune Dependency
Authors
Maintainers
Sources
patricia-tree-0.11.0.tbz
sha256=18fcde5d35d65c9bb2f9ec4ff732ecdd8969ba6fc2cf51d29ecb3be66e2fe664
sha512=da038d5096deb4bf3c02efd694e962ecf9b2571d140fa1fef17cce474f628ec070b93a44fd742748b9d3ba0e51041f864623d83e9cb0c72214abb0fb4a043625
doc/CHANGELOG.html
v0.11.0 - 2025-01-27
- Add some
reflexive_equal
andreflexive_compare
functions - Add
min_binding_inter
for maps,min_elt_inter
for sets and their max counterparts - Add
difference
andsymmetric_difference
function to maps (and adddifference
toWithForeign
) - Add
diff
functions to sets - Internal refactor.
v0.10.0 - 2024-06-01
Main changes
- Added hash-consed nodes and functors to build hash-consed maps and sets.
- Added new functions
fold_on_nonequal_inter
andfold_on_nonequal_union
to maps. - Now support using negative keys, removed
zarith
dependency. - Fixed some bugs
Detailed changes
Breaking changes:
- Renamed
MakeCustom
toMakeCustomMap
, added new functorMakeCustomSet
.MakeCustomMap
changed to take a new argument to specify the'a value
type. - Renamed
MakeCustomHeterogeneous
toMakeCustomHeterogeneousMap
, added new functorMakeCustomHeterogeneousSet
. - Renamed
NODE_WITH_ID.get_id
toNODE_WITH_ID.to_int
, this allows using instancesNODE_WITH_ID
directly as aKEY
. - Renamed
VALUE
toHETEROGENEOUS_VALUE
, added aVALUE
module type (previously unnamed). - Renamed
min_binding
,max_binding
,pop_minimum
,pop_maximum
,min_elt
andmax_elt
tounsigned_min_binding
,unsigned_max_binding
,pop_unsigned_minimum
,pop_unsigned_maximum
,unsigned_min_elt
andunsigned_max_elt
respectively, to clarify that these functions consider negative numbers as larger than positive ones.
New features:
- Added new interface
MAP_WITH_VALUE
which is the same asMAP
but with a custom type'a value
instead of just'a
. - Added
HashconsedNode
,HashconsedSetNode
as well as four functors to create hash-consed heterogeneous/homogeneous maps/sets:MakeHashconsedMap
,MakeHashconsedSet
,MakeHashconsedHeterogeneousMap
andMakeHashconsedHeterogeneousSet
. - Now support using negative keys. Trees are built using the bitwise representation of integer, meaning they effectively use an unsigned order. Negative keys are considered bigger than positive keys,
0
is the minimal number and-1
the maximal one. - Added new functions
fold_on_nonequal_inter
andfold_on_nonequal_union
to maps.
Bug fixes:
- Fixed a bug where
NodeWithId
wasn't incrementing ids properly zarith
is no longer a dependency, used GCC's__builtin_clz
as a faster method of finding an integer's highest bit.- Fixed a bug where
pop_minimum
andpop_maximum
could throw a private exceptionDissappeared
when usingWeakNode
. - Fixed a possible assertion error when using
idempotent_subset_domain_forall2
withWeakNode
. - Fix compilation warnings when compiling on ocaml 5.2.
v0.9.0 - 2024-04-18
- Initial release of Patricia Tree
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page