untested outputs
This commit is contained in:
parent
a85a66c9a7
commit
b357f939eb
9 changed files with 216 additions and 138 deletions
|
@ -1,47 +1,47 @@
|
|||
"Rule: ocaml dependencies ml (%=src/appTools )": "\183\148#t\166\132\168\206#\210\238[Q2\b["
|
||||
"Rule: ocaml dependencies mli (%=src/gfile )": "7\182\192g\020\238\188\b\211\164{\014\157\135\011\003"
|
||||
"Rule: ocaml dependencies ml (%=src/appTools )": "\012%\144C\164|\170\156B\169:\0193\177SJ"
|
||||
"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"
|
||||
"Rule: ocaml dependencies mli (%=src/gfile )": "7\182\192g\020\238\188\b\211\164{\014\157\135\011\003"
|
||||
"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"
|
||||
"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 dependencies mli (%=src/ioApp )": "\199}\132Z\031\020^\201\179,\223C\220\169\194\238"
|
||||
"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 dependencies mli (%=src/display )": "\231~k=1\249%\182S0\233D\212\252\223\161"
|
||||
"Rule: ocaml: cmx* & o* -> native (%=src/appMedium )": "\171*\174\n\255\2036 -\1577\209^\246.\030"
|
||||
"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 )": "\165\163&C\247\02392\222\141}\166\237\209\226\196"
|
||||
"Rule: ocaml: mli -> cmi (%=src/graph )": ")2\159\205\136\031\251\145\0263\01878\001\b\134"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/graph.mli": "\253S\031\015\162|\210x\252\n \227\001{\133e"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/tools.ml": "\143\\\1796g(\028m\247\209\131_vDeU"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/fordFulkerson )": "NH\210[_\240)6\144(\177'?\001\2204"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/tools.ml": "\143\\\1796g(\028m\247\209\131_vDeU"
|
||||
"Rule: ocaml: mli -> cmi (%=src/tools )": "\239.\206\1667\139\246~\227$\235l\012\210\208;"
|
||||
"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/"
|
||||
"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: mli -> cmi (%=src/ioApp )": "%\246\167\224\"c>\168\bS,X|ym6"
|
||||
"Rule: ocaml dependencies ml (%=src/ioApp )": "\018e\252P\t\201H\255\172\246\229\216\157\215K,"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ioApp.ml": "B,X\213@!\026\151\188\255e\176}\139\169m"
|
||||
"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/fordFulkerson.mli": "_;(\155\176\"\225\011\230\191\031M\168\250\219\170"
|
||||
"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"
|
||||
"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 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"
|
||||
"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"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/gfile.ml": "\1966\177\141\185,fpl\1987gT\128b\028"
|
||||
"Rule: ocaml: ml & cmi -> cmx & o (%=src/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 )": "\016\140\158\221\016\024\205\248\132Yl\002\245\182O\187"
|
||||
"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"
|
||||
"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`"
|
||||
"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"
|
||||
"Rule: ocaml dependencies mli (%=src/tools )": "\151\181\0055\199\150&\017\021_\215\015\215\018\027+"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/appMedium.ml": "^3NHM\196\012|O\139v\169l\149y\145"
|
||||
"Rule: ocaml dependencies ml (%=src/gfile )": "U4(<\t=rQ\240c\0278\231N\1949"
|
||||
"Rule: ocaml dependencies mli (%=src/tools )": "\151\181\0055\199\150&\017\021_\215\015\215\018\027+"
|
||||
"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/display.ml": "\253\183m\179\227\189\240\189Z\198>\208jt\007#"
|
||||
|
|
10
_build/_log
10
_build/_log
|
@ -31,11 +31,6 @@
|
|||
/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.
|
||||
# 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 }
|
||||
|
@ -66,11 +61,6 @@ Warning 26 [unused-var]: unused variable gFinal.
|
|||
/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.
|
||||
# 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
|
||||
# Compilation successful.
|
||||
|
|
20
outFileApp
20
outFileApp
|
@ -12,13 +12,17 @@
|
|||
node [shape = circle];
|
||||
|
||||
|
||||
4 -> 3 [label = "1"];
|
||||
4 -> 2 [label = "1"];
|
||||
2 -> 0 [label = "1"];
|
||||
2 -> 7 [label = "1"];
|
||||
7 -> 8 [label = "1"];
|
||||
5 -> 8 [label = "1"];
|
||||
1 -> 5 [label = "1"];
|
||||
4 -> 1 [label = "1"];
|
||||
6 -> 4 [label = "1"];
|
||||
6 -> 5 [label = "1"];
|
||||
5 -> 2 [label = "1"];
|
||||
3 -> 0 [label = "4"];
|
||||
2 -> 0 [label = "3"];
|
||||
1 -> 0 [label = "2"];
|
||||
8 -> 4 [label = "1"];
|
||||
6 -> 2 [label = "1"];
|
||||
6 -> 8 [label = "1"];
|
||||
3 -> 6 [label = "1"];
|
||||
0 -> 2 [label = "1"];
|
||||
0 -> 1 [label = "1"];
|
||||
0 -> 3 [label = "1"];
|
||||
}
|
220
outFileApp.svg
220
outFileApp.svg
|
@ -4,115 +4,155 @@
|
|||
<!-- 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="632pt" height="174pt"
|
||||
viewBox="0.00 0.00 632.00 174.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 170)">
|
||||
<title>finite_state_machine</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-155 280,-155 280,4 -4,4"/>
|
||||
<!-- 4 -->
|
||||
<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>
|
||||
</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>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-170 628,-170 628,4 -4,4"/>
|
||||
<!-- 2 -->
|
||||
<g id="node3" class="node">
|
||||
<g id="node1" 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>
|
||||
</g>
|
||||
<!-- 4->2 -->
|
||||
<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>
|
||||
</g>
|
||||
<!-- 1 -->
|
||||
<g id="node4" 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>
|
||||
</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>
|
||||
<ellipse fill="none" stroke="black" cx="18" cy="-75" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="18" y="-71.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">2</text>
|
||||
</g>
|
||||
<!-- 0 -->
|
||||
<g id="node7" class="node">
|
||||
<g id="node2" 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>
|
||||
</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>
|
||||
<ellipse fill="none" stroke="black" cx="98" cy="-113" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="98" y="-109.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">0</text>
|
||||
</g>
|
||||
<!-- 2->0 -->
|
||||
<g id="edge8" class="edge">
|
||||
<g id="edge1" 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>
|
||||
<path fill="none" stroke="black" d="M29.83,-88.79C36.11,-95.75 44.61,-103.63 54,-108 58.9,-110.28 64.44,-111.68 69.87,-112.5"/>
|
||||
<polygon fill="black" stroke="black" points="69.71,-116 79.99,-113.47 70.37,-109.03 69.71,-116"/>
|
||||
<text text-anchor="middle" x="58" y="-113.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</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>
|
||||
<!-- 7 -->
|
||||
<g id="node3" class="node">
|
||||
<title>7</title>
|
||||
<ellipse fill="none" stroke="black" cx="152" cy="-18" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="152" y="-14.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">7</text>
|
||||
</g>
|
||||
<!-- 6 -->
|
||||
<g id="node5" 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>
|
||||
<!-- 2->7 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>2->7</title>
|
||||
<path fill="none" stroke="black" d="M27.15,-58.99C33.15,-48.93 42.29,-36.65 54,-30 75.26,-17.93 103.32,-15.64 123.79,-15.95"/>
|
||||
<polygon fill="black" stroke="black" points="123.88,-19.46 134.01,-16.33 124.14,-12.46 123.88,-19.46"/>
|
||||
<text text-anchor="middle" x="58" y="-33.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</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>
|
||||
<!-- 0->2 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>0->2</title>
|
||||
<path fill="none" stroke="black" d="M83.26,-102.22C77.03,-97.7 69.4,-92.65 62,-89 56.81,-86.44 51.04,-84.19 45.45,-82.29"/>
|
||||
<polygon fill="black" stroke="black" points="46.36,-78.91 35.77,-79.25 44.26,-85.59 46.36,-78.91"/>
|
||||
<text text-anchor="middle" x="58" y="-92.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 1 -->
|
||||
<g id="node6" class="node">
|
||||
<title>1</title>
|
||||
<ellipse fill="none" stroke="black" cx="526" cy="-105" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="526" y="-101.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 0->1 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>0->1</title>
|
||||
<path fill="none" stroke="black" d="M113.85,-122.01C133.82,-133.24 170.79,-151 205,-151 205,-151 205,-151 447,-151 469.28,-151 490.81,-136.9 505.58,-124.31"/>
|
||||
<polygon fill="black" stroke="black" points="507.97,-126.87 513.05,-117.57 503.28,-121.67 507.97,-126.87"/>
|
||||
<text text-anchor="middle" x="326" y="-154.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 3 -->
|
||||
<g id="node9" class="node">
|
||||
<title>3</title>
|
||||
<ellipse fill="none" stroke="black" cx="206" cy="-105" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="206" y="-101.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">3</text>
|
||||
</g>
|
||||
<!-- 0->3 -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>0->3</title>
|
||||
<path fill="none" stroke="black" d="M116.03,-111.71C132.72,-110.46 158.42,-108.52 177.92,-107.04"/>
|
||||
<polygon fill="black" stroke="black" points="178.3,-110.52 188.01,-106.28 177.78,-103.54 178.3,-110.52"/>
|
||||
<text text-anchor="middle" x="152" y="-113.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 8 -->
|
||||
<g id="node4" class="node">
|
||||
<title>8</title>
|
||||
<ellipse fill="none" stroke="black" cx="366" cy="-61" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="366" y="-57.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">8</text>
|
||||
</g>
|
||||
<!-- 7->8 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>7->8</title>
|
||||
<path fill="none" stroke="black" d="M170.02,-18.74C198.26,-20.27 256.41,-24.75 304,-37 316.15,-40.13 329.15,-45.01 340.01,-49.56"/>
|
||||
<polygon fill="black" stroke="black" points="338.73,-52.82 349.3,-53.58 341.52,-46.4 338.73,-52.82"/>
|
||||
<text text-anchor="middle" x="246" y="-30.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 4 -->
|
||||
<g id="node7" class="node">
|
||||
<title>4</title>
|
||||
<ellipse fill="none" stroke="black" cx="446" cy="-105" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="446" y="-101.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">4</text>
|
||||
</g>
|
||||
<!-- 8->4 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>8->4</title>
|
||||
<path fill="none" stroke="black" d="M382.04,-69.48C393.15,-75.75 408.51,-84.41 421.27,-91.61"/>
|
||||
<polygon fill="black" stroke="black" points="419.58,-94.68 430.01,-96.54 423.02,-88.58 419.58,-94.68"/>
|
||||
<text text-anchor="middle" x="406" y="-87.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 5 -->
|
||||
<g id="node6" class="node">
|
||||
<g id="node5" 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>
|
||||
<ellipse fill="none" stroke="black" cx="606" cy="-75" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="606" y="-71.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">5</text>
|
||||
</g>
|
||||
<!-- 6->5 -->
|
||||
<!-- 5->8 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>5->8</title>
|
||||
<path fill="none" stroke="black" d="M587.72,-73.98C546.83,-71.58 443.85,-65.52 394.37,-62.61"/>
|
||||
<polygon fill="black" stroke="black" points="394.3,-59.1 384.12,-62.01 393.89,-66.09 394.3,-59.1"/>
|
||||
<text text-anchor="middle" x="486" y="-71.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 1->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>
|
||||
<title>1->5</title>
|
||||
<path fill="none" stroke="black" d="M543.16,-98.78C553.62,-94.76 567.46,-89.44 579.4,-84.85"/>
|
||||
<polygon fill="black" stroke="black" points="580.78,-88.06 588.86,-81.21 578.27,-81.53 580.78,-88.06"/>
|
||||
<text text-anchor="middle" x="566" y="-93.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 5->2 -->
|
||||
<!-- 4->1 -->
|
||||
<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>4->1</title>
|
||||
<path fill="none" stroke="black" d="M464.31,-105C474.11,-105 486.58,-105 497.67,-105"/>
|
||||
<polygon fill="black" stroke="black" points="497.74,-108.5 507.74,-105 497.74,-101.5 497.74,-108.5"/>
|
||||
<text text-anchor="middle" x="486" y="-108.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 6 -->
|
||||
<g id="node8" class="node">
|
||||
<title>6</title>
|
||||
<ellipse fill="none" stroke="black" cx="286" cy="-64" rx="18" ry="18"/>
|
||||
<text text-anchor="middle" x="286" y="-60.3" font-family="Helvetica,Arial,sans-serif" font-size="14.00">6</text>
|
||||
</g>
|
||||
<!-- 6->2 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>6->2</title>
|
||||
<path fill="none" stroke="black" d="M267.75,-64.71C222.68,-66.58 101.09,-71.61 46.36,-73.87"/>
|
||||
<polygon fill="black" stroke="black" points="45.89,-70.38 36.04,-74.3 46.18,-77.38 45.89,-70.38"/>
|
||||
<text text-anchor="middle" x="152" y="-73.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 6->8 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>6->8</title>
|
||||
<path fill="none" stroke="black" d="M304.31,-63.33C314.17,-62.95 326.75,-62.47 337.9,-62.04"/>
|
||||
<polygon fill="black" stroke="black" points="338.15,-65.54 348.01,-61.65 337.88,-58.54 338.15,-65.54"/>
|
||||
<text text-anchor="middle" x="326" y="-65.8" font-family="Helvetica,Arial,sans-serif" font-size="14.00">1</text>
|
||||
</g>
|
||||
<!-- 3->6 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>3->6</title>
|
||||
<path fill="none" stroke="black" d="M222.41,-96.9C233.31,-91.17 248.14,-83.38 260.63,-76.81"/>
|
||||
<polygon fill="black" stroke="black" points="262.4,-79.83 269.62,-72.08 259.14,-73.64 262.4,-79.83"/>
|
||||
<text text-anchor="middle" x="246" y="-88.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: 7.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
|
||||
|
|
38
src/ioApp.ml
38
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,39 @@ 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
|
||||
|
||||
|
||||
|
|
|
@ -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