Module Kappa_runtime.Data

type snapshot = {
  1. snapshot_event : int;
  2. snapshot_time : float;
  3. snapshot_agents : (int * Kappa_site_graphs.User_graph.connected_component) list;
  4. snapshot_tokens : (string * Kappa_data_structures.Nbr.t) array;
}
type din_data = {
  1. din_kind : Kappa_terms.Primitives.din_kind;
  2. din_start : float;
  3. din_hits : int array;
  4. din_fluxs : float array array;
}
type din = {
  1. din_rules : string array;
  2. din_data : din_data;
  3. din_end : float;
}
type file_line = {
  1. file_line_name : string option;
  2. file_line_text : string;
}
type t =
  1. | DIN of string * din
  2. | DeltaActivities of int * (int * (float * float)) list
  3. | Plot of Kappa_data_structures.Nbr.t array
    (*

    Must have length >= 1 (at least T or E)

    *)
  4. | Print of file_line
  5. | TraceStep of Trace.step
  6. | Snapshot of string * snapshot
  7. | Log of string
  8. | Species of string * float * Kappa_site_graphs.User_graph.connected_component
  9. | Warning of Kappa_data_structures.Loc.t option * Stdlib.Format.formatter -> unit
val print_snapshot : ?uuid:int -> Stdlib.Format.formatter -> snapshot -> unit
val print_dot_snapshot : ?uuid:int -> Stdlib.Format.formatter -> snapshot -> unit
val write_snapshot : Stdlib.Buffer.t -> snapshot -> unit

Output a JSON value of type snapshot.

val string_of_snapshot : ?len:int -> snapshot -> string

Serialize a value of type snapshot into a JSON string.

  • parameter len

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

val read_snapshot : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> snapshot

Input JSON data of type snapshot.

val snapshot_of_string : string -> snapshot

Deserialize JSON data of type snapshot.

val print_dot_din : ?uuid:int -> Stdlib.Format.formatter -> din -> unit
val print_html_din : Stdlib.Format.formatter -> din -> unit
val write_din : Stdlib.Buffer.t -> din -> unit

Output a JSON value of type din.

val string_of_din : ?len:int -> din -> string

Serialize a value of type din into a JSON string.

  • parameter len

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

val read_din : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> din

Input JSON data of type din.

val din_of_string : string -> din

Deserialize JSON data of type din.

type plot = {
  1. plot_legend : string array;
  2. plot_series : float option array list;
}
val add_plot_line : Kappa_data_structures.Nbr.t array -> plot -> plot
val init_plot : Kappa_terms.Model.t -> plot
val write_plot : Stdlib.Buffer.t -> plot -> unit

Output a JSON value of type plot.

val string_of_plot : ?len:int -> plot -> string

Serialize a value of type plot into a JSON string.

  • parameter len

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

val read_plot : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> plot

Input JSON data of type plot.

val plot_of_string : string -> plot

Deserialize JSON data of type plot.

val print_plot_legend : is_tsv:bool -> Stdlib.Format.formatter -> string array -> unit
val print_plot_line : is_tsv:bool -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a array -> unit
val export_plot : is_tsv:bool -> plot -> string
val print_initial_inputs : ?uuid:int -> Kappa_terms.Configuration.t -> Kappa_terms.Model.t -> Stdlib.Format.formatter -> (Kappa_terms.Primitives.alg_expr * Kappa_terms.Primitives.elementary_rule) list -> unit
val print_warning : ?pos:Kappa_data_structures.Loc.t -> Stdlib.Format.formatter -> (Stdlib.Format.formatter -> unit) -> unit