Refactor
This commit is contained in:
parent
83c6b455be
commit
a565cdcaeb
2 changed files with 4 additions and 22 deletions
23
src/ftest.ml
23
src/ftest.ml
|
|
@ -36,19 +36,9 @@ let () =
|
|||
|
||||
let flow_graph = create_flow_graph graph in
|
||||
|
||||
(* iteration 1 *)
|
||||
|
||||
let flow_graph = iterate graph flow_graph source target in
|
||||
|
||||
(* iteration 2 *)
|
||||
|
||||
let flow_graph = iterate graph flow_graph source target in
|
||||
|
||||
(* iteration 3 *)
|
||||
|
||||
let flow_graph = iterate graph flow_graph source target in
|
||||
|
||||
(* save result to file *)
|
||||
let flow_graph = iterate_ford_fulkerson graph flow_graph source target in
|
||||
let flow_graph = iterate_ford_fulkerson graph flow_graph source target in
|
||||
let flow_graph = iterate_ford_fulkerson graph flow_graph source target in
|
||||
|
||||
let string_flow_graph = gmap flow_graph (fun x -> string_of_int x) in
|
||||
|
||||
|
|
@ -57,10 +47,3 @@ let () =
|
|||
|
||||
()
|
||||
|
||||
|
||||
|
||||
(*(* let g = clone_nodes graph in *)
|
||||
let () = aff (dfs graph 0 [] 3) ;
|
||||
Printf.printf "\n\n" ;
|
||||
hash
|
||||
in () *)
|
||||
|
|
@ -38,7 +38,7 @@ let rec aff nodes =
|
|||
| [] -> ()
|
||||
| x::rest -> Printf.printf "%d " x ; aff rest
|
||||
|
||||
let iterate graph flow_graph src tgt =
|
||||
let iterate_ford_fulkerson graph flow_graph src tgt =
|
||||
let path : int list = find_path graph src tgt in
|
||||
Printf.printf "Path: [%s]\n" (String.concat "; " (List.map string_of_int path)) ;
|
||||
|
||||
|
|
@ -50,4 +50,3 @@ let iterate graph flow_graph src tgt =
|
|||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in a new issue