package containers-data

  1. Overview
  2. Docs

Parameters

module O : Stdlib.Map.OrderedType

Signature

type vertex = O.t
type 'a t
val as_graph : 'a t -> (vertex, 'a) graph

Graph view of the map.

val empty : 'a t
val add_edge : vertex -> 'a -> vertex -> 'a t -> 'a t
val remove_edge : vertex -> vertex -> 'a t -> 'a t
val add : vertex -> 'a t -> 'a t

Add a vertex, possibly with no outgoing edge.

val remove : vertex -> 'a t -> 'a t

Remove the vertex and all its outgoing edges. Edges that point to the vertex are NOT removed, they must be manually removed with remove_edge.

val union : 'a t -> 'a t -> 'a t
val vertices : _ t -> vertex iter
val vertices_l : _ t -> vertex list
val of_list : (vertex * 'a * vertex) list -> 'a t
val add_list : (vertex * 'a * vertex) list -> 'a t -> 'a t
val to_list : 'a t -> (vertex * 'a * vertex) list
val of_iter : (vertex * 'a * vertex) iter -> 'a t
  • since 2.8
val add_iter : (vertex * 'a * vertex) iter -> 'a t -> 'a t
  • since 2.8
val to_iter : 'a t -> (vertex * 'a * vertex) iter
  • since 2.8
OCaml

Innovation. Community. Security.