package kappa-library

  1. Overview
  2. Docs
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 * Format.formatter -> unit
val print_snapshot : ?uuid:int -> Format.formatter -> snapshot -> unit
val print_dot_snapshot : ?uuid:int -> Format.formatter -> snapshot -> unit
val write_snapshot : 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.

Input JSON data of type snapshot.

val snapshot_of_string : string -> snapshot

Deserialize JSON data of type snapshot.

val print_dot_din : ?uuid:int -> Format.formatter -> din -> unit
val print_html_din : Format.formatter -> din -> unit
val write_din : 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.

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 : 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.

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 -> Format.formatter -> string array -> unit
val print_plot_line : is_tsv:bool -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a array -> unit
val export_plot : is_tsv:bool -> plot -> string
val print_warning : ?pos:Kappa_data_structures.Loc.t -> Format.formatter -> (Format.formatter -> unit) -> unit
OCaml

Innovation. Community. Security.