Module Link.Ports

This module implements multisets of nodes as maps.

type t

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 isomorphism i to port set p. Elements of p not in the domain of i 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 set s. For example:

"\{(0, 0), (1, 3)\}".