Module CCGraph.Map

Parameters

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
val of_seq : (vertex * 'a * vertex) iter -> 'a t
deprecated

use of_iter instead

val add_seq : (vertex * 'a * vertex) iter -> 'a t -> 'a t
deprecated

use add_iter instead

val to_seq : 'a t -> (vertex * 'a * vertex) iter
deprecated

use to_iter instead