#157: Improve depency tracking in Swilena
-------------------------+--------------------------------------------------
Reporter: levill_r | Owner: Olena Team
Type: enhancement | Status: new
Priority: minor | Milestone: Olena 1.0
Component: Swilena | Version: 1.0
Keywords: |
-------------------------+--------------------------------------------------
Our hand-made build system does not seem to track dependencies very well
in Swilena/Python. Improve this.
--
Ticket URL: <https://trac.lrde.org/olena/ticket/157>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-06-09 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Fix coding style.
* mln/accu/stat/all.hh,
* mln/accu/stat/max.hh,
* mln/accu/stat/max_h.hh,
* mln/accu/stat/mean.hh,
* mln/accu/stat/median_h.hh,
* mln/accu/stat/min.hh,
* mln/accu/stat/min_h.hh,
* mln/accu/stat/min_max.hh,
* mln/morpho/tree/all.hh,
* mln/morpho/tree/compute_attribute_image.hh,
* mln/morpho/tree/compute_parent.hh,
* mln/morpho/tree/filter/all.hh,
* mln/morpho/tree/filter/direct.hh,
* mln/morpho/tree/filter/filter.hh,
* mln/morpho/tree/filter/max.hh,
* mln/morpho/tree/filter/min.hh,
* mln/morpho/tree/filter/subtractive.hh,
* mln/morpho/tree/propagate_if.hh,
* mln/morpho/tree/propagate_node.hh,
* mln/morpho/tree/propagate_representative.hh:
Fix coding style.
---
accu/stat/all.hh | 11 +++++-
accu/stat/max.hh | 11 +++++-
accu/stat/max_h.hh | 17 +++++-----
accu/stat/mean.hh | 12 ++++++-
accu/stat/median_h.hh | 12 ++++++-
accu/stat/min.hh | 9 +++++
accu/stat/min_h.hh | 11 +++++-
accu/stat/min_max.hh | 31 +++++++++----------
morpho/tree/all.hh | 8 ++---
morpho/tree/compute_attribute_image.hh | 6 +--
morpho/tree/filter/all.hh | 26 +++++++++-------
morpho/tree/filter/direct.hh | 36 ++++++++++++++--------
morpho/tree/filter/filter.hh | 34 +++++++++++++--------
morpho/tree/filter/max.hh | 36 ++++++++++++++--------
morpho/tree/filter/min.hh | 36 ++++++++++++++--------
morpho/tree/filter/subtractive.hh | 33 ++++++++++++--------
morpho/tree/propagate_if.hh | 45 ++++++++++++++++------------
morpho/tree/propagate_node.hh | 52 ++++++++++++++++++---------------
18 files changed, 268 insertions(+), 158 deletions(-)
Index: trunk/milena/mln/accu/stat/min.hh
===================================================================
--- trunk/milena/mln/accu/stat/min.hh (revision 4040)
+++ trunk/milena/mln/accu/stat/min.hh (revision 4041)
@@ -47,13 +47,16 @@
namespace stat
{
+
// Forward declaration.
template <typename T>
struct min;
- }
+
+ } // end of namespace mln::accu::stat
namespace meta
{
+
namespace stat
{
/// Meta accumulator for min.
@@ -66,12 +69,15 @@
typedef accu::stat::min<T> ret;
};
};
+
} // end of namespace mln::accu::meta::stat
+
} // end of namespace mln::accu::meta
namespace stat
{
+
/// \brief Generic min accumulator class.
/*!
* The parameter \c T is the type of values.
@@ -169,6 +175,7 @@
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::accu::stat
+
} // end of namespace mln::accu
} // end of namespace mln
Index: trunk/milena/mln/accu/stat/median_h.hh
===================================================================
--- trunk/milena/mln/accu/stat/median_h.hh (revision 4040)
+++ trunk/milena/mln/accu/stat/median_h.hh (revision 4041)
@@ -40,19 +40,25 @@
namespace mln
{
+
namespace accu
{
+
namespace stat
{
+
// Forward declaration.
template <typename V>
struct median_h;
- }
+
+ } // end of namespace mln::accu::stat
namespace meta
{
+
namespace stat
{
+
/// Meta accumulator for median_h.
struct median_h : public Meta_Accumulator< median_h >
{
@@ -62,7 +68,9 @@
typedef accu::stat::median_h<V> ret;
};
};
+
} // end of namespace mln::accu::meta::stat
+
} // end of namespace mln::accu::meta
namespace stat
@@ -282,7 +290,9 @@
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::accu::stat
+
} // end of namespace mln::accu
+
} // end of namespace mln
#endif // ! MLN_ACCU_STAT_MEDIAN_H_HH
Index: trunk/milena/mln/accu/stat/max.hh
===================================================================
--- trunk/milena/mln/accu/stat/max.hh (revision 4040)
+++ trunk/milena/mln/accu/stat/max.hh (revision 4041)
@@ -41,22 +41,27 @@
namespace mln
{
+
namespace accu
{
+
namespace stat
{
+
// Forward declaration.
template <typename T>
struct max;
- }
+
+ } // end of namespace mln::accu::stat
namespace meta
{
+
namespace stat
{
- /// Meta accumulator for max.
+ /// Meta accumulator for max.
struct max : public Meta_Accumulator< max >
{
template <typename T>
@@ -67,6 +72,7 @@
};
} // end of namespace mln::accu::meta::stat
+
} // end of namespace mln::accu::meta
@@ -168,6 +174,7 @@
}
# endif // ! MLN_INCLUDE_ONLY
+
} // end of namespace mln::accu::stat
} // end of namespace mln::accu
Index: trunk/milena/mln/accu/stat/all.hh
===================================================================
--- trunk/milena/mln/accu/stat/all.hh (revision 4040)
+++ trunk/milena/mln/accu/stat/all.hh (revision 4041)
@@ -35,19 +35,24 @@
namespace mln
{
+
namespace accu
{
+
namespace meta
{
+
/// Namespace of statistical meta-accumulators.
namespace stat {}
- }
+
+ } // end of namespace mln::accu::meta
/// Namespace of statistical accumulators.
namespace stat {}
- }
-}
+ } // end of namespace mln::accu
+
+} // end of namespace mln
# include <mln/accu/stat/deviation.hh>
Index: trunk/milena/mln/accu/stat/min_max.hh
===================================================================
--- trunk/milena/mln/accu/stat/min_max.hh (revision 4040)
+++ trunk/milena/mln/accu/stat/min_max.hh (revision 4041)
@@ -46,24 +46,9 @@
namespace mln
{
- namespace accu
- {
- namespace stat
- {
- // Forward declaration.
- template <typename V>
- struct min_max;
- }
- namespace meta
- {
- namespace stat
+ namespace accu
{
- // FIXME: Doc!
- typedef meta::pair<meta::stat::min,meta::stat::max> min_max;
-
- } // end of namespace mln::accu::meta::stat
- } // end of namespace mln::accu::meta
namespace stat
{
@@ -82,6 +67,20 @@
template <typename I> struct min_max< util::pix<I> >;
} // end of namespace mln::accu::stat
+
+
+ namespace meta
+ {
+
+ namespace stat
+ {
+ // FIXME: Doc!
+ typedef meta::pair<meta::stat::min,meta::stat::max> min_max;
+
+ } // end of namespace mln::accu::meta::stat
+
+ } // end of namespace mln::accu::meta
+
} // end of namespace mln::accu
} // end of namespace mln
Index: trunk/milena/mln/accu/stat/min_h.hh
===================================================================
--- trunk/milena/mln/accu/stat/min_h.hh (revision 4040)
+++ trunk/milena/mln/accu/stat/min_h.hh (revision 4041)
@@ -41,18 +41,22 @@
namespace mln
{
+
namespace accu
{
namespace stat
{
+
// Forward declaration.
template <typename V>
struct min_h;
- }
+
+ } // end of namespace mln::accu::stat
namespace meta
{
+
namespace stat
{
@@ -67,11 +71,13 @@
};
} // end of namespace mln::meta::stat
+
} // end of namespace mln::meta
namespace stat
{
+
/// \brief Generic min function based on histogram over a value
/// set with type \c V.
///
@@ -305,8 +311,9 @@
} // end of namespace mln::accu::stat
+
} // end of namespace mln::accu
-} // end of namespace mln
+} // end of namespace mln
#endif // ! MLN_ACCU_STAT_MIN_H_HH
Index: trunk/milena/mln/accu/stat/max_h.hh
===================================================================
--- trunk/milena/mln/accu/stat/max_h.hh (revision 4040)
+++ trunk/milena/mln/accu/stat/max_h.hh (revision 4041)
@@ -47,13 +47,16 @@
namespace stat
{
+
// Forward declaration.
template <typename V>
struct max_h;
- }
+
+ } // end of namespace mln::accu::stat
namespace meta
{
+
namespace stat
{
@@ -67,8 +70,9 @@
};
};
- } // end of namespace mln::meta::stat
- } // end of namespace mln::meta
+ } // end of namespace mln::accu::meta::stat
+
+ } // end of namespace mln::accu::meta
namespace stat
@@ -125,13 +129,8 @@
};
-
template <typename I> struct max_h< util::pix<I> >;
-
-
-
-
# ifndef MLN_INCLUDE_ONLY
template <typename V>
@@ -308,7 +307,9 @@
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::accu::stat
+
} // end of namespace mln::accu
+
} // end of namespace mln
Index: trunk/milena/mln/accu/stat/mean.hh
===================================================================
--- trunk/milena/mln/accu/stat/mean.hh (revision 4040)
+++ trunk/milena/mln/accu/stat/mean.hh (revision 4041)
@@ -42,19 +42,25 @@
namespace mln
{
+
namespace accu
{
+
namespace stat
{
+
// Forward declaration.
template <typename T, typename S, typename M>
struct mean;
- }
+
+ } // end of namespace mln::accu::stat
namespace meta
{
+
namespace stat
{
+
/// Meta accumulator for mean.
struct mean : public Meta_Accumulator< mean >
{
@@ -66,7 +72,9 @@
typedef accu::stat::mean<T,S,M> ret;
};
};
+
} // end of namespace mln::accu::meta::stat
+
} // end of namespace mln::accu::meta
namespace stat
@@ -183,7 +191,9 @@
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::accu::stat
+
} // end of namespace mln::accu
+
} // end of namespace mln
#endif // ! MLN_ACCU_STAT_MEAN_HH
Index: trunk/milena/mln/morpho/tree/compute_attribute_image.hh
===================================================================
--- trunk/milena/mln/morpho/tree/compute_attribute_image.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/compute_attribute_image.hh (revision 4041)
@@ -72,9 +72,9 @@
** - p is root iff parent(p) == p \n
** - p is a node iff either p is root or f(parent(p)) != f(p).
**
- ** @param[in] a Attribute.
- ** @param[in] t Component tree.
- ** @param[out] accu_image Optional argument used to store image
+ ** \param[in] a Attribute.
+ ** \param[in] t Component tree.
+ ** \param[out] accu_image Optional argument used to store image
** of attribute accumulator.
**
** @return The attribute image.
Index: trunk/milena/mln/morpho/tree/propagate_representative.hh
===================================================================
Index: trunk/milena/mln/morpho/tree/compute_parent.hh
===================================================================
Index: trunk/milena/mln/morpho/tree/filter/min.hh
===================================================================
--- trunk/milena/mln/morpho/tree/filter/min.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/filter/min.hh (revision 4041)
@@ -26,34 +26,41 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_MORPHO_TREE_FILTER_MIN_HH_
-# define MLN_MORPHO_TREE_FILTER_MIN_HH_
+#ifndef MLN_MORPHO_TREE_FILTER_MIN_HH
+# define MLN_MORPHO_TREE_FILTER_MIN_HH
# include <mln/core/concept/function.hh>
# include <mln/morpho/tree/data.hh>
/**
-** @file mln/morpho/tree/filter/min.hh
+** \file mln/morpho/tree/filter/min.hh
**
-** @brief Filtering with min strategy.
+** \brief Filtering with min strategy.
**
**
*/
-namespace mln {
- namespace morpho {
- namespace tree {
- namespace filter {
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
+
+ namespace filter
+ {
/**
** Min pruning strategy. A node is removed iif its parent is
** removed or if it does not verify the predicate \p pred_.
**
- ** @param[in] tree Component tree.
- ** @param[out] f_ Image to filter.
- ** @param[in] pred_ Filtering criterion.
+ ** \param[in] tree Component tree.
+ ** \param[out] f_ Image to filter.
+ ** \param[in] pred_ Filtering criterion.
*/
template <typename T, typename F, typename P>
inline
@@ -90,11 +97,14 @@
trace::exiting("mln::morpho::tree::filter::min");
}
-# endif /* !MLN_INCLUDE_ONLY */
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::morpho::tree::filter
+
} // end of namespace mln::morpho::tree
+
} // end of namespace mln::morpho
+
} // end of namespace mln
-#endif /* !MLN_MORPHO_TREE_FILTER_MIN_HH_ */
+#endif // ! MLN_MORPHO_TREE_FILTER_MIN_HH
Index: trunk/milena/mln/morpho/tree/filter/filter.hh
===================================================================
--- trunk/milena/mln/morpho/tree/filter/filter.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/filter/filter.hh (revision 4041)
@@ -26,8 +26,8 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_MORPHO_TREE_FILTER_FILTER_HH_
-# define MLN_MORPHO_TREE_FILTER_FILTER_HH_
+#ifndef MLN_MORPHO_TREE_FILTER_FILTER_HH
+# define MLN_MORPHO_TREE_FILTER_FILTER_HH
/**
** \file mln/morpho/tree/filter/filter.hh
@@ -39,10 +39,17 @@
# include <mln/morpho/tree/data.hh>
# include <mln/morpho/tree/propagate_if.hh>
-namespace mln {
- namespace morpho {
- namespace tree {
- namespace filter {
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
+
+ namespace filter
+ {
/**
@@ -50,10 +57,10 @@
** sub-components of nodes that does not match the predicate
** \p pred_ are filled with the given value \p v.
**
- ** @param tree Component tree.
- ** @param f_ Image function.
- ** @param pred_ Predicate.
- ** @param v Value to propagate.
+ ** \param tree Component tree.
+ ** \param f_ Image function.
+ ** \param pred_ Predicate.
+ ** \param v Value to propagate.
*/
template <typename T, typename F, typename P>
inline
@@ -88,12 +95,15 @@
trace::exiting("mln::morpho::tree::filter::filter");
}
-# endif /* !MLN_INCLUDE_ONLY */
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::morpho::tree::filter
+
} // end of namespace mln::morpho::tree
+
} // end of namespace mln::morpho
+
} // end of namespace mln
-#endif /* !MLN_MORPHO_TREE_FILTER_FILTER_HH_ */
+#endif // ! MLN_MORPHO_TREE_FILTER_FILTER_HH
Index: trunk/milena/mln/morpho/tree/filter/max.hh
===================================================================
--- trunk/milena/mln/morpho/tree/filter/max.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/filter/max.hh (revision 4041)
@@ -26,33 +26,40 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_MORPHO_TREE_FILTER_MAX_HH_
-# define MLN_MORPHO_TREE_FILTER_MAX_HH_
+#ifndef MLN_MORPHO_TREE_FILTER_MAX_HH
+# define MLN_MORPHO_TREE_FILTER_MAX_HH
# include <mln/core/concept/function.hh>
# include <mln/morpho/tree/data.hh>
/**
-** @file mln/morpho/tree/filter/max.hh
+** \file mln/morpho/tree/filter/max.hh
**
-** @brief Filtering with max strategy.
+** \brief Filtering with max strategy.
**
**
*/
-namespace mln {
- namespace morpho {
- namespace tree {
- namespace filter {
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
+
+ namespace filter
+ {
/**
** Max pruning strategy. A node is removed iif all of its
** children are removed or if it does not verify the predicate
** \p pred_.
**
- ** @param[in] tree Component tree.
- ** @param[out] f_ Image to filter.
- ** @param[in] pred_ Filtering criterion.
+ ** \param[in] tree Component tree.
+ ** \param[out] f_ Image to filter.
+ ** \param[in] pred_ Filtering criterion.
*/
template <typename T, typename F, typename P>
inline
@@ -100,11 +107,14 @@
trace::exiting("mln::morpho::tree::filter::max");
}
-# endif /* !MLN_INCLUDE_ONLY */
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::morpho::tree::filter
+
} // end of namespace mln::morpho::tree
+
} // end of namespace mln::morpho
+
} // end of namespace mln
-#endif /* !MLN_MORPHO_TREE_FILTER_MAX_HH_ */
+#endif // ! MLN_MORPHO_TREE_FILTER_MAX_HH
Index: trunk/milena/mln/morpho/tree/filter/all.hh
===================================================================
--- trunk/milena/mln/morpho/tree/filter/all.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/filter/all.hh (revision 4041)
@@ -26,11 +26,11 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_MORPHO_TREE_FILTER_ALL_HH_
-# define MLN_MORPHO_TREE_FILTER_ALL_HH_
+#ifndef MLN_MORPHO_TREE_FILTER_ALL_HH
+# define MLN_MORPHO_TREE_FILTER_ALL_HH
/**
-** @file mln/morpho/tree/filter.hh
+** \file mln/morpho/tree/filter.hh
**
** Methods to handle component tree filtering strategies with
** non-increasing attribute. Nevertheless, it works on increasing
@@ -40,16 +40,22 @@
** the min filter that minimizes calls to predicate function.
*/
-namespace mln {
- namespace morpho {
- namespace tree {
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
/// Namespace for attribute filtering.
- namespace filter {
+ namespace filter {}
- } // end of namespace mln::morpho::tree::filter
} // end of namespace mln::morpho::tree
+
} // end of namespace mln::morpho
+
} // end of namespace mln
@@ -61,6 +67,4 @@
# include <mln/morpho/tree/filter/direct.hh>
# include <mln/morpho/tree/filter/subtractive.hh>
-
-
-#endif /* !MLN_MORPHO_TREE_FILTER_ALL_HH_ */
+#endif // ! MLN_MORPHO_TREE_FILTER_ALL_HH
Index: trunk/milena/mln/morpho/tree/filter/direct.hh
===================================================================
--- trunk/milena/mln/morpho/tree/filter/direct.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/filter/direct.hh (revision 4041)
@@ -26,32 +26,39 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_MORPHO_TREE_FILTER_DIRECT_HH_
-# define MLN_MORPHO_TREE_FILTER_DIRECT_HH_
+#ifndef MLN_MORPHO_TREE_FILTER_DIRECT_HH
+# define MLN_MORPHO_TREE_FILTER_DIRECT_HH
# include <mln/core/concept/function.hh>
# include <mln/morpho/tree/data.hh>
/**
-** @file mln/morpho/tree/filter/direct.hh
+** \file mln/morpho/tree/filter/direct.hh
**
-** @brief Filtering with direct strategy.
+** \brief Filtering with direct strategy.
**
**
*/
-namespace mln {
- namespace morpho {
- namespace tree {
- namespace filter {
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
+
+ namespace filter
+ {
/**
** Direct non-pruning strategy. A node is removed if it does
** not verify the predicate. The sub-components remain intact.
**
- ** @param[in] tree Component tree.
- ** @param[out] f_ Image to filter.
- ** @param[in] pred_ Filtering criterion.
+ ** \param[in] tree Component tree.
+ ** \param[out] f_ Image to filter.
+ ** \param[in] pred_ Filtering criterion.
*/
template <typename T, typename F, typename P>
inline
@@ -81,11 +88,14 @@
trace::exiting("mln::morpho::tree::filter::direct");
}
-# endif /* !MLN_INCLUDE_ONLY */
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::morpho::tree::filter
+
} // end of namespace mln::morpho::tree
+
} // end of namespace mln::morpho
+
} // end of namespace mln
-#endif /* !MLN_MORPHO_TREE_FILTER_DIRECT_HH_ */
+#endif // ! MLN_MORPHO_TREE_FILTER_DIRECT_HH
Index: trunk/milena/mln/morpho/tree/filter/subtractive.hh
===================================================================
--- trunk/milena/mln/morpho/tree/filter/subtractive.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/filter/subtractive.hh (revision 4041)
@@ -26,8 +26,8 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_MORPHO_TREE_FILTER_SUBTRACTIVE_HH_
-# define MLN_MORPHO_TREE_FILTER_SUBTRACTIVE_HH_
+#ifndef MLN_MORPHO_TREE_FILTER_SUBTRACTIVE_HH
+# define MLN_MORPHO_TREE_FILTER_SUBTRACTIVE_HH
# include <mln/core/concept/function.hh>
# include <mln/fun/ops.hh>
@@ -36,26 +36,33 @@
# include <mln/morpho/tree/propagate_if.hh>
/**
-** @file mln/morpho/tree/filter/subtractive.hh
+** \file mln/morpho/tree/filter/subtractive.hh
**
-** @brief Filtering with subtractive strategy.
+** \brief Filtering with subtractive strategy.
**
**
*/
-namespace mln {
- namespace morpho {
- namespace tree {
- namespace filter {
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
+
+ namespace filter
+ {
/**
** Subtractive pruning strategy. The node is removed if it
** does not verify the predicate. The sub-components values
** are set to the value of the removed component.
**
- ** @param[in] tree Component tree.
- ** @param[out] f_ Image to filter.
- ** @param[in] pred_ Filtering criterion.
+ ** \param[in] tree Component tree.
+ ** \param[out] f_ Image to filter.
+ ** \param[in] pred_ Filtering criterion.
*/
template <typename T, typename F, typename P>
inline
@@ -87,11 +94,11 @@
trace::exiting("mln::morpho::tree::filter::subtractive");
}
-# endif /* !MLN_INCLUDE_ONLY */
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::morpho::tree::filter
} // end of namespace mln::morpho::tree
} // end of namespace mln::morpho
} // end of namespace mln
-#endif /* !MLN_MORPHO_TREE_FILTER_SUBTRACTIVE_HH_ */
+#endif // ! MLN_MORPHO_TREE_FILTER_SUBTRACTIVE_HH
Index: trunk/milena/mln/morpho/tree/propagate_node.hh
===================================================================
--- trunk/milena/mln/morpho/tree/propagate_node.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/propagate_node.hh (revision 4041)
@@ -26,8 +26,8 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_MORPHO_TREE_PROPAGATE_NODE_HH_
-# define MLN_MORPHO_TREE_PROPAGATE_NODE_HH_
+#ifndef MLN_MORPHO_TREE_PROPAGATE_NODE_HH
+# define MLN_MORPHO_TREE_PROPAGATE_NODE_HH
# include <mln/core/concept/image.hh>
# include <mln/core/macros.hh>
@@ -37,18 +37,23 @@
///
/// Functions to propagate node in the tree.
-namespace mln {
- namespace morpho {
- namespace tree {
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
/**
** Propagate a value \p v from a node \p n to its descendants.
**
- ** @param n[in] Node to propagate.
- ** @param t[in] Component tree used for propagation.
- ** @param a_[in] Attribute image where values are propagated.
- ** @param v[in] Value to propagate.
- ** @param nb_leaves[out] Optional. Store the number of leaves in
+ ** \param n[in] Node to propagate.
+ ** \param t[in] Component tree used for propagation.
+ ** \param a_[in] Attribute image where values are propagated.
+ ** \param v[in] Value to propagate.
+ ** \param nb_leaves[out] Optional. Store the number of leaves in
** the component.
*/
template <typename T, typename A>
@@ -62,10 +67,10 @@
/**
** Propagate the node's value to its descendants.
**
- ** @param n[in] Node to propagate.
- ** @param t[in] Component tree used for propagation.
- ** @param a_[in] Attribute image where values are propagated.
- ** @param nb_leaves[out] Optional. Store the number of leaves in
+ ** \param n[in] Node to propagate.
+ ** \param t[in] Component tree used for propagation.
+ ** \param a_[in] Attribute image where values are propagated.
+ ** \param nb_leaves[out] Optional. Store the number of leaves in
** the component.
*/
template <typename T, typename A>
@@ -80,10 +85,10 @@
/**
** Propagate a value \p v from a node \p n to its ancestors.
**
- ** @param n Node to propagate.
- ** @param t Component tree used for propagation.
- ** @param a_ Attribute image where values are propagated.
- ** @param v Value to propagate.
+ ** \param n Node to propagate.
+ ** \param t Component tree used for propagation.
+ ** \param a_ Attribute image where values are propagated.
+ ** \param v Value to propagate.
*/
template <typename T, typename A>
void
@@ -95,9 +100,9 @@
/**
** Propagate the node's value to its ancestors.
**
- ** @param n Node to propagate.
- ** @param t Component tree used for propagation.
- ** @param a_ Attribute image where values are propagated.
+ ** \param n Node to propagate.
+ ** \param t Component tree used for propagation.
+ ** \param a_ Attribute image where values are propagated.
*/
template <typename T, typename A>
inline
@@ -111,7 +116,6 @@
/* Descendants propagation */
-
template <typename T, typename A>
inline
void
@@ -203,7 +207,9 @@
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::morpho::tree
+
} // end of namespace mln::morpho
+
} // end of namespace mln
-#endif /* !MLN_MORPHO_TREE_PROPAGATE_NODE_HH_ */
+#endif // ! MLN_MORPHO_TREE_PROPAGATE_NODE_HH
Index: trunk/milena/mln/morpho/tree/all.hh
===================================================================
--- trunk/milena/mln/morpho/tree/all.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/all.hh (revision 4041)
@@ -35,6 +35,7 @@
namespace mln
{
+
namespace morpho
{
@@ -42,8 +43,9 @@
namespace tree
{}
- }
-}
+ } // end of namespace mln::morpho
+
+} // end of namespace mln
# include <mln/morpho/tree/compute_attribute_image.hh>
@@ -52,6 +54,4 @@
# include <mln/morpho/tree/max.hh>
# include <mln/morpho/tree/utils.hh>
-
-
#endif // ! MLN_MORPHO_TREE_ALL_HH
Index: trunk/milena/mln/morpho/tree/propagate_if.hh
===================================================================
--- trunk/milena/mln/morpho/tree/propagate_if.hh (revision 4040)
+++ trunk/milena/mln/morpho/tree/propagate_if.hh (revision 4041)
@@ -26,13 +26,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_MORPHO_TREE_PROPAGATE_IF_HH_
-# define MLN_MORPHO_TREE_PROPAGATE_IF_HH_
+#ifndef MLN_MORPHO_TREE_PROPAGATE_IF_HH
+# define MLN_MORPHO_TREE_PROPAGATE_IF_HH
/**
-** @file mln/morpho/tree/propagate_if.hh
+** \file mln/morpho/tree/propagate_if.hh
**
-** @brief Routines to handle propagation with predicate.
+** \brief Routines to handle propagation with predicate.
**
*/
@@ -42,9 +42,14 @@
# include <mln/data/fill.hh>
# include <mln/pw/all.hh>
-namespace mln {
- namespace morpho {
- namespace tree {
+namespace mln
+{
+
+ namespace morpho
+ {
+
+ namespace tree
+ {
template <typename W>
struct way_of_propagation : Object< W > { protected: way_of_propagation() {}; };
@@ -55,12 +60,12 @@
** Propagate nodes checking the predicate \p pred in the way
** defined by \p way_of_propagation.
**
- ** @param tree Component tree used for propagation.
- ** @param a_ Attributed image where values are propagated.
- ** @param way_of_propagation Propagate node in acsendant or
+ ** \param tree Component tree used for propagation.
+ ** \param a_ Attributed image where values are propagated.
+ ** \param way_of_propagation Propagate node in acsendant or
** descendant way.
- ** @param pred Predicate that node must check to be propagated.
- ** @param v Value to be propagated. (By default \p v is the value
+ ** \param pred Predicate that node must check to be propagated.
+ ** \param v Value to be propagated. (By default \p v is the value
** at the node being propagated).
*/
template <typename T, typename A, typename P, typename W>
@@ -84,12 +89,12 @@
** Propagate nodes having the value v in the way
** defined by \p way_of_propagation.
**
- ** @param tree Component tree used for propagation.
- ** @param a_ Attributed image where values are propagated.
- ** @param way_of_propagation Propagate node in acsendant or
+ ** \param tree Component tree used for propagation.
+ ** \param a_ Attributed image where values are propagated.
+ ** \param way_of_propagation Propagate node in acsendant or
** descendant way.
- ** @param v Value that node must have to be propagated.
- ** @param v_prop Value to propagate (By default it is the value
+ ** \param v Value that node must have to be propagated.
+ ** \param v_prop Value to propagate (By default it is the value
** at the node being propagated).
*/
template <typename T, typename A, typename W>
@@ -316,11 +321,13 @@
internal::propagate_if(tree, a, prop, pred);
}
-#endif /* !MLN_INCLUDE_ONLY */
+#endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::morpho::tree
+
} // end of namespace mln::morpho
+
} // end of namespace mln
-#endif /* !MLN_MORPHO_TREE_PROPAGATE_IF_HH_ */
+#endif // ! MLN_MORPHO_TREE_PROPAGATE_IF_HH
* theo/esiee/laurent/presentation/classif.cc: Here.
---
milena/sandbox/ChangeLog | 6 ++++++
.../theo/esiee/laurent/presentation/classif.cc | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index ba73002..c64e27c 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-05 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Rename nfaces(unsigned) as nfaces_of_dim(unsigned).
+
+ * theo/esiee/laurent/presentation/classif.cc: Here.
+
2009-06-08 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Minor changes to move_accu script.
diff --git a/milena/sandbox/theo/esiee/laurent/presentation/classif.cc b/milena/sandbox/theo/esiee/laurent/presentation/classif.cc
index 3b2bea2..0b9912d 100644
--- a/milena/sandbox/theo/esiee/laurent/presentation/classif.cc
+++ b/milena/sandbox/theo/esiee/laurent/presentation/classif.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -396,7 +396,7 @@ int main(int argc, char* argv[])
We definitely need a complex_image that can accept a subset of a
complex as domain (or at least a p_face<N, D, P>. */
- std::cout << "nbasins = " << nbasins - c.nfaces(0) << std::endl;
+ std::cout << "nbasins = " << nbasins - c.nfaces_of_dim(0) << std::endl;
image2d<int_u8> canvas_wst(seeds.domain());
--
1.6.1.2
* mln/topo/complex.hh: Here.
Reported by Thierry Géraud <thierry.geraud(a)lrde.epita.fr>.
---
milena/ChangeLog | 7 +++++++
milena/mln/topo/complex.hh | 8 +-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index c1687cb..915d95a 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,10 @@
+2009-06-05 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Typo in the documentation of mln::topo::complex.
+
+ * mln/topo/complex.hh: Here.
+ Reported by Thierry Géraud <thierry.geraud(a)lrde.epita.fr>.
+
2009-06-08 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix some g++-3.3 compilation warnings and errors.
diff --git a/milena/mln/topo/complex.hh b/milena/mln/topo/complex.hh
index a7abf9a..3a3e1f0 100644
--- a/milena/mln/topo/complex.hh
+++ b/milena/mln/topo/complex.hh
@@ -35,12 +35,6 @@
///
/// A complex defines a topological space which can be used as a
/// support for an image (i.e., as site sets).
-///
-/// \todo Roland: Check that the top of the inheritance diagram
-/// is correct; you wrote:
-/// faces_set_mixin<0, D> ---> lower_dim_faces_set_mixin<D, D>
-/// I (theo) think it's:
-/// faces_set_mixin<0, D> ---> lower_dim_faces_set_mixin<0, D>
# include <cstddef>
@@ -246,7 +240,7 @@ namespace mln
\verbatim
- ,-----------> lower_dim_faces_set_mixin<D, D>
+ ,-----------> higher_dim_faces_set_mixin<0, D>
|
faces_set_mixin<0, D>
^
--
1.6.1.2
* python/image2d-misc.py: Always get the domain of an image by
calling it domain() method.
* python/Makefile.am (TESTS): Remove conditional HAVE_SWIG_1_3_39
and always exercise dynamic-image2d-misc.py.
---
swilena/ChangeLog | 9 +++++++++
swilena/python/Makefile.am | 7 +------
swilena/python/image2d-misc.py | 13 +------------
3 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/swilena/ChangeLog b/swilena/ChangeLog
index c52ff12..95369a7 100644
--- a/swilena/ChangeLog
+++ b/swilena/ChangeLog
@@ -1,3 +1,12 @@
+2009-06-09 Roland Levillain <roland(a)lrde.epita.fr>
+
+ No longer handle SWIG < 1.3.39 specifically.
+
+ * python/image2d-misc.py: Always get the domain of an image by
+ calling it domain() method.
+ * python/Makefile.am (TESTS): Remove conditional HAVE_SWIG_1_3_39
+ and always exercise dynamic-image2d-misc.py.
+
2009-06-08 Roland Levillain <roland(a)lrde.epita.fr>
Fix a bug in Swilena's wrapper of box2d.
diff --git a/swilena/python/Makefile.am b/swilena/python/Makefile.am
index 1525d5d..0658ec1 100644
--- a/swilena/python/Makefile.am
+++ b/swilena/python/Makefile.am
@@ -212,11 +212,6 @@ $(srcdir)/run.stamp: $(RUN_IN)
# as `--python' to `run'.
TESTS = \
box2d-misc.py \
- image2d-misc.py morpho-fun.py morpho-segm.py
-
-# Do no exercise tests known to fail with old versions of SWIG.
-if HAVE_SWIG_1_3_39
-TESTS += dynamic-image2d-misc.py
-endif HAVE_SWIG_1_3_39
+ image2d-misc.py morpho-fun.py morpho-segm.py dynamic-image2d-misc.py
EXTRA_DIST += $(TESTS)
diff --git a/swilena/python/image2d-misc.py b/swilena/python/image2d-misc.py
index a7933d1..737b39b 100644
--- a/swilena/python/image2d-misc.py
+++ b/swilena/python/image2d-misc.py
@@ -22,24 +22,13 @@ from swilena import *
ima = image2d_int.image2d_int(3, 3)
image2d_int.fill(ima, 42)
-# FIXME: Help version of SWIG older than 1.3.39. For instance, SWIG
-# 1.3.36 does not generate code smart enough to detect that the output
-# of `ima.domain()' should be a wrapped `box2d'. Help it.
-#
-# We should get rid of this when SWIG 1.3.39 (or greater) is
-# widespread.
-if config.have_swig(0x010339):
- domain = ima.domain()
-else:
- domain = box2d(3, 3)
-
# FIXME: Eventually we'd like to be able to write this:
#
# for p in ima.domain():
# print "ima(" + str(p) + ") = " + ima(p)
#
# as it is generic and way closer to what we do in C++.
-for p in domain:
+for p in ima.domain():
# FIXME: Handling POD types (like int) as value types is not
# transparent: ima(p) returns a pointer to int wrapped in a SWIG
# object, and cannot be easily converted to a Python integer
--
1.6.1.2