26 #ifndef MLN_TOPO_ALGEBRAIC_N_FACE_HH
27 # define MLN_TOPO_ALGEBRAIC_N_FACE_HH
32 #include <mln/topo/n_face.hh>
49 template <
unsigned N,
unsigned D>
76 template <
unsigned N,
unsigned D>
83 template <
unsigned N,
unsigned D>
87 template <
unsigned N,
unsigned D>
100 template <
unsigned N,
unsigned D>
109 template <
unsigned N,
unsigned D>
121 template <
unsigned N,
unsigned D>
123 operator< (const algebraic_n_face<N, D>& lhs,
130 template <
unsigned N,
unsigned D>
132 operator<<(std::ostream& ostr, const algebraic_n_face<N, D>& f);
155 template <
unsigned D>
162 # ifndef MLN_INCLUDE_ONLY
164 template <
unsigned N,
unsigned D>
170 metal::bool_< N <= D >::check();
171 mln_postcondition(!this->
is_valid());
174 template <
unsigned N,
unsigned D>
178 :
super_(c, face_id), sign_(sign)
181 metal::bool_< N <= D >::check();
184 template <
unsigned N,
unsigned D>
190 metal::bool_< N <= D >::check();
194 template <
unsigned N,
unsigned D>
202 template <
unsigned N,
unsigned D>
211 template <
unsigned N,
unsigned D>
219 template <
unsigned N,
unsigned D>
220 algebraic_n_face<N, D>
226 template <
unsigned N,
unsigned D>
227 algebraic_n_face<N, D>
228 operator-(
const algebraic_n_face<N, D>& f)
230 algebraic_n_face<N, D> f2(f);
231 f2.set_sign(!f.sign());
236 template <
unsigned N,
unsigned D>
243 mln_precondition(lhs.
cplx() == rhs.
cplx());
247 template <
unsigned N,
unsigned D>
254 mln_precondition(lhs.
cplx() == rhs.
cplx());
255 return !(lhs == rhs);
258 template <
unsigned N,
unsigned D>
261 operator< (const algebraic_n_face<N, D>& lhs,
265 mln_precondition(lhs.cplx() == rhs.cplx());
266 return lhs.face_id() < rhs.face_id();
270 template <
unsigned N,
unsigned D>
273 operator<<(std::ostream& ostr, const algebraic_n_face<N, D>& f)
276 ostr <<
"(cplx = " << f.cplx().addr() <<
", dim = " << f.n()
277 <<
", id = " << f.face_id() <<
", sign = " << f.sign()<<
')';
284 template <
unsigned D>
285 algebraic_n_face<1, D>
288 typedef std::vector< algebraic_n_face<0, D> > n0_faces_t;
289 typedef std::vector< algebraic_n_face<1, D> > n1_faces_t;
292 for (
typename n1_faces_t::const_iterator e = f1_adj_edges.begin();
293 e != f1_adj_edges.end(); ++e)
295 n0_faces_t e_adj_vertices = e->lower_dim_adj_faces();
296 for (
typename n0_faces_t::const_iterator w = e_adj_vertices.begin();
297 w != e_adj_vertices.end(); ++w)
307 # endif // ! MLN_INCLUDE_ONLY
313 #endif // ! MLN_TOPO_ALGEBRAIC_N_FACE_HH