package octez-internal-libs
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
    
    
  sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
    
    
  doc/octez-internal-libs.irmin/Irmin/Node/module-type-Graph/index.html
Module type Node.GraphSource
Graph specifies the signature for node graphs. A node graph is a deterministic DAG, labeled by steps.
Node Graphs
val contents_key_t : contents_key Type.tThe type of store paths. A path is composed of steps.
The type for store values.
val empty : [> Perms.write ] t -> node_key Lwt.tThe empty node.
v t n is a new node containing n.
list t n is the contents of the node n.
find t n p is the contents of the path p starting form n.
add t n p v is the node x such that find t x p is Some v and it behaves the same n for other operations.
remove t n path is the node x such that find t x is None and it behhaves then same as n for other operations.
closure t min max is the unordered list of nodes n reachable from a node of max along a path which: (i) either contains no min or (ii) it ends with a min.
Note: Both min and max are subsets of n.
val iter : 
  [> Perms.read ] t ->
  min:node_key list ->
  max:node_key list ->
  ?node:(node_key -> unit Lwt.t) ->
  ?contents:(contents_key -> unit Lwt.t) ->
  ?edge:(node_key -> node_key -> unit Lwt.t) ->
  ?skip_node:(node_key -> bool Lwt.t) ->
  ?skip_contents:(contents_key -> bool Lwt.t) ->
  ?rev:bool ->
  unit ->
  unit Lwt.titer t min max node edge skip rev () iterates in topological order over the closure of t.
It applies the following functions while traversing the graph: node on the nodes; edge n predecessor_of_n on the directed edges; skip_node n to not include a node n, its predecessors and the outgoing edges of n and skip_contents c to not include content c.
If rev is true (the default) then the graph is traversed in the reverse order: node n is applied only after it was applied on all its predecessors; edge n p is applied after node n. Note that edge n p is applied even if p is skipped.