27 #ifndef MLN_LOGICAL_XOR_HH
28 # define MLN_LOGICAL_XOR_HH
34 # include <mln/logical/includes.hh>
35 # include <mln/fun/vv2v/lxor.hh>
55 template <
typename L,
typename R>
56 mln_ch_fun_vv2v(lxor, L, R)
57 xor_(const Image<L>& lhs, const Image<R>&
rhs);
74 template <typename L, typename R>
75 void xor_inplace(Image<L>& lhs, const Image<R>& rhs);
78 # ifndef MLN_INCLUDE_ONLY
80 template <
typename L,
typename R>
82 mln_ch_fun_vv2v(lxor, L, R)
83 xor_(const Image<L>& lhs, const Image<R>& rhs)
85 mln_trace(
"logical::xor_");
87 internal::tests(lhs, rhs);
89 mln_fun_vv2v(lxor, L, R) f;
90 mln_ch_fun_vv2v(lxor, L, R) output =
data::
transform(lhs, rhs, f);
95 template <typename L, typename R>
97 void xor_inplace(Image<L>& lhs, const Image<R>& rhs)
99 mln_trace(
"logical::xor_inplace");
101 mlc_converts_to(mln_fun_vv2v_result(lxor, L, R),
102 mln_value(L))::check();
104 internal::tests(lhs, rhs);
106 mln_fun_vv2v(lxor, L, R) f;
107 data::transform_inplace(lhs, rhs, f);
111 # endif // ! MLN_INCLUDE_ONLY
118 #endif // ! MLN_LOGICAL_XOR_HH