package index

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

Install

Dune Dependency

Authors

Maintainers

Sources

index-1.3.2.tbz
sha256=0e46ebc785eb5b947bcb6e04075dda694d7e951c5ac51103e4d5fa5105df5d14
sha512=fd82ba852bb43eae8fefca2563d114bc2fa99e0ba98c828bccc2e81737a05156297b64b5894e2d0a58457a3382730a34e16cf16c844f8a6e6844c2684d79c7b5

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

Parameter Make.K

type t

The type for keys.

val t : t Repr.t
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.

OCaml

Innovation. Community. Security.