26 #ifndef MLN_MORPHO_MIN_HH
27 # define MLN_MORPHO_MIN_HH
36 # include <mln/data/compare.hh>
37 # include <mln/logical/and.hh>
38 # include <mln/arith/min.hh>
50 template <
typename I,
typename J>
52 min(const Image<I>& lhs, const Image<J>& rhs);
59 template <typename I, typename J>
60 void min_inplace(Image<I>& lhs, const Image<J>& rhs);
63 # ifndef MLN_INCLUDE_ONLY
70 template <
typename I,
typename J,
typename O>
72 mln_concrete(I) min_(trait::image::kind::logic,
73 const I& lhs, const J& rhs)
75 return logical::and_(lhs, rhs);
78 template <
typename I,
typename J>
80 void min_inplace_(trait::image::kind::logic,
88 template <
typename I,
typename J>
90 mln_concrete(I) min_(trait::image::kind::any,
91 const I& lhs, const J& rhs)
96 template <
typename I,
typename J>
98 void min_inplace_(trait::image::kind::any,
109 template <
typename I,
typename J>
114 trace::entering(
"morpho::min");
115 mln_precondition(exact(rhs).domain() == exact(lhs).domain());
117 mln_concrete(I) output = impl::min_(mln_trait_image_kind(I)(), exact(lhs), exact(rhs));
119 trace::exiting(
"morpho::min");
123 template <
typename I,
typename J>
127 trace::entering(
"morpho::min_inplace");
128 mln_precondition(exact(rhs).domain() == exact(lhs).domain());
130 impl::min_inplace_(mln_trait_image_kind(I)(), exact(lhs), exact(rhs));
132 trace::exiting(
"morpho::min_inplace_");
135 # endif // ! MLN_INCLUDE_ONLY
142 #endif // ! MLN_MORPHO_MIN_HH