Module Link.Ports
This module implements multisets of nodes as maps.
Standard operations on maps
val choose : t -> (int * int) option
val compare : (int -> int -> int) -> t -> t -> int
val empty : t
val equal : t -> t -> bool
val filter : (int -> int -> bool) -> t -> t
val fold : (int -> int -> 'b -> 'b) -> t -> 'b -> 'b
val is_empty : t -> bool
val iter : (int -> int -> unit) -> t -> unit
val max_binding : t -> (int * int) option
val min_binding : t -> (int * int) option
Additional functions
val add : int -> t -> t
val apply : Iso.t -> t -> t
apply i p
applies isomorphismi
to port setp
. Elements ofp
not in the domain ofi
are dropped.
val arity : t -> int -> int option
val cardinal : t -> int
val of_list : (int * int) list -> t
val of_nodes : Nodes.t -> t
of_nodes ns
transform a set of nodes into a set of ports.
val sum : t -> t -> t
val to_IntSet : t -> IntSet.t
to_IntSet ps
returns a set of node identifiers form a set of ports.
val to_string : t -> string
to_string s
gives the string representation of port sets
. For example:"\{(0, 0), (1, 3)\}"
.