package index

  1. Overview
  2. Docs
A platform-agnostic multi-level index for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

index-1.2.0.tbz
sha256=c639104eacbf50254c2edc053a46e38107c79148ec14f8c1bbbbdf2a5ad08434
sha512=630fca9e2262c6fdb849e3f5b5dd8e17f3d972c80be10ee97c70f3926433a2cda697b2bb87da9aee731689e3ad25a7089b8e1f37bb0602223f0b2ecf50657262

doc/index.unix/Index_unix/Make/argument-1-K/index.html

Parameter Make.K

type t

The type for keys.

val equal : t -> t -> bool

The equality function for keys.

val hash : t -> int

Note: Unevenly distributed hash functions may result in performance drops.

val hash_size : int

The number of bits necessary to encode the maximum output value of hash. `Hashtbl.hash` uses 30 bits.

Overestimating the hash_size will result in performance drops; underestimation will result in undefined behavior.

val encode : t -> string

encode is an encoding function. The resultant encoded values must have size encoded_size.

val encoded_size : int

encoded_size is the size of the result of encode, expressed in number of bytes.

val decode : string -> int -> t

decode s off is the decoded form of the encoded value at the offset off of string s. Must satisfy decode (encode t) 0 = t.

val pp : t Fmt.t

Formatter for keys

OCaml

Innovation. Community. Security.