This commit is contained in:
Baptiste 2024-12-09 14:53:56 +01:00
parent 5ab4cd7e48
commit a0a1c78910
2 changed files with 5 additions and 1 deletions

View file

@ -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) []
| 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) []

View file

@ -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