aga,agar: The Bellman-Ford algorithm
authorDavid Gibson <david@gibson.dropbear.id.au>
Sat, 11 Jun 2016 08:30:08 +0000 (18:30 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 Nov 2016 12:38:47 +0000 (23:38 +1100)
commiteedf1079f38efb2b8dc4fd3f516cce8ac1272c06
tree6c381d552d5d8cc57c349ce744066327c346d34f
parentfd96a212810bff1574b047c9079e3e050feb8a28
aga,agar: The Bellman-Ford algorithm

This adds the Bellman-Ford single-source shortest path algorithm to
the aga and agar modules.  The Bellman-Ford algorithm is (usually)
slower than Dijkstra's algorithm, but unlike Dijkstra's is able to
cope with negative edge costs, unless they form a negative cost cycle.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/aga/aga.h
ccan/aga/bellman_ford.c [new file with mode: 0644]
ccan/aga/test/api-bellman_ford.c [new file with mode: 0644]
ccan/agar/agar.c
ccan/agar/agar.h
ccan/agar/test/api-bellman_ford.c [new file with mode: 0644]