27 #ifndef MLN_DATA_COMPARE_HH
28 # define MLN_DATA_COMPARE_HH
34 # include <mln/core/concept/image.hh>
35 # include <mln/fun/vv2b/eq.hh>
36 # include <mln/fun/vv2b/le.hh>
37 # include <mln/fun/vv2b/lt.hh>
38 # include <mln/test/predicate.hh>
52 template <
typename L,
typename R>
53 bool operator == (
const Image<L>& lhs,
const Image<R>& rhs);
64 template <
typename L,
typename R>
65 bool operator < (const Image<L>& lhs,
const Image<R>& rhs);
76 template <
typename L,
typename R>
77 bool operator <= (const Image<L>& lhs,
const Image<R>& rhs);
81 # ifndef MLN_INCLUDE_ONLY
84 template <
typename L,
typename R>
88 trace::entering(
"data::compare (==)");
90 const L& lhs = exact(lhs_);
91 const R& rhs = exact(rhs_);
93 mln_precondition(lhs.is_valid());
94 mln_precondition(rhs.is_valid());
95 mln_precondition(lhs.domain() == rhs.domain());
100 trace::exiting(
"data::compare (==)");
105 template <
typename L,
typename R>
107 bool operator < (const Image<L>& lhs_,
const Image<R>& rhs_)
109 trace::entering(
"data::compare (<)");
111 const L& lhs = exact(lhs_);
112 const R& rhs = exact(rhs_);
114 mln_precondition(lhs.domain() == rhs.domain());
119 trace::exiting(
"data::compare (<)");
124 template <
typename L,
typename R>
126 bool operator <= (const Image<L>& lhs_,
const Image<R>& rhs_)
128 trace::entering(
"data::compare (<=)");
130 const L& lhs = exact(lhs_);
131 const R& rhs = exact(rhs_);
133 mln_precondition(lhs.domain() == rhs.domain());
138 trace::exiting(
"data::compare (<=)");
142 # endif // ! MLN_INCLUDE_ONLY
147 #endif // ! MLN_DATA_COMPARE_HH