package patricia-tree
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Patricia Tree data structure in OCaml for maps and sets. Supports generic key-value pairs
Install
dune-project
Dependency
Authors
Maintainers
Sources
patricia-tree-0.14.0.tbz
sha256=32e5639ec6af0f7763d6bf48a8711d8d9cd0d79af1fc8cecf1c73a442c1c1fa7
sha512=749fb6696e83b88b782d70248cb646a8a7ac02d1e781f15d680ff1b41949b936259abd6979680fc9812b9c9cf8406ca24ccf3e785b8b7977519394a04d53f451
doc/CHANGELOG.html
v0.14.0 - 2026-06-03
- Change type of
nonreflexive_subset_domain_for_all2to allows usage with maps of different type. - Add JS stubs for use with js-of-ocaml (#34).
v0.13.0 - 2026-04-09
- Add
nonidempotent_union(by julow in #26) - Add
nonidempotent_inter_filter_no_share(by julow in #28) - Add
reflexive_subset_domain_for_all2,[non]reflexive_any_domain_for_all2,fold_on_union,fold_on_inter(#27) - Use a more generic type for
fold_on_nonequal_{union,inter}: both maps are no longer required to have the same type. - Type changes:
polyfold2is renamed topolyfold2_inter;polyfold2_unionis renamed topolyfold2and gains a new parameter to allow use with maps of different types. This should not break code that instantiate these types but will break code that has explicit type annotations. - Optimize
difference: it can now skip physically equal subtrees. - Merge types
polyiterandpolyfoldinto a single type with a parameter for return value. Same forpolyiter2andpolyfold2.
v0.12.0 - 2026-01-19
- Specify that hash-consed and weak nodes are not thread safe (issue #17)
- Add
MutexProtectNodefunctors to enable multithreaded use of non-thread safe nodes (#24). - Also add
Make[Heterogeneous]Hashconsed[Set|Map]WithMutexfunctors usingMutexProtectNodefor convenience (#24). - Fix a bug with
nonreflexive_same_domain_forall2(by julow in #19)
Dev changes
- Add coverage with bisect_ppx (by julow in #20)
- Add model based qcheck test (by julow in #21)
- Add benchmarks (by julow in #22)
v0.11.0 - 2025-01-27
- Add some
reflexive_equalandreflexive_comparefunctions - Add
min_binding_interfor maps,min_elt_interfor sets and their max counterparts - Add
differenceandsymmetric_differencefunction to maps (and adddifferencetoWithForeign) - Add
difffunctions 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_interandfold_on_nonequal_unionto maps. - Now support using negative keys, removed
zarithdependency. - Fixed some bugs
Detailed changes
Breaking changes:
- Renamed
MakeCustomtoMakeCustomMap, added new functorMakeCustomSet.MakeCustomMapchanged to take a new argument to specify the'a valuetype. - Renamed
MakeCustomHeterogeneoustoMakeCustomHeterogeneousMap, added new functorMakeCustomHeterogeneousSet. - Renamed
NODE_WITH_ID.get_idtoNODE_WITH_ID.to_int, this allows using instancesNODE_WITH_IDdirectly as aKEY. - Renamed
VALUEtoHETEROGENEOUS_VALUE, added aVALUEmodule type (previously unnamed). - Renamed
min_binding,max_binding,pop_minimum,pop_maximum,min_eltandmax_elttounsigned_min_binding,unsigned_max_binding,pop_unsigned_minimum,pop_unsigned_maximum,unsigned_min_eltandunsigned_max_eltrespectively, to clarify that these functions consider negative numbers as larger than positive ones.
New features:
- Added new interface
MAP_WITH_VALUEwhich is the same asMAPbut with a custom type'a valueinstead of just'a. - Added
HashconsedNode,HashconsedSetNodeas well as four functors to create hash-consed heterogeneous/homogeneous maps/sets:MakeHashconsedMap,MakeHashconsedSet,MakeHashconsedHeterogeneousMapandMakeHashconsedHeterogeneousSet. - 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,
0is the minimal number and-1the maximal one. - Added new functions
fold_on_nonequal_interandfold_on_nonequal_unionto maps.
Bug fixes:
- Fixed a bug where
NodeWithIdwasn't incrementing ids properly zarithis no longer a dependency, used GCC's__builtin_clzas a faster method of finding an integer's highest bit.- Fixed a bug where
pop_minimumandpop_maximumcould throw a private exceptionDissappearedwhen usingWeakNode. - Fixed a possible assertion error when using
idempotent_subset_domain_forall2withWeakNode. - 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