26 #ifndef MLN_CORE_SITE_SET_P_COMPLEX_HH
27 # define MLN_CORE_SITE_SET_P_COMPLEX_HH
33 # include <mln/core/internal/site_set_base.hh>
35 # include <mln/topo/complex.hh>
37 # include <mln/core/site_set/complex_psite.hh>
38 # include <mln/core/site_set/p_complex_piter.hh>
39 # include <mln/core/site_set/p_n_faces_piter.hh>
42 # include <mln/core/site_set/p_complex_faces_piter.hh>
45 # include <mln/geom/complex_geometry.hh>
55 template <
unsigned D,
typename G>
class p_complex;
57 template <
unsigned D,
typename G>
class p_complex_fwd_piter_;
58 template <
unsigned D,
typename G>
class p_complex_bkd_piter_;
62 template <
unsigned N,
unsigned D,
typename G>
63 class p_complex_faces_fwd_piter_;
64 template <
unsigned N,
unsigned D,
typename G>
65 class p_complex_faces_bkd_piter_;
70 template <
unsigned D,
typename G>
71 struct site_set_< p_complex<D, G> >
73 typedef trait::site_set::nsites::known
nsites;
75 typedef trait::site_set::bbox::unknown
bbox;
76 typedef trait::site_set::contents::fixed
contents;
77 typedef trait::site_set::arity::unique
arity;
115 template <
unsigned D,
typename G>
165 bool has(const psite&
p) const;
176 topo::complex<D>& cplx() const;
179 topo::complex<D>& cplx();
182 const G& geom() const;
199 mutable topo::complex<D> cplx_;
209 template <
unsigned D, typename G>
221 template <
unsigned D, typename G>
227 # ifndef MLN_INCLUDE_ONLY
229 template <
unsigned D,
typename G>
232 : cplx_(cplx), geom_(geom)
236 template <
unsigned D,
typename G>
244 template <
unsigned D,
typename G>
247 p_complex<D, G>::nfaces()
const
249 return cplx_.nfaces();
252 template <
unsigned D,
typename G>
255 p_complex<D, G>::nfaces_of_dim(
unsigned n)
const
257 return cplx_.nfaces_of_dim(n);
260 template <
unsigned D,
typename G>
263 p_complex<D, G>::is_valid()
const
268 template <
unsigned D,
typename G>
271 p_complex<D, G>::has(
const psite& p)
const
273 mln_precondition(is_valid());
276 (p.site_set() == *
this) &&
281 template <
unsigned D,
typename G>
284 p_complex<D, G>::memory_size()
const
291 template <
unsigned D,
typename G>
293 p_complex<D, G>::cplx()
const
295 mln_precondition(is_valid());
299 template <
unsigned D,
typename G>
301 p_complex<D, G>::cplx()
303 mln_precondition(is_valid());
307 template <
unsigned D,
typename G>
309 p_complex<D, G>::geom()
const
319 template <
unsigned D,
typename G>
321 operator==(
const p_complex<D, G>& lhs,
const p_complex<D, G>& rhs)
325 return lhs.cplx() == rhs.cplx();
328 template <
unsigned D,
typename G>
330 operator<=(const p_complex<D, G>& lhs,
const p_complex<D, G>& rhs)
337 # endif // ! MLN_INCLUDE_ONLY
341 #endif // ! MLN_CORE_SITE_SET_P_COMPLEX_HH