Module Imperative.GenericRelational

Same as GenericRelationValued, but without the values

Parameters

Signature

type 'a node_through_relation =
  1. | NodeThoughRelation : 'b Node.Node.t * ('a, 'b) Node.Relation.t -> 'a node_through_relation
val find_representative : 'a Node.Node.t -> 'a node_through_relation

Find the representative of a node, and the associated relation

check_related a b returns the relation between a and b if they are in the same class.

val union : 'a Node.Node.t -> 'b Node.Node.t -> ('a, 'b) Node.Relation.t -> unit

union m n r adds the r(m,n) relation to the union find

  • raises AssertionFailure

    if both nodes are in the same class