Commit cbab6231 authored by erwan's avatar erwan
Browse files

Fix: the Register.diameter returned the links number (introduced in...

Fix: the Register.diameter returned the links number (introduced in sha:40eece7c)
parent 528298e3
Pipeline #65154 passed with stages
in 3 minutes and 25 seconds
......@@ -58,5 +58,6 @@ let (max_mat: int array array -> int) =
(* takes a graph t in argument and returns the diameter *)
let (get: Topology.t -> int ) =
fun t ->
(max_mat(floydwarshall (graph_to_adjency t)))
\ No newline at end of file
let d = (max_mat(floydwarshall (graph_to_adjency t))) in
Printf.eprintf " ====> The Graph Diameter is %d \n%!" d;
d
(* Time-stamp: <modified the 08/04/2021 (at 22:03) by Erwan Jahier> *)
(* Time-stamp: <modified the 21/04/2021 (at 15:58) by Erwan Jahier> *)
type 's neighbor = {
state: 's ;
......@@ -311,7 +311,7 @@ let (diameter : unit -> int) =
match tbls.diameter with
| Some x -> x
| None ->
let x = Topology.get_nb_link (get_topology ()) in
let x = Diameter.get (get_topology ()) in
tbls.diameter <- Some x;
x
......
(* Time-stamp: <modified the 09/04/2021 (at 10:48) by Erwan Jahier> *)
(* Time-stamp: <modified the 21/04/2021 (at 15:56) by Erwan Jahier> *)
(** {1 Topology: internal representation of Graphs } *)
......@@ -35,7 +35,7 @@ val is_out_tree : t -> bool
val get_height : t -> string -> int
val get_parent : t -> string -> int option
val get_sub_tree_size : t -> string -> int
val get_degree: t -> int * int
val get_degree: t -> int * int
(** [reply g p p_neighbor] returns the channel number that let
[p_neighbor] access to the content of [p], if [p] is a neighbor of
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment