Module Sasacore.Topology

Topology: internal representation of Graphs

type node_id = string
type node = {
id : node_id;

The id of the node as stated in the dot file

file : string;

the content of the algo field (a ml file)

init : string;

store the content of the init field

}
type t = {
nodes : node list;
succ : node_id -> (int * node_id) list;

get neighbors, with weight

of_id : node_id -> node;
directed : bool;

true if the graph is directed

attributes : (string * string) list;

(name, value) list of graph attributes

}
val read : string -> t

Parse a sasa dot file

Various eponymous util functions

val to_adjacency : t -> bool array array
val get_mean_degree : t -> float
val is_connected_and_cyclic : t -> bool * bool
val height : string list -> t -> string -> int
val get_height : t -> string -> int
val get_degree : t -> int * int