X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fagar%2Ftest%2Fsimple-graphr.h;h=21cae6a3497c9900ba010dd445f4acdd6203f649;hb=0ea6a2126c713207cb139d3329b15f0c9d735fbe;hp=ddb1edbcbd58a5603d9858d36a62671d2f4fcc6a;hpb=c23a40c7f1ac9fad0146b46988a41f196aae933f;p=ccan 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 */