package codex

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Imperative.MakeNumberedNodeSource

Same as MakeNode, but also remembers all built node in a hash-table so we can check if elements already have an associated node

Parameters

Signature

include sig ... end
Sourceval polyeq : 'a t -> 'b t -> ('a, 'b) PatriciaTree.cmp
Sourcemodule Relation : sig ... end
Sourcetype !'a parent = 'a MakeNode(Elt)(Relation).parent =
  1. | Node : 'b t * ('a0, 'b) Relation.t -> 'a0 parent
  2. | Root
Sourceval get_parent : 'a t -> 'a parent
Sourceval set_parent : 'a t -> 'a parent -> unit
Sourceval payload : 'a t -> 'a Elt.t

Inspect the payload of a node

Sourceval make_node : 'a Elt.t -> 'a t

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

Sourceval get_node : 'a Elt.t -> 'a t option

Checks if a node has already been constructed for the given element

Sourceval get_or_make_node : 'a Elt.t -> 'a t

Returns the node associated with the given element if it exists, else builds it