Compare commits
2 commits
a85a66c9a7
...
212d6f6022
Author | SHA1 | Date | |
---|---|---|---|
|
212d6f6022 | ||
|
b357f939eb |
9 changed files with 228 additions and 133 deletions
|
@ -1,11 +1,11 @@
|
|||
"Rule: ocaml dependencies ml (%=src/appTools )": "\183\148#t\166\132\168\206#\210\238[Q2\b["
|
||||
"Rule: ocaml dependencies ml (%=src/appTools )": "\012%\144C\164|\170\156B\169:\0193\177SJ"
|
||||
"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 )": "\239\213\229\211j!\190#\027U\183\135\175^\143<"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/appTools.mli": "\150\255\014\015\006\217\135\239\138\221\031\024D\175\187\240"
|
||||
"Rule: ocaml dependencies mli (%=src/ioApp )": "\015p\211\144\234B\152\220\232~\227\1799o\140:"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/appTools.ml": "^\251~s!\164;8\176\224\157\152K\214\135\223"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/appTools.mli": "\155\b\026hx\155\244]\204\252\142\180\149\139\198\233"
|
||||
"Rule: ocaml dependencies mli (%=src/ioApp )": "\199}\132Z\031\020^\201\179,\223C\220\169\194\238"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/appTools.ml": "\213\031\163<\142\00535\157=\207}9|\135\230"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/gfile )": "\236O\148Y\157m\028\183\166?\231a\231\187u\132"
|
||||
"Rule: ocaml: cmx* & o* -> native (%=src/appMedium )": "\007g\183Z\031\194]+_\241X\200\rD\023\246"
|
||||
"Rule: ocaml: cmx* & o* -> native (%=src/appMedium )": "\141/)\246;g2kJ3\146r\172^(\012"
|
||||
"Rule: ocaml dependencies mli (%=src/display )": "\231~k=1\249%\182S0\233D\212\252\223\161"
|
||||
"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"
|
||||
|
@ -17,31 +17,31 @@
|
|||
"Rule: ocaml: mli -> cmi (%=src/fordFulkerson )": "v\184\208\237V\182T\138\168\207\20258\221\233s"
|
||||
"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/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ioApp.mli": "\151\003\019\151\016\160\201G\158\215\195\0282\192\193\179"
|
||||
"Rule: ocaml: mli -> cmi (%=src/appTools )": "\254\007-\022GJ\148\228/\220\"#%3\186\024"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/appMedium )": "PM(\023e6\192\145\205\140Xf\241\184\028#"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ioApp.mli": "\178\247\139\175\031\167d)\137\166*\002\145\219/\223"
|
||||
"Rule: ocaml: mli -> cmi (%=src/appTools )": "0\023\150\158\252\178S\158\b\189\169RA\190\195+"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/appMedium )": "d\031\192\1383\182\210\211sRe\237\024u\152\030"
|
||||
"Rule: ocaml dependencies ml (%=src/tools )": ",\255!)\2477ygb7\022\204V\143/$"
|
||||
"Rule: ocaml: mli -> cmi (%=src/ioApp )": "\157\160\238I\0164\025\190\144\018\016\222\162B\006i"
|
||||
"Rule: ocaml dependencies ml (%=src/ioApp )": "*\222\b4~[\166S\002\239\253\162\252\227\250\130"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ioApp.ml": "\241W\154\212\017'L|v.pw\243\253\206/"
|
||||
"Rule: ocaml: mli -> cmi (%=src/ioApp )": "%\246\167\224\"c>\168\bS,X|ym6"
|
||||
"Rule: ocaml dependencies ml (%=src/ioApp )": "o[\196\152]\007R\152\141\185\244\004\206\182\243\018"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ioApp.ml": "X\001\188\187\150\143`\138\203\220\200\255\226\147f\210"
|
||||
"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": "\1933\002\200+\198\166\181\251\020[Kl\1395\244"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/tools )": "@\029k\227\011N\245M\025S\161\203\212\156\191F"
|
||||
"Rule: ocaml dependencies mli (%=src/appTools )": "\144I\155\245\193\219\140\169\228\151\003d\023\029\176\247"
|
||||
"Rule: ocaml: ml -> cmo & cmi (%=src/appMedium )": "\196\219\130\186p\144\141Q\228\142\217\015\133{\154\168"
|
||||
"Rule: ocaml dependencies mli (%=src/appTools )": "\190\231\005\208\005\148\218\\\00486\211\183+i?"
|
||||
"Rule: ocaml: ml -> cmo & cmi (%=src/appMedium )": "\212\238\215\019\142\150\225\1679\224\176`\241)\222g"
|
||||
"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 dependencies ml (%=src/fordFulkerson )": "P\128\241\162\216\228\240\163<\168\241\235\129v\231\185"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/appTools )": ")\214w`^\253B\200\150,\219\173\0174\006d"
|
||||
"Rule: ocaml dependencies ml (%=src/appMedium )": "\142\163\229\252\003U{\202!:\138\184$\247ZN"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/ioApp )": "\193\015X--\018\239\025\016\241\025\225\172jI\206"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/appTools )": "\172]O\222\166\169W\240\018,\242\239\135\204i\030"
|
||||
"Rule: ocaml dependencies ml (%=src/appMedium )": "\194'6c-A\131\130m&\231 0c\152\170"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/ioApp )": "\224z\001\022x\219H\213k<\209.\247\168\193b"
|
||||
"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 mli (%=src/graph )": "\012\213_n\023=\207kZ+\251(^M\2028"
|
||||
"Rule: ocaml dependencies ml (%=src/display )": "\150I\199\147\226\208\148\192\184y\253\190\201\006>\168"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/gfile.mli": "\203\249\163Ct\234\0067d}\142\011m8T`"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/appMedium.ml": "\216\2227\174z\bw\1511b\183\194j\156\201s"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/appMedium.ml": "^3NHM\196\012|O\139v\169l\149y\145"
|
||||
"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": "\253\183m\179\227\189\240\189Z\198>\208jt\007#"
|
||||
|
|
18
_build/_log
18
_build/_log
|
@ -1,6 +1,6 @@
|
|||
### Starting build.
|
||||
# Target: src/appMedium.ml.depends, tags: { extension:ml, file:src/appMedium.ml, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/appMedium.ml > src/appMedium.ml.depends
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/appMedium.ml > src/appMedium.ml.depends # cached
|
||||
# Target: src/appTools.mli.depends, tags: { extension:mli, file:src/appTools.mli, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/appTools.mli > src/appTools.mli.depends # cached
|
||||
# Target: src/gfile.mli.depends, tags: { extension:mli, file:src/gfile.mli, include, ocaml, ocamldep, quiet, traverse }
|
||||
|
@ -30,12 +30,7 @@
|
|||
# Target: src/ioApp.cmi, tags: { byte, compile, extension:mli, file:src/ioApp.mli, include, interf, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/ioApp.cmi src/ioApp.mli # cached
|
||||
# Target: src/appMedium.cmo, tags: { byte, compile, extension:cmo, extension:ml, file:src/appMedium.cmo, file:src/appMedium.ml, implem, include, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/appMedium.cmo src/appMedium.ml
|
||||
+ /home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/appMedium.cmo src/appMedium.ml
|
||||
File "src/appMedium.ml", line 25, characters 12-18:
|
||||
25 | let gFinal = main gComplete (getMaximumNodeId gComplete) 0 in
|
||||
^^^^^^
|
||||
Warning 26 [unused-var]: unused variable gFinal.
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/appMedium.cmo src/appMedium.ml # cached
|
||||
# Target: src/appTools.ml.depends, tags: { extension:ml, file:src/appTools.ml, include, ocaml, ocamldep, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/appTools.ml > src/appTools.ml.depends # cached
|
||||
# Target: src/gfile.ml.depends, tags: { extension:ml, file:src/gfile.ml, include, ocaml, ocamldep, quiet, traverse }
|
||||
|
@ -65,12 +60,7 @@ Warning 26 [unused-var]: unused variable gFinal.
|
|||
# Target: src/ioApp.cmx, tags: { compile, extension:cmx, extension:ml, file:src/ioApp.cmx, file:src/ioApp.ml, implem, include, native, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/ioApp.cmx src/ioApp.ml # cached
|
||||
# Target: src/appMedium.cmx, tags: { compile, extension:cmx, extension:ml, file:src/appMedium.cmx, file:src/appMedium.ml, implem, include, native, ocaml, quiet, traverse }
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/appMedium.cmx src/appMedium.ml
|
||||
+ /home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/appMedium.cmx src/appMedium.ml
|
||||
File "src/appMedium.ml", line 25, characters 12-18:
|
||||
25 | let gFinal = main gComplete (getMaximumNodeId gComplete) 0 in
|
||||
^^^^^^
|
||||
Warning 26 [unused-var]: unused variable gFinal.
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/appMedium.cmx src/appMedium.ml # cached
|
||||
# Target: src/appMedium.native, tags: { dont_link_with, extension:native, file:src/appMedium.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/appTools.cmx src/display.cmx src/fordFulkerson.cmx src/ioApp.cmx src/appMedium.cmx -o src/appMedium.native
|
||||
/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -I src src/graph.cmx src/gfile.cmx src/tools.cmx src/appTools.cmx src/display.cmx src/fordFulkerson.cmx src/ioApp.cmx src/appMedium.cmx -o src/appMedium.native # cached
|
||||
# Compilation successful.
|
||||
|
|
22
outFileApp
22
outFileApp
|
@ -12,13 +12,19 @@
|
|||
node [shape = circle];
|
||||
|
||||
|
||||
4 -> 3 [label = "1"];
|
||||
4 -> 2 [label = "1"];
|
||||
4 -> 1 [label = "1"];
|
||||
6 -> 4 [label = "1"];
|
||||
6 -> 5 [label = "1"];
|
||||
5 -> 2 [label = "1"];
|
||||
3 -> 0 [label = "4"];
|
||||
5 -> 8 [label = "1"];
|
||||
3 -> 8 [label = "1"];
|
||||
4 -> 8 [label = "1"];
|
||||
7 -> 1 [label = "1"];
|
||||
7 -> 8 [label = "1"];
|
||||
2 -> 0 [label = "3"];
|
||||
1 -> 0 [label = "2"];
|
||||
2 -> 5 [label = "1"];
|
||||
2 -> 7 [label = "1"];
|
||||
6 -> 8 [label = "1"];
|
||||
6 -> 2 [label = "1"];
|
||||
1 -> 3 [label = "1"];
|
||||
1 -> 4 [label = "1"];
|
||||
1 -> 6 [label = "1"];
|
||||
0 -> 2 [label = "2"];
|
||||
0 -> 1 [label = "3"];
|
||||
}
|
230
outFileApp.svg
230
outFileApp.svg
|
@ -4,115 +4,169 @@
|
|||
<!-- Generated by graphviz version 2.50.0 (0)
|
||||
-->
|
||||
<!-- Title: finite_state_machine Pages: 1 -->
|
||||
<svg width="284pt" height="159pt"
|
||||
viewBox="0.00 0.00 284.00 159.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 155)">
|
||||
<svg width="420pt" height="313pt"
|
||||
viewBox="0.00 0.00 420.00 313.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 309)">
|
||||
<title>finite_state_machine</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-155 280,-155 280,4 -4,4"/>
|
||||
<!-- 4 -->
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-309 416,-309 416,4 -4,4"/>
|
||||
<!-- 5 -->
|
||||
<g id="node1" class="node">
|
||||
<title>4</title>
|
||||
<ellipse fill="none" stroke="black" cx="98" cy="-77" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="98" y="-73.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">4</text>
|
||||
<title>5</title>
|
||||
<ellipse fill="none" stroke="black" cx="314" cy="-78" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="314" y="-74.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
|
||||
</g>
|
||||
<!-- 8 -->
|
||||
<g id="node2" class="node">
|
||||
<title>8</title>
|
||||
<ellipse fill="none" stroke="black" cx="394" cy="-178" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="394" y="-174.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">8</text>
|
||||
</g>
|
||||
<!-- 5->8 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>5->8</title>
|
||||
<path fill="none" stroke="black" d="M327.24,-90.29C336.17,-99.51 348.34,-112.62 358,-125 365.19,-134.23 372.44,-144.91 378.45,-154.25"/>
|
||||
<polygon fill="black" stroke="black" points="375.5,-156.13 383.8,-162.71 381.42,-152.39 375.5,-156.13"/>
|
||||
<text text-anchor="middle" x="354" y="-128.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 3 -->
|
||||
<g id="node2" class="node">
|
||||
<title>3</title>
|
||||
<ellipse fill="none" stroke="black" cx="178" cy="-79" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="178" y="-75.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
|
||||
</g>
|
||||
<!-- 4->3 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>4->3</title>
|
||||
<path fill="none" stroke="black" d="M116.31,-77.44C126.11,-77.7 138.58,-78.01 149.67,-78.3"/>
|
||||
<polygon fill="black" stroke="black" points="149.65,-81.8 159.74,-78.56 149.83,-74.8 149.65,-81.8"/>
|
||||
<text text-anchor="middle" x="138" y="-81.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 2 -->
|
||||
<g id="node3" class="node">
|
||||
<title>2</title>
|
||||
<ellipse fill="none" stroke="black" cx="178" cy="-25" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="178" y="-21.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
<title>3</title>
|
||||
<ellipse fill="none" stroke="black" cx="152" cy="-287" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="152" y="-283.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
|
||||
</g>
|
||||
<!-- 4->2 -->
|
||||
<!-- 3->8 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>4->2</title>
|
||||
<path fill="none" stroke="black" d="M113.31,-67.46C124.67,-59.89 140.78,-49.14 153.96,-40.36"/>
|
||||
<polygon fill="black" stroke="black" points="156.14,-43.11 162.52,-34.65 152.26,-37.29 156.14,-43.11"/>
|
||||
<text text-anchor="middle" x="138" y="-55.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
<title>3->8</title>
|
||||
<path fill="none" stroke="black" d="M170.03,-286.66C203.72,-285.23 280.06,-278.15 332,-244 349.49,-232.5 365.4,-214.93 376.59,-200.81"/>
|
||||
<polygon fill="black" stroke="black" points="379.61,-202.61 382.91,-192.54 374.05,-198.36 379.61,-202.61"/>
|
||||
<text text-anchor="middle" x="260" y="-280.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>4</title>
|
||||
<ellipse fill="none" stroke="black" cx="260" cy="-243" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="260" y="-239.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">4</text>
|
||||
</g>
|
||||
<!-- 4->8 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>4->8</title>
|
||||
<path fill="none" stroke="black" d="M276.4,-235.42C298.93,-224.32 341.13,-203.54 368.1,-190.26"/>
|
||||
<polygon fill="black" stroke="black" points="369.86,-193.29 377.29,-185.74 366.77,-187.01 369.86,-193.29"/>
|
||||
<text text-anchor="middle" x="314" y="-228.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 7 -->
|
||||
<g id="node5" class="node">
|
||||
<title>7</title>
|
||||
<ellipse fill="none" stroke="black" cx="314" cy="-132" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="314" y="-128.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">7</text>
|
||||
</g>
|
||||
<!-- 7->8 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>7->8</title>
|
||||
<path fill="none" stroke="black" d="M331.49,-137.14C339.74,-140.05 349.71,-144.1 358,-149 363.01,-151.96 368.04,-155.63 372.66,-159.34"/>
|
||||
<polygon fill="black" stroke="black" points="370.55,-162.14 380.44,-165.94 375.08,-156.8 370.55,-162.14"/>
|
||||
<text text-anchor="middle" x="354" y="-152.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 1 -->
|
||||
<g id="node4" class="node">
|
||||
<g id="node6" class="node">
|
||||
<title>1</title>
|
||||
<ellipse fill="none" stroke="black" cx="178" cy="-133" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="178" y="-129.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
<ellipse fill="none" stroke="black" cx="18" cy="-200" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="18" y="-196.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 4->1 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>4->1</title>
|
||||
<path fill="none" stroke="black" d="M113.31,-87.27C124.85,-95.56 141.3,-107.37 154.59,-116.91"/>
|
||||
<polygon fill="black" stroke="black" points="152.62,-119.8 162.78,-122.79 156.7,-114.12 152.62,-119.8"/>
|
||||
<text text-anchor="middle" x="138" y="-109.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
<!-- 7->1 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>7->1</title>
|
||||
<path fill="none" stroke="black" d="M306.99,-148.82C301.51,-161.41 292.12,-177.83 278,-186 239.28,-208.42 104.64,-204.47 46.3,-201.58"/>
|
||||
<polygon fill="black" stroke="black" points="46.19,-198.07 36.02,-201.04 45.82,-205.06 46.19,-198.07"/>
|
||||
<text text-anchor="middle" x="152" y="-206.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 0 -->
|
||||
<g id="node7" class="node">
|
||||
<title>0</title>
|
||||
<ellipse fill="none" stroke="black" cx="258" cy="-79" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="258" y="-75.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">0</text>
|
||||
<!-- 1->3 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>1->3</title>
|
||||
<path fill="none" stroke="black" d="M24.78,-216.93C30.25,-230.5 39.77,-249.02 54,-260 74.15,-275.55 102.76,-282.14 123.69,-284.94"/>
|
||||
<polygon fill="black" stroke="black" points="123.52,-288.44 133.85,-286.09 124.3,-281.49 123.52,-288.44"/>
|
||||
<text text-anchor="middle" x="58" y="-268.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 3->0 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>3->0</title>
|
||||
<path fill="none" stroke="black" d="M196.31,-79C206.11,-79 218.58,-79 229.67,-79"/>
|
||||
<polygon fill="black" stroke="black" points="229.74,-82.5 239.74,-79 229.74,-75.5 229.74,-82.5"/>
|
||||
<text text-anchor="middle" x="218" y="-82.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">4</text>
|
||||
</g>
|
||||
<!-- 2->0 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>2->0</title>
|
||||
<path fill="none" stroke="black" d="M193.31,-34.9C204.74,-42.82 220.99,-54.07 234.21,-63.22"/>
|
||||
<polygon fill="black" stroke="black" points="232.57,-66.34 242.78,-69.16 236.55,-60.59 232.57,-66.34"/>
|
||||
<text text-anchor="middle" x="218" y="-56.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
|
||||
</g>
|
||||
<!-- 1->0 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>1->0</title>
|
||||
<path fill="none" stroke="black" d="M193.31,-123.1C204.74,-115.18 220.99,-103.93 234.21,-94.78"/>
|
||||
<polygon fill="black" stroke="black" points="236.55,-97.41 242.78,-88.84 232.57,-91.66 236.55,-97.41"/>
|
||||
<text text-anchor="middle" x="218" y="-110.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
<!-- 1->4 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>1->4</title>
|
||||
<path fill="none" stroke="black" d="M34.76,-207.24C40.68,-209.71 47.55,-212.28 54,-214 116.38,-230.63 192.14,-238.2 231.8,-241.24"/>
|
||||
<polygon fill="black" stroke="black" points="231.76,-244.74 241.99,-241.98 232.27,-237.76 231.76,-244.74"/>
|
||||
<text text-anchor="middle" x="98" y="-230.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 6 -->
|
||||
<g id="node5" class="node">
|
||||
<g id="node9" class="node">
|
||||
<title>6</title>
|
||||
<ellipse fill="none" stroke="black" cx="18" cy="-45" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="18" y="-41.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">6</text>
|
||||
<ellipse fill="none" stroke="black" cx="98" cy="-154" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="98" y="-150.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">6</text>
|
||||
</g>
|
||||
<!-- 6->4 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>6->4</title>
|
||||
<path fill="none" stroke="black" d="M35.16,-51.63C45.69,-55.95 59.65,-61.68 71.64,-66.59"/>
|
||||
<polygon fill="black" stroke="black" points="70.55,-69.93 81.13,-70.49 73.2,-63.45 70.55,-69.93"/>
|
||||
<text text-anchor="middle" x="58" y="-64.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
<!-- 1->6 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>1->6</title>
|
||||
<path fill="none" stroke="black" d="M31.56,-187.94C37.92,-182.27 45.99,-175.74 54,-171 59.31,-167.86 65.31,-165.07 71.11,-162.71"/>
|
||||
<polygon fill="black" stroke="black" points="72.4,-165.96 80.51,-159.14 69.92,-159.41 72.4,-165.96"/>
|
||||
<text text-anchor="middle" x="58" y="-174.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="98" cy="-18" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="98" y="-14.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
|
||||
<!-- 2 -->
|
||||
<g id="node7" class="node">
|
||||
<title>2</title>
|
||||
<ellipse fill="none" stroke="black" cx="206" cy="-94" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="206" y="-90.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
</g>
|
||||
<!-- 6->5 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>6->5</title>
|
||||
<path fill="none" stroke="black" d="M34.92,-38.29C40.86,-35.88 47.7,-33.21 54,-31 59.43,-29.1 65.3,-27.21 70.9,-25.49"/>
|
||||
<polygon fill="black" stroke="black" points="71.98,-28.82 80.56,-22.61 69.97,-22.12 71.98,-28.82"/>
|
||||
<text text-anchor="middle" x="58" y="-34.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
<!-- 2->5 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>2->5</title>
|
||||
<path fill="none" stroke="black" d="M224.03,-91.43C240.72,-88.91 266.42,-85.03 285.92,-82.09"/>
|
||||
<polygon fill="black" stroke="black" points="286.65,-85.52 296.01,-80.56 285.6,-78.6 286.65,-85.52"/>
|
||||
<text text-anchor="middle" x="260" y="-92.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 5->2 -->
|
||||
<!-- 2->7 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>2->7</title>
|
||||
<path fill="none" stroke="black" d="M222.96,-100.6C228.91,-103 235.74,-105.69 242,-108 256.79,-113.45 273.48,-119.12 286.96,-123.57"/>
|
||||
<polygon fill="black" stroke="black" points="285.96,-126.93 296.55,-126.72 288.14,-120.28 285.96,-126.93"/>
|
||||
<text text-anchor="middle" x="260" y="-124.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 0 -->
|
||||
<g id="node8" class="node">
|
||||
<title>0</title>
|
||||
<ellipse fill="none" stroke="black" cx="314" cy="-18" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="314" y="-14.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">0</text>
|
||||
</g>
|
||||
<!-- 2->0 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>5->2</title>
|
||||
<path fill="none" stroke="black" d="M114.92,-10.79C123.03,-8.01 133.04,-5.94 142,-8 145.71,-8.85 149.48,-10.15 153.1,-11.66"/>
|
||||
<polygon fill="black" stroke="black" points="151.68,-14.86 162.22,-15.98 154.68,-8.54 151.68,-14.86"/>
|
||||
<text text-anchor="middle" x="138" y="-11.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
<title>2->0</title>
|
||||
<path fill="none" stroke="black" d="M220.03,-82.64C226.5,-77.14 234.52,-70.55 242,-65 257.48,-53.51 275.62,-41.53 289.69,-32.54"/>
|
||||
<polygon fill="black" stroke="black" points="291.7,-35.41 298.27,-27.1 287.95,-29.49 291.7,-35.41"/>
|
||||
<text text-anchor="middle" x="260" y="-68.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
|
||||
</g>
|
||||
<!-- 0->1 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>0->1</title>
|
||||
<path fill="none" stroke="black" d="M296.82,-12.4C282.18,-8.21 260.18,-4.12 242,-10 148.05,-40.38 68.36,-133.94 35.32,-177.39"/>
|
||||
<polygon fill="black" stroke="black" points="32.35,-175.52 29.17,-185.62 37.96,-179.71 32.35,-175.52"/>
|
||||
<text text-anchor="middle" x="152" y="-76.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
|
||||
</g>
|
||||
<!-- 0->2 -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>0->2</title>
|
||||
<path fill="none" stroke="black" d="M296.29,-14.77C280.87,-12.75 258,-12.25 242,-23 227.12,-33 218.32,-51.24 213.26,-66.73"/>
|
||||
<polygon fill="black" stroke="black" points="209.88,-65.81 210.45,-76.39 216.6,-67.77 209.88,-65.81"/>
|
||||
<text text-anchor="middle" x="260" y="-26.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
</g>
|
||||
<!-- 6->8 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>6->8</title>
|
||||
<path fill="none" stroke="black" d="M116.08,-155.39C164.99,-159.39 305.95,-170.89 365.7,-175.77"/>
|
||||
<polygon fill="black" stroke="black" points="365.62,-179.28 375.88,-176.6 366.19,-172.3 365.62,-179.28"/>
|
||||
<text text-anchor="middle" x="260" y="-171.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 6->2 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>6->2</title>
|
||||
<path fill="none" stroke="black" d="M113.91,-144.88C120.1,-141.14 127.36,-136.81 134,-133 149.46,-124.12 167.01,-114.47 180.8,-107"/>
|
||||
<polygon fill="black" stroke="black" points="182.54,-110.04 189.67,-102.2 179.21,-103.88 182.54,-110.04"/>
|
||||
<text text-anchor="middle" x="152" y="-136.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 9 KiB |
|
@ -24,5 +24,8 @@
|
|||
|
||||
let gFinal = main gComplete (getMaximumNodeId gComplete) 0 in
|
||||
|
||||
let () = exportBase gComplete "./outFileApp" in
|
||||
()
|
||||
let () = exportBase gFinal "./outFileApp" in
|
||||
();
|
||||
|
||||
let () = outputData gFinal ys xs in
|
||||
(); print_string "\n\n"
|
|
@ -5,8 +5,11 @@ open Tools
|
|||
let fst3 x = match x with
|
||||
| (a,_,_) -> a
|
||||
|
||||
let snd3 = function
|
||||
| (_, b, _ ) -> b
|
||||
|
||||
let thrd3 = function
|
||||
| (_, _, a ) -> a
|
||||
| (_, _, c ) -> c
|
||||
|
||||
let buildGraph xs =
|
||||
let g = new_node empty_graph 0 (*Defines the end*)
|
||||
|
|
|
@ -4,6 +4,8 @@ open Tools
|
|||
|
||||
val fst3 : ('a * 'b * 'c) -> 'a
|
||||
|
||||
val snd3 : ('a * 'b * 'c) -> 'b
|
||||
|
||||
val thrd3 : ('a * 'b * 'c) -> 'c
|
||||
|
||||
val buildGraph : (string * int * int) list -> int graph
|
||||
|
|
39
src/ioApp.ml
39
src/ioApp.ml
|
@ -1,4 +1,5 @@
|
|||
open AppTools
|
||||
open Graph
|
||||
|
||||
(* Prompts the user to enter all activities and stores them in a (id, name) list*)
|
||||
let enterAllChoices () =
|
||||
|
@ -42,8 +43,6 @@ let displayAllChoices xs =
|
|||
Takes in input the number of the previously assigned nodes' maximum id
|
||||
and the list of activities) *)
|
||||
|
||||
|
||||
|
||||
let enterChildren idPrev listActivities =
|
||||
let rec inner xs i =
|
||||
let str = read_line ()
|
||||
|
@ -82,4 +81,40 @@ let enterChildren idPrev listActivities =
|
|||
activities they are interested in. type \'HELP\' to list the activities\n";
|
||||
inner [] (idPrev+1)
|
||||
|
||||
(*Prints on the screen which children have nothing to do and what the others have*)
|
||||
let outputData g childrenList choicesList =
|
||||
|
||||
let findAssignedChildren activity =
|
||||
|
||||
let rec inner2 acc = function (*goes over all edges out of the activity's node*)
|
||||
| [] -> acc
|
||||
| x :: xs -> inner2 (acc ^
|
||||
(if fst x <> 0
|
||||
then
|
||||
let childNodeId = fst x in
|
||||
snd3 (List.find (fun a -> fst3 a = childNodeId) childrenList) ^ "/"
|
||||
else
|
||||
""
|
||||
)
|
||||
) xs
|
||||
|
||||
in
|
||||
inner2 "" (out_arcs g (snd3 activity))
|
||||
|
||||
in
|
||||
|
||||
let rec inner acc g = function
|
||||
| [] -> print_string acc
|
||||
| x :: xs ->
|
||||
(inner
|
||||
(acc ^ "\n" ^ (fst3 x) ^ " : " ^ (findAssignedChildren x))
|
||||
g xs
|
||||
)
|
||||
|
||||
|
||||
|
||||
in
|
||||
inner "" g choicesList; print_string("\n the children that did not appear above could \
|
||||
not be assigned any activity")
|
||||
|
||||
|
||||
|
|
|
@ -4,4 +4,6 @@ val enterAllChoices: unit -> (string * int * int) list
|
|||
|
||||
val displayAllChoices: string list -> unit
|
||||
|
||||
val enterChildren: int -> (string * int * int) list -> (int * string * (int list)) list
|
||||
val enterChildren: int -> (string * int * int) list -> (int * string * (int list)) list
|
||||
|
||||
val outputData : int graph -> (int * string * (int list)) list-> (string * int * int) list -> unit
|
Loading…
Reference in a new issue