28 #include <mln/core/image/graph_elt_mixed_window.hh>
29 #include <mln/core/image/vertex_image.hh>
30 #include <mln/core/image/edge_image.hh>
31 #include <mln/fun/i2v/array.hh>
32 #include <mln/util/graph.hh>
49 static const unsigned X = mln_max(
unsigned);
52 static unsigned expected_fwd_nb[5][3] = { { 0, X, X },
59 static unsigned expected_bkd_nb[5][3] = { { 0, X, X },
104 viota_t
iota(g.v_nmax());
105 for (
unsigned i = 0; i <
iota.size(); ++i)
111 eiota_t eiota(g.e_nmax());
112 for (
unsigned i = 0; i < eiota.size(); ++i)
117 v_ima_t v_ima(g,
iota);
120 e_ima_t e_ima(g, eiota);
124 mln_piter_(v_ima_t) v(v_ima.domain());
129 e_ima_t::domain_t> edge_win_t;
138 mln_qiter_(edge_win_t) e(win, e_ima.domain(), v);
141 mln_assertion(expected_fwd_nb[v.id()][i++] == e.id());
142 mln_assertion((e.id() + 20) == e_ima(e));
153 mln_bkd_qiter_(edge_win_t) e(win, e_ima.domain(), v);
156 mln_assertion(expected_bkd_nb[v.id()][i++] == e.id());
157 mln_assertion((e.id() + 20) == e_ima(e));