]> git.ozlabs.org Git - ccan/commit
aga,agar: Negative weight cycle testcase
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 3 Nov 2016 10:49:55 +0000 (21:49 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 Nov 2016 12:38:47 +0000 (23:38 +1100)
commit318edb2466a24a2eadcfd05fa83ae29c0e8aae03
tree2161232b2f6133a06e2d7e1f7cca318fea076a4d
parenteedf1079f38efb2b8dc4fd3f516cce8ac1272c06
aga,agar: Negative weight cycle testcase

Adds a new test graph which includes a negative weight cycle.  This means
that shortest paths are not well defined, and both Dijkstra's algorithm and
the Bellman-Ford algorithm (which can handle some negative edge weights)
will fail.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
13 files changed:
ccan/aga/test/api-adjacency.c
ccan/aga/test/api-bellman_ford.c
ccan/aga/test/api-bfs.c
ccan/aga/test/api-dfs.c
ccan/aga/test/api-dijkstra.c
ccan/aga/test/negacycle.c [new file with mode: 0644]
ccan/aga/test/simple-graph.h
ccan/agar/test/api-bellman_ford.c
ccan/agar/test/api-bfs.c
ccan/agar/test/api-dfs.c
ccan/agar/test/api-dijkstra.c
ccan/agar/test/negacycle.c [new file with mode: 0644]
ccan/agar/test/simple-graphr.h