added working and tested path-finding option

This commit is contained in:
rlacroix 2022-11-30 10:45:54 +01:00
parent 052d75604e
commit 97f80d194d
16 changed files with 247 additions and 124 deletions

View file

@ -14,7 +14,12 @@ demo: build
./ftest.native graphs/graph1 1 2 outfile
@echo "\n==== RESULT ==== (content of outfile) \n"
@cat outfile
dot -Tsvg outfile > test.svg
clean:
-rm -rf _build/
-rm ftest.native
test: build
./ftest.native graphs/graph1 1 2 outfile
dot -Tsvg outfile > test.svg

View file

@ -1,30 +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 )": "\200\209\169o\127\030m\142\170\028>\188\236\007\1540"
"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"
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ftest.ml": "5P\231\174\024\150\154\226\128U\190\156\229\r\211\229"
"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"
"Rule: ocaml: mli -> cmi (%=src/display )": "UAU\224\168o\2429OM\253\194i'\218N"
"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"
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/tools.ml": "\020m\226\134\024>H\2363\159\169\203\168\222m\205"
"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 )": "\207\160\000\019\137\232\202\016\241\146\200\215\025\236Ne"
"Rule: ocaml: ml & cmi -> cmx & o (%=src/ftest )": "\191^\023\176^\212\131yAC^\234\229N<\168"
"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/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 )": "\233\000A\192\r\246.I\244p]yG\219\212{"
"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&"
"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 )": "#9\227\199\183\221bM\251\240\246z\153\003\023\141"
"Rule: ocaml: ml & cmi -> cmx & o (%=src/tools )": "\233h{v\154Q\000\2511\168h\241\181\020\153\169"
"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"
"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: 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 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"

View file

@ -1,6 +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 # cached
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/ftest.ml > src/ftest.ml.depends
# 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 }
/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 }
@ -9,12 +11,20 @@
/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/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
# 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 # cached
/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 }
@ -23,12 +33,18 @@
/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 # cached
/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/tools.cmx src/ftest.cmx -o src/ftest.native # cached
/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.

View file

@ -1,9 +1,12 @@
open Gfile
open Tools
open Display
open FordFulkerson
let () =
(* Check the number of command-line arguments *)
(* Check the number of command-line arguments
*)
if Array.length Sys.argv <> 5 then
begin
Printf.printf
@ -15,12 +18,11 @@ let () =
exit 0
end ;
(* Arguments are : infile(1) source-id(2) sink-id(3) outfile(4) *)
let infile = Sys.argv.(1)
and outfile = Sys.argv.(4)
(* 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)
@ -31,12 +33,22 @@ let () =
let graphInt = gmap graph int_of_string in
let graphBis = add_arc graphInt 0 3 5 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
match (way graphBis 5 0) with
| None -> failwith "No way"
| Some (x,y) -> Printf.printf "%d \n" y;
let () = List.iter (Printf.printf "%d, ") x in
(); Printf.printf "\n";
let graphFinal = gmap graphBis string_of_int in
(* Rewrite the graph that has been read. *)
let () = write_file outfile graphFinal in
let () = export graphFinal outfile in
()
(*Rewrite the graph that has been read.
let () = write_file outfile graphDot in
()
*)

View file

@ -1 +1 @@
src/ftest.ml: Array Gfile Printf Sys Tools
src/ftest.ml: Array Display FordFulkerson Gfile List Printf Sys Tools

Binary file not shown.

Binary file not shown.

View file

@ -12,6 +12,9 @@
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"];
@ -19,7 +22,7 @@
1 -> 4 [label = "1"];
1 -> 5 [label = "21"];
4 -> 5 [label = "14"];
0 -> 2 [label = "8"];
0 -> 1 [label = "7"];
0 -> 3 [label = "15"];
4 -> 1 [label = "10"];
5 -> 4 [label = "10"];
5 -> 1 [label = "10"];
}

34
src/fordFulkerson.ml Normal file
View file

@ -0,0 +1,34 @@
open Graph
open Tools
open Display
open List
open Printf
let rec way g n1 n2 =
let rec inner g (xs, capa) visited n1 n2 = match n1, n2 with
| a, b when a = n2 -> Some ((List.rev xs), capa)
| a, b ->
let findNext x (arcId, arcCapa) = match x with
| None -> inner g (arcId :: xs, (min capa arcCapa)) (arcId :: visited) arcId n2
| Some a -> Some a
in
let out = List.filter
(fun x -> not (List.exists
(fun y -> (fst x) = y) visited))
(out_arcs g a) in
if List.length out > 0
then
fold_left findNext None out
else
None
in
if n1 == n2
then None
else inner g ([n1], 99999) [] n1 n2

9
src/fordFulkerson.mli Normal file
View file

@ -0,0 +1,9 @@
open Graph
open Tools
open Display
val way: int graph -> id -> id -> (id list * int) option
(*
*)

View file

@ -1,10 +1,12 @@
open Gfile
open Tools
open Display
open FordFulkerson
let () =
(* Check the number of command-line arguments *)
(* Check the number of command-line arguments
*)
if Array.length Sys.argv <> 5 then
begin
Printf.printf
@ -16,12 +18,11 @@ let () =
exit 0
end ;
(* Arguments are : infile(1) source-id(2) sink-id(3) outfile(4) *)
let infile = Sys.argv.(1)
and outfile = Sys.argv.(4)
(* 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)
@ -32,14 +33,22 @@ let () =
let graphInt = gmap graph int_of_string in
let graphBis = add_arc graphInt 0 3 5 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
match (way graphBis 5 0) with
| None -> failwith "No way"
| Some (x,y) -> Printf.printf "%d \n" y;
let () = List.iter (Printf.printf "%d, ") x in
(); Printf.printf "\n";
let graphFinal = gmap graphBis string_of_int in
let () = export graphFinal outfile in
()
(* Rewrite the graph that has been read.
()
(*Rewrite the graph that has been read.
let () = write_file outfile graphDot in
() *)
()
*)

View file

@ -14,3 +14,5 @@ let add_arc g id1 id2 n =
(* 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*)

203
test.svg
View file

@ -4,116 +4,137 @@
<!-- Generated by graphviz version 2.50.0 (0)
-->
<!-- Title: finite_state_machine Pages: 1 -->
<svg width="396pt" height="154pt"
viewBox="0.00 0.00 396.00 154.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 150)">
<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)">
<title>finite_state_machine</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-150 392,-150 392,4 -4,4"/>
<!-- 2 -->
<polygon fill="white" stroke="transparent" points="-4,4 -4,-193 472,-193 472,4 -4,4"/>
<!-- 0 -->
<g id="node1" class="node">
<title>2</title>
<ellipse fill="none" stroke="black" cx="194" cy="-128" rx="18" ry="18"/>
<text text-anchor="middle" x="194" y="-124.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
<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>
<!-- 4 -->
<!-- 2 -->
<g id="node2" class="node">
<title>4</title>
<ellipse fill="none" stroke="black" cx="282" cy="-71" rx="18" ry="18"/>
<text text-anchor="middle" x="282" y="-67.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">4</text>
<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>
<!-- 2&#45;&gt;4 -->
<!-- 0&#45;&gt;2 -->
<g id="edge1" class="edge">
<title>2&#45;&gt;4</title>
<path fill="none" stroke="black" d="M209.59,-118.33C222.89,-109.52 242.75,-96.35 258.16,-86.14"/>
<polygon fill="black" stroke="black" points="260.22,-88.97 266.63,-80.53 256.36,-83.13 260.22,-88.97"/>
<text text-anchor="middle" x="238" y="-107.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">12</text>
</g>
<!-- 5 -->
<g id="node5" class="node">
<title>5</title>
<ellipse fill="none" stroke="black" cx="370" cy="-30" rx="18" ry="18"/>
<text text-anchor="middle" x="370" y="-26.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
</g>
<!-- 4&#45;&gt;5 -->
<g id="edge7" class="edge">
<title>4&#45;&gt;5</title>
<path fill="none" stroke="black" d="M298.77,-63.48C311.5,-57.41 329.64,-48.77 344.29,-41.78"/>
<polygon fill="black" stroke="black" points="345.81,-44.94 353.33,-37.47 342.79,-38.62 345.81,-44.94"/>
<text text-anchor="middle" x="326" y="-57.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">14</text>
<title>0&#45;&gt;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="-77" rx="18" ry="18"/>
<text text-anchor="middle" x="106" y="-73.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
<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>
<!-- 3&#45;&gt;2 -->
<g id="edge3" class="edge">
<title>3&#45;&gt;2</title>
<path fill="none" stroke="black" d="M121.98,-85.88C135.05,-93.64 154.24,-105.02 169.38,-113.99"/>
<polygon fill="black" stroke="black" points="167.81,-117.13 178.19,-119.22 171.38,-111.11 167.81,-117.13"/>
<text text-anchor="middle" x="150" y="-110.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
</g>
<!-- 3&#45;&gt;4 -->
<!-- 0&#45;&gt;3 -->
<g id="edge2" class="edge">
<title>3&#45;&gt;4</title>
<path fill="none" stroke="black" d="M124,-76.41C154.15,-75.37 217.21,-73.2 253.57,-71.95"/>
<polygon fill="black" stroke="black" points="254.06,-75.43 263.93,-71.59 253.82,-68.44 254.06,-75.43"/>
<text text-anchor="middle" x="194" y="-77.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
<title>0&#45;&gt;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>
</g>
<!-- 1 -->
<g id="node4" class="node">
<title>1</title>
<ellipse fill="none" stroke="black" cx="194" cy="-18" rx="18" ry="18"/>
<text text-anchor="middle" x="194" y="-14.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
</g>
<!-- 3&#45;&gt;1 -->
<g id="edge4" class="edge">
<title>3&#45;&gt;1</title>
<path fill="none" stroke="black" d="M119.9,-65.47C126.35,-59.93 134.38,-53.35 142,-48 150.52,-42.02 160.29,-36.07 168.98,-31.07"/>
<polygon fill="black" stroke="black" points="170.89,-34.02 177.88,-26.06 167.45,-27.92 170.89,-34.02"/>
<text text-anchor="middle" x="150" y="-51.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">11</text>
</g>
<!-- 1&#45;&gt;4 -->
<g id="edge5" class="edge">
<title>1&#45;&gt;4</title>
<path fill="none" stroke="black" d="M210.29,-26.73C220.49,-32.61 234.14,-40.62 246,-48 249.93,-50.44 254.06,-53.09 258.06,-55.69"/>
<polygon fill="black" stroke="black" points="256.18,-58.65 266.46,-61.21 260.03,-52.8 256.18,-58.65"/>
<text text-anchor="middle" x="238" y="-51.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
</g>
<!-- 1&#45;&gt;5 -->
<g id="edge6" class="edge">
<title>1&#45;&gt;5</title>
<path fill="none" stroke="black" d="M212,-19.17C242.15,-21.25 305.21,-25.6 341.57,-28.11"/>
<polygon fill="black" stroke="black" points="341.71,-31.63 351.93,-28.82 342.19,-24.64 341.71,-31.63"/>
<text text-anchor="middle" x="282" y="-28.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">21</text>
</g>
<!-- 0 -->
<g id="node6" class="node">
<title>0</title>
<ellipse fill="none" stroke="black" cx="18" cy="-77" rx="18" ry="18"/>
<text text-anchor="middle" x="18" y="-73.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">0</text>
</g>
<!-- 0&#45;&gt;2 -->
<g id="edge8" class="edge">
<title>0&#45;&gt;2</title>
<path fill="none" stroke="black" d="M34.05,-85.9C40.13,-89.3 47.29,-93.06 54,-96 91.85,-112.58 101.38,-118.44 142,-126 149.67,-127.43 158.09,-128.11 165.84,-128.39"/>
<polygon fill="black" stroke="black" points="165.81,-131.89 175.86,-128.56 165.92,-124.89 165.81,-131.89"/>
<text text-anchor="middle" x="106" y="-125.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">8</text>
</g>
<!-- 0&#45;&gt;3 -->
<g id="edge10" class="edge">
<title>0&#45;&gt;3</title>
<path fill="none" stroke="black" d="M36.4,-77C48.25,-77 64.18,-77 77.71,-77"/>
<polygon fill="black" stroke="black" points="77.92,-80.5 87.92,-77 77.92,-73.5 77.92,-80.5"/>
<text text-anchor="middle" x="62" y="-80.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">15</text>
<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&#45;&gt;1 -->
<g id="edge9" class="edge">
<g id="edge3" class="edge">
<title>0&#45;&gt;1</title>
<path fill="none" stroke="black" d="M32.71,-66.44C46.07,-56.69 67.35,-42.63 88,-35 113.34,-25.64 144.01,-21.43 165.64,-19.54"/>
<polygon fill="black" stroke="black" points="166.05,-23.01 175.76,-18.76 165.52,-16.03 166.05,-23.01"/>
<text text-anchor="middle" x="106" y="-38.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">7</text>
<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&#45;&gt;4 -->
<g id="edge4" class="edge">
<title>2&#45;&gt;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&#45;&gt;2 -->
<g id="edge6" class="edge">
<title>3&#45;&gt;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&#45;&gt;1 -->
<g id="edge7" class="edge">
<title>3&#45;&gt;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&#45;&gt;4 -->
<g id="edge5" class="edge">
<title>3&#45;&gt;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&#45;&gt;4 -->
<g id="edge8" class="edge">
<title>1&#45;&gt;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&#45;&gt;5 -->
<g id="edge9" class="edge">
<title>1&#45;&gt;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&#45;&gt;1 -->
<g id="edge11" class="edge">
<title>4&#45;&gt;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&#45;&gt;5 -->
<g id="edge10" class="edge">
<title>4&#45;&gt;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>
</g>
<!-- 5&#45;&gt;1 -->
<g id="edge13" class="edge">
<title>5&#45;&gt;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>
</g>
<!-- 5&#45;&gt;4 -->
<g id="edge12" class="edge">
<title>5&#45;&gt;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>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB