26 #ifndef MLN_MORPHO_ATTRIBUTE_COUNT_ADJACENT_VERTICES_HH
27 # define MLN_MORPHO_ATTRIBUTE_COUNT_ADJACENT_VERTICES_HH
36 # include <mln/pw/internal/image_base.hh>
37 # include <mln/accu/internal/base.hh>
38 # include <mln/pw/image.hh>
39 # include <mln/util/pix.hh>
40 # include <mln/util/graph_ids.hh>
49 struct count_adjacent_vertices;
60 struct accumulator_< morpho::attribute::count_adjacent_vertices<I> >
62 typedef accumulator::has_untake::no
has_untake;
64 typedef accumulator::has_stop::no
has_stop;
65 typedef accumulator::when_pix::use_p
when_pix;
85 count_adjacent_vertices<I> >
95 void take(const argument& px);
120 # ifndef MLN_INCLUDE_ONLY
122 template <
typename I>
129 template <
typename I>
138 template <
typename I>
143 vertices_.insert(p.v1());
144 vertices_.insert(p.v2());
148 template <
typename I>
153 vertices_.insert (other.vertices_.begin(), other.vertices_.end());
157 template <
typename I>
166 template <
typename I>
174 template <
typename I>
179 count__ = vertices_.size();
182 template <
typename I>
191 # endif // ! MLN_INCLUDE_ONLY
199 #endif // ! MLN_MORPHO_ATTRIBUTE_COUNT_ADJACENT_VERTICES_HH