27 #ifndef MLN_CORE_SITE_SET_P_LINE2D_HH
28 # define MLN_CORE_SITE_SET_P_LINE2D_HH
35 # include <mln/core/site_set/p_array.hh>
36 # include <mln/core/alias/box2d.hh>
38 # include <mln/math/sign.hh>
39 # include <mln/math/abs.hh>
40 # include <mln/math/min.hh>
41 # include <mln/math/max.hh>
56 struct site_set_< p_line2d >
58 typedef trait::site_set::nsites::known
nsites;
59 typedef trait::site_set::bbox::straight
bbox;
60 typedef trait::site_set::contents::fixed
contents;
61 typedef trait::site_set::arity::unique
arity;
65 struct set_precise_unary_< op::ord, p_line2d >
67 typedef set_precise_unary_< op::ord, p_line2d >
ret;
68 bool strict(
const p_line2d& lhs,
const p_line2d&
rhs)
const;
106 bool is_end_excluded =
false);
143 const std::vector<point2d>&
std_vector()
const;
154 bool is_end_excluded);
159 # ifndef MLN_INCLUDE_ONLY
169 bool is_end_excluded)
172 mln_precondition(end != beg);
173 compute_(beg, end, is_end_excluded);
180 bool is_end_excluded)
183 mln_precondition(end != beg);
186 dpoint2d
dp = end - beg;
194 int e = ddrow - dcol;
195 for (
int i = 0; i < dcol; ++i)
198 static_cast<def::coord>(col)));
210 int e = ddcol - drow;
211 for (
int i = 0; i < drow; ++i)
214 static_cast<def::coord>(col)));
224 if (! is_end_excluded)
226 static_cast<def::coord>(col)));
235 mln_postcondition(this->
begin() == beg);
236 mln_postcondition(is_end_excluded == (this->
end() != end));
243 if (!
has(p.index()))
245 mln_invariant(p.to_site() == (*this)[p.index()]);
280 const std::vector<point2d>&
288 algebra::vec<2, float>
291 algebra::vec<2, float> res;
301 mln_precondition(i <
nsites());
334 set_precise_unary_< op::ord, p_line2d >::strict(
const p_line2d& lhs,
335 const p_line2d&
rhs)
const
338 rhs.begin(), rhs.end());
343 # endif // ! MLN_INCLUDE_ONLY
348 #endif // ! MLN_CORE_SITE_SET_P_LINE2D_HH