X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Faga%2Ftest%2Fsimple-graph.h;h=5808993ac2c203364c73b6ffdbbf8f09ebfc95fd;hb=8967bc9e1bdd68f2dc33e9d80bbf0f944fb7e772;hp=b8da3ad999045bc9207b59871a56fae691a13120;hpb=09378088f7f49f30cb61435712a8dc2e52a32f69;p=ccan diff --git a/ccan/aga/test/simple-graph.h b/ccan/aga/test/simple-graph.h index b8da3ad9..5808993a 100644 --- a/ccan/aga/test/simple-graph.h +++ b/ccan/aga/test/simple-graph.h @@ -256,4 +256,23 @@ static const struct adjacency_list shortcut2_adjacency[] = { {}, }; +/* Negacycle graph + * + * A <---- (-3) ----- C + * \ ^ + * (1)-> B -- (1)-/ + * + * Graph with a negative length cycle, and so lacking well-defined shortest paths. + */ +struct negacycle_graph { + struct simple_graph sg; +}; +void negacycle_graph_init(struct negacycle_graph *ng); +static const struct adjacency_list negacycle_adjacency[] = { + {1, {2}}, + {2, {3}}, + {3, {1}}, + {}, +}; + #endif /* _TEST_GRAPHS_H */