package acgtk

  1. Overview
  2. Docs
Module type
Class type

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.

module type S = sig ... end

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 type Store = sig ... end
module Make (_ : Store) : S

This (functor) 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

module StoreAsMap : Store

Innovation. Community. Security.