26 #ifndef MLN_LOGICAL_AND_HH
27 # define MLN_LOGICAL_AND_HH
33 # include <mln/logical/includes.hh>
34 # include <mln/fun/vv2v/land.hh>
54 template <
typename L,
typename R>
55 mln_ch_fun_vv2v(land, L, R)
56 and_(const Image<L>& lhs, const Image<R>&
rhs);
72 template <typename L, typename R>
73 void and_inplace(Image<L>& lhs, const Image<R>& rhs);
76 # ifndef MLN_INCLUDE_ONLY
78 template <
typename L,
typename R>
80 mln_ch_fun_vv2v(land, L, R)
81 and_(const Image<L>& lhs, const Image<R>& rhs)
83 mln_trace(
"logical::and_");
85 internal::tests(lhs, rhs);
87 mln_fun_vv2v(land, L, R) f;
88 mln_ch_fun_vv2v(land, L, R) output =
data::
transform(lhs, rhs, f);
93 template <typename L, typename R>
95 void and_inplace(Image<L>& lhs, const Image<R>& rhs)
97 mln_trace(
"logical::and_inplace");
99 mlc_converts_to(mln_fun_vv2v_result(land, L, R),
100 mln_value(L))::check();
102 internal::tests(lhs, rhs);
104 mln_fun_vv2v(land, L, R) f;
105 data::transform_inplace(lhs, rhs, f);
109 # endif // ! MLN_INCLUDE_ONLY
116 #endif // ! MLN_LOGICAL_AND_HH