27 #ifndef SCRIBO_FUN_V2B_COMPONENTS_SMALL_FILTER_HH
28 # define SCRIBO_FUN_V2B_COMPONENTS_SMALL_FILTER_HH
35 # include <mln/core/concept/function.hh>
37 # include <mln/util/array.hh>
39 # include <mln/accu/math/count.hh>
41 # include <mln/labeling/compute.hh>
43 # include <mln/value/next.hh>
45 # include <scribo/core/component_set.hh>
83 bool operator()(
const mln_value(L)& l)
const;
92 mutable mln_value(L) nlabels_;
95 mutable mln::util::array<
bool> marked_;
101 # ifndef MLN_INCLUDE_ONLY
104 template <
typename L>
109 : min_size_(min_size), components_(components), nlabels_(0),
110 marked_(mln::
value::next(components.nelements()), false)
116 template <
typename L>
121 if (l == literal::zero)
123 if (components_.info(l).card() >= min_size_)
127 nlabels_ = value::next(nlabels_);
137 # endif // ! MLN_INCLUDE_ONLY
146 #endif // ! SCRIBO_FUN_V2B_COMPONENTS_SMALL_FILTER_HH