package index

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

Install

Dune Dependency

Authors

Maintainers

Sources

index-1.6.1.tbz
sha256=acfc0dcea916a836a4da60d30c806a22f69c858d6f7ce233166c1a5e365e6bee
sha512=78c45c71c1194d6e118c5cf3920d84c571d0f61f8fa3467f72e7c17c4bbab8e01a5efdb6a96a5328a7b3c5bbf01b0b31e42525c66f4be72d986530ef0ec7cec5

doc/index.unix/Index_unix/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.