From a0a1c78910e148ee928370261d906d5008872c51 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Mon, 9 Dec 2024 14:53:56 +0100 Subject: [PATCH] fix 2/2 --- src/tools.ml | 4 +++- src/tools.mli | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools.ml b/src/tools.ml index 57bf0ae..601d1f5 100644 --- a/src/tools.ml +++ b/src/tools.ml @@ -31,4 +31,6 @@ let update_graph graph list value = |(id1,id2)::rest -> let arc = find_arc graph id1 id2 in match arc with | None-> raise Not_found - | Some x -> if x.lbl < acu then take_min graph rest x.lbl else take_min graph rest aculet list_arc graph = e_fold graph (fun acu t -> t::acu) [] \ No newline at end of file + | Some x -> if x.lbl < acu then take_min graph rest x.lbl else take_min graph rest acu + +let list_arc graph = e_fold graph (fun acu t -> t::acu) [] \ No newline at end of file diff --git a/src/tools.mli b/src/tools.mli index 4e39efa..c68551d 100644 --- a/src/tools.mli +++ b/src/tools.mli @@ -13,4 +13,6 @@ val add_arc: int graph -> id -> id -> int -> int graph raise Not_found if the arc does not exist in the graph *) val update_graph: int graph -> (id*id) list -> int -> int graph +val take_min: int graph -> (id * id) list -> int -> int + val list_arc: int graph -> int arc list \ No newline at end of file