Compare commits
2 commits
97f80d194d
...
9ef1bef8c7
Author | SHA1 | Date | |
---|---|---|---|
|
9ef1bef8c7 | ||
|
33d1c3a80b |
18 changed files with 338 additions and 267 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"
|
||||
"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 dependencies ml (%=src/ftest )": "\022\160\161\193C\022\254\133j\146\196\000-~(\161"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/gfile )": "\236O\148Y\157m\028\183\166?\231a\231\187u\132"
|
||||
"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 dependencies mli (%=src/display )": "+\178\012\248)#\197\218\144\1935\220\193\190\212\183"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ftest.ml": "\204\235D\031\004O\173\136R\148y\171\207]&g"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/fordFulkerson.ml": "qra\159@\212u\200\192\132V9-\127\2022"
|
||||
"Rule: ocaml: mli -> cmi (%=src/graph )": ")2\159\205\136\031\251\145\0263\01878\001\b\134"
|
||||
"Rule: ocaml: mli -> cmi (%=src/display )": "UAU\224\168o\2429OM\253\194i'\218N"
|
||||
"Rule: ocaml: mli -> cmi (%=src/display )": "\020\015~%\135\196\153\152}\154\244v\253$N\164"
|
||||
"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"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/fordFulkerson )": "\158P\156*\236\171\2120>1Z\179\149\240\201."
|
||||
"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: mli -> cmi (%=src/tools )": "\239.\206\1667\139\246~\227$\235l\012\210\208;"
|
||||
"Rule: ocaml: cmx* & o* -> native (%=src/ftest )": "O\\\249\200\251,\018\028\206cr\144\204\180\181\214"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/ftest )": "8u\155\140\162\183(4F\239\206\198\150\176\162\227"
|
||||
"Rule: ocaml: mli -> cmi (%=src/fordFulkerson )": "\206\016hD\235I\220+\252\2129\195G\179\151g"
|
||||
"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-/"
|
||||
"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/tools.ml": "~[\186\208\199\129\006\030\012\196\245\183'\163\211&"
|
||||
"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"
|
||||
"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"
|
||||
"Rule: ocaml: ml -> cmo & cmi (%=src/ftest )": "aTb\021\214\239K\186C,\231\n\012T'\136"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/fordFulkerson.mli": "_;(\155\176\"\225\011\230\191\031M\168\250\219\170"
|
||||
"Rule: ocaml dependencies mli (%=src/fordFulkerson )": "\022\200\166Dz0\003\233z\198y\144S\162\2034"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/display.mli": "\129\140,\157Z\158D\177\144\227\139t\029Y\253\019"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/tools )": "z\158\235\155v\003\214Q\150\t\224\"\026\246(\158"
|
||||
"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/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@"
|
||||
"Rule: ocaml dependencies ml (%=src/fordFulkerson )": "P\128\241\162\216\228\240\163<\168\241\235\129v\231\185"
|
||||
"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"
|
||||
"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 mli (%=src/tools )": "\151\181\0055\199\150&\017\021_\215\015\215\018\027+"
|
||||
"Rule: ocaml dependencies ml (%=src/gfile )": "U4(<\t=rQ\240c\0278\231N\1949"
|
||||
"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"
|
||||
|
|
43
_build/_log
43
_build/_log
|
@ -1,8 +1,8 @@
|
|||
### 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
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/display.mli > src/display.mli.depends
|
||||
# Target: src/gfile.mli.depends, tags: { extension:mli, file:src/gfile.mli, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/gfile.mli > src/gfile.mli.depends # cached
|
||||
# Target: src/graph.mli.depends, tags: { extension:mli, file:src/graph.mli, include, ocaml, ocamldep, quiet, traverse }
|
||||
|
@ -11,40 +11,23 @@
|
|||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/graph.cmi src/graph.mli # cached
|
||||
# Target: src/gfile.cmi, tags: { byte, compile, extension:mli, file:src/gfile.mli, include, interf, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/gfile.cmi src/gfile.mli # cached
|
||||
# Target: src/display.cmi, tags: { byte, compile, extension:mli, file:src/display.mli, include, interf, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/display.cmi src/display.mli # cached
|
||||
# Target: src/fordFulkerson.mli.depends, tags: { extension:mli, file:src/fordFulkerson.mli, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/fordFulkerson.mli > src/fordFulkerson.mli.depends # cached
|
||||
# Target: src/display.cmi, tags: { byte, compile, extension:mli, file:src/display.mli, include, interf, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/display.cmi src/display.mli
|
||||
# Target: src/tools.mli.depends, tags: { extension:mli, file:src/tools.mli, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/tools.mli > src/tools.mli.depends # cached
|
||||
# Target: src/tools.cmi, tags: { byte, compile, extension:mli, file:src/tools.mli, include, interf, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/tools.cmi src/tools.mli # cached
|
||||
# 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
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/fordFulkerson.cmi src/fordFulkerson.mli
|
||||
# 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
|
||||
# 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 }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/gfile.ml > src/gfile.ml.depends # cached
|
||||
# Target: src/graph.ml.depends, tags: { extension:ml, file:src/graph.ml, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/graph.ml > src/graph.ml.depends # cached
|
||||
# Target: src/graph.cmx, tags: { compile, extension:cmx, extension:ml, file:src/graph.cmx, file:src/graph.ml, implem, include, native, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/graph.cmx src/graph.ml # cached
|
||||
# Target: src/gfile.cmx, tags: { compile, extension:cmx, extension:ml, file:src/gfile.cmx, file:src/gfile.ml, implem, include, native, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/gfile.cmx src/gfile.ml # cached
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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.
|
||||
+ /home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/ftest.cmo src/ftest.ml
|
||||
File "src/ftest.ml", line 40, characters 43-50:
|
||||
40 | let () = exportDifference graphFinal outfile in
|
||||
^^^^^^^
|
||||
Error: This expression has type string but an expression was expected of type
|
||||
int Graph.graph
|
||||
Command exited with code 2.
|
||||
# Compilation unsuccessful.
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,54 +1,45 @@
|
|||
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 graphSolved = main graphInt 0 5 in
|
||||
|
||||
let graphFinal = gmap graphBis string_of_int in
|
||||
let graphFinal = gmap graphSolved string_of_int in
|
||||
|
||||
let () = export graphFinal outfile in
|
||||
()
|
||||
(*Rewrite the graph that has been read.
|
||||
let () = write_file outfile graphDot in
|
||||
()
|
||||
*)
|
||||
let () = exportDifference graphFinal outfile in
|
||||
()
|
||||
(* Rewrite the graph that has been read.
|
||||
let () = write_file outfile graphDot in
|
||||
()
|
||||
*)
|
|
@ -1 +1 @@
|
|||
src/ftest.ml: Array Display FordFulkerson Gfile List Printf Sys Tools
|
||||
src/ftest.ml: Array Display FordFulkerson Gfile Printf Sys Tools
|
||||
|
|
Binary file not shown.
Binary file not shown.
25
outfile
25
outfile
|
@ -12,17 +12,18 @@
|
|||
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 = "17"];
|
||||
5 -> 4 [label = "8"];
|
||||
1 -> 5 [label = "4"];
|
||||
1 -> 3 [label = "10"];
|
||||
1 -> 0 [label = "7"];
|
||||
1 -> 4 [label = "1"];
|
||||
1 -> 5 [label = "21"];
|
||||
4 -> 5 [label = "14"];
|
||||
4 -> 1 [label = "10"];
|
||||
5 -> 4 [label = "10"];
|
||||
5 -> 1 [label = "10"];
|
||||
3 -> 1 [label = "1"];
|
||||
3 -> 0 [label = "10"];
|
||||
3 -> 2 [label = "2"];
|
||||
3 -> 4 [label = "5"];
|
||||
2 -> 0 [label = "8"];
|
||||
2 -> 4 [label = "4"];
|
||||
4 -> 2 [label = "8"];
|
||||
4 -> 5 [label = "6"];
|
||||
}
|
|
@ -2,7 +2,7 @@ open Graph
|
|||
open Printf
|
||||
open Gfile
|
||||
|
||||
let export g path =
|
||||
let exportBase g path =
|
||||
let str = e_fold
|
||||
g
|
||||
(fun x id1 id2 label -> x ^ "\n " ^ (string_of_int id1) ^ " -> " ^ (string_of_int id2) ^ " [label = \"" ^ label ^"\"];" )
|
||||
|
@ -28,3 +28,38 @@ let export g path =
|
|||
fprintf ff "%s%!" totalStr;
|
||||
close_out ff;
|
||||
()
|
||||
|
||||
|
||||
|
||||
let exportDifference gStart gEnd path =
|
||||
let findUsedCapacity gEnd id1 id2 capaStart =
|
||||
let newEdge = find_arc gEnd id1 id2 in
|
||||
match newEdge with
|
||||
| None -> capaStart
|
||||
| Some a -> capaStart - a
|
||||
in
|
||||
let str = e_fold
|
||||
gStart
|
||||
(fun x id1 id2 label -> x ^ "\n " ^ (string_of_int id1) ^ " -> " ^ (string_of_int id2) ^ " [label = \"" ^ string_of_int (findUsedCapacity gEnd id1 id2 (int_of_string label)) ^ "/" ^ label ^"\"];" )
|
||||
""
|
||||
in
|
||||
|
||||
let startStr =
|
||||
"
|
||||
digraph finite_state_machine {\n
|
||||
fontname=\"Helvetica,Arial,sans-serif\"\n
|
||||
node [fontname=\"Helvetica,Arial,sans-serif\"]\n
|
||||
edge [fontname=\"Helvetica,Arial,sans-serif\"]\n
|
||||
rankdir=LR;\n
|
||||
node [shape = circle];\n
|
||||
"
|
||||
in
|
||||
|
||||
let finishStr = "\n}" in
|
||||
|
||||
let totalStr = startStr ^ str ^ finishStr in
|
||||
|
||||
let ff = open_out path in
|
||||
fprintf ff "%s%!" totalStr;
|
||||
close_out ff;
|
||||
()
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
open Graph
|
||||
open Gfile
|
||||
val export: string graph -> path -> unit
|
||||
val exportBase: string graph -> path -> unit
|
||||
val exportDifference: string graph -> int graph -> path -> unit
|
|
@ -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
|
||||
| Some (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
|
||||
|
||||
(*
|
||||
*)
|
||||
val main: int graph -> id -> id -> int graph
|
83
src/ftest.ml
83
src/ftest.ml
|
@ -1,54 +1,49 @@
|
|||
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 graphSolved = main graphInt 0 5 in
|
||||
|
||||
let graphFinal = gmap graphBis string_of_int in
|
||||
let graphFinal = gmap graphSolved string_of_int in
|
||||
|
||||
let () = export graphFinal outfile in
|
||||
()
|
||||
(*Rewrite the graph that has been read.
|
||||
let () = write_file outfile graphDot in
|
||||
()
|
||||
*)
|
||||
|
||||
(*TODO : gérer les strings / non-strings ==> tout display à partir de type INT ça sera plus simple *)
|
||||
let () = exportDifference 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
|
225
test.svg
225
test.svg
|
@ -4,137 +4,144 @@
|
|||
<!-- 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="221pt"
|
||||
viewBox="0.00 0.00 468.00 221.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 217)">
|
||||
<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,-217 464,-217 464,4 -4,4"/>
|
||||
<!-- 5 -->
|
||||
<g id="node1" class="node">
|
||||
<title>0</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>
|
||||
<title>5</title>
|
||||
<ellipse fill="none" stroke="black" cx="18" cy="-18" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="18" y="-14.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>
|
||||
<ellipse fill="none" stroke="black" cx="106" cy="-78" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="106" y="-74.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>
|
||||
<!-- 5->1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>5->1</title>
|
||||
<path fill="none" stroke="black" d="M29.99,-31.49C36.44,-38.8 45.06,-47.62 54,-54 61.67,-59.47 70.79,-64.23 79.18,-68.02"/>
|
||||
<polygon fill="black" stroke="black" points="77.99,-71.32 88.56,-72.03 80.74,-64.89 77.99,-71.32"/>
|
||||
<text text-anchor="middle" x="62" y="-66.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">17</text>
|
||||
</g>
|
||||
<!-- 4 -->
|
||||
<g id="node5" class="node">
|
||||
<g id="node3" 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>
|
||||
<ellipse fill="none" stroke="black" cx="274" cy="-43" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="274" y="-39.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>
|
||||
<!-- 5->4 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>5->4</title>
|
||||
<path fill="none" stroke="black" d="M36.01,-19.23C45.93,-19.97 58.68,-20.97 70,-22 133.06,-27.73 206.99,-35.69 245.9,-39.98"/>
|
||||
<polygon fill="black" stroke="black" points="245.58,-43.47 255.9,-41.09 246.35,-36.51 245.58,-43.47"/>
|
||||
<text text-anchor="middle" x="150" y="-33.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">8</text>
|
||||
</g>
|
||||
<!-- 3->2 -->
|
||||
<!-- 1->5 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>1->5</title>
|
||||
<path fill="none" stroke="black" d="M95.96,-63.01C89.7,-53.77 80.61,-42.33 70,-35 62.87,-30.08 54.21,-26.49 46.06,-23.91"/>
|
||||
<polygon fill="black" stroke="black" points="46.74,-20.47 36.17,-21.17 44.87,-27.22 46.74,-20.47"/>
|
||||
<text text-anchor="middle" x="62" y="-38.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">4</text>
|
||||
</g>
|
||||
<!-- 1->4 -->
|
||||
<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>
|
||||
<title>1->4</title>
|
||||
<path fill="none" stroke="black" d="M123.83,-74.45C152.66,-68.37 211.73,-55.92 246.26,-48.64"/>
|
||||
<polygon fill="black" stroke="black" points="247.06,-52.05 256.12,-46.56 245.62,-45.2 247.06,-52.05"/>
|
||||
<text text-anchor="middle" x="194" y="-66.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 3 -->
|
||||
<g id="node4" class="node">
|
||||
<title>3</title>
|
||||
<ellipse fill="none" stroke="black" cx="194" cy="-109" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="194" y="-105.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
|
||||
</g>
|
||||
<!-- 1->3 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>1->3</title>
|
||||
<path fill="none" stroke="black" d="M124.08,-75.98C134.26,-75.43 147.24,-75.88 158,-80 163.53,-82.12 168.82,-85.48 173.54,-89.18"/>
|
||||
<polygon fill="black" stroke="black" points="171.52,-92.06 181.35,-96.01 176.12,-86.79 171.52,-92.06"/>
|
||||
<text text-anchor="middle" x="150" y="-83.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">10</text>
|
||||
</g>
|
||||
<!-- 0 -->
|
||||
<g id="node5" class="node">
|
||||
<title>0</title>
|
||||
<ellipse fill="none" stroke="black" cx="442" cy="-152" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="442" y="-148.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">0</text>
|
||||
</g>
|
||||
<!-- 1->0 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>1->0</title>
|
||||
<path fill="none" stroke="black" d="M110.87,-95.45C119.4,-128.73 143.15,-198 193,-198 193,-198 193,-198 363,-198 385.28,-198 406.81,-183.9 421.58,-171.31"/>
|
||||
<polygon fill="black" stroke="black" points="423.97,-173.87 429.05,-164.57 419.28,-168.67 423.97,-173.87"/>
|
||||
<text text-anchor="middle" x="274" y="-201.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">7</text>
|
||||
</g>
|
||||
<!-- 4->5 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>4->5</title>
|
||||
<path fill="none" stroke="black" d="M256.93,-36.84C234.98,-28.78 194.2,-15.09 158,-10 119.33,-4.56 74.11,-9.17 46.01,-13.32"/>
|
||||
<polygon fill="black" stroke="black" points="45.12,-9.91 35.78,-14.92 46.2,-16.83 45.12,-9.91"/>
|
||||
<text text-anchor="middle" x="150" y="-13.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">6</text>
|
||||
</g>
|
||||
<!-- 2 -->
|
||||
<g id="node6" class="node">
|
||||
<title>2</title>
|
||||
<ellipse fill="none" stroke="black" cx="362" cy="-93" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="362" y="-89.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
</g>
|
||||
<!-- 4->2 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>4->2</title>
|
||||
<path fill="none" stroke="black" d="M289.98,-51.71C303.05,-59.31 322.24,-70.47 337.38,-79.27"/>
|
||||
<polygon fill="black" stroke="black" points="335.79,-82.39 346.19,-84.39 339.31,-76.34 335.79,-82.39"/>
|
||||
<text text-anchor="middle" x="318" y="-75.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">8</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>
|
||||
<path fill="none" stroke="black" d="M176.22,-105.22C166.15,-102.75 153.17,-99.21 142,-95 138.61,-93.72 135.1,-92.24 131.68,-90.68"/>
|
||||
<polygon fill="black" stroke="black" points="132.94,-87.41 122.41,-86.24 129.92,-93.72 132.94,-87.41"/>
|
||||
<text text-anchor="middle" x="150" y="-103.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</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>
|
||||
<title>3->4</title>
|
||||
<path fill="none" stroke="black" d="M208.23,-97.8C220.22,-87.66 238.09,-72.54 252.03,-60.75"/>
|
||||
<polygon fill="black" stroke="black" points="254.33,-63.38 259.7,-54.25 249.81,-58.04 254.33,-63.38"/>
|
||||
<text text-anchor="middle" x="234" y="-80.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
|
||||
</g>
|
||||
<!-- 5->1 -->
|
||||
<g id="edge13" 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>
|
||||
<!-- 3->0 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>3->0</title>
|
||||
<path fill="none" stroke="black" d="M211.28,-114.1C217.14,-115.82 223.83,-117.64 230,-119 295.34,-133.39 373.41,-143.89 413.79,-148.83"/>
|
||||
<polygon fill="black" stroke="black" points="413.56,-152.33 423.91,-150.05 414.4,-145.38 413.56,-152.33"/>
|
||||
<text text-anchor="middle" x="318" y="-139.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">10</text>
|
||||
</g>
|
||||
<!-- 5->4 -->
|
||||
<!-- 3->2 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>3->2</title>
|
||||
<path fill="none" stroke="black" d="M212.14,-107.35C240.84,-104.58 298.87,-98.99 333.39,-95.66"/>
|
||||
<polygon fill="black" stroke="black" points="334.09,-99.11 343.7,-94.67 333.42,-92.14 334.09,-99.11"/>
|
||||
<text text-anchor="middle" x="274" y="-106.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
</g>
|
||||
<!-- 2->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>
|
||||
<title>2->4</title>
|
||||
<path fill="none" stroke="black" d="M354.62,-76.39C349.05,-64.44 339.68,-49.2 326,-42 318.62,-38.11 309.76,-37.22 301.51,-37.65"/>
|
||||
<polygon fill="black" stroke="black" points="301.1,-34.17 291.55,-38.77 301.88,-41.13 301.1,-34.17"/>
|
||||
<text text-anchor="middle" x="318" y="-45.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">4</text>
|
||||
</g>
|
||||
<!-- 2->0 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>2->0</title>
|
||||
<path fill="none" stroke="black" d="M377.55,-102.71C385.98,-108.44 396.73,-115.94 406,-123 410.63,-126.52 415.5,-130.43 420.08,-134.19"/>
|
||||
<polygon fill="black" stroke="black" points="417.99,-137.01 427.91,-140.72 422.47,-131.63 417.99,-137.01"/>
|
||||
<text text-anchor="middle" x="402" y="-126.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">8</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.8 KiB |
Loading…
Reference in a new issue