26 #ifndef MLN_MORPHO_PLUS_HH
27 # define MLN_MORPHO_PLUS_HH
36 # include <mln/data/compare.hh>
37 # include <mln/logical/or.hh>
38 # include <mln/arith/plus.hh>
50 template <
typename I,
typename J>
51 mln_concrete(I)
plus(const Image<I>& lhs, const Image<J>& rhs);
54 # ifndef MLN_INCLUDE_ONLY
61 template <
typename I,
typename J>
63 mln_concrete(I) plus_(trait::image::kind::logic,
64 const I& lhs, const J& rhs)
66 return logical::or_(lhs, rhs);
71 template <
typename I,
typename J>
73 mln_concrete(I) plus_(trait::image::kind::any,
74 const I& lhs, const J& rhs)
76 return arith::plus<mln_value(I)>(lhs, rhs);
84 template <
typename I,
typename J>
88 trace::entering(
"morpho::plus");
89 mln_precondition(exact(rhs).domain() == exact(lhs).domain());
91 mln_concrete(I) output = impl::plus_(mln_trait_image_kind(I)(),
92 exact(lhs), exact(rhs));
94 trace::exiting(
"morpho::plus");
98 # endif // ! MLN_INCLUDE_ONLY
105 #endif // ! MLN_MORPHO_PLUS_HH