package fix

  1. Overview
  2. Docs

This module offers facilities for tabulating a function, that is, eagerly evaluating this function at every point in its domain, so as to obtain an equivalent function that can be queried in (near) constant time.

module Make (F : sig ... end) (M : sig ... end) : sig ... end

Make constructs a tabulator for a finite type that is equipped with an implementation of imperative maps.

module ForOrderedType (F : sig ... end) (T : Map.OrderedType with type t = F.t) : sig ... end

ForOrderedType is a special case of Make where it suffices to pass a finite ordered type as an argument. A reference to a persistent map is used to hold the table.

module ForHashedType (F : sig ... end) (T : Hashtbl.HashedType with type t = F.t) : sig ... end

ForHashedType is a special case of Make where it suffices to pass a finite hashed type as an argument. A reference to a persistent map is used to hold the table.

module ForType (F : sig ... end) : sig ... end

ForType is a special case of Make where it suffices to pass an arbitrary finite type as an argument. A reference to a persistent map is used to hold the table.

module ForIntSegment (K : sig ... end) : sig ... end

ForIntSegment constructs a tabulator for the integer segment [0..n). An array is used to hold the table.

OCaml

Innovation. Community. Security.