summaryrefslogtreecommitdiffstats
path: root/data/dijkstra.test
diff options
context:
space:
mode:
authorjullinator <justus.karlsson@hotmail.se>2018-10-28 02:01:18 +0200
committerjullinator <justus.karlsson@hotmail.se>2018-10-28 02:01:18 +0200
commitc9c42ef4862717bf0a85024fdf6e8c13e73ad24d (patch)
tree4450afc4aac537a8570dd2b7cfd11f12dfef5b1e /data/dijkstra.test
parent723e04aaa02ab157015a65eb3a6b24c99d9e665b (diff)
downloadtdde25-c9c42ef4862717bf0a85024fdf6e8c13e73ad24d.tar.gz
omega
Diffstat (limited to 'data/dijkstra.test')
-rw-r--r--data/dijkstra.test59
1 files changed, 59 insertions, 0 deletions
diff --git a/data/dijkstra.test b/data/dijkstra.test
new file mode 100644
index 0000000..22aba2d
--- /dev/null
+++ b/data/dijkstra.test
@@ -0,0 +1,59 @@
+# -- Answers for the shortest path of the given graphs --
+# The file consists of a number of test cases.
+# Feel free to provide your own test cases!
+# Each test case has this structure:
+# <number of nodes>
+# <space separated SOURCE and DESTINATION node indexes>
+# ... <space separated x y coordinates of each node>
+# <number of edges>
+# ... <space separated nodes edges> (NODE1 is connected to NODE2)
+# <distance of the shortest path>
+# ...<node ids of the shortest path in the order visited>
+# Test case 1:
+6
+0 5
+0 0
+2 2
+2 -2
+4 1
+4 -2
+6 1
+7
+0 1
+0 2
+2 3
+1 2
+3 5
+1 4
+0 5
+6.082762530298219
+0 5
+# Test case 2:
+4
+0 3
+0 0
+2 0
+2 2
+4 0
+4
+0 1
+0 2
+1 3
+2 3
+4.0
+0 1 3
+# Test case 3:
+5
+0 3
+1 3
+4 2
+-2 4
+1 5
+-1 4
+4
+0 1
+1 3
+4 3
+1 4
+7.404918347287664
+0 1 3 \ No newline at end of file