27 #ifndef MLN_CORE_SITE_SET_P_FACES_HH
28 # define MLN_CORE_SITE_SET_P_FACES_HH
35 # include <mln/core/internal/site_set_base.hh>
37 # include <mln/topo/complex.hh>
39 # include <mln/core/faces_psite.hh>
43 # include <mln/core/site_set/p_faces_piter.hh>
46 # include <mln/core/site_set/p_complex.hh>
53 template <
unsigned N,
unsigned D,
typename P>
struct p_faces;
55 template <
unsigned N,
unsigned D,
typename P>
class p_faces_fwd_piter_;
56 template <
unsigned N,
unsigned D,
typename P>
class p_faces_bkd_piter_;
61 template <
unsigned N,
unsigned D,
typename P>
62 struct site_set_< p_faces<N, D, P> >
64 typedef trait::site_set::nsites::known
nsites;
66 typedef trait::site_set::bbox::unknown bbox;
67 typedef trait::site_set::contents::fixed contents;
68 typedef trait::site_set::arity::unique arity;
77 template <
unsigned N,
unsigned D,
typename P>
79 :
public internal::site_set_base_< faces_psite<N, D, P>,
83 typedef internal::site_set_base_< faces_psite<N, D, P>,
self_ > super_;
132 bool has(const psite& p) const;
135 std::
size_t memory_size() const;
143 topo::complex<D>& cplx() const;
146 topo::complex<D>& cplx();
163 mutable topo::complex<D> cplx_;
171 template <
unsigned N,
unsigned D, typename P>
173 operator==(const
p_faces<N, D, P>& lhs, const
p_faces<N, D, P>& rhs);
183 template <
unsigned N,
unsigned D, typename P>
185 operator<=(const
p_faces<N, D, P>& lhs, const
p_faces<N, D, P>& rhs);
189 # ifndef MLN_INCLUDE_ONLY
191 template <
unsigned N,
unsigned D,
typename P>
197 metal::bool_< N <= D >::check();
200 template <
unsigned N,
unsigned D,
typename P>
206 metal::bool_< N <= D >::check();
209 template <
unsigned N,
unsigned D,
typename P>
217 template <
unsigned N,
unsigned D,
typename P>
222 return cplx_.template nfaces_of_static_dim<N>();
225 template <
unsigned N,
unsigned D,
typename P>
233 template <
unsigned N,
unsigned D,
typename P>
238 mln_precondition(is_valid());
241 (p.site_set() == *
this) &&
246 template <
unsigned N,
unsigned D,
typename P>
249 p_faces<N, D, P>::memory_size()
const
256 template <
unsigned N,
unsigned D,
typename P>
260 mln_precondition(is_valid());
264 template <
unsigned N,
unsigned D,
typename P>
268 mln_precondition(is_valid());
277 template <
unsigned N,
unsigned D,
typename P>
286 template <
unsigned N,
unsigned D,
typename P>
295 # endif // ! MLN_INCLUDE_ONLY
299 #endif // ! MLN_CORE_SITE_SET_P_FACES_HH