5 #include <ccan/container_of/container_of.h>
6 #include <ccan/ptrint/ptrint.h>
8 #include <ccan/agar/agar.h>
10 #include "simple-graphr.h"
12 static const void *negacycle_first_edge_r(const struct agar_graph *gr,
18 static const void *negacycle_next_edge_r(const struct agar_graph *gr,
19 const void *nr, const void *e)
21 assert(ptr2int(e) == 1);
25 static int negacycle_edge_info_r(const struct agar_graph *gr,
26 const void *nr, const void *e,
27 struct agar_edge_info *eir)
31 assert(ptr2int(e) == 1);
32 eir->to = int2ptr((ni % 3) + 1);
38 struct negacycle_graphr negacycle_graphr = {
39 AGAR_INIT_GRAPH(negacycle_first_edge_r,
40 negacycle_next_edge_r,
41 negacycle_edge_info_r),