finished dev for main FF function
This commit is contained in:
parent
97f80d194d
commit
33d1c3a80b
15 changed files with 300 additions and 250 deletions
|
@ -1,42 +1,42 @@
|
|||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/display )": "\027\"r\253b.\004\234\141\ba\206\238\025\242r"
|
||||
"Rule: ocaml dependencies mli (%=src/gfile )": "7\182\192g\020\238\188\b\211\164{\014\157\135\011\003"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/display )": "\027\"r\253b.\004\234\141\ba\206\238\025\242r"
|
||||
"Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/tools.mli": "9\173\222\177]e\245\229\131\151\020fsu\133@"
|
||||
"Rule: ocaml dependencies ml (%=src/ftest )": "\224h\140`\164\1892\223M>y\242\188\163\157'"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/gfile )": "\236O\148Y\157m\028\183\166?\231a\231\187u\132"
|
||||
"Rule: ocaml dependencies ml (%=src/ftest )": "\252\019/\001\247\140\132b\221\205\237\217\194\139\011\245"
|
||||
"Rule: ocaml dependencies mli (%=src/display )": "B+\230S\204^\178D\253\139t\200\194%5b"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ftest.ml": "\193\219\229\187Q\161x\240|\242FG-\132\1953"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/fordFulkerson.ml": "\146\212\242\180\229\234\254*\132\173\180^\242?v\148"
|
||||
"Rule: ocaml: mli -> cmi (%=src/graph )": ")2\159\205\136\031\251\145\0263\01878\001\b\134"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ftest.ml": "\185\019Y\252\019n*\004\218s\243\024\173}Zd"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/fordFulkerson.ml": "q\184\138\153\242\011%\207\178\202b\006\1654D\243"
|
||||
"Rule: ocaml: mli -> cmi (%=src/display )": "UAU\224\168o\2429OM\253\194i'\218N"
|
||||
"Rule: ocaml: mli -> cmi (%=src/graph )": ")2\159\205\136\031\251\145\0263\01878\001\b\134"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/graph.mli": "\253S\031\015\162|\210x\252\n \227\001{\133e"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/fordFulkerson )": "'v\231\027\206tFGD\129[\156\177\019\147\128"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/tools.ml": "\195\192\025\161\030\226\027\178\227x\145\250,\014`\012"
|
||||
"Rule: ocaml: mli -> cmi (%=src/tools )": "*\130\\\221>3X\156\180\205\"\245\255-\230~"
|
||||
"Rule: ocaml: cmx* & o* -> native (%=src/ftest )": "d\210=\023\185\235\174T4$\157\183\145t)q"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/ftest )": "\211\249\221x\234\164\237\012\189\154\239\246]YK\018"
|
||||
"Rule: ocaml: mli -> cmi (%=src/fordFulkerson )": "\019]\213\1741`\210\006x(\bcY\143\169\149"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/tools.ml": "\185\244\209\136L\1577;\191J\171\162M\135xa"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/fordFulkerson )": "\128\136\201\143^_\n3V\177lE3\1654\139"
|
||||
"Rule: ocaml: cmx* & o* -> native (%=src/ftest )": "u8i\1621\017rk\197\200ZA\n;d\b"
|
||||
"Rule: ocaml: mli -> cmi (%=src/tools )": "\239.\206\1667\139\246~\227$\235l\012\210\208;"
|
||||
"Rule: ocaml: mli -> cmi (%=src/fordFulkerson )": ";\199h\213Q\200\225\024\160\204\r\225\r\203\155\\"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/ftest )": "\160l\238\232%a\145\130\240\152J#\031_\024\199"
|
||||
"Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/graph.ml": "\005\175.\2458\176E\202]\255\235=9\015\000\237"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/graph.ml": "\005\175.\2458\176E\202]\255\235=9\015\000\237"
|
||||
"Rule: ocaml: mli -> cmi (%=src/gfile )": "\015\211&r\030l{}\183\187\236\2266\022\129\191"
|
||||
"Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/graph.mli": "\031\217\135\022\208\254\154\148\252)\210\130\174\215X\031"
|
||||
"Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/gfile.mli": "\203\249\163Ct\234\0067d}\142\011m8T`"
|
||||
"Rule: ocaml dependencies ml (%=src/tools )": "\238;-\163=t\145N\016@\024\208\158\198-/"
|
||||
"Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/tools.ml": "~[\186\208\199\129\006\030\012\196\245\183'\163\211&"
|
||||
"Rule: ocaml dependencies ml (%=src/tools )": "\228\210\133\187`\193\179>\031\016\197\147\221\006j\017"
|
||||
"Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/ftest.ml": "~\190 \235\142\210\r\222\253\136>\194\180\207\183\168"
|
||||
"Rule: ocaml: ml -> cmo & cmi (%=src/ftest )": "8 D,\027\028\193\161N'\n\184\250\177\237m"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/fordFulkerson.mli": "\\\2004\027\164.\176\217\238\189<Wa\188\133F"
|
||||
"Rule: ocaml dependencies mli (%=src/fordFulkerson )": "\236\n\218Q\223\154\150\021\232\128\147\130\233\234\141X"
|
||||
"Rule: ocaml: ml -> cmo & cmi (%=src/ftest )": "\211\163\255\143]\195\185\150\159\224r\005\232\206\148="
|
||||
"Rule: ocaml dependencies mli (%=src/fordFulkerson )": "\175u\223\222e6\175\017\025\014\220\011\127\150\218t"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/fordFulkerson.mli": "t\243u\229\130\149\185\161\226\030|\1607\130?+"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/display.mli": "j\141\168#\004\174\151?]\022hm\211,\164\147"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/tools )": ";\129\180\230Q\250!\223TK}\193\012D\247\005"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/gfile.ml": "\1966\177\141\185,fpl\1987gT\128b\028"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/tools )": "z\158\235\155v\003\214Q\150\t\224\"\026\246(\158"
|
||||
"Rule: ocaml dependencies ml (%=src/fordFulkerson )": "\216\216\252\019\234{jF\249\249u\001fe\0241"
|
||||
"Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/gfile.ml": "\1966\177\141\185,fpl\1987gT\128b\028"
|
||||
"Rule: ocaml dependencies ml (%=src/fordFulkerson )": "\187{\021\n?|\014\005\140I\151I\222\135\221i"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/tools.mli": "9\173\222\177]e\245\229\131\151\020fsu\133@"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/gfile.ml": "\1966\177\141\185,fpl\1987gT\128b\028"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/tools.mli": "\025v\144\241\237\241\b\248\197tD\012\171\216\202\148"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/graph )": "\190\tV\232\254i\031+\141\154\168\219\155n\156C"
|
||||
"Rule: ocaml dependencies ml (%=src/graph )": "\137kk#\140\236\011\255?\132T\225M\018\169\224"
|
||||
"Rule: ocaml dependencies ml (%=src/display )": "\162K\\\156\237a\012\132\237\169\243\248\212Sb\221"
|
||||
"Rule: ocaml dependencies mli (%=src/graph )": "\012\213_n\023=\207kZ+\251(^M\2028"
|
||||
"Rule: ocaml dependencies ml (%=src/display )": "\162K\\\156\237a\012\132\237\169\243\248\212Sb\221"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/gfile.mli": "\203\249\163Ct\234\0067d}\142\011m8T`"
|
||||
"Rule: ocaml dependencies mli (%=src/tools )": "\22566|\026\\\138\197K\020\155\144/$\219\161"
|
||||
"Rule: ocaml dependencies ml (%=src/gfile )": "U4(<\t=rQ\240c\0278\231N\1949"
|
||||
"Rule: ocaml dependencies mli (%=src/tools )": "\151\181\0055\199\150&\017\021_\215\015\215\018\027+"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/display.ml": "y\135\165\238\138M)N\224\237\005 \027+d\t"
|
||||
|
|
10
_build/_log
10
_build/_log
|
@ -1,6 +1,6 @@
|
|||
### Starting build.
|
||||
# Target: src/ftest.ml.depends, tags: { extension:ml, file:src/ftest.ml, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/ftest.ml > src/ftest.ml.depends
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/ftest.ml > src/ftest.ml.depends # cached
|
||||
# Target: src/display.mli.depends, tags: { extension:mli, file:src/display.mli, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/display.mli > src/display.mli.depends # cached
|
||||
# Target: src/gfile.mli.depends, tags: { extension:mli, file:src/gfile.mli, include, ocaml, ocamldep, quiet, traverse }
|
||||
|
@ -22,7 +22,7 @@
|
|||
# Target: src/fordFulkerson.cmi, tags: { byte, compile, extension:mli, file:src/fordFulkerson.mli, include, interf, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/fordFulkerson.cmi src/fordFulkerson.mli # cached
|
||||
# Target: src/ftest.cmo, tags: { byte, compile, extension:cmo, extension:ml, file:src/ftest.cmo, file:src/ftest.ml, implem, include, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/ftest.cmo src/ftest.ml
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/ftest.cmo src/ftest.ml # cached
|
||||
# Target: src/display.ml.depends, tags: { extension:ml, file:src/display.ml, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/display.ml > src/display.ml.depends # cached
|
||||
# Target: src/gfile.ml.depends, tags: { extension:ml, file:src/gfile.ml, include, ocaml, ocamldep, quiet, traverse }
|
||||
|
@ -36,15 +36,15 @@
|
|||
# Target: src/display.cmx, tags: { compile, extension:cmx, extension:ml, file:src/display.cmx, file:src/display.ml, implem, include, native, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/display.cmx src/display.ml # cached
|
||||
# Target: src/fordFulkerson.ml.depends, tags: { extension:ml, file:src/fordFulkerson.ml, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/fordFulkerson.ml > src/fordFulkerson.ml.depends # cached
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/fordFulkerson.ml > src/fordFulkerson.ml.depends
|
||||
# Target: src/tools.ml.depends, tags: { extension:ml, file:src/tools.ml, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/tools.ml > src/tools.ml.depends # cached
|
||||
# Target: src/tools.cmx, tags: { compile, extension:cmx, extension:ml, file:src/tools.cmx, file:src/tools.ml, implem, include, native, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/tools.cmx src/tools.ml # cached
|
||||
# Target: src/fordFulkerson.cmx, tags: { compile, extension:cmx, extension:ml, file:src/fordFulkerson.cmx, file:src/fordFulkerson.ml, implem, include, native, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/fordFulkerson.cmx src/fordFulkerson.ml # cached
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/fordFulkerson.cmx src/fordFulkerson.ml
|
||||
# Target: src/ftest.cmx, tags: { compile, extension:cmx, extension:ml, file:src/ftest.cmx, file:src/ftest.ml, implem, include, native, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/ftest.cmx src/ftest.ml
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/ftest.cmx src/ftest.ml # cached
|
||||
# Target: src/ftest.native, tags: { dont_link_with, extension:native, file:src/ftest.native, include, link, native, ocaml, program, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -I src src/graph.cmx src/gfile.cmx src/display.cmx src/tools.cmx src/fordFulkerson.cmx src/ftest.cmx -o src/ftest.native
|
||||
# Compilation successful.
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,54 +1,58 @@
|
|||
open Gfile
|
||||
open Tools
|
||||
open Display
|
||||
open FordFulkerson
|
||||
|
||||
let () =
|
||||
open Gfile
|
||||
open Tools
|
||||
open Display
|
||||
open FordFulkerson
|
||||
|
||||
(* Check the number of command-line arguments
|
||||
*)
|
||||
if Array.length Sys.argv <> 5 then
|
||||
begin
|
||||
Printf.printf
|
||||
"\n ✻ Usage: %s infile source sink outfile\n\n%s%!" Sys.argv.(0)
|
||||
(" 🟄 infile : input file containing a graph\n" ^
|
||||
" 🟄 source : identifier of the source vertex (used by the ford-fulkerson algorithm)\n" ^
|
||||
" 🟄 sink : identifier of the sink vertex (ditto)\n" ^
|
||||
" 🟄 outfile : output file in which the result should be written.\n\n") ;
|
||||
exit 0
|
||||
end ;
|
||||
let () =
|
||||
|
||||
(* Arguments are : infile(1) source-id(2) sink-id(3) outfile(4) *)
|
||||
|
||||
let infile = Sys.argv.(1)
|
||||
and outfile = Sys.argv.(4)
|
||||
(* Check the number of command-line arguments
|
||||
*)
|
||||
if Array.length Sys.argv <> 5 then
|
||||
begin
|
||||
Printf.printf
|
||||
"\n ✻ Usage: %s infile source sink outfile\n\n%s%!" Sys.argv.(0)
|
||||
(" 🟄 infile : input file containing a graph\n" ^
|
||||
" 🟄 source : identifier of the source vertex (used by the ford-fulkerson algorithm)\n" ^
|
||||
" 🟄 sink : identifier of the sink vertex (ditto)\n" ^
|
||||
" 🟄 outfile : output file in which the result should be written.\n\n") ;
|
||||
exit 0
|
||||
end ;
|
||||
|
||||
(* These command-line arguments are not used for the moment. *)
|
||||
and _source = int_of_string Sys.argv.(2)
|
||||
and _sink = int_of_string Sys.argv.(3)
|
||||
in
|
||||
(* Arguments are : infile(1) source-id(2) sink-id(3) outfile(4) *)
|
||||
|
||||
(* Open file *)
|
||||
let graph = from_file infile in
|
||||
let infile = Sys.argv.(1)
|
||||
and outfile = Sys.argv.(4)
|
||||
|
||||
let graphInt = gmap graph int_of_string in
|
||||
(* These command-line arguments are not used for the moment. *)
|
||||
and _source = int_of_string Sys.argv.(2)
|
||||
and _sink = int_of_string Sys.argv.(3)
|
||||
in
|
||||
|
||||
let graphBis1 = add_arc graphInt 5 4 10 in
|
||||
let graphBis2 = add_arc graphBis1 4 1 10 in
|
||||
let graphBis = add_arc graphBis2 5 1 10 in
|
||||
(* Open file *)
|
||||
let graph = from_file infile in
|
||||
|
||||
match (way graphBis 5 0) with
|
||||
| None -> failwith "No way"
|
||||
| Some (x,y) -> Printf.printf "%d \n" y;
|
||||
let graphInt = gmap graph int_of_string in
|
||||
|
||||
let () = List.iter (Printf.printf "%d, ") x in
|
||||
(); Printf.printf "\n";
|
||||
let pathTest = way graphInt 0 5 in
|
||||
|
||||
let graphFinal = gmap graphBis string_of_int in
|
||||
match pathTest with
|
||||
| None -> failwith "No way"
|
||||
| Some (x,y) -> Printf.printf "%d \n" y;
|
||||
|
||||
let () = export graphFinal outfile in
|
||||
()
|
||||
(*Rewrite the graph that has been read.
|
||||
let () = write_file outfile graphDot in
|
||||
()
|
||||
*)
|
||||
let () = List.iter (Printf.printf "%d, ") x in
|
||||
(); Printf.printf "\n";
|
||||
|
||||
|
||||
match pathTest with
|
||||
| None -> failwith "No way"
|
||||
| Some (x,y) -> let graphBis = update graphInt (x,y) in
|
||||
|
||||
|
||||
let graphFinal = gmap graphBis string_of_int in
|
||||
|
||||
let () = export graphFinal outfile in
|
||||
()
|
||||
(* Rewrite the graph that has been read.
|
||||
let () = write_file outfile graphDot in
|
||||
()
|
||||
*)
|
Binary file not shown.
Binary file not shown.
20
outfile
20
outfile
|
@ -12,17 +12,15 @@
|
|||
node [shape = circle];
|
||||
|
||||
|
||||
0 -> 2 [label = "8"];
|
||||
0 -> 3 [label = "10"];
|
||||
0 -> 1 [label = "7"];
|
||||
2 -> 4 [label = "12"];
|
||||
3 -> 4 [label = "5"];
|
||||
3 -> 2 [label = "2"];
|
||||
3 -> 1 [label = "11"];
|
||||
5 -> 1 [label = "7"];
|
||||
1 -> 5 [label = "14"];
|
||||
1 -> 0 [label = "7"];
|
||||
1 -> 4 [label = "1"];
|
||||
1 -> 5 [label = "21"];
|
||||
0 -> 3 [label = "10"];
|
||||
0 -> 2 [label = "8"];
|
||||
4 -> 5 [label = "14"];
|
||||
4 -> 1 [label = "10"];
|
||||
5 -> 4 [label = "10"];
|
||||
5 -> 1 [label = "10"];
|
||||
3 -> 1 [label = "11"];
|
||||
3 -> 2 [label = "2"];
|
||||
3 -> 4 [label = "5"];
|
||||
2 -> 4 [label = "12"];
|
||||
}
|
|
@ -29,6 +29,30 @@ let rec way g n1 n2 =
|
|||
in
|
||||
if n1 == n2
|
||||
then None
|
||||
else inner g ([n1], 99999) [] n1 n2
|
||||
else inner g ([n1], (maxCapaGraph g)) [] n1 n2
|
||||
|
||||
(*updates the difference graph according to a path,
|
||||
removes any 0-worth edge and tests for the graph sanity (only positive-valued edges)*)
|
||||
let update g (nodes,capa) =
|
||||
let rec updateCapacityAlongPath g (nodes,capa) =
|
||||
match nodes with
|
||||
| [] -> g
|
||||
| x :: [] -> g
|
||||
| x::y::xs ->
|
||||
let removedCapcityUsed = sub_arc g x y capa in
|
||||
let addPossibleUndo = add_arc removedCapcityUsed y x capa in
|
||||
updateCapacityAlongPath addPossibleUndo (y::xs,capa)
|
||||
in
|
||||
testGraphSanity (
|
||||
clearNull (
|
||||
updateCapacityAlongPath g (nodes,capa)
|
||||
)
|
||||
)
|
||||
|
||||
(*takes a graph, a start/end node and returns a finished difference graph*)
|
||||
let rec main g idS idE =
|
||||
let path = way g idS idE in
|
||||
match path with
|
||||
| None -> g
|
||||
| Same (xs, capa) -> main (update g (xs, capa) idS IdE)
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@ open Display
|
|||
|
||||
val way: int graph -> id -> id -> (id list * int) option
|
||||
|
||||
|
||||
val update: int graph -> (id list * int) -> int graph
|
||||
(*
|
||||
*)
|
92
src/ftest.ml
92
src/ftest.ml
|
@ -1,54 +1,58 @@
|
|||
open Gfile
|
||||
open Tools
|
||||
open Display
|
||||
open FordFulkerson
|
||||
|
||||
let () =
|
||||
open Gfile
|
||||
open Tools
|
||||
open Display
|
||||
open FordFulkerson
|
||||
|
||||
(* Check the number of command-line arguments
|
||||
*)
|
||||
if Array.length Sys.argv <> 5 then
|
||||
begin
|
||||
Printf.printf
|
||||
"\n ✻ Usage: %s infile source sink outfile\n\n%s%!" Sys.argv.(0)
|
||||
(" 🟄 infile : input file containing a graph\n" ^
|
||||
" 🟄 source : identifier of the source vertex (used by the ford-fulkerson algorithm)\n" ^
|
||||
" 🟄 sink : identifier of the sink vertex (ditto)\n" ^
|
||||
" 🟄 outfile : output file in which the result should be written.\n\n") ;
|
||||
exit 0
|
||||
end ;
|
||||
let () =
|
||||
|
||||
(* Arguments are : infile(1) source-id(2) sink-id(3) outfile(4) *)
|
||||
|
||||
let infile = Sys.argv.(1)
|
||||
and outfile = Sys.argv.(4)
|
||||
(* Check the number of command-line arguments
|
||||
*)
|
||||
if Array.length Sys.argv <> 5 then
|
||||
begin
|
||||
Printf.printf
|
||||
"\n ✻ Usage: %s infile source sink outfile\n\n%s%!" Sys.argv.(0)
|
||||
(" 🟄 infile : input file containing a graph\n" ^
|
||||
" 🟄 source : identifier of the source vertex (used by the ford-fulkerson algorithm)\n" ^
|
||||
" 🟄 sink : identifier of the sink vertex (ditto)\n" ^
|
||||
" 🟄 outfile : output file in which the result should be written.\n\n") ;
|
||||
exit 0
|
||||
end ;
|
||||
|
||||
(* These command-line arguments are not used for the moment. *)
|
||||
and _source = int_of_string Sys.argv.(2)
|
||||
and _sink = int_of_string Sys.argv.(3)
|
||||
in
|
||||
(* Arguments are : infile(1) source-id(2) sink-id(3) outfile(4) *)
|
||||
|
||||
(* Open file *)
|
||||
let graph = from_file infile in
|
||||
let infile = Sys.argv.(1)
|
||||
and outfile = Sys.argv.(4)
|
||||
|
||||
let graphInt = gmap graph int_of_string in
|
||||
(* These command-line arguments are not used for the moment. *)
|
||||
and _source = int_of_string Sys.argv.(2)
|
||||
and _sink = int_of_string Sys.argv.(3)
|
||||
in
|
||||
|
||||
let graphBis1 = add_arc graphInt 5 4 10 in
|
||||
let graphBis2 = add_arc graphBis1 4 1 10 in
|
||||
let graphBis = add_arc graphBis2 5 1 10 in
|
||||
(* Open file *)
|
||||
let graph = from_file infile in
|
||||
|
||||
match (way graphBis 5 0) with
|
||||
| None -> failwith "No way"
|
||||
| Some (x,y) -> Printf.printf "%d \n" y;
|
||||
let graphInt = gmap graph int_of_string in
|
||||
|
||||
let () = List.iter (Printf.printf "%d, ") x in
|
||||
(); Printf.printf "\n";
|
||||
let pathTest = way graphInt 0 5 in
|
||||
|
||||
let graphFinal = gmap graphBis string_of_int in
|
||||
match pathTest with
|
||||
| None -> failwith "No way"
|
||||
| Some (x,y) -> Printf.printf "%d \n" y;
|
||||
|
||||
let () = export graphFinal outfile in
|
||||
()
|
||||
(*Rewrite the graph that has been read.
|
||||
let () = write_file outfile graphDot in
|
||||
()
|
||||
*)
|
||||
let () = List.iter (Printf.printf "%d, ") x in
|
||||
(); Printf.printf "\n";
|
||||
|
||||
|
||||
match pathTest with
|
||||
| None -> failwith "No way"
|
||||
| Some (x,y) -> let graphBis = update graphInt (x,y) in
|
||||
|
||||
|
||||
let graphFinal = gmap graphBis string_of_int in
|
||||
|
||||
let () = export graphFinal outfile in
|
||||
()
|
||||
(* Rewrite the graph that has been read.
|
||||
let () = write_file outfile graphDot in
|
||||
()
|
||||
*)
|
32
src/tools.ml
32
src/tools.ml
|
@ -11,8 +11,38 @@ let add_arc g id1 id2 n =
|
|||
| None -> new_arc g id1 id2 n
|
||||
| Some a -> new_arc g id1 id2 (n + a)
|
||||
|
||||
|
||||
let sub_arc g id1 id2 n =
|
||||
match find_arc g id1 id2 with
|
||||
| None -> new_arc g id1 id2 (-1 * n)
|
||||
| Some a -> new_arc g id1 id2 ((-1 * n) + a)
|
||||
|
||||
|
||||
(* maps all arcs of gr by function f *)
|
||||
let gmap gr f = e_fold gr (fun acc id1 id2 x -> new_arc acc id1 id2 (f x)) (clone_nodes gr)
|
||||
|
||||
|
||||
(*let maxCapaGraph*)
|
||||
(* removes all empty edges *)
|
||||
let clearNull g =
|
||||
let newG = clone_nodes g in
|
||||
let filterEdge g id1 id2 x =
|
||||
if x <> 0 then
|
||||
add_arc g id1 id2 x
|
||||
else
|
||||
g
|
||||
in
|
||||
e_fold g filterEdge newG
|
||||
|
||||
(*calculates the maximum capacity of the graph
|
||||
(used as a base value for the min capacity on a eay)*)
|
||||
let maxCapaGraph g =
|
||||
e_fold g (fun x id1 id2 a -> (max a x)) 0
|
||||
|
||||
(*Checks that no null or negative edge exists,
|
||||
returns the graph unchanged in this case*)
|
||||
let testGraphSanity g =
|
||||
if e_fold g (fun x id1 id2 a -> x or a < 1) false
|
||||
then
|
||||
failwith "Graph wrongly managed"
|
||||
else
|
||||
g
|
||||
|
|
|
@ -2,4 +2,8 @@ open Graph
|
|||
|
||||
val clone_nodes: 'a graph -> 'b graph
|
||||
val gmap: 'a graph -> ('a -> 'b) -> 'b graph
|
||||
val add_arc: int graph -> id -> id -> int -> int graph
|
||||
val add_arc: int graph -> id -> id -> int -> int graph
|
||||
val sub_arc: int graph -> id -> id -> int -> int graph
|
||||
val clearNull: int graph -> int graph
|
||||
val maxCapaGraph: int graph -> int
|
||||
val testGraphSanity: int graph -> int graph
|
228
test.svg
228
test.svg
|
@ -4,137 +4,123 @@
|
|||
<!-- Generated by graphviz version 2.50.0 (0)
|
||||
-->
|
||||
<!-- Title: finite_state_machine Pages: 1 -->
|
||||
<svg width="476pt" height="197pt"
|
||||
viewBox="0.00 0.00 476.00 197.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 193)">
|
||||
<svg width="468pt" height="180pt"
|
||||
viewBox="0.00 0.00 468.00 180.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 176)">
|
||||
<title>finite_state_machine</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-193 472,-193 472,4 -4,4"/>
|
||||
<!-- 0 -->
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-176 464,-176 464,4 -4,4"/>
|
||||
<!-- 5 -->
|
||||
<g id="node1" class="node">
|
||||
<title>0</title>
|
||||
<title>5</title>
|
||||
<ellipse fill="none" stroke="black" cx="18" cy="-46" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="18" y="-42.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">0</text>
|
||||
</g>
|
||||
<!-- 2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>2</title>
|
||||
<ellipse fill="none" stroke="black" cx="186" cy="-113" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="186" y="-109.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
</g>
|
||||
<!-- 0->2 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>0->2</title>
|
||||
<path fill="none" stroke="black" d="M36.18,-45.33C57.68,-45.14 95.17,-46.99 124,-60 140.42,-67.41 155.71,-80.71 166.87,-92.14"/>
|
||||
<polygon fill="black" stroke="black" points="164.52,-94.75 173.91,-99.65 169.63,-89.96 164.52,-94.75"/>
|
||||
<text text-anchor="middle" x="106" y="-63.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">8</text>
|
||||
</g>
|
||||
<!-- 3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>3</title>
|
||||
<ellipse fill="none" stroke="black" cx="106" cy="-102" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="106" y="-98.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
|
||||
</g>
|
||||
<!-- 0->3 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>0->3</title>
|
||||
<path fill="none" stroke="black" d="M33.59,-55.5C46.81,-64.11 66.51,-76.94 81.88,-86.94"/>
|
||||
<polygon fill="black" stroke="black" points="80.05,-89.93 90.34,-92.45 83.87,-84.06 80.05,-89.93"/>
|
||||
<text text-anchor="middle" x="62" y="-83.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">10</text>
|
||||
<text text-anchor="middle" x="18" y="-42.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
|
||||
</g>
|
||||
<!-- 1 -->
|
||||
<g id="node4" class="node">
|
||||
<g id="node2" class="node">
|
||||
<title>1</title>
|
||||
<ellipse fill="none" stroke="black" cx="362" cy="-100" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="362" y="-96.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 0->1 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>0->1</title>
|
||||
<path fill="none" stroke="black" d="M31.57,-34.15C47.4,-20.52 76.05,0 105,0 105,0 105,0 275,0 313.88,0 339.02,-44 351.54,-73.62"/>
|
||||
<polygon fill="black" stroke="black" points="348.34,-75.05 355.3,-83.04 354.84,-72.45 348.34,-75.05"/>
|
||||
<text text-anchor="middle" x="186" y="-3.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">7</text>
|
||||
</g>
|
||||
<!-- 4 -->
|
||||
<g id="node5" class="node">
|
||||
<title>4</title>
|
||||
<ellipse fill="none" stroke="black" cx="274" cy="-152" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="274" y="-148.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">4</text>
|
||||
</g>
|
||||
<!-- 2->4 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>2->4</title>
|
||||
<path fill="none" stroke="black" d="M202.77,-120.15C215.38,-125.87 233.29,-133.99 247.87,-140.6"/>
|
||||
<polygon fill="black" stroke="black" points="246.77,-143.95 257.33,-144.89 249.66,-137.57 246.77,-143.95"/>
|
||||
<text text-anchor="middle" x="230" y="-138.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">12</text>
|
||||
</g>
|
||||
<!-- 3->2 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>3->2</title>
|
||||
<path fill="none" stroke="black" d="M123.92,-104.39C133.84,-105.79 146.59,-107.58 157.88,-109.18"/>
|
||||
<polygon fill="black" stroke="black" points="157.72,-112.69 168.11,-110.62 158.69,-105.76 157.72,-112.69"/>
|
||||
<text text-anchor="middle" x="146" y="-110.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
</g>
|
||||
<!-- 3->1 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>3->1</title>
|
||||
<path fill="none" stroke="black" d="M123.34,-96.49C135.5,-92.69 152.58,-87.99 168,-86 204.5,-81.29 281.25,-87.27 326,-93 328.73,-93.35 331.57,-93.79 334.39,-94.28"/>
|
||||
<polygon fill="black" stroke="black" points="333.87,-97.74 344.34,-96.17 335.18,-90.86 333.87,-97.74"/>
|
||||
<text text-anchor="middle" x="230" y="-89.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">11</text>
|
||||
</g>
|
||||
<!-- 3->4 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>3->4</title>
|
||||
<path fill="none" stroke="black" d="M121.08,-112.16C127.37,-116.57 134.95,-121.7 142,-126 174.04,-145.53 184.74,-148.58 222,-153 229.74,-153.92 238.18,-154.09 245.93,-153.91"/>
|
||||
<polygon fill="black" stroke="black" points="246.09,-157.41 255.94,-153.5 245.81,-150.42 246.09,-157.41"/>
|
||||
<text text-anchor="middle" x="186" y="-153.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
|
||||
</g>
|
||||
<!-- 1->4 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>1->4</title>
|
||||
<path fill="none" stroke="black" d="M343.94,-96.57C333.53,-95.36 320.29,-95.45 310,-101 299.69,-106.56 291.8,-116.65 286.16,-126.39"/>
|
||||
<polygon fill="black" stroke="black" points="282.94,-124.99 281.42,-135.47 289.15,-128.22 282.94,-124.99"/>
|
||||
<text text-anchor="middle" x="318" y="-104.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 5 -->
|
||||
<g id="node6" class="node">
|
||||
<title>5</title>
|
||||
<ellipse fill="none" stroke="black" cx="450" cy="-153" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="450" y="-149.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
|
||||
</g>
|
||||
<!-- 1->5 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>1->5</title>
|
||||
<path fill="none" stroke="black" d="M380.08,-96.54C390.5,-95.31 403.74,-95.41 414,-101 424.53,-106.74 432.49,-117.18 438.13,-127.21"/>
|
||||
<polygon fill="black" stroke="black" points="435.02,-128.82 442.67,-136.16 441.26,-125.65 435.02,-128.82"/>
|
||||
<text text-anchor="middle" x="406" y="-104.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">21</text>
|
||||
</g>
|
||||
<!-- 4->1 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>4->1</title>
|
||||
<path fill="none" stroke="black" d="M289.98,-142.94C303.05,-135.04 322.24,-123.43 337.38,-114.28"/>
|
||||
<polygon fill="black" stroke="black" points="339.45,-117.12 346.19,-108.95 335.82,-111.13 339.45,-117.12"/>
|
||||
<text text-anchor="middle" x="318" y="-133.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">10</text>
|
||||
</g>
|
||||
<!-- 4->5 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>4->5</title>
|
||||
<path fill="none" stroke="black" d="M292,-152.1C322.15,-152.27 385.21,-152.63 421.57,-152.84"/>
|
||||
<polygon fill="black" stroke="black" points="421.91,-156.34 431.93,-152.9 421.95,-149.34 421.91,-156.34"/>
|
||||
<text text-anchor="middle" x="362" y="-155.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">14</text>
|
||||
<ellipse fill="none" stroke="black" cx="106" cy="-84" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="106" y="-80.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 5->1 -->
|
||||
<g id="edge13" class="edge">
|
||||
<g id="edge1" class="edge">
|
||||
<title>5->1</title>
|
||||
<path fill="none" stroke="black" d="M434.19,-143.87C421.17,-135.85 401.99,-124.03 386.82,-114.68"/>
|
||||
<polygon fill="black" stroke="black" points="388.33,-111.5 377.98,-109.23 384.66,-117.46 388.33,-111.5"/>
|
||||
<text text-anchor="middle" x="406" y="-134.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">10</text>
|
||||
<path fill="none" stroke="black" d="M34.65,-53.24C40.68,-56.01 47.65,-59.18 54,-62 62.27,-65.67 71.33,-69.61 79.49,-73.12"/>
|
||||
<polygon fill="black" stroke="black" points="78.31,-76.43 88.88,-77.15 81.07,-69.99 78.31,-76.43"/>
|
||||
<text text-anchor="middle" x="62" y="-71.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">7</text>
|
||||
</g>
|
||||
<!-- 5->4 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>5->4</title>
|
||||
<path fill="none" stroke="black" d="M433.19,-159.67C427.26,-161.96 420.4,-164.36 414,-166 369.22,-177.47 354.63,-178.03 310,-166 306.78,-165.13 303.45,-164.05 300.19,-162.88"/>
|
||||
<polygon fill="black" stroke="black" points="301.35,-159.58 290.76,-159.22 298.81,-166.1 301.35,-159.58"/>
|
||||
<text text-anchor="middle" x="362" y="-177.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">10</text>
|
||||
<!-- 1->5 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>1->5</title>
|
||||
<path fill="none" stroke="black" d="M96.49,-68.52C90.44,-59.24 81.39,-48.25 70,-43 62.41,-39.5 53.5,-38.98 45.27,-39.73"/>
|
||||
<polygon fill="black" stroke="black" points="44.72,-36.27 35.35,-41.21 45.76,-43.19 44.72,-36.27"/>
|
||||
<text text-anchor="middle" x="62" y="-46.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">14</text>
|
||||
</g>
|
||||
<!-- 0 -->
|
||||
<g id="node3" class="node">
|
||||
<title>0</title>
|
||||
<ellipse fill="none" stroke="black" cx="186" cy="-97" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="186" y="-93.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">0</text>
|
||||
</g>
|
||||
<!-- 1->0 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>1->0</title>
|
||||
<path fill="none" stroke="black" d="M123.92,-86.82C133.94,-88.49 146.86,-90.64 158.23,-92.54"/>
|
||||
<polygon fill="black" stroke="black" points="157.67,-95.99 168.11,-94.18 158.82,-89.09 157.67,-95.99"/>
|
||||
<text text-anchor="middle" x="146" y="-93.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">7</text>
|
||||
</g>
|
||||
<!-- 4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>4</title>
|
||||
<ellipse fill="none" stroke="black" cx="442" cy="-71" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="442" y="-67.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">4</text>
|
||||
</g>
|
||||
<!-- 1->4 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>1->4</title>
|
||||
<path fill="none" stroke="black" d="M120.41,-72.8C135.23,-61.6 160.3,-46 185,-46 185,-46 185,-46 355,-46 376.12,-46 399.03,-53.04 415.9,-59.64"/>
|
||||
<polygon fill="black" stroke="black" points="414.96,-63.05 425.54,-63.63 417.64,-56.58 414.96,-63.05"/>
|
||||
<text text-anchor="middle" x="274" y="-49.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 3 -->
|
||||
<g id="node5" class="node">
|
||||
<title>3</title>
|
||||
<ellipse fill="none" stroke="black" cx="274" cy="-154" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="274" y="-150.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
|
||||
</g>
|
||||
<!-- 0->3 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>0->3</title>
|
||||
<path fill="none" stroke="black" d="M201.59,-106.67C214.89,-115.48 234.75,-128.65 250.16,-138.86"/>
|
||||
<polygon fill="black" stroke="black" points="248.36,-141.87 258.63,-144.47 252.22,-136.03 248.36,-141.87"/>
|
||||
<text text-anchor="middle" x="230" y="-133.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">10</text>
|
||||
</g>
|
||||
<!-- 2 -->
|
||||
<g id="node6" class="node">
|
||||
<title>2</title>
|
||||
<ellipse fill="none" stroke="black" cx="354" cy="-97" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="354" y="-93.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
</g>
|
||||
<!-- 0->2 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>0->2</title>
|
||||
<path fill="none" stroke="black" d="M204.14,-97C232.84,-97 290.87,-97 325.39,-97"/>
|
||||
<polygon fill="black" stroke="black" points="325.7,-100.5 335.7,-97 325.7,-93.5 325.7,-100.5"/>
|
||||
<text text-anchor="middle" x="274" y="-100.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">8</text>
|
||||
</g>
|
||||
<!-- 4->5 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>4->5</title>
|
||||
<path fill="none" stroke="black" d="M431.98,-55.94C418.21,-35.1 389.85,0 355,0 105,0 105,0 105,0 80.34,0 55.91,-14.88 39.43,-27.72"/>
|
||||
<polygon fill="black" stroke="black" points="37.09,-25.11 31.57,-34.15 41.52,-30.52 37.09,-25.11"/>
|
||||
<text text-anchor="middle" x="230" y="-3.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">14</text>
|
||||
</g>
|
||||
<!-- 3->1 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>3->1</title>
|
||||
<path fill="none" stroke="black" d="M255.79,-152.31C245.8,-151.07 233.05,-149.07 222,-146 184.26,-135.5 174.94,-130.2 142,-109 137.82,-106.31 133.46,-103.33 129.28,-100.4"/>
|
||||
<polygon fill="black" stroke="black" points="131.26,-97.51 121.09,-94.54 127.18,-103.2 131.26,-97.51"/>
|
||||
<text text-anchor="middle" x="186" y="-143.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">11</text>
|
||||
</g>
|
||||
<!-- 3->4 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>3->4</title>
|
||||
<path fill="none" stroke="black" d="M291.93,-151.66C299.93,-150.36 309.55,-148.48 318,-146 359.4,-133.85 371.4,-130.78 406,-105 411.44,-100.95 416.9,-96.11 421.84,-91.36"/>
|
||||
<polygon fill="black" stroke="black" points="424.48,-93.66 429.08,-84.12 419.54,-88.71 424.48,-93.66"/>
|
||||
<text text-anchor="middle" x="354" y="-143.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
|
||||
</g>
|
||||
<!-- 3->2 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>3->2</title>
|
||||
<path fill="none" stroke="black" d="M288.94,-143.81C300.52,-135.35 317.2,-123.16 330.64,-113.34"/>
|
||||
<polygon fill="black" stroke="black" points="332.9,-116.02 338.91,-107.29 328.77,-110.37 332.9,-116.02"/>
|
||||
<text text-anchor="middle" x="314" y="-130.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
</g>
|
||||
<!-- 2->4 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>2->4</title>
|
||||
<path fill="none" stroke="black" d="M371.58,-91.99C383.84,-88.28 400.76,-83.16 414.84,-78.91"/>
|
||||
<polygon fill="black" stroke="black" points="415.91,-82.24 424.47,-76 413.88,-75.54 415.91,-82.24"/>
|
||||
<text text-anchor="middle" x="398" y="-89.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">12</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 6.6 KiB |
Loading…
Reference in a new issue