27 #ifndef SCRIBO_PRIMITIVE_LINK_MERGE_DOUBLE_LINK_HH
28 # define SCRIBO_PRIMITIVE_LINK_MERGE_DOUBLE_LINK_HH
37 # include <mln/core/concept/image.hh>
38 # include <mln/core/site_set/box.hh>
40 # include <mln/accu/shape/bbox.hh>
42 # include <mln/data/compare.hh>
44 # include <mln/util/array.hh>
46 # include <scribo/core/macros.hh>
48 # include <scribo/core/object_links.hh>
49 # include <scribo/core/component_set.hh>
50 # include <scribo/primitive/internal/find_root.hh>
51 # include <scribo/primitive/internal/is_link_valid.hh>
75 const object_links<L>& right_link);
79 # ifndef MLN_INCLUDE_ONLY
86 const object_links<L>& right_link)
88 mln_trace(
"scribo::primitive::link::merge_double_link");
90 mln_precondition(left_link.is_valid());
91 mln_precondition(right_link.is_valid());
92 mln_precondition(left_link.components() == right_link.components());
94 const component_set<L>&
components = left_link.components();
96 object_links<L> merge(components);
99 for_all_comps(i, components)
102 merge.disable_linking(i);
107 merge.update(i, left_link(i));
117 # endif // ! MLN_INCLUDE_ONLY
126 #endif // ! SCRIBO_PRIMITIVE_LINK_MERGE_DOUBLE_LINK_HH