package orsetto
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=6e6f59fc6a2c590b1b377e40f2120a548e6f09e61e7eb12ffa45cf2d517316b8
md5=533153cd4a9fe8093d3b98afc1073bc8
doc/orsetto.cf/Cf_bsearch/index.html
Module Cf_bsearch
Binary search algorithm and data structures.
Overview
This module implements generalized binary search functions along with a functorial interface that generalizes static sets and maps implemented as vectors in multiplicative binary search order. A specialization is provided for character sets and maps implemented with strings as the vector.
Types
A return finalization configuration for use with the search
function (see below).
module type Basis = sig ... end
Use module B: Basis = struct ... end
to define a type t
and associated functions that provide the operations on it required for binary searching in the range between two values of type t
.
module Char_basis : Basis with type t = char
The distinguished basis for OCaml char
values.
module Float_basis : Basis with type t = float
The distinguished basis for OCaml float
values.
module type Profile = sig ... end
The signature of the module returned by the Create(B)
functor.
General Interface
Use Create(B)
to make a module that provides binary searches using the index type defined with the basis B
.