package core_extended
Extra components that are not as closely vetted or as stable as Core
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=17de5f7cf59818d757bb0625c55f0afc84509122645b7782fb522ac98c3be446
doc/core_extended.bitarray/Bitarray/index.html
Module Bitarray
Source
This module implements efficient and compact arrays of boolean values. It stores its values in the bits of an integer, using multiple integers to allow for arrays larger than the machine word size. All operations are on immediates (no caml_modify), and are quite simple. Hence this data structure should be more efficient than an array of bools.
get t pos
get the value in position pos
, raises Invalid_argument if the position is out of bounds.
set t pos
set the value in position pos
, raises Invalid_argument if the position is out of bounds.
clear t
set the contents of every element to false O(n / (word_size - 2))
fold t ~init ~f
Fold over the array as in Array.fold
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>