package grenier
A collection of various algorithms in OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
grenier-0.13.tbz
sha256=04831d5c2ea783d4e32b356a8495e5481ce8919aa70f5eecee29baebbf6fa483
sha512=1199122ab70701ecd33bf9c6339a743d163a1ba3ef5d0db189cab6c6712386739031b66002bf48d4740112430a93780f82dc37f56688ee33f99da928186b8205
doc/grenier.orderme/Order_managed_interval/index.html
Module Order_managed_interval
Source
Basic ordering operations
An element of an ordering.
after t
inserts a new element to the ordering, greater than t
but less than all existing elements greater than t
.
O(1) amortized.
before t
inserts a new element to the ordering, less than t
but greater than all existing elements less than t
.
O(1) amortized.
Compare two elements. O(1)
Memory management
When you know you are not going to use an element any longer, forget
it to release memory. It makes operations slightly faster to not have to wait for the GC to release elements.
After calling forget
, an element should not be used. You can check if it is the case with is_valid
.
Algorithm due to: Two Simplified Algorithms for Maintaining Order in a List Bender et al., 2002
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page