package kappa-library

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Kappa_site_graphs.EdgesSource

Concrete graph implementation

Sourcetype t
Sourceval empty : with_connected_components:bool -> t
Sourceval copy : t -> t

You'd better NOT use that on the state of a simulation

Sourcetype stats = {
  1. nb_agents : int;
}
Sourceval stats : t -> stats
Sourceval add_agent : ?id:int -> Signature.s -> int -> t -> int * t

add_agent ?id sigs agent_type graph

Sourceval add_free : int -> int -> t -> t

add_free agent_id site graph

Sourceval add_internal : int -> int -> int -> t -> t

add_internal agent_id site internal_state graph

add_link ag1 s1 ag2 s2 t Some (i,j) as second returned element means cc j is now merged into cc i

Sourceval remove_agent : int -> t -> t
Sourceval remove_free : int -> int -> t -> t
Sourceval remove_internal : int -> int -> t -> int * t

Some (i,j) as second returned element means separate "new" cc j from cc i

Sourceval is_agent : Agent.t -> t -> bool

is_agent agent graph

Sourceval is_agent_id : int -> t -> bool

is_agent_id agent_id graph

Sourceval is_free : int -> int -> t -> bool

is_free agent_id site graph

Sourceval is_internal : int -> int -> int -> t -> bool

is_internal internal_state agent_id site graph

link_exists ag1_id site1 ag2_id site2 graph

Sourceval exists_fresh : int -> int -> int -> int -> t -> int option

exists_fresh ag1 site1 type_of_ag2 site2 graph

link_destination ag site graph

Sourceval get_internal : int -> int -> t -> int

get_internal ag site graph

Sourceval get_sites : int -> t -> int
Sourceval get_sort : int -> t -> int
Sourceval get_connected_component : int -> t -> int option
Sourceval in_same_connected_component : int -> int -> t -> bool
Sourceval iter_neighbors : (Agent.t -> unit) -> int -> t -> unit

iter_neighbors f ag graph calls function f on all direct neighbors of agent ag in graph.

Sourceval all_agents_where : (Agent.t -> bool) -> t -> Kappa_data_structures.IntCollection.t
Sourcetype path = ((Agent.t * int) * (Agent.t * int)) list
Sourceval empty_path : path
Sourceval singleton_path : Agent.t -> int -> Agent.t -> int -> path
Sourceval rev_path : path -> path
Sourceval print_path : ?sigs:Signature.s -> Format.formatter -> path -> unit
Sourceval is_valid_path : path -> t -> bool
Sourceval are_connected : ?max_distance:int -> t -> Agent.t list -> Agent.t list -> path option

are_connected ?max_distance graph nodes_x nodes_y

Sourceval species : debug_mode:bool -> Signature.s -> int -> t -> User_graph.connected_component
Sourceval build_snapshot : raw:bool -> Signature.s -> t -> Snapshot.t
Sourceval build_user_snapshot : debug_mode:bool -> raw:bool -> Signature.s -> t -> (int * User_graph.connected_component) list
Sourceval debug_print : Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.