* mln/morpho/line_gradient.hh (mln::morpho::line_gradient): Here.
---
milena/ChangeLog | 6 ++++++
milena/mln/morpho/line_gradient.hh | 9 +++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 329f88a..e225c93 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2008-09-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Improve the handling of a possibly unused variable in line_gradient.
+
+ * mln/morpho/line_gradient.hh (mln::morpho::line_gradient): Here.
+
+2008-09-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Fix a bug in morpho::line_gradient.
* mln/morpho/line_gradient.hh (mln::morpho::line_gradient):
diff --git a/milena/mln/morpho/line_gradient.hh b/milena/mln/morpho/line_gradient.hh
index c802d9a..f9b32b2 100644
--- a/milena/mln/morpho/line_gradient.hh
+++ b/milena/mln/morpho/line_gradient.hh
@@ -100,13 +100,10 @@ namespace mln
for_all (q)
if (ima.domain().has(q))
{
- // Avoid a warning about an undefined variable when the
- // NDEBUG is not defined.
-#ifdef NDEBUG
- g.add_edge(points[p], points[q]);
-#else // !NDEBUG
util::edge_id id = g.add_edge(points[p], points[q]);
-#endif //!NDEBUG
+ // Avoid a warning about an undefined variable when NDEBUG
+ // is not defined.
+ (void) id;
// The computed value is a norm of the gradient between P and Q.
edge_values.push_back(math::abs(ima(p) - ima(q)));
mln_assertion(id != mln_max(util::edge_id::equiv));
--
1.6.0.1
* mln/morpho/line_gradient.hh (mln::morpho::line_gradient):
Iterate on the domain, not the extensible domain.
---
milena/ChangeLog | 7 +++++++
milena/mln/morpho/line_gradient.hh | 2 +-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 0b74ec4..329f88a 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,12 @@
2008-09-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Fix a bug in morpho::line_gradient.
+
+ * mln/morpho/line_gradient.hh (mln::morpho::line_gradient):
+ Iterate on the domain, not the extensible domain.
+
+2008-09-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Use util::ord in morpho::line_gradient instead of ad hoc code.
* mln/morpho/line_gradient.hh
diff --git a/milena/mln/morpho/line_gradient.hh b/milena/mln/morpho/line_gradient.hh
index fb42d13..c802d9a 100644
--- a/milena/mln/morpho/line_gradient.hh
+++ b/milena/mln/morpho/line_gradient.hh
@@ -98,7 +98,7 @@ namespace mln
mln_fwd_qiter_(window2d) q(next_c4_win, p);
for_all (p)
for_all (q)
- if (ima.has(q))
+ if (ima.domain().has(q))
{
// Avoid a warning about an undefined variable when the
// NDEBUG is not defined.
--
1.6.0.1
* mln/core/internal/site_set_iterator_base.hh
* mln/core/internal/site_relative_iterator_base.hh:
Do it.
---
milena/ChangeLog | 8 ++++++++
.../core/internal/site_relative_iterator_base.hh | 7 ++++---
milena/mln/core/internal/site_set_iterator_base.hh | 3 +++
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 18f27e1..f8750e4 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,13 @@
2008-09-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Update the Doxygen documentation of iterator internal classes.
+
+ * mln/core/internal/site_set_iterator_base.hh
+ * mln/core/internal/site_relative_iterator_base.hh:
+ Do it.
+
+2008-09-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Update the Doxygen documentation of site set internal classes.
* mln/core/internal/site_set_base.hh: Do it.
diff --git a/milena/mln/core/internal/site_relative_iterator_base.hh b/milena/mln/core/internal/site_relative_iterator_base.hh
index f9b582f..b488ee7 100644
--- a/milena/mln/core/internal/site_relative_iterator_base.hh
+++ b/milena/mln/core/internal/site_relative_iterator_base.hh
@@ -49,14 +49,15 @@ namespace mln
namespace internal
{
- /*! \brief A generic forward iterator on points of windows and of
+ /*! \brief A generic iterator on points of windows and of
* neighborhoods.
*
* Parameter \c S is the targeted "site set definition" type. It
* can be either a Window, or a Neighborhood.
*
- * IMPORTANT: Sub-classes have to define do_start_, do_next_, and
- * compute_p_. They shall define NEITHER start_ NOR next_.
+ * IMPORTANT: Sub-classes have to define do_start_, do_next_,
+ * is_valid_, invalidate_ and compute_p_. They shall define
+ * NEITHER start_ NOR next_.
*/
template <typename S, typename E>
class site_relative_iterator_base : public site_iterator_base< S, E >
diff --git a/milena/mln/core/internal/site_set_iterator_base.hh b/milena/mln/core/internal/site_set_iterator_base.hh
index 376e5d6..6b76994 100644
--- a/milena/mln/core/internal/site_set_iterator_base.hh
+++ b/milena/mln/core/internal/site_set_iterator_base.hh
@@ -46,6 +46,9 @@ namespace mln
/*! \internal A base class for site iterators.
*
* Parameter \c S is the targeted site set type.
+ *
+ * IMPORTANT: Sub-classes have to define start_, next_,
+ * is_valid_ and invalidate_.
*/
template <typename S, typename E>
class site_set_iterator_base : public site_iterator_base<S, E>
--
1.6.0.1