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.3.0.tbz
sha256=afed32fd3caab6dd222e421f03100982bc32b0aa8c7c7d7394590b4f7f78269b
sha512=29eae145ff204f5cd64885cc5d8df1a74f0c654c5c80d08cbf031bf5ac43591ad161c5da3f07ff8f29cbe416702c7239a4fe0721b2cce2d612d799f3c4a09dcc
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)"
>