package containers

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type vertex
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 sequence
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_seq : (vertex * 'a * vertex) sequence -> 'a t
val add_seq : (vertex * 'a * vertex) sequence -> 'a t -> 'a t
val to_seq : 'a t -> (vertex * 'a * vertex) sequence
OCaml

Innovation. Community. Security.