Module UnionFind.Parameters

Common module types for Imperative and Functional parameters. Defines the types of the functor parameters.

Some vocabulary conventions:

Terms

Terms are the elements in our union-find structures.

module type SIMPLE_GENERIC_TERM = sig ... end

A type for generic terms stored in our imperative union-find structures.

module type GENERIC_TERM = sig ... end

A type for generic terms stored in our functional union-find structures. This should be a subtype PatriciaTree.HeterogeneousKey.

Relations

Relations between terms. Classical union find has a single equivalence relation, which can be mimicked with type ('a, 'b) t = Equiv : ('a,'a) t) However, we can have more complex relation (any group structure) fairly easily

module type SIMPLE_GENERIC_GROUP = sig ... end

A (possibly non-commutative) group structure, used to represent relations.

module type GENERIC_GROUP = sig ... end

Same as SIMPLE_GENERIC_GROUP, with some extra functions used in the functional union-find.

Values

Values associated with each relation class between terms, values and relation interact via a group action

module type SIMPLE_GENERIC_VALUE = sig ... end

The values associated with each equivalence class in the imperative union-find

module type GENERIC_VALUE = sig ... end

The values associated with each equivalence class in the functional union-find

Imperative nodes

Node representative for imperative union-find. This can be used if terms have builtins pointer to their parents

module type SIMPLE_UF_NODE = sig ... end

Simple union-find node, without values

module type UF_NODE = sig ... end

union-find node with values