26 #ifndef MLN_CORE_ALIAS_POINT1D_HH
27 # define MLN_CORE_ALIAS_POINT1D_HH
34 # include <mln/core/point.hh>
36 # include <mln/core/concept/site_proxy.hh>
37 # include <mln/core/internal/force_exact.hh>
57 template <
typename C,
typename E>
58 struct subject_impl< const point<grid::tick, C>, E >
63 typedef const C& ind_t;
66 const C& operator[](
unsigned i)
const;
67 const C& last_coord()
const;
69 const E& exact_()
const;
75 template <
typename C,
typename E>
76 struct subject_impl< point<grid::tick, C>, E > :
77 subject_impl< const point<grid::tick, C>, E >
80 typedef subject_impl< const point<grid::tick, C>, E > super_;
85 using super_::operator[];
86 C& operator[](
unsigned i);
91 # ifndef MLN_INCLUDE_ONLY
95 template <
typename C,
typename E>
98 subject_impl< const point<grid::tick, C>, E >::ind()
const
100 return exact_().get_subject().ind();
103 template <
typename C,
typename E>
106 subject_impl< const point<grid::tick, C>, E >::operator[](
unsigned i)
const
108 mln_precondition(i == 0);
110 return exact_().get_subject()[0];
113 template <
typename C,
typename E>
116 subject_impl< const point<grid::tick, C>, E >::exact_()
const
118 return internal::force_exact<const E>(*this);
123 template <
typename C,
typename E>
126 subject_impl< point<grid::tick, C>, E >::ind()
128 return exact_().get_subject().ind();
131 template <
typename C,
typename E>
134 subject_impl< point<grid::tick, C>, E >::operator[](
unsigned i)
136 mln_precondition(i == 0);
138 return exact_().get_subject()[0];
141 # endif // ! MLN_INCLUDE_ONLY
148 # include <mln/core/alias/dpoint1d.hh>
151 #endif // ! MLN_CORE_ALIAS_POINT1D_HH