X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fagar%2Ftest%2Fsimple-graphr.h;fp=ccan%2Fagar%2Ftest%2Fsimple-graphr.h;h=168ee2902a9a3941b94712785b3d8a84869b58ca;hb=13430d4e252edbe0c202237e5a956670da1efe0b;hp=2abe72dcb6903989fafa71d46b5c5f3715b95ab2;hpb=a2eaae42b58a44d6f88f5e20e4a7d7cdbde9edae;p=ccan diff --git a/ccan/agar/test/simple-graphr.h b/ccan/agar/test/simple-graphr.h index 2abe72dc..168ee290 100644 --- a/ccan/agar/test/simple-graphr.h +++ b/ccan/agar/test/simple-graphr.h @@ -199,4 +199,24 @@ static const struct adjacency_listr traversal1_adjacency[] = { {}, }; +/* Shortcut-1 graph + * + * A ---- (3) -----> C + * \ / + * (1)-> B --(1) + * + * This provides an example of a graph where the lowest cost path from + * (A) to (C) is not the path with the smallest number od edges. + */ +struct shortcut1_graphr { + struct agar_graph gr; +}; +void shortcut1_graphr_init(struct shortcut1_graphr *s1gr); +static const struct adjacency_listr shortcut1_adjacencyr[] = { + {1, {3, 2}}, + {2, {3}}, + {3, {}}, + {}, +}; + #endif /* _SIMPLE_GRAPHR_H */