Module type Parameters.GENERIC_VALUE

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

include SIMPLE_GENERIC_VALUE
type ('a, 'b) relation

The type of relations, should match GENERIC_MONOID.t.

type 'a t

The generic type of our values. An 'a t value is associated to each class of our union find whose representative has type 'a GENERIC_ELT.t.

val apply : 'a t -> ('a, 'b) relation -> 'b t

apply v r is the value obtained by applying relation r to value v apply should be a group action from R : GENERIC_GROUP with type ('a,'b) t = ('a,'b) relation on the value 'a t. Meaning it should verify the following:

  • apply v R.identity = v
  • apply (apply v r2) r1 = apply v (R.compose r2 r1)
val meet : 'a t -> 'a t -> 'a t

Intersection of values

val equal : 'a t -> 'a t -> bool

Equality on values.

val pretty : Stdlib.Format.formatter -> 'a t -> unit

Only required for Functional.XX.pretty

val join : 'a t -> 'a t -> 'a t

Union of values, only required for Functional.XX.join

val is_top : 'a t -> bool

Only required for Functional, top values can be removed from the data structure which allows smaller structures and faster access. This function only need to be an over-approximation: it can return false on top, but returning true on non-top leads to precision-loss.