27 #ifndef MLN_GEOM_COMPLEX_GEOMETRY_HH
28 # define MLN_GEOM_COMPLEX_GEOMETRY_HH
39 # include <mln/topo/face.hh>
40 # include <mln/topo/adj_m_face_iter.hh>
42 # include <mln/util/multi_site.hh>
43 # include <mln/util/tracked_ptr.hh>
66 template <
typename P>
struct complex_geometry_data;
88 template <
unsigned D,
typename P>
126 template <
typename P>
135 # ifndef MLN_INCLUDE_ONLY
137 template <
unsigned D,
typename P>
140 : data_(new internal::complex_geometry_data<P>())
144 template <
unsigned D,
typename P>
147 complex_geometry<D, P>::add_location(
const P&
p)
149 mln_precondition(data_);
151 data_->zero_faces_geom.push_back(p);
152 return data_->zero_faces_geom.size();
155 template <
unsigned D,
typename P>
160 mln_precondition(data_);
166 mln_assertion(f.
face_id() < data_->zero_faces_geom.size());
167 s.push_back(data_->zero_faces_geom[f.
face_id()]);
173 topo::adj_m_face_fwd_iter<D> g(f, 0);
175 s.push_back(data_->zero_faces_geom[g.subject().face_id()]);
180 template <
unsigned D, typename P>
183 complex_geometry<D, P>::reserve(
size_t n)
185 mln_precondition(data_);
186 data_->zero_faces_geom.reserve(n);
189 # endif // ! MLN_INCLUDE_ONLY
195 #endif // ! MLN_GEOM_COMPLEX_GEOMETRY_HH