Module Kappa_terms.Pattern

type cc
type t = cc

type for domain points

type id
val debug_print_id : Format.formatter -> id -> unit
module ObsMap : sig ... end
module Env : sig ... end
module PreEnv : sig ... end
type work

Create a connected component

type of a PreEnv during a pattern construction

val empty_cc : Kappa_mixtures.Signature.s -> cc
val begin_new : PreEnv.t -> work

Starts creation

val new_node : work -> int -> Kappa_mixtures.Agent.t * work

new_node wk node_type

new_link wk (node, site_id) (node', site_id')

val new_free : work -> (Kappa_mixtures.Agent.t * int) -> work
val new_internal_state : work -> (Kappa_mixtures.Agent.t * int) -> int -> work

new_link_type work (node,site) type

val finish_new : debugMode:bool -> ?⁠origin:Kappa_generic_toolset.Operator.rev_dep -> work -> PreEnv.t * Kappa_generic_toolset.Renaming.t * cc * id

Use a connected component

val compare_canonicals : id -> id -> int
val is_equal_canonicals : id -> id -> bool
val print_cc : noCounters:bool -> ?⁠dotnet:bool -> ?⁠full_species:bool -> ?⁠sigs:Kappa_mixtures.Signature.s -> ?⁠cc_id:id -> with_id:bool -> Format.formatter -> t -> unit
val print_cc_as_id : Kappa_mixtures.Signature.s -> Format.formatter -> t -> unit
val print : noCounters:bool -> ?⁠domain:Env.t -> with_id:bool -> Format.formatter -> id -> unit

print ~domain ?with_id:None form cc

val id_to_yojson : id -> Yojson.Basic.t
val id_of_yojson : Yojson.Basic.t -> id
val reconstruction_navigation : t -> Kappa_mixtures.Navigation.abstract Kappa_mixtures.Navigation.t
val find_ty : cc -> int -> int

Abstraction leak, please do not use

val automorphisms : debugMode:bool -> t -> Kappa_generic_toolset.Renaming.t list
val embeddings_to_fully_specified : debugMode:bool -> Env.t -> id -> cc -> Kappa_generic_toolset.Renaming.t list
val size_of_cc : cc -> int
val fold_by_type : (pos:int -> agent_type:int -> (link * int) array -> 'a -> 'a) -> cc -> 'a -> 'a

USE WITH CARE: Break some abstraction. The array must not be modified and internal state -1 means unspecified

val fold : (int -> (link * int) array -> 'acc -> 'acc) -> cc -> 'acc -> 'acc

USE WITH CARE: Break some abstraction. The array must not be modified and internal state -1 means unspecified

type sharing_level =
| No_sharing
| Compatible_patterns
| Max_sharing

Heuristic to use on domain construction

val write_sharing_level : Bi_outbuf.t -> sharing_level -> unit

Output a JSON value of type sharing_level.

val string_of_sharing_level : ?⁠len:int -> sharing_level -> string

Serialize a value of type sharing_level into a JSON string.

parameter len

specifies the initial length of the buffer used internally. Default: 1024.

val read_sharing_level : Yojson.Safe.lexer_state -> Lexing.lexbuf -> sharing_level

Input JSON data of type sharing_level.

val sharing_level_of_string : string -> sharing_level

Deserialize JSON data of type sharing_level.

val finalize : debugMode:bool -> sharing:sharing_level -> PreEnv.t -> Contact_map.t -> Env.t * PreEnv.stat
val infs : debugMode:bool -> t -> t -> t list
val matchings : debugMode:bool -> t -> t -> Kappa_generic_toolset.Renaming.t list
val merge_on_inf : debugMode:bool -> PreEnv.t -> Kappa_generic_toolset.Renaming.t -> t -> t -> t option * (t * int * t * int * int * bool) option
val length : t -> int
val counter_value_cc : cc -> (Kappa_generic_toolset.Mods.IntMap.elt * int) -> int -> int