package orsetto
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=6e6f59fc6a2c590b1b377e40f2120a548e6f09e61e7eb12ffa45cf2d517316b8
md5=533153cd4a9fe8093d3b98afc1073bc8
doc/orsetto.cf/Cf_bsearch_data/Table/Create/index.html
Module Table.Create
Use Create(B)
to create an instance of a table module.
Parameters
Signature
val nil : t
A distinguished empty table.
val empty : t -> bool
Use empty t
to test if t
is an empty table.
val of_seq : B.Vector.element Seq.t -> t
Use of_seq s
to construct a table from the sequence of vector elements s
.
val find : (B.Vector.index, 'r) Cf_bsearch.ret -> B.Search.t -> t -> 'r
Use find ret key tab
to search for key
in tab
and use the binary search return adapter ret
to construct the result.
val member : B.Search.t -> t -> bool
Use member key tab
to check if key
is to be found in tab
.
val search : B.Search.t -> t -> B.Vector.index option
Use search key tab
to return Some index
for key
if it can be found in tab
and None
otherwise.
val require : B.Search.t -> t -> B.Vector.index
Use require key tab
to return index
for key
if it can be found in tab
. Raises Not_found
if key
is not in tab
.
val to_seq : t -> B.Vector.element Seq.t
Use to_seq tab
to make a sequence of the elements in the underlying vector. These are presented in binary search order, not monotonically increasing order.
module Unsafe : sig ... end
Unsafe interfaces depend on the internal structure of tables.