X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fagar%2Ftest%2Fsimple-graphr.h;h=21cae6a3497c9900ba010dd445f4acdd6203f649;hp=ddb1edbcbd58a5603d9858d36a62671d2f4fcc6a;hb=318edb2466a24a2eadcfd05fa83ae29c0e8aae03;hpb=eedf1079f38efb2b8dc4fd3f516cce8ac1272c06 diff --git a/ccan/agar/test/simple-graphr.h b/ccan/agar/test/simple-graphr.h index ddb1edbc..21cae6a3 100644 --- a/ccan/agar/test/simple-graphr.h +++ b/ccan/agar/test/simple-graphr.h @@ -240,4 +240,23 @@ static const struct adjacency_listr shortcut2_adjacencyr[] = { {}, }; +/* Negacycle graph + * + * A <---- (-3) ----- C + * \ ^ + * (1)-> B -- (1)-/ + * + * Graph with a negative length cycle, and so lacking well-defined shortest paths. + */ +struct negacycle_graphr { + struct agar_graph gr; +}; +extern struct negacycle_graphr negacycle_graphr; +static const struct adjacency_listr negacycle_adjacencyr[] = { + {1, {2}}, + {2, {3}}, + {3, {1}}, + {}, +}; + #endif /* _SIMPLE_GRAPHR_H */