package art
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Adaptive Radix Tree
Install
dune-project
Dependency
Authors
Maintainers
Sources
art-0.4.0.tbz
sha256=88462f64f362ae8513363c73477980c476337f636f2aa1318461a8617eda84d9
sha512=5ec966101928e890da6f86dccc3271b2002b63e4f9d3f9fa5a85494f3ae4e85312c9561a893cda55602373815ec36d476aabf740b6d59442456296095d50752b
doc/README.html
Adaptive Radix Tree (ART) in OCaml
This is an implementation in OCaml of ART. Adaptive Radix Tree is like a simple Hashtbl with order:
# let tree = Art.make () ;;
# Art.insert tree (Art.key "foo") 42 ;;
# Art.insert tree (Art.key "bar") 21 ;;
# Art.find tree (Art.key "foo")
- : int = 42Operation like minimum or maximum are available (which don't exist for a simple Hashtbl.t):
# let tree = Art.make () ;;
# Art.insert tree (Art.key "0") 0 ;;
# Art.insert tree (Art.key "1") 1 ;;
# Art.insert tree (Art.key "2") 2 ;;
# Art.minimum tree
- : int = 0
# Art.maximum tree
- : int = 2If you want the order and the speed of Hashtbl.t, Art is your library:
The function prefix_iter is also available if you want to get a subset of your tree:
# let t = Art.make () ;;
# Art.insert t (Art.key
# Art.insert t (Art.key "Dalton Joe") 0 ;;
# Art.insert t (Art.key "Dalton Jack") 1 ;;
# Art.insert t (Art.key "Dalton William") 2 ;;
# Art.insert t (Art.key "Dalton Averell") 3 ;;
# Art.insert t (Art.key "Rantanplan") 4 ;;
# let dalton = Art.prefix_iter ~prefix:(Art.key "Dalton")
(fun k _ a -> (k :> string) :: a) [] t ;;
- : string list = [ "Dalton Joe"
; "Dalton Jack"
; "Dalton William"
; "Dalton Averell" ]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>