package acgtk

  1. Overview
  2. Docs

Modules with this module type should provide Union-Find algorithms and the indexed storage data structure. Note that we take the opportunity of implementing from scratch such algorithms to allow the find function returns not only the index of the representative and the values it indexes, but also the storage data structure, so that the find algorithm can modify it, in particular with path compression.

Modules with this module type should provide an indexed (by int indexes) storage data structure for 'a type values and access and update functions.

module UF (Value : sig ... end) : sig ... end

This module implements a UnionFind data structure. The S parameter is used to try different implementations of indexed data structure, in particular eventually persistent arrays as described in "A Persistent Union-Find Data Structure" (Sylvain Conchon and Jean-Chrisophe Filliâtre

OCaml

Innovation. Community. Security.