* mln/topo/skeleton/breadth_first_thinning.hh,
* mln/topo/skeleton/priority_driven_thinning.hh:
Here.
---
milena/ChangeLog | 8 ++++++++
milena/mln/topo/skeleton/breadth_first_thinning.hh | 16 ++++------------
.../mln/topo/skeleton/priority_driven_thinning.hh | 16 ++++------------
3 files changed, 16 insertions(+), 24 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index e0532ab..9a2bbcc 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,13 @@
2010-09-19 Roland Levillain <roland(a)lrde.epita.fr>
+ Get rid of intermediate psites in thinning algorithms.
+
+ * mln/topo/skeleton/breadth_first_thinning.hh,
+ * mln/topo/skeleton/priority_driven_thinning.hh:
+ Here.
+
+2010-09-19 Roland Levillain <roland(a)lrde.epita.fr>
+
Have topo::is_n_face take a psite type as class parameter.
* mln/topo/is_n_face.hh: Here, so that the argument of this
diff --git a/milena/mln/topo/skeleton/breadth_first_thinning.hh
b/milena/mln/topo/skeleton/breadth_first_thinning.hh
index d2f33b5..286e3e0 100644
--- a/milena/mln/topo/skeleton/breadth_first_thinning.hh
+++ b/milena/mln/topo/skeleton/breadth_first_thinning.hh
@@ -119,15 +119,9 @@ namespace mln
typedef p_queue_fast<psite> queue_t;
queue_t queue;
// Populate QUEUE with candidate simple points.
- mln_piter(I) p_(output.domain());
- for_all(p_)
+ mln_piter(I) p(output.domain());
+ for_all(p)
{
- /* CONSTRAINTS and IS_SIMPLE are site-to-boolean (p2b)
- predicate functors; passing an iterator as argument might
- not be possible (C++ cannot resolve template routines if
- an implicit conversion of the argument is needed). Help
- the compiler and pass an actual, explicit psite. */
- psite p = p_;
if (output(p) && constraint(p) && is_simple(p))
queue.push(p);
}
@@ -138,11 +132,9 @@ namespace mln
if (output(p) && constraint(p) && is_simple(p))
{
detach(p, output);
- mln_niter(N) n_(nbh, p);
- for_all(n_)
+ mln_niter(N) n(nbh, p);
+ for_all(n)
{
- // Same remark as above regarding P and P_.
- psite n = n_;
if (output.domain().has(n)
&& output(n) && constraint(n) && is_simple(n))
queue.push(n);
diff --git a/milena/mln/topo/skeleton/priority_driven_thinning.hh
b/milena/mln/topo/skeleton/priority_driven_thinning.hh
index 42e1b13..cacc575 100644
--- a/milena/mln/topo/skeleton/priority_driven_thinning.hh
+++ b/milena/mln/topo/skeleton/priority_driven_thinning.hh
@@ -129,15 +129,9 @@ namespace mln
typedef p_priority<mln_value(J), queue_t> priority_queue_t;
priority_queue_t queue;
// Populate QUEUE with candidate simple points.
- mln_piter(I) p_(output.domain());
- for_all(p_)
+ mln_piter(I) p(output.domain());
+ for_all(p)
{
- /* CONSTRAINTS and IS_SIMPLE are site-to-boolean (p2b)
- predicate functors; passing an iterator as argument might
- not be possible (C++ cannot resolve template routines if
- an implicit conversion of the argument is needed). Help
- the compiler and pass an actual, explicit psite. */
- psite p = p_;
if (output(p) && constraint(p) && is_simple(p))
queue.push(priority(p), p);
}
@@ -148,11 +142,9 @@ namespace mln
if (output(p) && constraint(p) && is_simple(p))
{
detach(p, output);
- mln_niter(N) n_(nbh, p);
- for_all(n_)
+ mln_niter(N) n(nbh, p);
+ for_all(n)
{
- // Same remark as above regarding P and P_.
- psite n = n_;
if (output.domain().has(n)
&& output(n) && constraint(n) && is_simple(n))
queue.push(priority(n), n);
--
1.5.6.5