package extlib
Install
Dune Dependency
Authors
Maintainers
Sources
md5=43fb3bf2989671af1769147b1171d080
sha512=dedd2bb4a63f2df9e451dbe6aede18d873489a8675f48ded09131f2af4d00dbeaecc8750039b2e4facb9f5f9b1b01c6b7accd392bf8ac5a3f2c801562ce5c4ee
doc/extlib/BitSet/index.html
Module BitSet
Source
Efficient bit sets.
A bitset is an array of boolean values that can be accessed with indexes like an array but provides a better memory usage (divided by 8) for a very small speed trade-off.
When a negative bit value is used for one of the BitSet functions, this exception is raised with the name of the function.
Create an empty bitset of size 0, the bitset will automatically expand when needed.
is_set s n
returns true if nth-bit in the bitset s
is set, or false otherwise.
compare s1 s2
compares two bitsets. Highest bit indexes are compared first.
equals s1 s2
returns true if, and only if, all bits values in s1 are the same as in s2.
enum s
returns an enumeration of bits which are set in the bitset s
.
differentiate_sym s t
sets s
to the symmetrical difference of the sets s
and t
.