26 #ifndef MLN_GEOM_PMIN_PMAX_HH
27 # define MLN_GEOM_PMIN_PMAX_HH
36 # include <mln/core/concept/site_set.hh>
37 # include <mln/core/concept/box.hh>
50 std::pair<mln_site(S), mln_site(S)>
58 pmin_pmax(
const Site_Set<S>& s, mln_site(S)& pmin, mln_site(S)& pmax);
64 std::pair<mln_site(I), mln_site(I)>
72 pmin_pmax(
const Site_Iterator<I>& p, mln_site(I)& pmin, mln_site(I)& pmax);
76 # ifndef MLN_INCLUDE_ONLY
90 mln_precondition(p.is_valid());
94 typedef mln_site(I) P;
96 for (
unsigned i = 0; i < P::dim; ++i)
99 else if (p[i] > pmax[i])
103 template <
typename I>
105 std::pair<mln_site(I), mln_site(I)>
108 typedef mln_site(I) P;
122 template <
typename S>
125 pmin_pmax_(
const Site_Set<S>& s, mln_site(S)& pmin, mln_site(S)& pmax)
127 mln_piter(S) it(exact(s));
133 template <typename B>
136 pmin_pmax_(const
Box<B>& b, mln_site(B)& pmin, mln_site(B)& pmax)
138 pmin = exact(b).pmin();
139 pmax = exact(b).pmax();
145 template <
typename S>
150 mln_precondition(exact(s).
nsites() != 0);
151 impl::pmin_pmax_(exact(s), pmin, pmax);
154 template <
typename S>
156 std::pair<mln_site(S), mln_site(S)>
159 mln_precondition(exact(s).
nsites() != 0);
160 typedef mln_site(S) P;
166 # endif // ! MLN_INCLUDE_ONLY
173 #endif // ! MLN_GEOM_PMIN_PMAX_HH