package index

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

Install

Dune Dependency

Authors

Maintainers

Sources

index-1.4.0.tbz
sha256=8cd859751eb01b578402ec7de3d67fc0b92106381df9704331da81c25041ad8f
sha512=212d674b50b091f8fd3ad0e793e06c555bd012669ff6eb2fe0774469a64f008c1957795203a3b5e08a583e66aa34f2e11f02def7f818bd54c1bf3ad07b71c3ec

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.