* tests/topo/complex.cc: Here.
---
milena/ChangeLog | 6 ++++++
milena/tests/topo/complex.cc | 19 ++++++++++++++++++-
2 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index dbe1c06..736c0cc 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -24,6 +24,12 @@
2008-10-22 Roland Levillain <roland(a)lrde.epita.fr>
+ Exercise iterators on transitively adjacent m-faces.
+
+ * tests/topo/complex.cc: Here.
+
+2008-10-22 Roland Levillain <roland(a)lrde.epita.fr>
+
Add a complex relative iterator on transitively adjacent m-faces.
* mln/topo/adj_m_face_iter.hh: New.
diff --git a/milena/tests/topo/complex.cc b/milena/tests/topo/complex.cc
index 249b743..7d5d354 100644
--- a/milena/tests/topo/complex.cc
+++ b/milena/tests/topo/complex.cc
@@ -33,7 +33,6 @@
#include <iostream>
#include <mln/topo/complex.hh>
-#include <mln/topo/center_only_iter.hh>
using namespace mln;
@@ -293,6 +292,24 @@ int main()
}
std::cout << std::endl;
+ // For each face F of C, and for M in [0, D], iterate on the the set
+ // of M-faces transitively adjacent to F.
+ topo::adj_m_face_fwd_iter<D> fwd_amf(fwd_f, 0);
+ topo::adj_m_face_bkd_iter<D> bkd_amf(fwd_f, 0);
+ for_all(fwd_f)
+ {
+ for (unsigned m = 0; m <= D; ++m)
+ {
+ fwd_amf.set_m(m);
+ bkd_amf.set_m(m);
+ std::cout << m << "-faces (transitively) adjacent to " <<
fwd_f
+ << ": " << std::endl;
+ for_all_2(fwd_amf, bkd_amf)
+ std::cout << " " << fwd_amf << '\t' <<
bkd_amf << std::endl;
+ }
+ std::cout << std::endl;
+ }
+
/* Next, write these:
--
1.6.0.1
Show replies by date