Module Bigraph.Face

Operations on faces defined as sets of names.

Names

type name

The type of names.

val pp_name : Ppx_deriving_runtime.Format.formatter -> name -> Ppx_deriving_runtime.unit
val show_name : name -> Ppx_deriving_runtime.string
val name_to_yojson : name -> Yojson.Safe.t
val name_of_yojson : Yojson.Safe.t -> name Ppx_deriving_yojson_runtime.error_or
val make_name : string -> name

make_name n computes a name given input string n. Valid inputs must match the following regexp: "^[a-z][a-zA-Z0-9_']*$". Note: no check is performed.

Faces

type t

The type of faces (sets of names).

val pp : Ppx_deriving_runtime.Format.formatter -> t -> Ppx_deriving_runtime.unit
val show : t -> Ppx_deriving_runtime.string
val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
val make : string list -> t

make ns computes a face starting from list of string names ns. The same format as in make_name is assumed for each element of ns. Note: no check is performed.

val norm : t -> string

Compute the canonical string representation of a face. For example, norm (make ["x"; "y"; "z"]) yields "x~y~z".

Set operations

val add : name -> t -> t
val cardinal : t -> int
val choose_opt : t -> name option
val compare : t -> t -> int
val diff : t -> t -> t
val elements : t -> name list
val empty : t
val equal : t -> t -> bool
val exists : (name -> bool) -> t -> bool
val filter : (name -> bool) -> t -> t
val fold : (name -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (name -> bool) -> t -> bool
val inter : t -> t -> t
val is_empty : t -> bool
val iter : (name -> unit) -> t -> unit
val mem : name -> t -> bool
val min_elt_opt : t -> name option
val choose : t -> name
val partition : (name -> bool) -> t -> t * t
val remove : name -> t -> t
val singleton : name -> t
val split : name -> t -> t * bool * t
val subset : t -> t -> bool
val union : t -> t -> t

Sets of faces

module Face_set : sig ... end
val equiv_class : Face_set.t -> Face_set.t -> Face_set.t

Merge two sets of equivalence classes.