26 #include <mln/core/alias/point2d.hh>
29 #include <mln/core/site_set/p_edges.hh>
30 #include <mln/core/image/graph_elt_window.hh>
31 #include <mln/core/image/graph_elt_neighborhood.hh>
32 #include <mln/core/image/vertex_image.hh>
33 #include <mln/core/neighb.hh>
34 #include <mln/core/var.hh>
35 #include <mln/pw/all.hh>
36 #include <mln/fun/i2v/array.hh>
37 #include <mln/util/graph.hh>
38 #include <mln/make/vertex_image.hh>
55 static const unsigned X = mln_max(
unsigned);
59 static unsigned expected_fwd_nbh[5][3] = { { 1, X, X },
65 static unsigned expected_bkd_nbh[5][3] = { { 1, 0, X },
81 typedef fun::i2v::array<point2d> fsite_t;
106 typedef fun::i2v::array<unsigned> viota_t;
107 viota_t
iota(g.v_nmax());
108 for (
unsigned i = 0; i <
iota.size(); ++i)
120 mln_edge_nbh_edge_iter_(util::graph) en(ei);
123 mln_piter_(ima_t) p(ima.domain());
126 mln_assertion(ima(p) == i++);
128 typedef ima_t::win_t win_t;
133 mln_fwd_qiter_(win_t) q(win, p);
139 mln_assertion(expected_fwd_nbh[p.id()][i] == q.id());
147 mln_bkd_qiter_(win_t) q(win, p);
153 mln_assertion(expected_bkd_nbh[p.id()][i] == q.id());
160 typedef ima_t::nbh_t neighb_t;
165 mln_fwd_niter_(neighb_t) n(neigh, p);
171 mln_assertion(expected_fwd_nbh[p.id()][i] == n.id());
179 mln_bkd_niter_(neighb_t) n(neigh, p);
185 mln_assertion(expected_bkd_nbh[p.id()][i] == n.id());