Module Imperative.MakeSimpleNode

Parameters

Signature

include Parameters.SIMPLE_UF_NODE with module Relation = Relation
module Relation = Relation
type root = {
  1. mutable size : int;
}

The type of root nodes, attached to each representative

type 'a parent =
  1. | Node : 'b Node.t * ('a, 'b) Relation.t -> 'a parent
  2. | Root of root
    (*

    The type of parents. A term either points to:

    • a representative via a relation
    • a root if it is a representative
    *)
val get_parent : 'a Node.t -> 'a parent
val set_parent : 'a Node.t -> 'a parent -> unit
val payload : 'a Node.t -> 'a Term.t

Inspect the payload of a node

val make_node : 'a Term.t -> 'a Node.t

Create a new node, in its own class. At most one node should be created per term!