27 #ifndef MLN_CORE_ALIAS_POINT2D_HH
28 # define MLN_CORE_ALIAS_POINT2D_HH
35 # include <mln/core/def/coord.hh>
36 # include <mln/core/def/coordf.hh>
37 # include <mln/core/point.hh>
39 # include <mln/core/concept/site_proxy.hh>
40 # include <mln/core/internal/force_exact.hh>
54 typedef point<mln::grid::square, mln::def::coord>
point2d;
66 typedef point<mln::grid::square, mln::def::coordf> point2df;
76 template <
typename C,
typename E>
82 typedef const C& row_t;
85 typedef const C& col_t;
88 const C& operator[](
unsigned i)
const;
89 const C& last_coord()
const;
91 const E& exact_()
const;
98 template <
typename C,
typename E>
110 using super_::operator[];
111 C& operator[](
unsigned i);
115 # ifndef MLN_INCLUDE_ONLY
119 template <
typename C,
typename E>
124 return exact_().get_subject().row();
127 template <
typename C,
typename E>
132 return exact_().get_subject().col();
135 template <
typename C,
typename E>
140 mln_precondition(i < 2);
141 return exact_().get_subject()[i];
144 template <
typename C,
typename E>
152 template <
typename C,
typename E>
157 return internal::force_exact<const E>(*this);
162 template <
typename C,
typename E>
167 return exact_().get_subject().row();
170 template <
typename C,
typename E>
175 return exact_().get_subject().col();
178 template <
typename C,
typename E>
183 mln_precondition(i < 2);
184 return exact_().get_subject()[i];
187 template <
typename C,
typename E>
192 return internal::force_exact<E>(*this);
195 # endif // ! MLN_INCLUDE_ONLY
203 # include <mln/core/alias/dpoint2d.hh>
206 #endif // ! MLN_CORE_ALIAS_POINT2D_HH