package fix

  1. Overview
  2. Docs

Module GraphNumbering.ForTypeSource

ForType is a special case of Make where the vertices of G can have arbitrary type. OCaml's built-in generic equality and hash functions are used.

Parameters

module T : sig ... end
module G : sig ... end

Signature

Sourcetype t = G.t

The type t of values of interest.

Sourceval n : int

n is the number of values of type t that have been encoded. The functions encode and decode represent an isomorphism between this subset of t and the interval [0..n).

Sourceval encode : t -> int

encode maps a value of type t to an integer code in the interval [0..n).

Sourceval decode : int -> t

decode maps an integer code in the interval [0..n) back to a value of type t.