Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
April 2009
- 11 participants
- 187 discussions
* mln/accu/all.hh: include new accumulators.
* mln/accu/count_labels.hh: count how many different labels are in an
image.
* mln/accu/label_used.hh: Reference all the different labels used.
---
milena/ChangeLog | 11 +++
milena/mln/accu/all.hh | 2 +
milena/mln/accu/count_labels.hh | 175 +++++++++++++++++++++++++++++++++++++++
milena/mln/accu/label_used.hh | 159 +++++++++++++++++++++++++++++++++++
4 files changed, 347 insertions(+), 0 deletions(-)
create mode 100644 milena/mln/accu/count_labels.hh
create mode 100644 milena/mln/accu/label_used.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f07f826..c7c171e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,14 @@
+2009-04-07 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Add new accumulators related to labels.
+
+ * mln/accu/all.hh: include new accumulators.
+
+ * mln/accu/count_labels.hh: count how many different labels are in an
+ image.
+
+ * mln/accu/label_used.hh: Reference all the different labels used.
+
2009-04-06 Frederic Bour <bour(a)lrde.epita.fr>
Clean new fun implementation.
diff --git a/milena/mln/accu/all.hh b/milena/mln/accu/all.hh
index 0e4d72d..5dfe51e 100644
--- a/milena/mln/accu/all.hh
+++ b/milena/mln/accu/all.hh
@@ -58,10 +58,12 @@ namespace mln
# include <mln/accu/bbox.hh>
# include <mln/accu/count.hh>
+# include <mln/accu/count_labels.hh>
# include <mln/accu/center.hh>
//# include <mln/accu/count_adjacent_vertices.hh>
# include <mln/accu/height.hh>
# include <mln/accu/histo.hh>
+# include <mln/accu/label_used.hh>
# include <mln/accu/land.hh>
# include <mln/accu/land_basic.hh>
# include <mln/accu/line.hh>
diff --git a/milena/mln/accu/count_labels.hh b/milena/mln/accu/count_labels.hh
new file mode 100644
index 0000000..533e736
--- /dev/null
+++ b/milena/mln/accu/count_labels.hh
@@ -0,0 +1,175 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_ACCU_COUNT_LABELS_HH
+# define MLN_ACCU_COUNT_LABELS_HH
+
+/// \file mln/accu/count_labels.hh
+///
+/// Define an accumulator that counts the number of different labels.
+
+# include <mln/accu/internal/base.hh>
+# include <mln/core/concept/meta_accumulator.hh>
+# include <mln/metal/is_a.hh>
+
+namespace mln
+{
+
+ // Forward declaration.
+ namespace value { template <typename E> struct Symbolic; }
+
+ namespace accu
+ {
+
+ /// Generic counter accumulator class.
+ /// The parameter \a L is the label type to be count.
+ template <typename L>
+ struct count_labels
+ : public mln::accu::internal::base< unsigned , count_labels<L> >,
+ mlc_is_a(L, mln::value::Symbolic)::check_t
+ {
+ typedef L argument;
+
+ count_labels();
+
+ /// Manipulators.
+ /// \{
+ void init();
+ void take(const argument&);
+ void take(const count_labels<L>& other);
+
+ /// Force the value of the counter to \a c.
+ void set_value(unsigned c);
+ /// \}
+
+ /// Get the value of the accumulator.
+ unsigned to_result() const;
+
+ /// Check whether this accu is able to return a result.
+ /// Always true here.
+ bool is_valid() const;
+
+ protected:
+ /// The value of the counter.
+ unsigned count_labels_;
+ std::vector<bool> deja_vu_;
+ };
+
+
+ namespace meta
+ {
+
+ /// Meta accumulator for count_labels.
+ struct count_labels : public Meta_Accumulator< count_labels >
+ {
+ template <typename L>
+ struct with
+ {
+ typedef accu::count_labels<L> ret;
+ };
+ };
+
+ } // end of namespace mln::accu::meta
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename L>
+ inline
+ count_labels<L>::count_labels()
+ {
+ init();
+ }
+
+ template <typename L>
+ inline
+ void
+ count_labels<L>::init()
+ {
+ count_labels_ = 0;
+ deja_vu_.resize(mln_max(L), false);
+ }
+
+ template <typename L>
+ inline
+ void
+ count_labels<L>::take(const argument& l)
+ {
+ if (!deja_vu_[l])
+ {
+ ++count_labels_;
+ deja_vu_[l] = true;
+ }
+ //else
+ // No-op
+ }
+
+ template <typename L>
+ inline
+ void
+ count_labels<L>::take(const count_labels<L>& other)
+ {
+ count_labels_ += other.count_labels_;
+ for (unsigned i = 0; i < deja_vu_.size(); ++i)
+ deja_vu_[i] = deja_vu_[i] || other.deja_vu_[i];
+ }
+
+ template <typename L>
+ inline
+ unsigned
+ count_labels<L>::to_result() const
+ {
+ // The background label MUST not be counted.
+ return count_labels_ - 1;
+ }
+
+ template <typename L>
+ inline
+ void
+ count_labels<L>::set_value(unsigned c)
+ {
+ count_labels_ = c;
+ }
+
+ template <typename L>
+ inline
+ bool
+ count_labels<L>::is_valid() const
+ {
+ return true;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::accu
+
+} // end of namespace mln
+
+
+#endif // ! MLN_ACCU_COUNT_LABELS_HH
diff --git a/milena/mln/accu/label_used.hh b/milena/mln/accu/label_used.hh
new file mode 100644
index 0000000..6323d3e
--- /dev/null
+++ b/milena/mln/accu/label_used.hh
@@ -0,0 +1,159 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_ACCU_LABEL_USED_HH
+# define MLN_ACCU_LABEL_USED_HH
+
+/// \file mln/accu/label_used.hh
+///
+/// Define an accumulator that references all the labels used.
+
+# include <mln/accu/internal/base.hh>
+# include <mln/core/concept/meta_accumulator.hh>
+# include <mln/math/max.hh>
+
+
+namespace mln
+{
+
+ namespace accu
+ {
+
+ /// Define an accumulator that references all the labels used.
+ /// The parameter \a L is the label type.
+ template <typename L>
+ struct label_used : public mln::accu::internal::base< const fun::i2v::array<bool>& , label_used<L> >
+ {
+ typedef L argument;
+
+ label_used();
+
+ /// Initialize accumulator attributes.
+ void init();
+
+ /// Manipulators.
+ /// \{
+ void take(const argument&);
+ void take(const label_used<L>& other);
+ /// \}
+
+ /// Get the value of the accumulator.
+ const fun::i2v::array<bool>& to_result() const;
+
+ /// Check whether this accu is able to return a result.
+ /// Always true here.
+ bool is_valid() const;
+
+ protected:
+ /// True if a label is used.
+ fun::i2v::array<bool> label_used_;
+ };
+
+
+ namespace meta
+ {
+
+ /// Meta accumulator for label_used.
+ struct label_used : public Meta_Accumulator< label_used >
+ {
+ template <typename L>
+ struct with
+ {
+ typedef accu::label_used<L> ret;
+ };
+ };
+
+ } // end of namespace mln::accu::meta
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename L>
+ inline
+ label_used<L>::label_used()
+ {
+ init();
+ }
+
+ template <typename L>
+ inline
+ void
+ label_used<L>::init()
+ {
+ label_used_.resize(1, true);
+ }
+
+ template <typename L>
+ inline
+ void
+ label_used<L>::take(const argument& l)
+ {
+ if (label_used_.size() <= l)
+ label_used_.resize(l.next(), false);
+
+ label_used_(l) = true;
+ }
+
+ template <typename L>
+ inline
+ void
+ label_used<L>::take(const label_used<L>& other)
+ {
+ unsigned
+ max_size = math::max(other.to_result().size(), label_used_.size());
+
+ label_used_.resize(max_size, false);
+ for (unsigned i = 1; i < label_used_.size(); ++i)
+ label_used_(i) = label_used_(i) || other.to_result()(i);
+ }
+
+ template <typename L>
+ inline
+ const fun::i2v::array<bool>&
+ label_used<L>::to_result() const
+ {
+ return label_used_;
+ }
+
+ template <typename L>
+ inline
+ bool
+ label_used<L>::is_valid() const
+ {
+ return true;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::accu
+
+} // end of namespace mln
+
+
+#endif // ! MLN_ACCU_LABEL_USED_HH
--
1.5.6.5
1
0
Add a small tool to map text components to lines.
* icdar/2009/hsc/input_lines_to_lines.cc: new.
---
milena/sandbox/ChangeLog | 6 ++
.../sandbox/icdar/2009/hsc/input_lines_to_lines.cc | 63 ++++++++++++++++++++
2 files changed, 69 insertions(+), 0 deletions(-)
create mode 100644 milena/sandbox/icdar/2009/hsc/input_lines_to_lines.cc
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index f1350d6..f6e6e15 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Add a small tool to map text components to lines.
+
+ * icdar/2009/hsc/input_lines_to_lines.cc: new.
+
2009-04-06 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Add function to perform component tree computation until.
diff --git a/milena/sandbox/icdar/2009/hsc/input_lines_to_lines.cc b/milena/sandbox/icdar/2009/hsc/input_lines_to_lines.cc
new file mode 100644
index 0000000..eb46b36
--- /dev/null
+++ b/milena/sandbox/icdar/2009/hsc/input_lines_to_lines.cc
@@ -0,0 +1,63 @@
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+#include <mln/labeling/background.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/value/label_8.hh>
+#include <mln/value/label_16.hh>
+#include <mln/io/pbm/load.hh>
+#include <mln/io/pgm/all.hh>
+#include <mln/accu/lbl_maj.hh>
+#include <mln/labeling/compute.hh>
+#include <mln/pw/all.hh>
+#include <mln/core/image/image_if.hh>
+#include <mln/data/fill.hh>
+
+void usage(char* argv[])
+{
+ std::cerr << "usage: " << argv[0] << " input.pbm lines.pgm output.pgm" << std::endl
+ << " HSC @ ICDAR'2009" << std::endl
+ << " Rebuild splitted components from a label image." << std::endl;
+ << " input.pbm: input 2D binary image (text is black; background is white)" << std::endl
+ << " lines.pgm: output image where line components are labeled (int_u8)" << std::endl
+ << " 0 is the background label." << std::endl
+ << " output.pgm output image where line components are labeled (int_u8)" << std::endl
+ << " 0 is the background label." << std::endl;
+ std::abort();
+}
+
+
+int main(int argc, char *argv[])
+{
+ using namespace mln;
+ using namespace mln::value;
+
+ if (argc < 4)
+ usage(argv);
+
+ image2d<bool> input;
+ io::pbm::load(input, argv[1]);
+
+ image2d<int_u8> lines;
+ io::pgm::load(lines, argv[2]);
+
+ label_16 nlabels;
+ image2d<label_16> lbl = labeling::background(input, c8(), nlabels);
+ util::array<box2d> bboxes = labeling::compute(accu::meta::bbox(), lbl, nlabels);
+
+ /// Compute the most represented label for each component.
+ accu::lbl_maj<label_16, int_u8> accu(nlabels.next());
+ mln_piter_(image2d<int_u8>) p(lines.domain());
+ for_all(p)
+ if (lines(p) != 0u)
+ accu.take(lbl(p), lines(p));
+
+
+ // Rebuild components.
+ util::array<util::couple<int_u8, float> > res = accu.to_result();
+ for (unsigned i = 1; i < res.nelements(); ++i)
+ if (res[i].second() >= 0.9f)
+ data::fill(((lines | bboxes[i]).rw() | (pw::value(lbl) != 0u)).rw(), res[i].first());
+
+ // Save result.
+ io::pgm::save(lines, argv[3]);
+}
--
1.5.6.5
1
0
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-04-06 Frederic Bour <bour(a)lrde.epita.fr>
Clean new fun implementation.
* sandbox/fred/mln/fun/binary.hh,
* sandbox/fred/mln/fun/compose.hh,
* sandbox/fred/mln/fun/composition.hh,
* sandbox/fred/mln/fun/spe/binary.hh,
* sandbox/fred/mln/fun/spe/unary.hh,
* sandbox/fred/mln/fun/unary.hh: Clean and update to make use of
param.hh.
* sandbox/fred/mln/fun/param.hh: New.
* sandbox/fred/mln/trait/fun.hh: Add support for parameter storage.
---
fun/binary.hh | 45 ++++-------
fun/compose.hh | 19 ++++
fun/composition.hh | 68 ++++++-----------
fun/param.hh | 88 ++++++++++++++++++++++
fun/spe/binary.hh | 60 +++++++++++----
fun/spe/unary.hh | 210 ++++++++++++++++++++++++++++-------------------------
fun/unary.hh | 198 ++++++++++---------------------------------------
trait/fun.hh | 87 +++++++++++++++++++++
8 files changed, 437 insertions(+), 338 deletions(-)
Index: trunk/milena/sandbox/fred/mln/trait/fun.hh
===================================================================
--- trunk/milena/sandbox/fred/mln/trait/fun.hh (revision 3622)
+++ trunk/milena/sandbox/fred/mln/trait/fun.hh (revision 3623)
@@ -30,6 +30,8 @@
# include <mln/metal/bexpr.hh>
# include <mln/metal/if.hh>
+# include <mln/fun/param.hh>
+# include <mln/trait/next/solve.hh>
#define mln_trait_fun_is_assignable(Fun) typename mln::trait::fun::is_assignable< Fun >::ret
#define mln_trait_fun_is_assignable_(Fun) mln::trait::fun::is_assignable< Fun >::ret
@@ -41,6 +43,7 @@
#define mln_trait_fun_lvalue(Fun) typename mln::trait::fun::get_lvalue< Fun >::ret
#define mln_trait_fun_param(Fun) typename mln::trait::fun::get_param< Fun >::ret
+# define mln_trait_fun_storage(Fun) typename mln::trait::fun::get_storage< Fun >::ret
namespace mln
{
@@ -66,6 +69,8 @@
template <>
struct except_void_t<void>;
+ // Lvalue solver
+
template <typename T, typename V>
struct has_lvalue_t
{
@@ -80,6 +85,44 @@
typedef typename T::lvalue type;
};
+ // Parameter solver
+ template <typename T, typename V>
+ struct param_solver;
+
+ template <typename T, typename V>
+ struct param_flag_solver
+ {
+ typedef typename mln::fun::parameter<T> ret;
+ };
+
+ template <typename T>
+ struct param_flag_solver<T, typename except_void_t<typename T::flag>::ret>
+ {
+ typedef typename param_solver<typename T::flag, void>::ret ret;
+ };
+
+ template <typename T, typename V>
+ struct param_def_solver : param_flag_solver<T, V>
+ {
+ };
+
+ template <typename T>
+ struct param_def_solver<T, typename except_void_t<typename T::def>::ret>
+ {
+ typedef typename param_solver<typename T::def, void>::ret ret;
+ };
+
+ template <typename T, typename V>
+ struct param_solver : param_def_solver<T, V>
+ {
+ };
+
+ template <typename T>
+ struct param_solver<T, typename except_void_t<typename T::param>::ret>
+ {
+ typedef T ret;
+ };
+
template <typename T, typename V>
struct has_param_t
{
@@ -88,10 +131,44 @@
};
template <typename T>
- struct has_param_t<T, typename except_void_t<typename T::param>::ret>
+ struct has_param_t<T, typename except_void_t<typename param_solver<T,void>::ret::param>::ret>
{
typedef metal::true_ ret;
- typedef typename T::param type;
+ typedef typename param_solver<T,void>::ret::param type;
+ };
+
+ template <typename T, typename V>
+ struct has_storage_t
+ {
+ typedef has_param_t<T, V> has_param;
+
+ typedef metal::false_ ret;
+ typedef typename has_param::type type;
+
+ template <typename U>
+ static inline
+ const U& compute(const U& t)
+ {
+ return t;
+ }
+
+ };
+
+ template <typename T>
+ struct has_storage_t<T, typename except_void_t<typename param_solver<T,void>::ret::storage>::ret>
+ {
+ typedef metal::true_ ret;
+ typedef typename param_solver<T,void>::ret def;
+
+ typedef typename def::storage type;
+
+ template <typename U>
+ static inline
+ type compute(const U& p)
+ {
+ return def::compute(p);
+ };
+
};
} // end of namespace mln::trait::fun::internal::introspect
@@ -122,6 +199,12 @@
typedef typename internal::introspect::has_param_t<F, void>::type ret;
};
+ template <typename F>
+ struct get_storage
+ {
+ typedef typename internal::introspect::has_storage_t<F, void>::type ret;
+ };
+
} // end of namespace mln::trait::fun
} // end of namespace mln::trait
Index: trunk/milena/sandbox/fred/mln/fun/composition.hh
===================================================================
--- trunk/milena/sandbox/fred/mln/fun/composition.hh (revision 3622)
+++ trunk/milena/sandbox/fred/mln/fun/composition.hh (revision 3623)
@@ -30,6 +30,7 @@
# include <mln/fun/unary.hh>
# include <mln/fun/binary.hh>
+# include <mln/fun/param.hh>
namespace mln
{
@@ -56,27 +57,39 @@
template <class> class CatG, typename G>
struct composition;
+ } // end of namespace mln::fun::internal
+
+ template <template <class> class CatF, typename F,
+ template <class> class CatG, typename G>
+ struct parameter< internal::composition<CatF, F, CatG, G> >
+ {
+ typedef internal::composition_param<F, G> param;
+ };
+
+ namespace internal
+ {
+
// Meta
template <typename F, typename G>
struct composition<mln::Meta_Function_v2v, F, mln::Meta_Function_v2v, G>
- : mln::fun::unary_param< composition<mln::Meta_Function_v2v, F, mln::Meta_Function_v2v, G>, composition_param<F, G> >
+ : mln::fun::unary< composition<mln::Meta_Function_v2v, F, mln::Meta_Function_v2v, G> >
{
- typedef mln::fun::unary_param< composition<mln::Meta_Function_v2v, F, mln::Meta_Function_v2v, G>, composition_param<F, G> > super;
+ typedef mln::fun::unary< composition<mln::Meta_Function_v2v, F, mln::Meta_Function_v2v, G> > super;
composition() {};
- composition(const typename super::param& p) : super(p) {};
+ composition(const composition_param<F, G>& p) : super(p) {};
typedef composition exact_type;
};
template <typename F, typename G>
struct composition<mln::Meta_Function_v2v, F, mln::Meta_Function_vv2v, G>
- : mln::fun::binary_param< composition<mln::Meta_Function_v2v, F, mln::Meta_Function_vv2v, G>, composition_param<F, G> >
+ : mln::fun::binary< composition<mln::Meta_Function_v2v, F, mln::Meta_Function_vv2v, G> >
{
- typedef mln::fun::binary_param< composition<mln::Meta_Function_v2v, F, mln::Meta_Function_vv2v, G>, composition_param<F, G> > super;
+ typedef mln::fun::binary< composition<mln::Meta_Function_v2v, F, mln::Meta_Function_vv2v, G> > super;
composition() {};
- composition(const typename super::param& p) : super(p) {};
+ composition(const composition_param<F, G>& p) : super(p) {};
typedef composition exact_type;
};
@@ -106,23 +119,10 @@
typedef typename F_spe::result result;
typedef composition_param<F, G> param;
- composition_unary_impl_helper() {}
- composition_unary_impl_helper(const param& p) : f_(p.f_), g_(p.g_) {}
-
- void init(const param& p)
+ static result read(const param& p, const argument& x)
{
- f_ = p.f_;
- g_ = p.g_;
+ return p.f_(p.g_(x));
}
-
- result read(const argument& x) const
- {
- return this->f_(this->g_(x));
- }
-
- protected:
- F f_;
- G g_;
};
template <typename F, typename F_spe, typename G, typename G_spe>
@@ -135,12 +135,12 @@
composition_unary_impl_helper() {}
composition_unary_impl_helper(const typename super::param& p) : super(p) {}
- void write(lvalue l, const typename super::result& x) const
+ static void write(const typename super::param& p, lvalue l, const typename super::result& x)
{
- typename G_spe::result r(this->g_(l));
+ typename G_spe::result r(p.g_(l));
- this->f_.set(r, x);
- this->g_.set(l, r);
+ p.f_.set(r, x);
+ p.g_.set(l, r);
}
};
@@ -154,7 +154,6 @@
composition_unary_impl(const typename super::param& p) : super(p) {}
};
- // Binary compositions implementation inherit from composition_binary_inherit...
template <typename F, typename F_spe, typename G, typename G_spe>
struct composition_binary_impl
{
@@ -163,23 +162,10 @@
typedef typename F_spe::result result;
typedef composition_param<F, G> param;
- composition_binary_impl() {}
- composition_binary_impl(const param& p) : f_(p.f_), g_(p.g_) {}
-
- void init(const param& p)
+ static result read(const param& p, const argument1& a, const argument2& b)
{
- f_ = p.f_;
- g_ = p.g_;
+ return p.f_(p.g_(a, b));
}
-
- result read(const argument1& a, const argument2& b) const
- {
- return this->f_(this->g_(a, b));
- }
-
- protected:
- F f_;
- G g_;
};
} // end of namespace mln::fun::internal
Index: trunk/milena/sandbox/fred/mln/fun/binary.hh
===================================================================
--- trunk/milena/sandbox/fred/mln/fun/binary.hh (revision 3622)
+++ trunk/milena/sandbox/fred/mln/fun/binary.hh (revision 3623)
@@ -42,6 +42,8 @@
template <typename F>
struct binary : mln::Meta_Function_vv2v< binary<F> >
{
+ typedef F flag;
+ typedef mln_trait_fun_storage(flag) storage;
template <typename T1, typename T2>
struct with
@@ -52,48 +54,37 @@
template <typename T1, typename T2>
typename with<T1, T2>::ret::result operator()(const T1& a, const T2& b) const
{
- typename with<T1, T2>::ret tmp;
- return tmp(a, b);
+ return typename with<T1, T2>::ret(storage_)(a, b);
}
- };
-
- template <typename F, typename P>
- struct binary_param: binary<F>
+ template <typename U>
+ void init(const U& value)
{
- typedef P param;
-
- binary_param() {};
- binary_param(const param& p) : p_(p) {};
+ storage_ = mln::trait::fun::internal::introspect::has_storage_t<flag, void>::compute(value);
+ };
- void init(const param& p)
+ binary()
{
- p_ = p;
}
- param& parameter()
+ template <typename U>
+ binary(const U& param)
{
- return p_;
+ this->init(param);
}
- protected:
- param p_;
- };
-
- template <typename F>
- struct binary_param<F, F>: binary<F>
- {
- typedef F param;
-
- void init(const param& p)
+ stored<storage>& storage_get()
{
- exact(*this) = p;
+ return storage_;
}
- param& parameter()
+ const stored<storage>& storage_get() const
{
- return exact(*this);
+ return storage_;
}
+
+ protected:
+ stored<storage> storage_;
};
} // end of namespace mln::fun
Index: trunk/milena/sandbox/fred/mln/fun/compose.hh
===================================================================
--- trunk/milena/sandbox/fred/mln/fun/compose.hh (revision 3622)
+++ trunk/milena/sandbox/fred/mln/fun/compose.hh (revision 3623)
@@ -30,6 +30,7 @@
# include <mln/fun/binary.hh>
# include <mln/fun/composition.hh>
+# include <mln/fun/param.hh>
namespace mln
{
@@ -42,13 +43,29 @@
{
template <template <class> class CatF, typename F, template <class> class CatG, typename G>
+ struct compose_helper;
+
+ }
+
+ template <template <class> class CatF, typename F,
+ template <class> class CatG, typename G>
+ struct parameter< internal::compose_helper<CatF, F, CatG, G> >
+ {
+ typedef typename internal::composition<CatF, F, CatG, G>::exact_type result;
+ typedef typename result::param param;
+ };
+
+ namespace internal
+ {
+
+ template <template <class> class CatF, typename F, template <class> class CatG, typename G>
struct compose_helper
{
typedef F argument1;
typedef G argument2;
typedef typename composition<CatF, F, CatG, G>::exact_type result;
- typedef typename result::param param;
+ typedef mln_trait_fun_param(result) param;
static result read(const F& f, const G& g)
{
Index: trunk/milena/sandbox/fred/mln/fun/spe/binary.hh
===================================================================
--- trunk/milena/sandbox/fred/mln/fun/spe/binary.hh (revision 3622)
+++ trunk/milena/sandbox/fred/mln/fun/spe/binary.hh (revision 3623)
@@ -50,50 +50,78 @@
namespace impl
{
+ template <bool has_param, typename Fun, typename T1, typename T2>
+ struct binary_impl;
+
template <typename Fun, typename T1, typename T2>
- struct binary_impl : mln::Function_v2v< binary<Fun, T1, T2> >
+ struct binary_impl<false, Fun, T1, T2>
+ : mln::Function_v2v< binary<Fun, T1, T2> >
{
- typedef mln_trait_nbinary(Fun, T1, T2) impl;
+ typedef Fun flag;
+ typedef mln_trait_nbinary(flag, T1, T2) def;
- typedef typename impl::argument1 argument1;
- typedef typename impl::argument2 argument2;
- typedef typename impl::result result;
+ typedef typename def::argument1 argument1;
+ typedef typename def::argument2 argument2;
+ typedef typename def::result result;
- binary_impl()
- : impl_()
+ result operator () (const argument1& a, const argument2& b) const
{
+ return def::read(a, b);
}
- binary_impl(const impl& f)
- : impl_(f)
+
+ template <typename U>
+ void init(const U& value)
{
}
+ };
+
+ template <typename Fun, typename T1, typename T2>
+ struct binary_impl<true, Fun, T1, T2>
+ : mln::Function_v2v< binary<Fun, T1, T2> >
+ {
+ typedef Fun flag;
+ typedef mln_trait_nbinary(flag, T1, T2) def;
+
+ typedef typename def::argument1 argument1;
+ typedef typename def::argument2 argument2;
+ typedef typename def::result result;
+
+ typedef mln_trait_fun_param(def) param;
+ typedef mln_trait_fun_storage(def) storage;
+
result operator () (const argument1& a, const argument2& b) const
{
- return this->impl_.read(a, b);
+ return def::read(storage_, a, b);
+ }
+
+ template <typename U>
+ void init(const U& value)
+ {
+ storage_ = mln::trait::fun::internal::introspect::has_storage_t<def, void>::compute(value);
}
protected:
- impl impl_;
+ mln::fun::stored<storage> storage_;
};
} // end of namespace mln::fun::spe::impl
template <typename Fun, typename T1, typename T2>
struct binary
- : impl::binary_impl<Fun, T1, T2>
+ : impl::binary_impl<mln_trait_fun_is_parametrable_(Fun)::value, Fun, T1, T2>
{
- typedef impl::binary_impl<Fun, T1, T2> super;
+ typedef impl::binary_impl<mln_trait_fun_is_parametrable_(Fun)::value, Fun, T1, T2> super;
binary()
- : super()
{
}
- binary(const typename super::impl& f)
- : super(f)
+ template <typename U>
+ binary(const U& param)
{
+ this->super::init(param);
}
using super::operator();
Index: trunk/milena/sandbox/fred/mln/fun/spe/unary.hh
===================================================================
--- trunk/milena/sandbox/fred/mln/fun/spe/unary.hh (revision 3622)
+++ trunk/milena/sandbox/fred/mln/fun/spe/unary.hh (revision 3623)
@@ -41,26 +41,23 @@
namespace spe
{
- namespace internal
- {
-
// Wrapper for bijective functions
- template <typename Impl, typename T>
- struct unary_modifier
+ template <typename Fun, typename T>
+ struct lwrapper
{
- typedef typename Impl::result result;
- typedef typename Impl::argument argument;
- typedef typename Impl::lvalue lvalue;
- typedef unary_modifier lresult;
+ typedef typename Fun::result result;
+ typedef typename Fun::argument argument;
+ typedef typename Fun::lvalue lvalue;
+ typedef lwrapper lresult;
- unary_modifier(const Impl& impl, T& x)
- : x_(&x), impl_(&impl)
+ lwrapper(const Fun& f, T& x)
+ : x_(&x), f_(&f)
{
}
result to_result() const
{
- return impl_->read(*x_);
+ return (*f_)(*const_cast<const T*>(x_));
};
operator result() const
@@ -71,7 +68,7 @@
const result& operator = (const result& r) const
{
argument x(*x_);
- impl_->write(x, r);
+ f_->set(x, r);
*x_ = x;
return r;
@@ -79,25 +76,25 @@
private:
T *x_;
- const Impl *impl_;
+ const Fun *f_;
};
- template <typename Impl>
- struct unary_modifier<Impl, typename Impl::argument>
+ template <typename Fun>
+ struct lwrapper<Fun, typename Fun::argument>
{
- typedef typename Impl::result result;
- typedef typename Impl::argument argument;
- typedef typename Impl::lvalue lvalue;
- typedef unary_modifier lresult;
+ typedef typename Fun::result result;
+ typedef typename Fun::argument argument;
+ typedef typename Fun::lvalue lvalue;
+ typedef lwrapper lresult;
- unary_modifier(const Impl& impl, argument& x)
- : x_(&x), impl_(&impl)
+ lwrapper(const Fun& f, argument& x)
+ : x_(&x), f_(&f)
{
}
result to_result() const
{
- return impl_->read(*x_);
+ return (*f_)(*const_cast<const argument*>(x_));
};
operator result() const
@@ -107,33 +104,32 @@
const result& operator = (const result& r) const
{
- impl_->write(*x_, r);
+ f_->set(*x_, r);
return r;
}
private:
argument *x_;
- const Impl *impl_;
+ const Fun *f_;
};
- template <typename Impl, typename Impl2, typename T>
- struct unary_modifier<Impl, unary_modifier<Impl2, T> >
+ template <typename Fun, typename Any, typename T>
+ struct lwrapper<Fun, lwrapper<Any, T> >
{
- typedef typename Impl::result result;
- typedef typename Impl::argument argument;
- typedef typename Impl::lvalue lvalue;
- typedef unary_modifier lresult;
+ typedef typename Fun::result result;
+ typedef typename Fun::argument argument;
+ typedef typename Fun::lvalue lvalue;
+ typedef lwrapper lresult;
- // FIXME: "argument& x" or "lvalue x" directly? ~~~
- unary_modifier(const Impl& impl, const unary_modifier<Impl2, T>& m)
- : m_(m), impl_(&impl)
+ lwrapper(const Fun& f, const lwrapper<Any, T>& m)
+ : m_(m), f_(&f)
{
}
result to_result() const
{
- return impl_->read(m_.to_result());
+ return (*f_)(m_.to_result());
};
operator result() const
@@ -144,113 +140,125 @@
const result& operator = (const result& r) const
{
argument m(m_);
- impl_->write(m, r);
+ f_->set(m, r);
m_ = m;
return r;
}
private:
- const unary_modifier<Impl2, T> m_;
- const Impl *impl_;
+ const lwrapper<Any, T> m_;
+ const Fun *f_;
};
- } // end of namespace mln::fun::internal
-
- // Forward declaration (defined in mln/fun/unary.hh)
template <typename Fun, typename T>
struct unary;
namespace impl
{
- template <bool set, typename Fun, typename T>
- struct unary_impl_set;
+ template <bool param, bool set, typename Fun, typename T>
+ struct unary_impl;
template <typename Fun, typename T>
- struct unary_impl_set<false, Fun, T> : mln::Function_v2v< unary<Fun, T> >
+ struct unary_impl<false, false, Fun, T> : Function_v2v< unary<Fun, T> >
{
- typedef mln_trait_nunary(Fun, T) impl;
-
- typedef typename impl::argument argument;
- typedef typename impl::result result;
- typedef mln_trait_fun_param(impl) param_;
- typedef mlc_if(mlc_equal(param_, void), impl, param_) init_param;
-
- unary_impl_set() {}
+ typedef Fun flag;
+ typedef mln_trait_nunary(Fun, T) def;
- unary_impl_set(const init_param& p) : impl_(p) {}
+ typedef typename def::argument argument;
+ typedef typename def::result result;
result operator () (const argument& value) const
{
- return this->impl_.read(value);
+ return def::read(value);
}
- protected:
- impl impl_;
+ template <typename U>
+ void init(const U& value)
+ {
+ };
+
};
template <typename Fun, typename T>
- struct unary_impl_set<true, Fun, T> : unary_impl_set<false, Fun, T>
+ struct unary_impl<false, true, Fun, T> : unary_impl<false, false, Fun, T>
{
- typedef unary_impl_set<false, Fun, T> super;
- typedef typename super::impl impl;
-
- typedef typename impl::argument argument;
- typedef typename impl::result result;
- typedef typename impl::lvalue lvalue;
+ typedef unary_impl<false, false, Fun, T> super;
+ typedef typename super::def::lvalue lvalue;
template <typename U>
struct lresult_with
{
- typedef mln::fun::spe::internal::unary_modifier<impl, U> ret;
+ typedef mln::fun::spe::lwrapper< unary<Fun, T>, U> ret;
};
- typedef typename lresult_with<argument>::ret lresult;
+ typedef typename lresult_with<typename super::argument>::ret lresult;
+
+ void set(lvalue l, const typename super::result& r) const
+ {
+ super::def::write(l, r);
+ }
- unary_impl_set() {}
- unary_impl_set(const typename super::init_param& p) : super(p) {}
+ using super::operator ();
- void set(lvalue l, const result& r) const
+ lresult operator () (typename super::argument& value) const
{
- this->impl_.write(l, r);
+ return lresult(this, value);
}
+ };
+
+ template <typename Fun, typename T>
+ struct unary_impl<true, false, Fun, T> : Function_v2v< unary<Fun, T> >
+ {
+ typedef Fun flag;
+ typedef mln_trait_nunary(Fun, T) def;
+
+ typedef typename def::argument argument;
+ typedef typename def::result result;
+
+ typedef mln_trait_fun_param(def) param;
+ typedef mln_trait_fun_storage(def) storage;
- lresult operator () (argument& value) const
+ result operator () (const argument& value) const
{
- return lresult(this->impl_, value);
+ return def::read(this->storage_, value);
}
- using super::operator();
+ template <typename U>
+ void init(const U& value)
+ {
+ storage_ = mln::trait::fun::internal::introspect::has_storage_t<def, void>::compute(value);
};
- template <bool set, typename Fun, typename T>
- struct unary_impl_param;
+ protected:
+ storage storage_;
+ };
template <typename Fun, typename T>
- struct unary_impl_param<false, Fun, T>
- : impl::unary_impl_set<mln_trait_fun_is_assignable_(mln_trait_nunary(Fun, T))::value, Fun, T>
+ struct unary_impl<true, true, Fun, T> : unary_impl<true, false, Fun, T>
{
- typedef impl::unary_impl_set<mln_trait_fun_is_assignable_(mln_trait_nunary(Fun, T))::value, Fun, T> super;
+ typedef unary_impl<true, false, Fun, T> super;
+ typedef typename super::def::lvalue lvalue;
- unary_impl_param() {}
- unary_impl_param(const typename super::init_param& p) : super(p) {}
+ template <typename U>
+ struct lresult_with
+ {
+ typedef mln::fun::spe::lwrapper< unary<Fun, T>, U> ret;
};
- template <typename Fun, typename T>
- struct unary_impl_param<true, Fun, T>
- : unary_impl_param<false, Fun, T>
- {
- typedef unary_impl_param<false, Fun, T> super;
+ typedef typename lresult_with<typename super::argument>::ret lresult;
- unary_impl_param() {}
- unary_impl_param(const typename super::init_param& p) : super(p) {}
+ void set(lvalue l, const typename super::result& r) const
+ {
+ super::def::write(this->storage_, l, r);
+ }
- typedef typename super::param_ param;
+ using super::operator ();
- void init(const param& p)
+ lresult operator () (typename super::argument& value) const
{
- this->impl_.init(p);
+ return lresult(exact(*this), value);
}
};
@@ -258,13 +266,23 @@
template <typename Fun, typename T>
struct unary
- : impl::unary_impl_param<mln_trait_fun_is_parametrable_(mln_trait_nunary(Fun, T))::value, Fun, T>
+ : impl::unary_impl<mln_trait_fun_is_parametrable_(mln_trait_nunary(Fun, T))::value,
+ mln_trait_fun_is_assignable_(mln_trait_nunary(Fun, T))::value, Fun, T>
{
- typedef impl::unary_impl_param<mln_trait_fun_is_parametrable_(mln_trait_nunary(Fun, T))::value, Fun, T>
+ typedef mln_trait_nunary(Fun, T) def;
+ typedef impl::unary_impl<mln_trait_fun_is_parametrable_(def)::value,
+ mln_trait_fun_is_assignable_(def)::value,
+ Fun,
+ T>
super;
unary() {}
- unary(const typename super::init_param& p) : super(p) {}
+
+ template <typename U>
+ unary(const U& param)
+ {
+ this->init(param);
+ }
using super::operator();
};
@@ -273,12 +291,12 @@
} // end of namespace mln::fun
- template <typename Impl, typename T>
- std::ostream& operator << (std::ostream& o, const mln::fun::spe::internal::unary_modifier<Impl, T>& m)
+} // end of namespace mln
+
+template <typename F, typename T>
+std::ostream& operator << (std::ostream& o, const mln::fun::spe::lwrapper<F, T>& m)
{
return o << m.to_result();
}
-} // end of namespace mln
-
#endif /* ! UNARY_HH */
Index: trunk/milena/sandbox/fred/mln/fun/unary.hh
===================================================================
--- trunk/milena/sandbox/fred/mln/fun/unary.hh (revision 3622)
+++ trunk/milena/sandbox/fred/mln/fun/unary.hh (revision 3623)
@@ -41,199 +41,73 @@
// Forward declarations, for composition with unary::operator()(Fun)
struct compose;
- template <typename F>
- struct unary;
-
namespace internal
{
- template <typename T>
+ template <typename U>
struct unary_with {};
- template <bool has_param, typename M, typename T>
- struct unary_with_param_helper;
-
- template <typename M, typename T>
- struct unary_with_param_helper<false, M, T>
- {
- typedef mln::fun::spe::unary<M, T> function;
-
- static function inst(const M&)
- {
- return function();
- };
-
- };
-
- template <typename M, typename T>
- struct unary_with_param_helper<true, M, T>
- {
- typedef mln::fun::spe::unary<M, T> function;
-
- static function inst(const M& m)
- {
- return function(m.parameter());
- };
-
- };
-
- template <bool has_lvalue, typename M, typename T>
- struct unary_with_lvalue_helper;
-
- template <typename M, typename T>
- struct unary_with_lvalue_helper<false, M, T>
- : unary_with_param_helper<mln_trait_fun_is_parametrable_(M)::value, M, T>
- {
- typedef unary_with_param_helper<mln_trait_fun_is_parametrable_(M)::value, M, T> super;
- typedef typename super::function function;
-
- static typename function::result call(const M& m, const T& x)
- {
- function f(super::inst(m));
- return f(x);
- }
- };
-
- template <typename M, typename T>
- struct unary_with_lvalue_helper<true, M, T>
- : unary_with_lvalue_helper<false, M, T>
- {
- typedef unary_with_lvalue_helper<false, M, T> super;
- typedef typename super::function function;
-
- static typename function::template lresult_with<T>::ret lcall(const M& m, T& x)
- {
- function f(super::inst(m));
- return f(x);
- }
-
- static void set(const M& m, typename function::lvalue v, const T& x)
- {
- function f(super::inst(m));
- f.set(v, x);
- }
- };
-
- template <typename MF, typename MG, typename T>
- struct unary_with_lvalue_helper<true, MF, mln::fun::spe::internal::unary_modifier<MG, T> >
- : unary_with_lvalue_helper<false, MF, mln::fun::spe::internal::unary_modifier<MG, T> >
- {
- typedef unary_with_lvalue_helper<false, MF, typename MG::result > super;
- typedef typename super::function function;
-
- static typename function::template lresult_with<typename MG::result>::ret lcall(const MF& m, T& x)
- {
- function f(super::inst(m));
- return f(x);
- }
-
- static typename function::template lresult_with< mln::fun::spe::internal::unary_modifier<MG, T> >::ret
- lcall(const MF& m, const mln::fun::spe::internal::unary_modifier<MG, T>& x)
- {
- function f(super::inst(m));
- return f(x);
}
- static void set(const MF& m, typename function::lvalue v, const T& x)
- {
- function f(super::inst(m));
- f.set(v, x);
- }
- };
-
- template <typename M, typename T>
- struct unary_with_helper
- : unary_with_lvalue_helper<mln_trait_fun_is_assignable__1comma_(mln::fun::spe::unary<M, T>)::value, M, T>
- {
- };
-
- } // end of namespace mln::fun::internal
-
template <typename F>
struct unary: mln::Meta_Function_v2v< F >
{
+ typedef F flag;
+ typedef mln_trait_fun_param(flag) param;
+ typedef mln_trait_fun_storage(flag) storage;
template <typename T>
struct with {
- typedef mln_trait_nunary(internal::unary_with<F>, T) impl;
- typedef typename impl::function ret;
+ typedef mln_trait_nunary(internal::unary_with<F>, T) def;
+ typedef typename def::ret ret;
};
template <typename T>
typename with<T>::ret::result operator()(const T& v) const
{
- return with<T>::impl::call(exact(*this), v);
+ return with<T>::def::call(exact(*this), v);
}
template <typename T>
typename with<T>::ret::template lresult_with<T>::ret operator()(T& v) const
{
- return with<T>::impl::lcall(exact(*this), v);
- }
-
- template <typename G, typename U>
- typename with< mln::fun::spe::internal::unary_modifier<G, U> >::ret::lresult
- operator()(const mln::fun::spe::internal::unary_modifier<G, U>& v) const
- {
- return with< mln::fun::spe::internal::unary_modifier<G, U> >::impl::lcall(exact(*this), v);
+ return typename with<T>::ret(storage_get())(v);
}
template <typename T, typename R>
void set(T& v, const R& r) const
{
- with<T>::impl::set(exact(*this), v, r);
- }
-
- };
-
- template <typename F, typename P>
- struct unary_param: unary<F>
- {
- typedef P param;
-
- unary_param() {};
- unary_param(const param& p) : p_(p) {};
-
- void init(const param& p)
- {
- p_ = p;
+ typename with<T>::ret(storage_).set(v, r);
}
- param& parameter()
+ template <typename U>
+ void init(const U& value)
{
- return p_;
- }
-
- const param& parameter() const
- {
- return p_;
- }
-
- protected:
- param p_;
-
+ storage_ = mln::trait::fun::internal::introspect::has_storage_t<flag, void>::compute(value);
};
- template <typename F>
- struct unary_param<F, F>: unary<F>
+ unary()
{
- typedef F param;
+ }
- void init(const param& p)
+ template <typename U>
+ unary(const U& param)
{
- exact(*this) = p;
+ this->init(param);
}
- param& parameter()
+ stored<storage>& storage_get()
{
- return exact(*this);
+ return storage_;
}
- const param& parameter() const
+ const stored<storage>& storage_get() const
{
- return exact(*this);
+ return storage_;
}
+ protected:
+ stored<storage> storage_;
};
} // end of namespace mln::fun
@@ -248,7 +122,17 @@
template <typename F, typename T>
struct set_unary_< mln::fun::internal::unary_with<F>, mln::Object, T>
{
- typedef mln::fun::internal::unary_with_helper<F, T> ret;
+ struct ret_t
+ {
+ typedef mln::fun::spe::unary<F, T> ret;
+
+ static typename ret::result call(const F& f, const T& v)
+ {
+ return ret(f.storage_get())(v);
+ }
+ };
+
+ typedef ret_t ret;
};
// Meta Function
@@ -262,14 +146,18 @@
typedef T ret;
};
- typedef set_unary_ ret;
- typedef typename identity<mln::fun::compose>::ret::template with<F, G>::ret function;
+ struct ret_t
+ {
+ typedef typename identity<mln::fun::compose>::ret::template with<F, G>::ret ret;
- static typename function::result call(const F& f, const G& g)
+ static typename ret::result call(const F& f, const G& g)
{
- function tmp;
- return tmp(f, g);
+ return ret()(f, g);
}
+
+ };
+
+ typedef ret_t ret;
};
} // end of namespace mln::trait::next
Index: trunk/milena/sandbox/fred/mln/fun/param.hh
===================================================================
--- trunk/milena/sandbox/fred/mln/fun/param.hh (revision 0)
+++ trunk/milena/sandbox/fred/mln/fun/param.hh (revision 3623)
@@ -0,0 +1,88 @@
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR F PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_FUN_PARAM_HH
+# define MLN_FUN_PARAM_HH
+
+namespace mln
+{
+
+ namespace fun
+ {
+
+ template <typename T>
+ struct stored
+ {
+ typedef T value;
+
+ const T& to_value() const
+ {
+ return t_;
+ }
+
+ T& to_value()
+ {
+ return t_;
+ }
+
+ operator const T& () const
+ {
+ return to_value();
+ }
+
+ operator T& ()
+ {
+ return to_value();
+ }
+
+ stored& operator = (const T& t)
+ {
+ t_ = t;
+ return *this;
+ }
+
+ protected:
+ T t_;
+ };
+
+ template <>
+ struct stored<void>
+ {
+ };
+
+ template <typename F>
+ struct parameter
+ {
+ typedef void param;
+ typedef void storage;
+ };
+
+ } // end of namespace mln::fun
+
+} // end of namespace mln
+
+#endif /* ! MLN_FUN_PARAM_HH */
1
0
06 Apr '09
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-04-06 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Add tree iterator regardless the way of traversal.
* mln/morpho/tree/data.hh: Add node_piter, site_piter and leaf_piter.
---
data.hh | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
Index: trunk/milena/mln/morpho/tree/data.hh
===================================================================
--- trunk/milena/mln/morpho/tree/data.hh (revision 3621)
+++ trunk/milena/mln/morpho/tree/data.hh (revision 3622)
@@ -31,11 +31,9 @@
/// \file mln/morpho/tree/data.hh
///
-/// FIXME: First Attempt.
+/// TODO: think about site iterator (using image site iterator instead
+/// of S container iterator) to go faster.
///
-/// \todo Fix the issue pointed to by Edwin without modifying the way
-/// sites are browsed (see the documentation of compute_parent to
-/// learn why we want the 1st pass to be in forward scan of s).
# include <mln/morpho/tree/compute_parent.hh>
# include <mln/core/site_set/p_array.hh>
@@ -49,6 +47,9 @@
# define mln_dn_node_piter(T) typename T::dn_node_piter
# define mln_up_leaf_piter(T) typename T::up_leaf_piter
# define mln_dn_leaf_piter(T) typename T::dn_leaf_piter
+# define mln_site_piter(T) typename T::site_piter
+# define mln_node_piter(T) typename T::node_piter
+# define mln_leaf_piter(T) typename T::leaf_piter
# define mln_preorder_piter(T) typename T::preorder_piter
# define mln_up_site_piter_(T) T::up_site_piter
@@ -57,6 +58,9 @@
# define mln_dn_node_piter_(T) T::dn_node_piter
# define mln_up_leaf_piter_(T) T::up_leaf_piter
# define mln_dn_leaf_piter_(T) T::dn_leaf_piter
+# define mln_site_piter_(T) T::site_piter
+# define mln_node_piter_(T) T::node_piter
+# define mln_leaf_piter_(T) T::leaf_piter
# define mln_preorder_piter_(T) T::preorder_piter
namespace mln
@@ -91,12 +95,6 @@
/// Preorder tree traversal iterator.
template <typename T> struct preorder_piter;
- /// Postorder tree traversal iterator.
- //template <typename T> struct postorder_piter;
-
- // FIXME: Doc!
-
-
template <typename I, typename S>
class data
@@ -122,21 +120,20 @@
// Iterate on all sites.
typedef mln::morpho::tree::up_site_piter<self_> up_site_piter;
typedef mln::morpho::tree::dn_site_piter<self_> dn_site_piter;
+ typedef up_site_piter site_piter;
// Iterate on nodes only.
typedef mln::morpho::tree::up_node_piter<self_> up_node_piter;
typedef mln::morpho::tree::dn_node_piter<self_> dn_node_piter;
+ typedef up_node_piter node_piter;
// Iterate on leaves only.
typedef mln::morpho::tree::up_leaf_piter<self_> up_leaf_piter;
typedef mln::morpho::tree::dn_leaf_piter<self_> dn_leaf_piter;
+ typedef up_leaf_piter leaf_piter;
typedef mln::morpho::tree::preorder_piter<self_> preorder_piter;
-// typedef mln_bkd_piter(S) piter;
-// typedef mln_bkd_piter(S) fwd_piter;
-// typedef mln_fwd_piter(S) bkd_piter;
-
/// Constructor.
template <typename N>
data(const Image<I>& f, const Site_Set<S>& s, const Neighborhood<N>& nbh);
1
0
06 Apr '09
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
ChangeLog:
2009-04-06 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Add function to perform component tree computation until.
* edwin/inim/Makefile,
* edwin/inim/configure,
* edwin/inim,
* edwin/inim/inim.cc: Move inim project to its own directory.
* edwin/tree/run.hh,
* edwin/tree/sharp.cc: Add functions to perform component tree
computation until all leaves belong to a component.
* edwin/tree/test.cc: Remove.
---
inim/Makefile | 1835 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
inim/configure | 21
inim/inim.cc | 247 +++++++
tree/Makefile | 2
tree/configure | 5
tree/run.hh | 60 +
tree/sharp.cc | 85 ++
7 files changed, 2232 insertions(+), 23 deletions(-)
Index: trunk/milena/sandbox/edwin/tree/test.cc (deleted)
===================================================================
Index: trunk/milena/sandbox/edwin/tree/configure
===================================================================
--- trunk/milena/sandbox/edwin/tree/configure (revision 3620)
+++ trunk/milena/sandbox/edwin/tree/configure (revision 3621)
@@ -13,9 +13,9 @@
rm -f makefile.rules
touch makefile.rules
if [ "$debug" ]; then
- echo 'DEBUG = 1' > makefile.rules
+ echo 'DEBUG = 1' >> makefile.rules
fi
if [ "$release" ]; then
- echo 'RELEASE = 1' > makefile.rules
+ echo 'RELEASE = 1' >> makefile.rules
fi
-echo "MLN_DIR = $MLN_DIR" > makefile.rules
\ No newline at end of file
+echo "MLN_DIR = $MLN_DIR" >> makefile.rules
\ No newline at end of file
Index: trunk/milena/sandbox/edwin/tree/sharp.cc
===================================================================
--- trunk/milena/sandbox/edwin/tree/sharp.cc (revision 3620)
+++ trunk/milena/sandbox/edwin/tree/sharp.cc (revision 3621)
@@ -25,7 +25,6 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
#include <mln/io/pbm/save.hh>
-#include <../../theo/color/change_attributes.hh>
/* data & pw */
#include <mln/core/concept/function.hh>
@@ -34,6 +33,9 @@
#include <mln/data/paste.hh>
#include <mln/pw/all.hh>
+/* level */
+#include <mln/level/stretch.hh>
+
/* trace */
#include <mln/trace/quiet.hh>
@@ -41,6 +43,7 @@
#include <string>
#include <iostream>
+using namespace mln;
bool mydebug = false;
@@ -59,10 +62,47 @@
}
+/**
+** For each component in the list \p component_list, it
+** propagates the representant value to the remaining nodes of the
+** component. The value of node that don't belong to a component is
+** set to \p null.
+**
+** @param attr_image The attribute image.
+** @param tree The component tree used to propagate value.
+** @param component_list The list of components.
+** @param null The nodes that don't belong to components will be set
+** with this value.
+**
+** @return The resulting component image.
+*/
+template <typename A, typename T>
+inline
+A set_value_to_components(const Image<A>& attr_image,
+ const T& tree,
+ const p_array< mln_psite(A) >& component_list,
+ const mln_value(A)& null)
+{
+ const A& attr_img = exact(attr_image);
+ A out;
+ initialize(out, attr_img);
+ data::fill(out, null);
+
+ mln_piter(p_array<mln_psite(A)>) p(component_list);
+ for_all(p)
+ {
+ out(p) = attr_img(p);
+ morpho::tree::propagate_node_to_descendants(p, tree, out);
+ }
+ morpho::tree::propagate_representant(tree, out);
+ return out;
+}
+
+
+
int main(int argc, char* argv[])
{
- using namespace mln;
using value::int_u8;
std::string arg;
unsigned nb_components = 0;
@@ -140,19 +180,23 @@
p_array< mln_psite_(A) > obj_array; // Array of object components.
if (mydebug) {
- std::stringstream s("Run max accumulator, look for ");
+ std::stringstream s("Run max accumulator, look for ", std::stringstream::out|std::stringstream::in|std::stringstream::ate);
if (nb_components)
s << nb_components << " components.";
- else
+ else if (sharpness)
s << "components whose treshold > " << sharpness;
+ else
+ s << "components util leaves are glutted";
dsp(s.str());
}
- if (!nb_components) {
+ if (sharpness != 0) {
mln_VAR(predicate, pw::value(a) > pw::cst(sharpness));
obj_array = morpho::tree::run_while(tree, a, argmax, predicate);
- } else {
+ } else if (nb_components) {
obj_array = morpho::tree::run_ntimes(tree, a, argmax, nb_components);
+ } else {
+ obj_array = morpho::tree::run_until_glutted_leaves(tree, a, argmax);
}
@@ -169,19 +213,24 @@
if (mydebug) {
dsp("Create mask and propagate");
}
- typedef mln_ch_value_(I, bool) M;
- M mask;
- initialize(mask, a);
- data::fill(mask, false);
- mln_fwd_piter_(p_array< mln_psite_(I) >) c(obj_array);
- for_all(c)
- {
- mask(c) = true;
- propagate_node_to_descendants(c, tree, mask);
- }
- morpho::tree::propagate_representant(tree, mask);
- io::pbm::save(mask, "binary.pbm");
+ A pre_output = set_value_to_components(a, tree, obj_array, 0);
+ I output = level::stretch(int_u8(), pre_output);
+ io::pgm::save(output, "components.pgm");
+
+
+// typedef mln_ch_value_(I, bool) M;
+// M mask;
+// initialize(mask, a);
+// data::fill(mask, false);
+
+// mln_fwd_piter_(p_array< mln_psite_(I) >) c(obj_array);
+// for_all(c)
+// {
+// mask(c) = true;
+// propagate_node_to_descendants(c, tree, mask);
+// }
+
// mask now contains all nodes related to objects
Index: trunk/milena/sandbox/edwin/tree/run.hh
===================================================================
--- trunk/milena/sandbox/edwin/tree/run.hh (revision 3620)
+++ trunk/milena/sandbox/edwin/tree/run.hh (revision 3621)
@@ -108,6 +108,14 @@
unsigned n);
+ template <typename T, typename A, typename ACC>
+ inline
+ p_array< mln_psite(A) >
+ run_until_glutted_leaves(const T& tree,
+ Image<A>& a,
+ Accumulator<ACC>& acc);
+
+
# ifndef MLN_INCLUDE_ONLY
namespace internal
@@ -120,7 +128,7 @@
ACC& accu,
P2B& pred)
{
- mln_psite(A) p;
+ mln_psite(A) p, tmp;
p_array< mln_psite(A) > arr_sites;
util::array< mln_value(A) > arr_values;
@@ -131,9 +139,12 @@
arr_values.append(a(p));
morpho::tree::propagate_node_to_descendants(p, tree, a, 0);
morpho::tree::propagate_node_to_ancestors(p, tree, a, 0);
+ if (pred(p)) // may have changed
+ {
a(p) = 0;
p = morpho::tree::run(tree, a, accu);
}
+ }
for (unsigned i = 0; i < arr_sites.nsites(); i++)
a(arr_sites[i]) = arr_values[i];
return arr_sites;
@@ -159,6 +170,37 @@
unsigned n_;
};
+ template <typename T>
+ struct glut_leaves : Function_p2b< glut_leaves<T> >
+ {
+ typedef bool result;
+
+ glut_leaves(const T& tree) :
+ tree_ (tree),
+ n_ (tree.leaves().nsites())
+ {
+ }
+
+ bool operator()(const mln_psite(T)& p)
+ {
+ (void)p;
+ std::cout << n_ << std::endl;
+
+ if (n_ == 0)
+ return false;
+
+ mln_preorder_piter(T) n(tree_, p);
+ for_all(n)
+ if (tree_.is_a_leaf(n))
+ n_--;
+ return true;
+ }
+
+ private:
+ const T& tree_;
+ unsigned n_;
+ };
+
} // end of namespace mln::morpho::tree::internal
@@ -196,6 +238,22 @@
return arr;
}
+
+ template <typename T, typename A, typename ACC>
+ inline
+ p_array< mln_psite(A) >
+ run_until_glutted_leaves(const T& tree,
+ Image<A>& a,
+ Accumulator<ACC>& acc)
+ {
+ trace::entering("mln::morpho::tree::run_until_glutted_leaves");
+ internal::glut_leaves<T> predicate(tree);
+ p_array< mln_psite(A) > arr = run_while(tree, a, acc, predicate);
+ trace::exiting("mln::morpho::tree::run_until_glutted_leaves");
+ return arr;
+ }
+
+
template <typename T, typename A, typename I>
mln_result(A)
run(const T& tree,
Index: trunk/milena/sandbox/edwin/tree/Makefile
===================================================================
--- trunk/milena/sandbox/edwin/tree/Makefile (revision 3620)
+++ trunk/milena/sandbox/edwin/tree/Makefile (revision 3621)
@@ -1,5 +1,5 @@
include makefile.rules
-TARGET=test
+TARGET=sharp
sharp_SRC=sharp.cc
sharp_OBJS=${sharp_SRC:.cc=.o}
Index: trunk/milena/sandbox/edwin/inim/inim.cc
===================================================================
--- trunk/milena/sandbox/edwin/inim/inim.cc (revision 0)
+++ trunk/milena/sandbox/edwin/inim/inim.cc (revision 3621)
@@ -0,0 +1,247 @@
+/* mln core */
+#include <mln/core/image/image2d.hh>
+#include <mln/core/image/image_if.hh>
+#include <mln/core/alias/neighb2d.hh>
+#include <mln/core/alias/window2d.hh>
+#include <mln/core/alias/w_window2d_int.hh>
+#include <mln/core/routine/duplicate.hh>
+#include <mln/core/var.hh>
+
+/* mln value */
+#include <mln/value/int_u16.hh>
+
+/* Site set */
+#include <mln/core/site_set/p_array.hh>
+#include <mln/level/sort_psites.hh>
+
+/* Component trees */
+#include <mln/morpho/tree/data.hh>
+#include <mln/morpho/tree/compute_attribute_image.hh>
+#include "propagate.hh"
+#include "run.hh"
+#include "accumulator/arg_max.hh"
+
+
+/* Attributes */
+#include <mln/transform/distance_front.hh>
+#include "../attributes/bbox.hh"
+#include <mln/morpho/attribute/card.hh>
+#include <mln/make/w_window2d_int.hh>
+
+/* io */
+#include <mln/io/pbm/load.hh>
+#include <mln/io/pgm/save.hh>
+#include <mln/io/ppm/save.hh>
+
+/* data & pw */
+#include <mln/core/concept/function.hh>
+#include <mln/fun/p2v/ternary.hh>
+#include <mln/data/fill.hh>
+#include <mln/data/paste.hh>
+#include <mln/pw/all.hh>
+
+/* labeling */
+#include <mln/value/label.hh>
+#include <mln/labeling/blobs.hh>
+#include <mln/debug/colorize.hh>
+
+/* Draw debug */
+#include <mln/draw/box.hh>
+
+/* std */
+#include <string>
+#include <iostream>
+#include <cmath>
+
+bool mydebug = false;
+
+void usage(char** argv)
+{
+ std::cerr << "usage: " << argv[0] << " input [--debug] [-n nbr_components | -s sharpness] [-c card]" << std::endl;
+ abort();
+}
+
+void dsp(const std::string& str)
+{
+ std::cout << std::endl
+ << "*********************" << std::endl
+ << "** " << str << std::endl
+ << "*********************" << std::endl;
+}
+
+template <typename P2V, typename G>
+struct ratio_ : public mln::Function_p2v< ratio_<P2V, G> >
+{
+ typedef double result;
+
+ ratio_(const P2V& f, const G& g) :
+ f_ (f), g_ (g)
+ {
+ }
+
+ template <typename P>
+ double operator() (const P& p) const
+ {
+ mln_VAR(box, f_(p));
+ double a = (double) (box.len(1)) / (double)(box.len(0));
+ return a * std::log(g_(p));
+ }
+
+protected:
+ const P2V& f_;
+ const G& g_;
+};
+
+template <typename P2V, typename G>
+ratio_<P2V, G> ratio(const mln::Function_p2v<P2V>& f, const mln::Function_p2v<G>& g)
+{
+ return ratio_<P2V, G>(exact(f), exact(g));
+}
+
+
+
+
+int main(int argc, char* argv[])
+{
+ using namespace mln;
+ using value::int_u16;
+
+ std::string arg;
+ unsigned nb_components = 0;
+ unsigned card = 0;
+ double treshold = 0;
+
+ if (argc < 2)
+ usage(argv);
+
+ for (int i = 2; i < argc; i++)
+ {
+ arg = std::string(argv[i]);
+ if (arg == "--debug")
+ mydebug = true;
+ else if (arg == "-n" && i != argc)
+ nb_components = atoi(argv[++i]);
+ else if (arg == "-t" && i != argc)
+ treshold = atof(argv[++i]);
+ else if (arg == "-c" && i != argc)
+ card = atoi(argv[++i]);
+ else if (arg == "--trace")
+ trace::quiet = false;
+ else
+ usage (argv);
+ }
+
+
+ /* Image loadin' */
+ typedef image2d<int_u16> I;
+
+ image2d<bool> input_;
+ io::pbm::load(input_, argv[1]);
+
+ /* Work on geodesic distance image */
+ I input;
+ {
+ const int weights[9] =
+ { 10, 9, 10,
+ 1, 0, 1,
+ 10, 9, 10 };
+
+ w_window2d_int win;
+ mln::convert::from_to(weights, win);
+ input = transform::distance_front(input_, c8(), win, mln_max(int_u16));
+ }
+
+ if (mydebug) {
+ dsp("Distance geodesic");
+ io::pgm::save(input, "distance.pgm");
+ }
+
+ /* Component tree creation */
+ typedef p_array< mln_site_(I) > S;
+ typedef morpho::tree::data<I,S> tree_t;
+
+ S sorted_sites = level::sort_psites_decreasing(input);
+ tree_t tree(input, sorted_sites, c4());
+
+ /* Compute Attribute On Image */
+ typedef morpho::attribute::bbox<I> bbox_t;
+ typedef morpho::attribute::card<I> card_t;
+ typedef mln_ch_value_(I, double) A;
+
+ mln_VAR(attr_image, morpho::tree::compute_attribute_image(bbox_t (), tree));
+ mln_VAR(card_image, morpho::tree::compute_attribute_image(card_t (), tree));
+ A a = duplicate(ratio(pw::value(attr_image), pw::value(card_image)) | attr_image.domain());
+ morpho::tree::propagate_representant(tree, a);
+
+ if (mydebug) {
+ dsp("Image sharp attribute");
+ }
+
+ /* Run max accumulator */
+ accumulator::arg_max<A> argmax(a);
+ p_array< mln_psite_(A) > obj_array; // Array of object components.
+
+ if (mydebug) {
+ std::stringstream s("Run max accumulator, look for ");
+ if (nb_components)
+ s << nb_components << " components.";
+ else
+ s << "components whose treshold > " << treshold;
+ dsp(s.str());
+ }
+
+ if (!nb_components) {
+ mln_VAR(predicate, pw::value(a) > pw::cst(treshold));
+ obj_array = morpho::tree::run_while(tree, a, argmax, predicate);
+ } else {
+ obj_array = morpho::tree::run_ntimes(tree, a, argmax, nb_components);
+ }
+
+ /* Print them */
+ if (mydebug) {
+ dsp("Image Filtered Components");
+ mln_fwd_piter_(p_array< mln_psite_(I) >) c(obj_array);
+ for_all(c)
+ std::cout << c;
+ }
+
+ /* Now Back Propagate to component */
+ typedef mln_ch_value_(I, bool) M;
+ M mask;
+ initialize(mask, a);
+ data::fill(mask, false);
+
+ mln_fwd_piter_(p_array< mln_psite_(I) >) c(obj_array);
+ for_all(c)
+ {
+ mask(c) = true;
+ propagate_node_to_descendants(c, tree, mask);
+ }
+ morpho::tree::propagate_representant(tree, mask);
+
+ // mask now contains all nodes related to objects
+
+ if (mydebug) {
+ dsp("Create mask and propagate");
+ }
+
+ /* Labeling */
+ typedef mln_ch_value_(I, value::label<8>) L;
+ typedef mln_ch_value_(I, value::rgb<8>) O;
+ value::label<8> nlabel;
+ L label = labeling::blobs(mask, c4(), nlabel);
+ O output = debug::colorize(value::rgb8(), label, nlabel);
+ io::ppm::save(output, "label.pgm");
+
+ /* Now store output image image */
+ O out;
+ initialize(out, input);
+ data::fill(out, literal::black_t());
+ data::paste(output | pw::value(input_), out);
+
+ if (mydebug) {
+ dsp("Mask input");
+ }
+
+ io::ppm::save(out, "output.pgm");
+}
Index: trunk/milena/sandbox/edwin/inim/configure
===================================================================
--- trunk/milena/sandbox/edwin/inim/configure (revision 0)
+++ trunk/milena/sandbox/edwin/inim/configure (revision 3621)
@@ -0,0 +1,21 @@
+#! /bin/bash
+
+for arg in "$@"; do
+ if [ "$arg" == "--debug" ]; then
+ debug=1;
+ elif [ "$arg" == "--release" ]; then
+ release=1;
+ elif [ "${arg#--mln_dir=}" ]; then
+ MLN_DIR=${arg#--mln_dir=}
+ fi
+done
+
+rm -f makefile.rules
+touch makefile.rules
+if [ "$debug" ]; then
+ echo 'DEBUG = 1' > makefile.rules
+fi
+if [ "$release" ]; then
+ echo 'RELEASE = 1' > makefile.rules
+fi
+echo "MLN_DIR = $MLN_DIR" > makefile.rules
\ No newline at end of file
Property changes on: trunk/milena/sandbox/edwin/inim/configure
___________________________________________________________________
Name: svn:executable
+ *
Index: trunk/milena/sandbox/edwin/inim/Makefile
===================================================================
--- trunk/milena/sandbox/edwin/inim/Makefile (revision 0)
+++ trunk/milena/sandbox/edwin/inim/Makefile (revision 3621)
@@ -0,0 +1,1835 @@
+include makefile.rules
+TARGET=test
+sharp_SRC=sharp.cc
+sharp_OBJS=${sharp_SRC:.cc=.o}
+
+test_SRC=test.cc
+test_OBJS=${test_SRC:.cc=.o}
+
+OLENADIR=$(MLN_DIR)/..
+MILENADIR=$(OLENADIR)/milena
+
+CXXFLAGS=-I$(MILENADIR) -I./ -W -Wall
+
+
+CXXFLAGS += $(if $(DEBUG), -g -ggdb, -DNDEBUG\
+ $(if $(RELEASE), -O3, -O1))
+
+CXX=g++
+LD=g++
+LDFLAGS=
+
+all: $(TARGET)
+
+
+$(TARGET): $($(TARGET)_OBJS) $($(TARGET)_SRC)
+ $(LD) $(LDFLAGS) -o $@ $($(TARGET)_OBJS)
+
+%.o: %.cc
+ $(CXX) $(CXXFLAGS) -c $<
+
+%.o: %.hh
+ $(CXX) $(CXXFLAGS) -c $<
+
+depend:
+ makedepend -- $(CXXFLAGS) -- -v $($(TARGET)_SRC)
+
+clean:
+ rm -f *.o $(TARGET)
+ #rm -f *.pbm
+ #find -name "*.pgm" \! -regex ".*/affiche2?.pgm" -delete
+# DO NOT DELETE
+
+test.o: /work/carlinet/trunk/milena/mln/core/image/image2d.hh
+# /work/carlinet/trunk/milena/mln/core/image/image2d.hh includes:
+# mln/core/internal/image_primary.hh
+# mln/core/internal/fixme.hh
+# mln/core/alias/box2d.hh
+# mln/core/routine/init.hh
+# mln/border/thickness.hh
+# mln/value/set.hh
+# mln/fun/i2v/all_to.hh
+# mln/core/trait/pixter.hh
+# mln/core/dpoints_pixter.hh
+# mln/core/pixter2d.hh
+# mln/make/image.hh
+# mln/make/image2d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/image_primary.hh
+# /work/carlinet/trunk/milena/mln/core/internal/image_primary.hh includes:
+# mln/core/internal/image_base.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/image_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/image_base.hh includes:
+# mln/core/concept/image.hh
+# mln/core/grids.hh
+# mln/core/trait/qlf_value.hh
+# mln/core/internal/check/image_all.hh
+# mln/core/internal/data.hh
+# mln/core/internal/morpher_lvalue.hh
+# mln/util/tracked_ptr.hh
+# mln/value/set.hh
+# mln/value/super_value.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/image.hh
+# /work/carlinet/trunk/milena/mln/core/concept/image.hh includes:
+# mln/core/concept/site_set.hh
+# mln/core/concept/mesh.hh
+# mln/core/trait/all.hh
+# mln/core/macros.hh
+# mln/core/site_set/box.hh
+# mln/trait/concrete.hh
+# mln/trait/images.hh
+# mln/metal/is_a.hh
+# mln/metal/equal.hh
+# mln/tag/init.hh
+# mln/core/routine/initialize.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/site_set.hh
+# /work/carlinet/trunk/milena/mln/core/concept/site_set.hh includes:
+# mln/core/concept/site_iterator.hh
+# mln/trait/site_sets.hh
+# mln/metal/not_equal.hh
+# mln/metal/is_a.hh
+# mln/metal/is_unqualif.hh
+# mln/util/ord.hh
+# mln/core/site_set/operators.hh
+# mln/core/routine/ops.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/site_iterator.hh
+# /work/carlinet/trunk/milena/mln/core/concept/site_iterator.hh includes:
+# mln/core/concept/site_proxy.hh
+# mln/core/concept/iterator.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/site_proxy.hh
+# /work/carlinet/trunk/milena/mln/core/concept/site_proxy.hh includes:
+# mln/core/concept/proxy.hh
+# mln/metal/is_a.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/proxy.hh
+# /work/carlinet/trunk/milena/mln/core/concept/proxy.hh includes:
+# mln/core/concept/object.hh
+# mln/value/ops.hh
+# mln/convert/from_to.hxx
+# mln/core/concept/proxy.hxx
+test.o: /work/carlinet/trunk/milena/mln/core/concept/object.hh
+# /work/carlinet/trunk/milena/mln/core/concept/object.hh includes:
+# mln/core/macros.hh
+# mln/core/category.hh
+# mln/core/contract.hh
+# mln/core/internal/fixme.hh
+# mln/trace/all.hh
+# mln/metal/abort.hh
+# mln/metal/is_a.hh
+# mln/metal/is_not_a.hh
+# mln/metal/is.hh
+# mln/metal/is_not.hh
+# mln/metal/equal.hh
+# mln/metal/not_equal.hh
+# mln/metal/converts_to.hh
+# mln/metal/ret.hh
+# mln/metal/unqualif.hh
+# mln/metal/math/all.hh
+# mln/core/routine/exact.hh
+# mln/core/routine/ops.hh
+test.o: /work/carlinet/trunk/milena/mln/core/macros.hh
+test.o: /work/carlinet/trunk/milena/mln/core/category.hh
+# /work/carlinet/trunk/milena/mln/core/category.hh includes:
+# mln/metal/equal.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/equal.hh
+# /work/carlinet/trunk/milena/mln/metal/equal.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/bool.hh
+# /work/carlinet/trunk/milena/mln/metal/bool.hh includes:
+# mln/metal/bexpr.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/bexpr.hh
+# /work/carlinet/trunk/milena/mln/metal/bexpr.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/core/contract.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/fixme.hh
+test.o: /work/carlinet/trunk/milena/mln/trace/all.hh
+# /work/carlinet/trunk/milena/mln/trace/all.hh includes:
+# mln/trace/quiet.hh
+# mln/trace/entering.hh
+# mln/trace/exiting.hh
+# mln/trace/stop.hh
+# mln/trace/resume.hh
+# mln/trace/warning.hh
+test.o: /work/carlinet/trunk/milena/mln/trace/quiet.hh
+# /work/carlinet/trunk/milena/mln/trace/quiet.hh includes:
+# sys/time.h
+test.o: /usr/include/sys/time.h
+# /usr/include/sys/time.h includes:
+# features.h
+# bits/types.h
+# time.h
+# bits/time.h
+# sys/select.h
+test.o: /usr/include/features.h
+# /usr/include/features.h includes:
+# sys/cdefs.h
+# gnu/stubs.h
+test.o: /usr/include/sys/cdefs.h
+# /usr/include/sys/cdefs.h includes:
+# bits/wordsize.h
+test.o: /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h
+# /usr/include/gnu/stubs.h includes:
+# bits/wordsize.h
+# gnu/stubs-32.h
+test.o: /usr/include/gnu/stubs-32.h /usr/include/bits/types.h
+# /usr/include/bits/types.h includes:
+# features.h
+# bits/wordsize.h
+# bits/typesizes.h
+test.o: /usr/include/bits/typesizes.h /usr/include/time.h
+# /usr/include/time.h includes:
+# bits/types.h
+test.o: /usr/include/bits/time.h
+# /usr/include/bits/time.h includes:
+# bits/types.h
+test.o: /usr/include/sys/select.h
+# /usr/include/sys/select.h includes:
+# features.h
+# bits/types.h
+# bits/select.h
+# bits/sigset.h
+# time.h
+# bits/time.h
+test.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
+test.o: /work/carlinet/trunk/milena/mln/trace/entering.hh
+# /work/carlinet/trunk/milena/mln/trace/entering.hh includes:
+# mln/trace/quiet.hh
+test.o: /work/carlinet/trunk/milena/mln/trace/exiting.hh
+# /work/carlinet/trunk/milena/mln/trace/exiting.hh includes:
+# mln/core/contract.hh
+# mln/trace/quiet.hh
+test.o: /work/carlinet/trunk/milena/mln/trace/stop.hh
+# /work/carlinet/trunk/milena/mln/trace/stop.hh includes:
+# mln/trace/quiet.hh
+test.o: /work/carlinet/trunk/milena/mln/trace/resume.hh
+# /work/carlinet/trunk/milena/mln/trace/resume.hh includes:
+# mln/trace/quiet.hh
+test.o: /work/carlinet/trunk/milena/mln/trace/warning.hh
+# /work/carlinet/trunk/milena/mln/trace/warning.hh includes:
+# mln/trace/quiet.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/abort.hh
+# /work/carlinet/trunk/milena/mln/metal/abort.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/is_a.hh
+# /work/carlinet/trunk/milena/mln/metal/is_a.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/is_not_a.hh
+# /work/carlinet/trunk/milena/mln/metal/is_not_a.hh includes:
+# mln/metal/is_a.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/is.hh
+# /work/carlinet/trunk/milena/mln/metal/is.hh includes:
+# mln/metal/is_a.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/is_not.hh
+# /work/carlinet/trunk/milena/mln/metal/is_not.hh includes:
+# mln/metal/is.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/not_equal.hh
+# /work/carlinet/trunk/milena/mln/metal/not_equal.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/converts_to.hh
+# /work/carlinet/trunk/milena/mln/metal/converts_to.hh includes:
+# mln/metal/is_a.hh
+# mln/metal/const.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/const.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/ret.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/unqualif.hh
+# /work/carlinet/trunk/milena/mln/metal/unqualif.hh includes:
+# mln/metal/unconst.hh
+# mln/metal/unref.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/unconst.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/unref.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/math/all.hh
+# /work/carlinet/trunk/milena/mln/metal/math/all.hh includes:
+# mln/metal/math/pow.hh
+# mln/metal/math/root.hh
+# mln/metal/math/sqrt.hh
+# mln/metal/math/max.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/math/pow.hh
+# /work/carlinet/trunk/milena/mln/metal/math/pow.hh includes:
+# mln/metal/bool.hh
+# mln/metal/int.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/int.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/math/root.hh
+# /work/carlinet/trunk/milena/mln/metal/math/root.hh includes:
+# mln/metal/math/pow.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/math/sqrt.hh
+# /work/carlinet/trunk/milena/mln/metal/math/sqrt.hh includes:
+# mln/metal/bool.hh
+# mln/metal/int.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/math/max.hh
+# /work/carlinet/trunk/milena/mln/metal/math/max.hh includes:
+# mln/metal/bool.hh
+# mln/metal/int.hh
+test.o: /work/carlinet/trunk/milena/mln/core/routine/exact.hh
+# /work/carlinet/trunk/milena/mln/core/routine/exact.hh includes:
+# mln/core/internal/exact.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/exact.hh
+# /work/carlinet/trunk/milena/mln/core/internal/exact.hh includes:
+# mln/core/concept/object.hh
+test.o: /work/carlinet/trunk/milena/mln/core/routine/ops.hh
+# /work/carlinet/trunk/milena/mln/core/routine/ops.hh includes:
+# mln/trait/op/all.hh
+# mln/core/concept/object.hh
+# mln/metal/converts_to.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/all.hh
+# /work/carlinet/trunk/milena/mln/trait/op/all.hh includes:
+# mln/trait/op/plus.hh
+# mln/trait/op/minus.hh
+# mln/trait/op/times.hh
+# mln/trait/op/div.hh
+# mln/trait/op/mod.hh
+# mln/trait/op/uplus.hh
+# mln/trait/op/uminus.hh
+# mln/trait/op/preinc.hh
+# mln/trait/op/postinc.hh
+# mln/trait/op/predec.hh
+# mln/trait/op/postdec.hh
+# mln/trait/op/eq.hh
+# mln/trait/op/neq.hh
+# mln/trait/op/less.hh
+# mln/trait/op/leq.hh
+# mln/trait/op/geq.hh
+# mln/trait/op/greater.hh
+# mln/trait/op/and.hh
+# mln/trait/op/or.hh
+# mln/trait/op/xor.hh
+# mln/trait/op/lor.hh
+# mln/trait/op/not.hh
+# mln/trait/op/ord.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/plus.hh
+# /work/carlinet/trunk/milena/mln/trait/op/plus.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/promote.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/decl.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/promote.hh
+# /work/carlinet/trunk/milena/mln/trait/promote.hh includes:
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/solve.hh
+# /work/carlinet/trunk/milena/mln/trait/solve.hh includes:
+# mln/core/category.hh
+# mln/metal/equal.hh
+# mln/metal/if.hh
+# mln/metal/ret.hh
+# mln/trait/solve_unary.hh
+# mln/trait/solve_binary.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/if.hh
+# /work/carlinet/trunk/milena/mln/metal/if.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/solve_unary.hh
+# /work/carlinet/trunk/milena/mln/trait/solve_unary.hh includes:
+# mln/core/category.hh
+# mln/core/routine/exact.hh
+# mln/metal/equal.hh
+# mln/metal/if.hh
+# mln/metal/ret.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/solve_binary.hh
+# /work/carlinet/trunk/milena/mln/trait/solve_binary.hh includes:
+# mln/core/category.hh
+# mln/core/routine/exact.hh
+# mln/metal/equal.hh
+# mln/metal/if.hh
+# mln/metal/ret.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/minus.hh
+# /work/carlinet/trunk/milena/mln/trait/op/minus.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/promote.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/times.hh
+# /work/carlinet/trunk/milena/mln/trait/op/times.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/div.hh
+# /work/carlinet/trunk/milena/mln/trait/op/div.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/promote.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/mod.hh
+# /work/carlinet/trunk/milena/mln/trait/op/mod.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/promote.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/uplus.hh
+# /work/carlinet/trunk/milena/mln/trait/op/uplus.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/uminus.hh
+# /work/carlinet/trunk/milena/mln/trait/op/uminus.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/preinc.hh
+# /work/carlinet/trunk/milena/mln/trait/op/preinc.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/postinc.hh
+# /work/carlinet/trunk/milena/mln/trait/op/postinc.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/predec.hh
+# /work/carlinet/trunk/milena/mln/trait/op/predec.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/postdec.hh
+# /work/carlinet/trunk/milena/mln/trait/op/postdec.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/eq.hh
+# /work/carlinet/trunk/milena/mln/trait/op/eq.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/neq.hh
+# /work/carlinet/trunk/milena/mln/trait/op/neq.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/less.hh
+# /work/carlinet/trunk/milena/mln/trait/op/less.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/leq.hh
+# /work/carlinet/trunk/milena/mln/trait/op/leq.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/geq.hh
+# /work/carlinet/trunk/milena/mln/trait/op/geq.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/greater.hh
+# /work/carlinet/trunk/milena/mln/trait/op/greater.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/and.hh
+# /work/carlinet/trunk/milena/mln/trait/op/and.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/or.hh
+# /work/carlinet/trunk/milena/mln/trait/op/or.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/xor.hh
+# /work/carlinet/trunk/milena/mln/trait/op/xor.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/lor.hh
+# /work/carlinet/trunk/milena/mln/trait/op/lor.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/not.hh
+# /work/carlinet/trunk/milena/mln/trait/op/not.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/op/ord.hh
+# /work/carlinet/trunk/milena/mln/trait/op/ord.hh includes:
+# mln/trait/op/decl.hh
+# mln/trait/solve.hh
+# mln/util/ord.hh
+test.o: /work/carlinet/trunk/milena/mln/util/ord.hh
+# /work/carlinet/trunk/milena/mln/util/ord.hh includes:
+# mln/core/concept/object.hh
+# mln/trait/op/ord.hh
+test.o: /work/carlinet/trunk/milena/mln/value/ops.hh
+# /work/carlinet/trunk/milena/mln/value/ops.hh includes:
+# mln/trait/op/all.hh
+# mln/value/builtin/all.hh
+# mln/value/concept/all.hh
+# mln/value/equiv.hh
+# mln/trait/value_.hh
+# mln/literal/zero.hh
+# mln/literal/one.hh
+# mln/literal/ops.hh
+# mln/metal/ret.hh
+test.o: /work/carlinet/trunk/milena/mln/value/builtin/all.hh
+# /work/carlinet/trunk/milena/mln/value/builtin/all.hh includes:
+# mln/value/builtin/carrays.hh
+# mln/value/builtin/integers.hh
+# mln/value/builtin/floatings.hh
+# mln/value/builtin/symbolics.hh
+# mln/value/builtin/promotions.hh
+# mln/value/builtin/ops.hh
+test.o: /work/carlinet/trunk/milena/mln/value/builtin/carrays.hh
+# /work/carlinet/trunk/milena/mln/value/builtin/carrays.hh includes:
+# mln/value/concept/built_in.hh
+# mln/value/concept/vectorial.hh
+# mln/trait/value_.hh
+test.o: /work/carlinet/trunk/milena/mln/value/concept/built_in.hh
+# /work/carlinet/trunk/milena/mln/value/concept/built_in.hh includes:
+# mln/core/category.hh
+test.o: /work/carlinet/trunk/milena/mln/value/concept/vectorial.hh
+# /work/carlinet/trunk/milena/mln/value/concept/vectorial.hh includes:
+# mln/core/concept/value.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/value.hh
+# /work/carlinet/trunk/milena/mln/core/concept/value.hh includes:
+# mln/core/concept/object.hh
+# mln/trait/value_.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/value_.hh
+# /work/carlinet/trunk/milena/mln/trait/value_.hh includes:
+# mln/metal/int.hh
+# mln/metal/math/pow.hh
+# mln/metal/if.hh
+# mln/trait/value/all.hh
+# mln/core/def/low_quant_nbits.hh
+# mln/trait/value/print.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/value/all.hh
+# /work/carlinet/trunk/milena/mln/trait/value/all.hh includes:
+# mln/trait/undef.hh
+# mln/trait/value/nature.hh
+# mln/trait/value/kind.hh
+# mln/trait/value/quant.hh
+# mln/trait/value/internal/all.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/undef.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/value/nature.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/value/kind.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/value/quant.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/value/internal/all.hh
+# /work/carlinet/trunk/milena/mln/trait/value/internal/all.hh includes:
+# mln/trait/value/internal/comp.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/value/internal/comp.hh
+# /work/carlinet/trunk/milena/mln/trait/value/internal/comp.hh includes:
+# mln/metal/bool.hh
+# mln/metal/if.hh
+test.o: /work/carlinet/trunk/milena/mln/core/def/low_quant_nbits.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/value/print.hh
+# /work/carlinet/trunk/milena/mln/trait/value/print.hh includes:
+# mln/trait/value_.hh
+# mln/metal/is_a.hh
+test.o: /work/carlinet/trunk/milena/mln/value/builtin/integers.hh
+# /work/carlinet/trunk/milena/mln/value/builtin/integers.hh includes:
+# mln/value/internal/limits.hh
+# mln/value/concept/built_in.hh
+# mln/value/concept/integer.hh
+# mln/trait/value_.hh
+# mln/metal/int.hh
+# mln/metal/if.hh
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/value/internal/limits.hh
+test.o: /work/carlinet/trunk/milena/mln/value/concept/integer.hh
+# /work/carlinet/trunk/milena/mln/value/concept/integer.hh includes:
+# mln/value/concept/scalar.hh
+test.o: /work/carlinet/trunk/milena/mln/value/concept/scalar.hh
+# /work/carlinet/trunk/milena/mln/value/concept/scalar.hh includes:
+# mln/core/concept/value.hh
+# mln/literal/one.hh
+test.o: /work/carlinet/trunk/milena/mln/literal/one.hh
+# /work/carlinet/trunk/milena/mln/literal/one.hh includes:
+# mln/core/concept/literal.hh
+# mln/metal/converts_to.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/literal.hh
+# /work/carlinet/trunk/milena/mln/core/concept/literal.hh includes:
+# mln/core/concept/object.hh
+test.o: /work/carlinet/trunk/milena/mln/value/builtin/floatings.hh
+# /work/carlinet/trunk/milena/mln/value/builtin/floatings.hh includes:
+# mln/value/internal/limits.hh
+# mln/value/concept/built_in.hh
+# mln/value/concept/floating.hh
+# mln/trait/value_.hh
+test.o: /work/carlinet/trunk/milena/mln/value/concept/floating.hh
+# /work/carlinet/trunk/milena/mln/value/concept/floating.hh includes:
+# mln/value/concept/scalar.hh
+test.o: /work/carlinet/trunk/milena/mln/value/builtin/symbolics.hh
+# /work/carlinet/trunk/milena/mln/value/builtin/symbolics.hh includes:
+# mln/value/concept/built_in.hh
+# mln/value/concept/symbolic.hh
+# mln/trait/value_.hh
+test.o: /work/carlinet/trunk/milena/mln/value/concept/symbolic.hh
+# /work/carlinet/trunk/milena/mln/value/concept/symbolic.hh includes:
+# mln/core/concept/value.hh
+test.o: /work/carlinet/trunk/milena/mln/value/builtin/promotions.hh
+# /work/carlinet/trunk/milena/mln/value/builtin/promotions.hh includes:
+# mln/trait/promote.hh
+# mln/metal/ret.hh
+test.o: /work/carlinet/trunk/milena/mln/value/builtin/ops.hh
+# /work/carlinet/trunk/milena/mln/value/builtin/ops.hh includes:
+# mln/value/scalar.hh
+# mln/trait/op/all.hh
+# mln/value/builtin/promotions.hh
+test.o: /work/carlinet/trunk/milena/mln/value/scalar.hh
+# /work/carlinet/trunk/milena/mln/value/scalar.hh includes:
+# mln/value/concept/scalar.hh
+# mln/metal/is_a.hh
+# mln/metal/if.hh
+test.o: /work/carlinet/trunk/milena/mln/value/concept/all.hh
+# /work/carlinet/trunk/milena/mln/value/concept/all.hh includes:
+# mln/value/concept/built_in.hh
+# mln/value/concept/data.hh
+# mln/value/concept/floating.hh
+# mln/value/concept/integer.hh
+# mln/value/concept/scalar.hh
+# mln/value/concept/structured.hh
+# mln/value/concept/symbolic.hh
+# mln/value/concept/vectorial.hh
+test.o: /work/carlinet/trunk/milena/mln/value/concept/data.hh
+# /work/carlinet/trunk/milena/mln/value/concept/data.hh includes:
+# mln/core/concept/value.hh
+test.o: /work/carlinet/trunk/milena/mln/value/concept/structured.hh
+# /work/carlinet/trunk/milena/mln/value/concept/structured.hh includes:
+# mln/core/concept/value.hh
+test.o: /work/carlinet/trunk/milena/mln/value/equiv.hh
+# /work/carlinet/trunk/milena/mln/value/equiv.hh includes:
+# mln/core/concept/value.hh
+# mln/value/cast.hh
+test.o: /work/carlinet/trunk/milena/mln/value/cast.hh
+# /work/carlinet/trunk/milena/mln/value/cast.hh includes:
+# mln/core/concept/value.hh
+# mln/value/equiv.hh
+test.o: /work/carlinet/trunk/milena/mln/literal/zero.hh
+# /work/carlinet/trunk/milena/mln/literal/zero.hh includes:
+# mln/core/concept/literal.hh
+# mln/metal/converts_to.hh
+test.o: /work/carlinet/trunk/milena/mln/literal/ops.hh
+# /work/carlinet/trunk/milena/mln/literal/ops.hh includes:
+# mln/core/concept/literal.hh
+# mln/trait/all.hh
+# mln/metal/equal.hh
+# mln/metal/converts_to.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/all.hh
+# /work/carlinet/trunk/milena/mln/trait/all.hh includes:
+# mln/trait/solve.hh
+# mln/trait/promote.hh
+# mln/trait/op/all.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/from_to.hxx
+# /work/carlinet/trunk/milena/mln/convert/from_to.hxx includes:
+# mln/core/def/all.hh
+# mln/core/grids.hh
+test.o: /work/carlinet/trunk/milena/mln/core/def/all.hh
+# /work/carlinet/trunk/milena/mln/core/def/all.hh includes:
+# mln/core/def/coord.hh
+# mln/core/def/coordf.hh
+# mln/core/def/low_quant_nbits.hh
+test.o: /work/carlinet/trunk/milena/mln/core/def/coord.hh
+test.o: /work/carlinet/trunk/milena/mln/core/def/coordf.hh
+test.o: /work/carlinet/trunk/milena/mln/core/grids.hh
+# /work/carlinet/trunk/milena/mln/core/grids.hh includes:
+# mln/core/concept/regular_grid.hh
+# mln/core/def/coord.hh
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/regular_grid.hh
+# /work/carlinet/trunk/milena/mln/core/concept/regular_grid.hh includes:
+# mln/core/concept/mesh.hh
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/mesh.hh
+# /work/carlinet/trunk/milena/mln/core/concept/mesh.hh includes:
+# mln/core/concept/object.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/proxy.hxx
+# /work/carlinet/trunk/milena/mln/core/concept/proxy.hxx includes:
+# mln/core/internal/force_exact.hh
+# mln/metal/unqualif.hh
+# mln/metal/is_a.hh
+# mln/metal/if.hh
+# mln/metal/is_const.hh
+# mln/metal/const.hh
+# mln/metal/unconst.hh
+# mln/metal/is_not_ref.hh
+# mln/metal/ref.hh
+# mln/metal/fix_return.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/force_exact.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/is_const.hh
+# /work/carlinet/trunk/milena/mln/metal/is_const.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/is_not_ref.hh
+# /work/carlinet/trunk/milena/mln/metal/is_not_ref.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/ref.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/fix_return.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/iterator.hh
+# /work/carlinet/trunk/milena/mln/core/concept/iterator.hh includes:
+# mln/core/concept/object.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/site_sets.hh
+# /work/carlinet/trunk/milena/mln/trait/site_sets.hh includes:
+# mln/trait/undef.hh
+# mln/trait/site_set/props.hh
+# mln/trait/site_set/print.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/site_set/props.hh
+# /work/carlinet/trunk/milena/mln/trait/site_set/props.hh includes:
+# mln/trait/undef.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/site_set/print.hh
+# /work/carlinet/trunk/milena/mln/trait/site_set/print.hh includes:
+# mln/trait/site_sets.hh
+# mln/metal/is_a.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/is_unqualif.hh
+# /work/carlinet/trunk/milena/mln/metal/is_unqualif.hh includes:
+# mln/metal/equal.hh
+# mln/metal/unqualif.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/operators.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/operators.hh includes:
+# mln/core/concept/site_set.hh
+test.o: /work/carlinet/trunk/milena/mln/core/trait/all.hh
+# /work/carlinet/trunk/milena/mln/core/trait/all.hh includes:
+# mln/core/trait/op_mult.hh
+# mln/core/trait/pixter.hh
+# mln/core/trait/qlf_value.hh
+test.o: /work/carlinet/trunk/milena/mln/core/trait/op_mult.hh
+test.o: /work/carlinet/trunk/milena/mln/core/trait/pixter.hh
+# /work/carlinet/trunk/milena/mln/core/trait/pixter.hh includes:
+# mln/metal/none.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/none.hh
+test.o: /work/carlinet/trunk/milena/mln/core/trait/qlf_value.hh
+# /work/carlinet/trunk/milena/mln/core/trait/qlf_value.hh includes:
+# mln/core/macros.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/box.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/box.hh includes:
+# mln/core/concept/box.hh
+# mln/core/internal/box_impl.hh
+# mln/core/point.hh
+# mln/literal/origin.hh
+# mln/core/site_set/box_piter.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/box.hh
+# /work/carlinet/trunk/milena/mln/core/concept/box.hh includes:
+# mln/core/concept/site_set.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/box_impl.hh
+# /work/carlinet/trunk/milena/mln/core/internal/box_impl.hh includes:
+# mln/core/internal/force_exact.hh
+test.o: /work/carlinet/trunk/milena/mln/core/point.hh
+# /work/carlinet/trunk/milena/mln/core/point.hh includes:
+# mln/core/def/coord.hh
+# mln/core/concept/proxy.hh
+# mln/core/concept/gpoint.hh
+# mln/core/internal/coord_impl.hh
+# mln/fun/i2v/all_to.hh
+# mln/metal/bool.hh
+# mln/metal/is_not.hh
+# mln/algebra/vec.hh
+# mln/metal/converts_to.hh
+# mln/algebra/h_vec.hh
+# mln/util/yes.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/gpoint.hh
+# /work/carlinet/trunk/milena/mln/core/concept/gpoint.hh includes:
+# mln/core/concept/site.hh
+# mln/core/concept/gdpoint.hh
+# mln/value/concept/scalar.hh
+# mln/algebra/vec.hh
+# mln/util/ord.hh
+# mln/debug/format.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/site.hh
+# /work/carlinet/trunk/milena/mln/core/concept/site.hh includes:
+# mln/core/concept/object.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/gdpoint.hh
+# /work/carlinet/trunk/milena/mln/core/concept/gdpoint.hh includes:
+# mln/core/concept/object.hh
+# mln/core/grids.hh
+# mln/trait/all.hh
+# mln/value/scalar.hh
+# mln/debug/format.hh
+test.o: /work/carlinet/trunk/milena/mln/debug/format.hh
+test.o: /work/carlinet/trunk/milena/mln/algebra/vec.hh
+# /work/carlinet/trunk/milena/mln/algebra/vec.hh includes:
+# mln/core/concept/object.hh
+# mln/literal/zero.hh
+# mln/literal/origin.hh
+# mln/norm/l2.hh
+# mln/trait/all.hh
+# mln/trait/value_.hh
+# mln/fun/i2v/all_to.hh
+# mln/debug/format.hh
+# mln/value/ops.hh
+# mln/make/vec.hh
+test.o: /work/carlinet/trunk/milena/mln/literal/origin.hh
+# /work/carlinet/trunk/milena/mln/literal/origin.hh includes:
+# mln/core/concept/literal.hh
+test.o: /work/carlinet/trunk/milena/mln/norm/l2.hh
+# /work/carlinet/trunk/milena/mln/norm/l2.hh includes:
+# mln/math/sqr.hh
+# mln/math/sqrt.hh
+# mln/algebra/vec.hh
+# mln/value/ops.hh
+test.o: /work/carlinet/trunk/milena/mln/math/sqr.hh
+test.o: /work/carlinet/trunk/milena/mln/math/sqrt.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/i2v/all_to.hh
+# /work/carlinet/trunk/milena/mln/fun/i2v/all_to.hh includes:
+# mln/core/concept/function.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/function.hh
+# /work/carlinet/trunk/milena/mln/core/concept/function.hh includes:
+# mln/core/concept/object.hh
+test.o: /work/carlinet/trunk/milena/mln/make/vec.hh
+# /work/carlinet/trunk/milena/mln/make/vec.hh includes:
+# mln/algebra/vec.hh
+# mln/core/concept/function.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/coord_impl.hh
+# /work/carlinet/trunk/milena/mln/core/internal/coord_impl.hh includes:
+# mln/core/internal/force_exact.hh
+test.o: /work/carlinet/trunk/milena/mln/algebra/h_vec.hh
+# /work/carlinet/trunk/milena/mln/algebra/h_vec.hh includes:
+# mln/algebra/vec.hh
+# mln/literal/one.hh
+test.o: /work/carlinet/trunk/milena/mln/util/yes.hh
+# /work/carlinet/trunk/milena/mln/util/yes.hh includes:
+# mln/core/concept/object.hh
+# mln/core/routine/ops.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/box_piter.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/box_piter.hh includes:
+# mln/core/internal/site_set_iterator_base.hh
+# mln/core/concept/box.hh
+# mln/core/site_set/box.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/site_set_iterator_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/site_set_iterator_base.hh includes:
+# mln/core/internal/site_iterator_base.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/site_iterator_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/site_iterator_base.hh includes:
+# mln/core/concept/site_iterator.hh
+# mln/core/concept/pseudo_site.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/pseudo_site.hh
+# /work/carlinet/trunk/milena/mln/core/concept/pseudo_site.hh includes:
+# mln/core/concept/site_proxy.hh
+# mln/metal/is_a.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/concrete.hh
+# /work/carlinet/trunk/milena/mln/trait/concrete.hh includes:
+# mln/trait/ch_value.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/ch_value.hh
+# /work/carlinet/trunk/milena/mln/trait/ch_value.hh includes:
+# mln/tag/skeleton.hh
+# mln/trait/image_from_grid.hh
+# mln/trait/ch_function_value.hh
+test.o: /work/carlinet/trunk/milena/mln/tag/skeleton.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/image_from_grid.hh
+# /work/carlinet/trunk/milena/mln/trait/image_from_grid.hh includes:
+# mln/core/grids.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/ch_function_value.hh
+# /work/carlinet/trunk/milena/mln/trait/ch_function_value.hh includes:
+# mln/fun/v2v/ch_function_value.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/v2v/ch_function_value.hh
+# /work/carlinet/trunk/milena/mln/fun/v2v/ch_function_value.hh includes:
+# mln/core/concept/function.hh
+# mln/fun/internal/ch_function_value_impl.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/internal/ch_function_value_impl.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/images.hh
+# /work/carlinet/trunk/milena/mln/trait/images.hh includes:
+# mln/trait/undef.hh
+# mln/trait/image/props.hh
+# mln/trait/value_.hh
+# mln/metal/bexpr.hh
+# mln/metal/equal.hh
+# mln/metal/if.hh
+# mln/metal/is_const.hh
+# mln/trait/image/print.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/image/props.hh
+# /work/carlinet/trunk/milena/mln/trait/image/props.hh includes:
+# mln/trait/undef.hh
+# mln/trait/value/kind.hh
+# mln/core/def/coord.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/image/print.hh
+# /work/carlinet/trunk/milena/mln/trait/image/print.hh includes:
+# mln/trait/images.hh
+# mln/metal/is_a.hh
+test.o: /work/carlinet/trunk/milena/mln/tag/init.hh
+test.o: /work/carlinet/trunk/milena/mln/core/routine/initialize.hh
+# /work/carlinet/trunk/milena/mln/core/routine/initialize.hh includes:
+# mln/core/concept/image.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/check/image_all.hh
+# /work/carlinet/trunk/milena/mln/core/internal/check/image_all.hh includes:
+# mln/trait/images.hh
+# mln/core/internal/check/image_fastest.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/check/image_fastest.hh
+# /work/carlinet/trunk/milena/mln/core/internal/check/image_fastest.hh includes:
+# mln/metal/bool.hh
+# mln/core/macros.hh
+# mln/core/trait/pixter.hh
+# mln/core/trait/qlf_value.hh
+# mln/core/internal/force_exact.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/data.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/morpher_lvalue.hh
+# /work/carlinet/trunk/milena/mln/core/internal/morpher_lvalue.hh includes:
+# mln/core/macros.hh
+test.o: /work/carlinet/trunk/milena/mln/util/tracked_ptr.hh
+# /work/carlinet/trunk/milena/mln/util/tracked_ptr.hh includes:
+# mln/core/contract.hh
+test.o: /work/carlinet/trunk/milena/mln/value/set.hh
+# /work/carlinet/trunk/milena/mln/value/set.hh includes:
+# mln/value/internal/iterable_set.hh
+# mln/trait/value_.hh
+test.o: /work/carlinet/trunk/milena/mln/value/internal/iterable_set.hh
+# /work/carlinet/trunk/milena/mln/value/internal/iterable_set.hh includes:
+# mln/core/concept/value_set.hh
+# mln/trait/value_.hh
+# mln/value/builtin/all.hh
+# mln/value/internal/convert.hh
+# mln/value/viter.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/value_set.hh
+# /work/carlinet/trunk/milena/mln/core/concept/value_set.hh includes:
+# mln/core/concept/value_iterator.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/value_iterator.hh
+# /work/carlinet/trunk/milena/mln/core/concept/value_iterator.hh includes:
+# mln/core/concept/iterator.hh
+test.o: /work/carlinet/trunk/milena/mln/value/internal/convert.hh
+# /work/carlinet/trunk/milena/mln/value/internal/convert.hh includes:
+# mln/core/contract.hh
+# mln/trait/value_.hh
+test.o: /work/carlinet/trunk/milena/mln/value/viter.hh
+# /work/carlinet/trunk/milena/mln/value/viter.hh includes:
+# mln/core/concept/value_iterator.hh
+# mln/core/concept/value_set.hh
+test.o: /work/carlinet/trunk/milena/mln/value/super_value.hh
+# /work/carlinet/trunk/milena/mln/value/super_value.hh includes:
+# mln/value/sign.hh
+test.o: /work/carlinet/trunk/milena/mln/value/sign.hh
+# /work/carlinet/trunk/milena/mln/value/sign.hh includes:
+# mln/value/internal/integer.hh
+# mln/trait/value_.hh
+# mln/literal/zero.hh
+# mln/literal/one.hh
+# mln/debug/format.hh
+test.o: /work/carlinet/trunk/milena/mln/value/internal/integer.hh
+# /work/carlinet/trunk/milena/mln/value/internal/integer.hh includes:
+# mln/value/concept/scalar.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/box2d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/box2d.hh includes:
+# mln/core/site_set/box.hh
+# mln/core/alias/point2d.hh
+# mln/make/box2d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/point2d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/point2d.hh includes:
+# mln/core/point.hh
+# mln/core/concept/site_proxy.hh
+# mln/core/internal/force_exact.hh
+# mln/core/alias/dpoint2d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/dpoint2d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/dpoint2d.hh includes:
+# mln/core/dpoint.hh
+# mln/core/def/coord.hh
+# mln/core/alias/point2d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/dpoint.hh
+# /work/carlinet/trunk/milena/mln/core/dpoint.hh includes:
+# mln/core/def/coord.hh
+# mln/core/concept/gdpoint.hh
+# mln/core/internal/coord_impl.hh
+# mln/fun/i2v/all.hh
+# mln/algebra/vec.hh
+# mln/metal/converts_to.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/i2v/all.hh
+# /work/carlinet/trunk/milena/mln/fun/i2v/all.hh includes:
+# mln/fun/i2v/all_to.hh
+# mln/fun/i2v/array.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/i2v/array.hh
+# /work/carlinet/trunk/milena/mln/fun/i2v/array.hh includes:
+# mln/core/concept/function.hh
+# mln/fun/internal/array_base.hh
+# mln/util/array.hh
+# mln/metal/equal.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/internal/array_base.hh
+# /work/carlinet/trunk/milena/mln/fun/internal/array_base.hh includes:
+# mln/util/array.hh
+# mln/tag/init.hh
+test.o: /work/carlinet/trunk/milena/mln/util/array.hh
+# /work/carlinet/trunk/milena/mln/util/array.hh includes:
+# mln/core/concept/proxy.hh
+# mln/core/concept/iterator.hh
+test.o: /work/carlinet/trunk/milena/mln/make/box2d.hh
+# /work/carlinet/trunk/milena/mln/make/box2d.hh includes:
+# mln/core/alias/box2d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/routine/init.hh
+# /work/carlinet/trunk/milena/mln/core/routine/init.hh includes:
+# mln/tag/init.hh
+# mln/geom/bbox.hh
+# mln/border/find.hh
+# mln/core/routine/init.hxx
+test.o: /work/carlinet/trunk/milena/mln/geom/bbox.hh
+# /work/carlinet/trunk/milena/mln/geom/bbox.hh includes:
+# mln/core/site_set/box.hh
+# mln/core/concept/image.hh
+# mln/core/concept/window.hh
+# mln/core/concept/weighted_window.hh
+# mln/literal/zero.hh
+# mln/accu/bbox.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/window.hh
+# /work/carlinet/trunk/milena/mln/core/concept/window.hh includes:
+# mln/core/concept/object.hh
+# mln/core/concept/iterator.hh
+# mln/trait/windows.hh
+# mln/core/site_set/p_array.hh
+# mln/core/internal/geom_bbox.hh
+# mln/convert/from_to.hxx
+# mln/util/array.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/windows.hh
+# /work/carlinet/trunk/milena/mln/trait/windows.hh includes:
+# mln/trait/undef.hh
+# mln/trait/window/props.hh
+# mln/trait/window/print.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/window/props.hh
+# /work/carlinet/trunk/milena/mln/trait/window/props.hh includes:
+# mln/trait/undef.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/window/print.hh
+# /work/carlinet/trunk/milena/mln/trait/window/print.hh includes:
+# mln/trait/windows.hh
+# mln/metal/is_a.hh
+# mln/metal/bexpr.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/p_array.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/p_array.hh includes:
+# mln/core/internal/site_set_base.hh
+# mln/core/internal/site_set_iterator_base.hh
+# mln/core/internal/pseudo_site_base.hh
+# mln/util/index.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/site_set_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/site_set_base.hh includes:
+# mln/core/concept/site_set.hh
+# mln/core/concept/site_proxy.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/pseudo_site_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/pseudo_site_base.hh includes:
+# mln/core/concept/pseudo_site.hh
+test.o: /work/carlinet/trunk/milena/mln/util/index.hh
+# /work/carlinet/trunk/milena/mln/util/index.hh includes:
+# mln/core/concept/object.hh
+# mln/util/dindex.hh
+test.o: /work/carlinet/trunk/milena/mln/util/dindex.hh
+# /work/carlinet/trunk/milena/mln/util/dindex.hh includes:
+# mln/util/index.hh
+# mln/literal/zero.hh
+# mln/literal/one.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/geom_bbox.hh
+# /work/carlinet/trunk/milena/mln/core/internal/geom_bbox.hh includes:
+# mln/accu/bbox.hh
+# mln/literal/origin.hh
+test.o: /work/carlinet/trunk/milena/mln/accu/bbox.hh
+# /work/carlinet/trunk/milena/mln/accu/bbox.hh includes:
+# mln/core/site_set/box.hh
+# mln/core/concept/meta_accumulator.hh
+# mln/accu/internal/base.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/meta_accumulator.hh
+# /work/carlinet/trunk/milena/mln/core/concept/meta_accumulator.hh includes:
+# mln/core/concept/object.hh
+# mln/core/concept/accumulator.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/accumulator.hh
+# /work/carlinet/trunk/milena/mln/core/concept/accumulator.hh includes:
+# mln/core/concept/proxy.hh
+# mln/metal/fix_return.hh
+# mln/metal/const.hh
+# mln/trait/accumulators.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/accumulators.hh
+# /work/carlinet/trunk/milena/mln/trait/accumulators.hh includes:
+# mln/trait/accumulator/props.hh
+# mln/trait/undef.hh
+# mln/trait/accumulator/print.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/accumulator/props.hh
+test.o: /work/carlinet/trunk/milena/mln/trait/accumulator/print.hh
+# /work/carlinet/trunk/milena/mln/trait/accumulator/print.hh includes:
+# mln/trait/accumulators.hh
+# mln/metal/is_a.hh
+test.o: /work/carlinet/trunk/milena/mln/accu/internal/base.hh
+# /work/carlinet/trunk/milena/mln/accu/internal/base.hh includes:
+# mln/core/concept/accumulator.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/weighted_window.hh
+# /work/carlinet/trunk/milena/mln/core/concept/weighted_window.hh includes:
+# mln/core/concept/object.hh
+# mln/core/concept/iterator.hh
+# mln/trait/windows.hh
+test.o: /work/carlinet/trunk/milena/mln/border/find.hh
+# /work/carlinet/trunk/milena/mln/border/find.hh includes:
+# mln/core/internal/image_morpher.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/image_morpher.hh
+# /work/carlinet/trunk/milena/mln/core/internal/image_morpher.hh includes:
+# mln/core/internal/image_base.hh
+# mln/metal/const.hh
+# mln/metal/is_const.hh
+# mln/metal/is_not_const.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/is_not_const.hh
+# /work/carlinet/trunk/milena/mln/metal/is_not_const.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/core/routine/init.hxx
+test.o: /work/carlinet/trunk/milena/mln/border/thickness.hh
+test.o: /work/carlinet/trunk/milena/mln/core/dpoints_pixter.hh
+# /work/carlinet/trunk/milena/mln/core/dpoints_pixter.hh includes:
+# mln/core/concept/proxy.hh
+# mln/core/concept/pixel_iterator.hh
+# mln/core/internal/pixel_impl.hh
+# mln/metal/converts_to.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/pixel_iterator.hh
+# /work/carlinet/trunk/milena/mln/core/concept/pixel_iterator.hh includes:
+# mln/core/concept/iterator.hh
+# mln/core/concept/generalized_pixel.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/generalized_pixel.hh
+# /work/carlinet/trunk/milena/mln/core/concept/generalized_pixel.hh includes:
+# mln/core/concept/object.hh
+# mln/core/internal/force_exact.hh
+# mln/core/trait/qlf_value.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/pixel_impl.hh
+# /work/carlinet/trunk/milena/mln/core/internal/pixel_impl.hh includes:
+# mln/core/concept/image.hh
+# mln/core/internal/force_exact.hh
+# mln/util/pix.hh
+test.o: /work/carlinet/trunk/milena/mln/util/pix.hh
+# /work/carlinet/trunk/milena/mln/util/pix.hh includes:
+# mln/core/concept/image.hh
+# mln/make/pix.hh
+test.o: /work/carlinet/trunk/milena/mln/make/pix.hh
+# /work/carlinet/trunk/milena/mln/make/pix.hh includes:
+# mln/util/pix.hh
+test.o: /work/carlinet/trunk/milena/mln/core/pixter2d.hh
+# /work/carlinet/trunk/milena/mln/core/pixter2d.hh includes:
+# mln/core/internal/pixel_iterator_base.hh
+# mln/core/alias/point2d.hh
+# mln/geom/size2d.hh
+# mln/opt/at.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/pixel_iterator_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/pixel_iterator_base.hh includes:
+# mln/core/concept/pixel_iterator.hh
+# mln/core/internal/pixel_impl.hh
+# mln/core/trait/qlf_value.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/size2d.hh
+# /work/carlinet/trunk/milena/mln/geom/size2d.hh includes:
+# mln/geom/nrows.hh
+# mln/geom/ncols.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/nrows.hh
+# /work/carlinet/trunk/milena/mln/geom/nrows.hh includes:
+# mln/geom/min_row.hh
+# mln/geom/max_row.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/min_row.hh
+# /work/carlinet/trunk/milena/mln/geom/min_row.hh includes:
+# mln/core/concept/image.hh
+# mln/geom/bbox.hh
+# mln/metal/bexpr.hh
+# mln/metal/int.hh
+# mln/metal/equal.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/max_row.hh
+# /work/carlinet/trunk/milena/mln/geom/max_row.hh includes:
+# mln/core/concept/image.hh
+# mln/geom/bbox.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/ncols.hh
+# /work/carlinet/trunk/milena/mln/geom/ncols.hh includes:
+# mln/geom/min_col.hh
+# mln/geom/max_col.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/min_col.hh
+# /work/carlinet/trunk/milena/mln/geom/min_col.hh includes:
+# mln/core/concept/image.hh
+# mln/geom/bbox.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/max_col.hh
+# /work/carlinet/trunk/milena/mln/geom/max_col.hh includes:
+# mln/core/concept/image.hh
+# mln/geom/bbox.hh
+test.o: /work/carlinet/trunk/milena/mln/opt/at.hh
+# /work/carlinet/trunk/milena/mln/opt/at.hh includes:
+# mln/core/concept/image.hh
+# mln/trait/images.hh
+# mln/trace/all.hh
+# mln/core/alias/point1d.hh
+# mln/core/alias/point2d.hh
+# mln/core/alias/point3d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/point1d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/point1d.hh includes:
+# mln/core/point.hh
+# mln/core/concept/site_proxy.hh
+# mln/core/internal/force_exact.hh
+# mln/core/alias/dpoint1d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/dpoint1d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/dpoint1d.hh includes:
+# mln/core/dpoint.hh
+# mln/core/grids.hh
+# mln/core/def/coord.hh
+# mln/core/alias/point1d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/point3d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/point3d.hh includes:
+# mln/core/point.hh
+# mln/core/concept/site_proxy.hh
+# mln/core/internal/force_exact.hh
+# mln/core/alias/dpoint3d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/dpoint3d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/dpoint3d.hh includes:
+# mln/core/dpoint.hh
+# mln/core/grids.hh
+# mln/core/def/coord.hh
+# mln/core/alias/point3d.hh
+test.o: /work/carlinet/trunk/milena/mln/make/image.hh
+# /work/carlinet/trunk/milena/mln/make/image.hh includes:
+# mln/core/image/image1d.hh
+# mln/core/image/image2d.hh
+# mln/core/image/image3d.hh
+# mln/opt/at.hh
+test.o: /work/carlinet/trunk/milena/mln/core/image/image1d.hh
+# /work/carlinet/trunk/milena/mln/core/image/image1d.hh includes:
+# mln/core/internal/fixme.hh
+# mln/core/internal/image_primary.hh
+# mln/core/alias/box1d.hh
+# mln/border/thickness.hh
+# mln/value/set.hh
+# mln/fun/i2v/all_to.hh
+# mln/core/trait/pixter.hh
+# mln/core/dpoints_pixter.hh
+# mln/core/pixter1d.hh
+# mln/core/w_window.hh
+# mln/make/image.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/box1d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/box1d.hh includes:
+# mln/core/site_set/box.hh
+# mln/core/alias/point1d.hh
+# mln/make/box1d.hh
+test.o: /work/carlinet/trunk/milena/mln/make/box1d.hh
+# /work/carlinet/trunk/milena/mln/make/box1d.hh includes:
+# mln/core/alias/box1d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/pixter1d.hh
+# /work/carlinet/trunk/milena/mln/core/pixter1d.hh includes:
+# mln/core/internal/pixel_iterator_base.hh
+# mln/core/alias/point1d.hh
+# mln/geom/size1d.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/size1d.hh
+# /work/carlinet/trunk/milena/mln/geom/size1d.hh includes:
+# mln/geom/ninds.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/ninds.hh
+# /work/carlinet/trunk/milena/mln/geom/ninds.hh includes:
+# mln/geom/min_ind.hh
+# mln/geom/max_ind.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/min_ind.hh
+# /work/carlinet/trunk/milena/mln/geom/min_ind.hh includes:
+# mln/core/concept/image.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/max_ind.hh
+# /work/carlinet/trunk/milena/mln/geom/max_ind.hh includes:
+# mln/core/concept/image.hh
+test.o: /work/carlinet/trunk/milena/mln/core/w_window.hh
+# /work/carlinet/trunk/milena/mln/core/w_window.hh includes:
+# mln/core/internal/weighted_window_base.hh
+# mln/core/concept/image.hh
+# mln/core/site_set/box.hh
+# mln/core/window.hh
+# mln/core/dpsites_piter.hh
+# mln/value/ops.hh
+# mln/util/ord.hh
+# mln/geom/bbox.hh
+# mln/literal/zero.hh
+# mln/convert/to.hh
+# mln/make/w_window.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/weighted_window_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/weighted_window_base.hh includes:
+# mln/core/concept/weighted_window.hh
+test.o: /work/carlinet/trunk/milena/mln/core/window.hh
+# /work/carlinet/trunk/milena/mln/core/window.hh includes:
+# mln/core/internal/window_base.hh
+# mln/core/concept/gdpoint.hh
+# mln/metal/is_a.hh
+# mln/util/set.hh
+# mln/fun/i2v/all_to.hh
+# mln/norm/linfty.hh
+# mln/literal/zero.hh
+# mln/core/dpsites_piter.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/window_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/window_base.hh includes:
+# mln/core/concept/window.hh
+test.o: /work/carlinet/trunk/milena/mln/util/set.hh
+# /work/carlinet/trunk/milena/mln/util/set.hh includes:
+# mln/core/concept/proxy.hh
+# mln/util/ord.hh
+test.o: /work/carlinet/trunk/milena/mln/norm/linfty.hh
+# /work/carlinet/trunk/milena/mln/norm/linfty.hh includes:
+# mln/math/abs.hh
+# mln/algebra/vec.hh
+test.o: /work/carlinet/trunk/milena/mln/math/abs.hh
+# /work/carlinet/trunk/milena/mln/math/abs.hh includes:
+# mln/value/int_u.hh
+test.o: /work/carlinet/trunk/milena/mln/value/int_u.hh
+# /work/carlinet/trunk/milena/mln/value/int_u.hh includes:
+# mln/trait/all.hh
+# mln/value/ops.hh
+# mln/metal/math/pow.hh
+# mln/value/internal/value_like.hh
+# mln/value/internal/encoding.hh
+# mln/value/concept/integer.hh
+# mln/trait/value_.hh
+# mln/debug/format.hh
+test.o: /work/carlinet/trunk/milena/mln/value/internal/value_like.hh
+# /work/carlinet/trunk/milena/mln/value/internal/value_like.hh includes:
+# mln/core/concept/value.hh
+# mln/core/internal/force_exact.hh
+test.o: /work/carlinet/trunk/milena/mln/value/internal/encoding.hh
+test.o: /work/carlinet/trunk/milena/mln/core/dpsites_piter.hh
+# /work/carlinet/trunk/milena/mln/core/dpsites_piter.hh includes:
+# mln/core/internal/site_relative_iterator_base.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/site_relative_iterator_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/site_relative_iterator_base.hh includes:
+# mln/core/internal/site_iterator_base.hh
+# mln/metal/converts_to.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/to.hh
+# /work/carlinet/trunk/milena/mln/convert/to.hh includes:
+# mln/core/routine/exact.hh
+# mln/metal/equal.hh
+# mln/trace/all.hh
+# mln/convert/from_to.hh
+# mln/convert/from_to.hxx
+test.o: /work/carlinet/trunk/milena/mln/convert/from_to.hh
+# /work/carlinet/trunk/milena/mln/convert/from_to.hh includes:
+# mln/convert/impl/all.hh
+# mln/convert/from_to.hxx
+# mln/metal/abort.hh
+# mln/metal/converts_to.hh
+# mln/metal/is.hh
+# mln/metal/is_a.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/impl/all.hh
+# /work/carlinet/trunk/milena/mln/convert/impl/all.hh includes:
+# mln/convert/impl/from_double_to_value.hh
+# mln/convert/impl/from_float_to_value.hh
+# mln/convert/impl/from_image_to_site_set.hh
+# mln/convert/impl/from_int_to_value.hh
+# mln/convert/impl/from_site_set_to_image.hh
+# mln/convert/impl/from_unsigned_to_value.hh
+# mln/convert/impl/from_value_to_value.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/impl/from_double_to_value.hh
+# /work/carlinet/trunk/milena/mln/convert/impl/from_double_to_value.hh includes:
+# mln/value/concept/integer.hh
+# mln/value/concept/floating.hh
+# mln/core/concept/value.hh
+# mln/math/round.hh
+test.o: /work/carlinet/trunk/milena/mln/math/round.hh
+# /work/carlinet/trunk/milena/mln/math/round.hh includes:
+# mln/core/concept/function.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/impl/from_float_to_value.hh
+# /work/carlinet/trunk/milena/mln/convert/impl/from_float_to_value.hh includes:
+# mln/value/concept/integer.hh
+# mln/value/concept/floating.hh
+# mln/core/concept/value.hh
+# mln/math/round.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/impl/from_image_to_site_set.hh
+# /work/carlinet/trunk/milena/mln/convert/impl/from_image_to_site_set.hh includes:
+# mln/core/site_set/p_run.hh
+# mln/core/site_set/p_array.hh
+# mln/metal/converts_to.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/p_run.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/p_run.hh includes:
+# mln/core/internal/site_set_base.hh
+# mln/core/site_set/box.hh
+# mln/core/internal/pseudo_site_base.hh
+# mln/util/index.hh
+# mln/core/site_set/p_run_piter.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/p_run_piter.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/p_run_piter.hh includes:
+# mln/core/site_set/p_run.hh
+# mln/core/internal/site_set_iterator_base.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/impl/from_int_to_value.hh
+# /work/carlinet/trunk/milena/mln/convert/impl/from_int_to_value.hh includes:
+# mln/value/concept/integer.hh
+# mln/core/concept/value.hh
+# mln/math/round.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/impl/from_site_set_to_image.hh
+# /work/carlinet/trunk/milena/mln/convert/impl/from_site_set_to_image.hh includes:
+# mln/core/image/sub_image.hh
+# mln/geom/bbox.hh
+# mln/trait/image_from_grid.hh
+# mln/data/fill.hh
+test.o: /work/carlinet/trunk/milena/mln/core/image/sub_image.hh
+# /work/carlinet/trunk/milena/mln/core/image/sub_image.hh includes:
+# mln/core/internal/image_domain_morpher.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/image_domain_morpher.hh
+# /work/carlinet/trunk/milena/mln/core/internal/image_domain_morpher.hh includes:
+# mln/core/internal/image_morpher.hh
+test.o: /work/carlinet/trunk/milena/mln/data/fill.hh
+# /work/carlinet/trunk/milena/mln/data/fill.hh includes:
+# mln/core/concept/function.hh
+# mln/pw/image.hh
+# mln/convert/to_fun.hh
+# mln/data/fill_with_image.hh
+# mln/data/fill_with_value.hh
+test.o: /work/carlinet/trunk/milena/mln/pw/image.hh
+# /work/carlinet/trunk/milena/mln/pw/image.hh includes:
+# mln/core/internal/image_primary.hh
+# mln/core/concept/function.hh
+# mln/value/set.hh
+# mln/metal/unqualif.hh
+# mln/metal/not_equal.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/to_fun.hh
+# /work/carlinet/trunk/milena/mln/convert/to_fun.hh includes:
+# mln/pw/value.hh
+# mln/fun/c.hh
+test.o: /work/carlinet/trunk/milena/mln/pw/value.hh
+# /work/carlinet/trunk/milena/mln/pw/value.hh includes:
+# mln/fun/internal/selector.hh
+# mln/core/concept/image.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/internal/selector.hh
+# /work/carlinet/trunk/milena/mln/fun/internal/selector.hh includes:
+# mln/core/concept/function.hh
+# mln/core/concept/site.hh
+# mln/core/concept/pseudo_site.hh
+# mln/metal/unqualif.hh
+# mln/metal/if.hh
+# mln/metal/is_a.hh
+# mln/algebra/vec.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/c.hh
+# /work/carlinet/trunk/milena/mln/fun/c.hh includes:
+# mln/fun/internal/selector.hh
+# mln/metal/unqualif.hh
+test.o: /work/carlinet/trunk/milena/mln/data/fill_with_image.hh
+# /work/carlinet/trunk/milena/mln/data/fill_with_image.hh includes:
+# mln/core/concept/image.hh
+# mln/data/fill_with_image.spe.hh
+test.o: /work/carlinet/trunk/milena/mln/data/fill_with_image.spe.hh
+# /work/carlinet/trunk/milena/mln/data/fill_with_image.spe.hh includes:
+# mln/data/memcpy_.hh
+# mln/data/fill_with_value.hh
+# mln/core/pixel.hh
+# mln/core/box_runstart_piter.hh
+# mln/border/get.hh
+# mln/opt/value.hh
+# mln/opt/element.hh
+test.o: /work/carlinet/trunk/milena/mln/data/memcpy_.hh
+# /work/carlinet/trunk/milena/mln/data/memcpy_.hh includes:
+# mln/core/concept/image.hh
+# mln/core/pixel.hh
+# mln/metal/is_not_const.hh
+# mln/opt/element.hh
+test.o: /work/carlinet/trunk/milena/mln/core/pixel.hh
+# /work/carlinet/trunk/milena/mln/core/pixel.hh includes:
+# mln/core/concept/generalized_pixel.hh
+# mln/core/internal/pixel_impl.hh
+# mln/make/pixel.hh
+test.o: /work/carlinet/trunk/milena/mln/make/pixel.hh
+# /work/carlinet/trunk/milena/mln/make/pixel.hh includes:
+# mln/core/concept/image.hh
+# mln/core/pixel.hh
+test.o: /work/carlinet/trunk/milena/mln/opt/element.hh
+# /work/carlinet/trunk/milena/mln/opt/element.hh includes:
+# mln/core/concept/image.hh
+# mln/trait/images.hh
+test.o: /work/carlinet/trunk/milena/mln/data/fill_with_value.hh
+# /work/carlinet/trunk/milena/mln/data/fill_with_value.hh includes:
+# mln/core/concept/image.hh
+# mln/data/fill_with_value.spe.hh
+test.o: /work/carlinet/trunk/milena/mln/data/fill_with_value.spe.hh
+# /work/carlinet/trunk/milena/mln/data/fill_with_value.spe.hh includes:
+# mln/data/memset_.hh
+# mln/opt/value.hh
+# mln/opt/element.hh
+test.o: /work/carlinet/trunk/milena/mln/data/memset_.hh
+# /work/carlinet/trunk/milena/mln/data/memset_.hh includes:
+# mln/core/concept/image.hh
+# mln/core/pixel.hh
+# mln/metal/is_not_const.hh
+# mln/opt/element.hh
+test.o: /work/carlinet/trunk/milena/mln/opt/value.hh
+# /work/carlinet/trunk/milena/mln/opt/value.hh includes:
+# mln/core/concept/image.hh
+# mln/trait/images.hh
+test.o: /work/carlinet/trunk/milena/mln/core/box_runstart_piter.hh
+# /work/carlinet/trunk/milena/mln/core/box_runstart_piter.hh includes:
+# mln/core/internal/site_iterator_base.hh
+# mln/core/site_set/box.hh
+test.o: /work/carlinet/trunk/milena/mln/border/get.hh
+# /work/carlinet/trunk/milena/mln/border/get.hh includes:
+# mln/trait/images.hh
+# mln/trace/all.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/impl/from_unsigned_to_value.hh
+# /work/carlinet/trunk/milena/mln/convert/impl/from_unsigned_to_value.hh includes:
+# mln/value/concept/integer.hh
+# mln/core/concept/value.hh
+# mln/value/label.hh
+# mln/math/round.hh
+test.o: /work/carlinet/trunk/milena/mln/value/label.hh
+# /work/carlinet/trunk/milena/mln/value/label.hh includes:
+# mln/debug/format.hh
+# mln/metal/math/pow.hh
+# mln/trait/value_.hh
+# mln/value/concept/symbolic.hh
+# mln/value/internal/value_like.hh
+# mln/value/internal/convert.hh
+# mln/value/internal/encoding.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/impl/from_value_to_value.hh
+# /work/carlinet/trunk/milena/mln/convert/impl/from_value_to_value.hh includes:
+# mln/core/concept/image.hh
+# mln/core/concept/site_set.hh
+# mln/value/concept/all.hh
+# mln/core/site_set/p_run.hh
+# mln/metal/converts_to.hh
+# mln/convert/from_to.hxx
+test.o: /work/carlinet/trunk/milena/mln/make/w_window.hh
+# /work/carlinet/trunk/milena/mln/make/w_window.hh includes:
+# mln/core/concept/window.hh
+# mln/core/concept/function.hh
+# mln/core/w_window.hh
+test.o: /work/carlinet/trunk/milena/mln/core/image/image3d.hh
+# /work/carlinet/trunk/milena/mln/core/image/image3d.hh includes:
+# mln/core/internal/fixme.hh
+# mln/core/internal/image_primary.hh
+# mln/core/alias/box3d.hh
+# mln/border/thickness.hh
+# mln/value/set.hh
+# mln/fun/i2v/all_to.hh
+# mln/core/trait/pixter.hh
+# mln/core/dpoints_pixter.hh
+# mln/core/pixter3d.hh
+# mln/core/w_window.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/box3d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/box3d.hh includes:
+# mln/core/site_set/box.hh
+# mln/core/alias/point3d.hh
+# mln/make/box3d.hh
+test.o: /work/carlinet/trunk/milena/mln/make/box3d.hh
+# /work/carlinet/trunk/milena/mln/make/box3d.hh includes:
+# mln/core/alias/box3d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/pixter3d.hh
+# /work/carlinet/trunk/milena/mln/core/pixter3d.hh includes:
+# mln/core/internal/pixel_iterator_base.hh
+# mln/core/alias/point3d.hh
+# mln/geom/size3d.hh
+# mln/opt/at.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/size3d.hh
+# /work/carlinet/trunk/milena/mln/geom/size3d.hh includes:
+# mln/geom/nslis.hh
+# mln/geom/nrows.hh
+# mln/geom/ncols.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/nslis.hh
+# /work/carlinet/trunk/milena/mln/geom/nslis.hh includes:
+# mln/geom/min_sli.hh
+# mln/geom/max_sli.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/min_sli.hh
+# /work/carlinet/trunk/milena/mln/geom/min_sli.hh includes:
+# mln/core/concept/image.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/max_sli.hh
+# /work/carlinet/trunk/milena/mln/geom/max_sli.hh includes:
+# mln/core/concept/image.hh
+test.o: /work/carlinet/trunk/milena/mln/make/image2d.hh
+# /work/carlinet/trunk/milena/mln/make/image2d.hh includes:
+# mln/core/image/image2d.hh
+test.o: /work/carlinet/trunk/milena/mln/core/image/image_if.hh
+# /work/carlinet/trunk/milena/mln/core/image/image_if.hh includes:
+# mln/core/internal/image_domain_morpher.hh
+# mln/core/site_set/p_if.hh
+# mln/pw/all.hh
+# mln/convert/to_fun.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/p_if.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/p_if.hh includes:
+# mln/core/internal/site_set_base.hh
+# mln/core/concept/function.hh
+# mln/core/site_set/p_if_piter.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/p_if_piter.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/p_if_piter.hh includes:
+# mln/core/internal/piter_adaptor.hh
+# mln/core/site_set/p_if.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/piter_adaptor.hh
+# /work/carlinet/trunk/milena/mln/core/internal/piter_adaptor.hh includes:
+# mln/core/internal/site_iterator_base.hh
+test.o: /work/carlinet/trunk/milena/mln/pw/all.hh
+# /work/carlinet/trunk/milena/mln/pw/all.hh includes:
+# mln/pw/cst.hh
+# mln/pw/image.hh
+# mln/pw/value.hh
+# mln/pw/var.hh
+# mln/fun/ops.hh
+test.o: /work/carlinet/trunk/milena/mln/pw/cst.hh
+# /work/carlinet/trunk/milena/mln/pw/cst.hh includes:
+# mln/fun/internal/selector.hh
+test.o: /work/carlinet/trunk/milena/mln/pw/var.hh
+# /work/carlinet/trunk/milena/mln/pw/var.hh includes:
+# mln/core/concept/function.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/ops.hh
+# /work/carlinet/trunk/milena/mln/fun/ops.hh includes:
+# mln/core/concept/function.hh
+# mln/fun/internal/selector.hh
+# mln/trait/all.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/neighb2d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/neighb2d.hh includes:
+# mln/core/alias/window2d.hh
+# mln/core/neighb.hh
+# mln/convert/from_to.hh
+test.o: /work/carlinet/trunk/milena/mln/core/alias/window2d.hh
+# /work/carlinet/trunk/milena/mln/core/alias/window2d.hh includes:
+# mln/core/window.hh
+# mln/core/alias/dpoint2d.hh
+# mln/metal/math/sqrt.hh
+# mln/convert/from_to.hxx
+test.o: /work/carlinet/trunk/milena/mln/core/neighb.hh
+# /work/carlinet/trunk/milena/mln/core/neighb.hh includes:
+# mln/core/internal/neighborhood_base.hh
+# mln/core/internal/site_relative_iterator_base.hh
+# mln/core/internal/neighb_niter_impl.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/neighborhood_base.hh
+# /work/carlinet/trunk/milena/mln/core/internal/neighborhood_base.hh includes:
+# mln/core/concept/neighborhood.hh
+# mln/core/concept/window.hh
+test.o: /work/carlinet/trunk/milena/mln/core/concept/neighborhood.hh
+# /work/carlinet/trunk/milena/mln/core/concept/neighborhood.hh includes:
+# mln/core/concept/window.hh
+# mln/trait/windows.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/neighb_niter_impl.hh
+# /work/carlinet/trunk/milena/mln/core/internal/neighb_niter_impl.hh includes:
+# mln/core/macros.hh
+# mln/core/internal/force_exact.hh
+test.o: /work/carlinet/trunk/milena/mln/core/routine/duplicate.hh
+# /work/carlinet/trunk/milena/mln/core/routine/duplicate.hh includes:
+# mln/core/concept/image.hh
+# mln/core/routine/init.hh
+# mln/data/fill.hh
+test.o: /work/carlinet/trunk/milena/mln/core/var.hh
+# /work/carlinet/trunk/milena/mln/core/var.hh includes:
+# mln/core/macros.hh
+test.o: /work/carlinet/trunk/milena/mln/level/sort_psites.hh
+# /work/carlinet/trunk/milena/mln/level/sort_psites.hh includes:
+# mln/core/concept/image.hh
+# mln/convert/to_p_array.hh
+# mln/histo/compute.hh
+# mln/util/ord.hh
+# mln/geom/nsites.hh
+test.o: /work/carlinet/trunk/milena/mln/convert/to_p_array.hh
+# /work/carlinet/trunk/milena/mln/convert/to_p_array.hh includes:
+# mln/core/site_set/p_array.hh
+# mln/core/concept/image.hh
+# mln/core/concept/window.hh
+test.o: /work/carlinet/trunk/milena/mln/histo/compute.hh
+# /work/carlinet/trunk/milena/mln/histo/compute.hh includes:
+# mln/core/concept/image.hh
+# mln/histo/array.hh
+# mln/histo/compute.spe.hh
+test.o: /work/carlinet/trunk/milena/mln/histo/array.hh
+# /work/carlinet/trunk/milena/mln/histo/array.hh includes:
+# mln/value/set.hh
+test.o: /work/carlinet/trunk/milena/mln/histo/compute.spe.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/nsites.hh
+# /work/carlinet/trunk/milena/mln/geom/nsites.hh includes:
+# mln/core/concept/image.hh
+# mln/set/card.hh
+test.o: /work/carlinet/trunk/milena/mln/set/card.hh
+# /work/carlinet/trunk/milena/mln/set/card.hh includes:
+# mln/core/concept/site_set.hh
+test.o: /work/carlinet/trunk/milena/mln/morpho/tree/data.hh
+# /work/carlinet/trunk/milena/mln/morpho/tree/data.hh includes:
+# mln/morpho/tree/compute_parent.hh
+# mln/core/site_set/p_array.hh
+# mln/core/internal/site_set_iterator_base.hh
+# mln/core/internal/piter_identity.hh
+test.o: /work/carlinet/trunk/milena/mln/morpho/tree/compute_parent.hh
+# /work/carlinet/trunk/milena/mln/morpho/tree/compute_parent.hh includes:
+# mln/core/concept/image.hh
+# mln/core/concept/neighborhood.hh
+# mln/data/fill.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/piter_identity.hh
+# /work/carlinet/trunk/milena/mln/core/internal/piter_identity.hh includes:
+# mln/core/internal/piter_adaptor.hh
+test.o: /work/carlinet/trunk/milena/mln/morpho/tree/compute_attribute_image.hh
+# /work/carlinet/trunk/milena/mln/morpho/tree/compute_attribute_image.hh includes:
+# mln/core/concept/image.hh
+# mln/morpho/tree/data.hh
+# mln/trait/accumulators.hh
+# mln/util/pix.hh
+# mln/data/fill.hh
+test.o: propagate.hh
+# propagate.hh includes:
+# mln/morpho/tree/data.hh
+test.o: run.hh
+# run.hh includes:
+# mln/core/concept/accumulator.hh
+# mln/core/concept/image.hh
+# mln/core/concept/function.hh
+# mln/core/site_set/p_array.hh
+# mln/util/pix.hh
+# mln/trace/entering.hh
+# mln/trace/exiting.hh
+# propagate_node.hh
+test.o: propagate_node.hh
+# propagate_node.hh includes:
+# mln/morpho/tree/data.hh
+# mln/core/site_set/p_array.hh
+test.o: accumulator/arg_max.hh
+# accumulator/arg_max.hh includes:
+# mln/core/concept/image.hh
+# mln/accu/internal/base.hh
+# mln/util/pix.hh
+test.o: /work/carlinet/trunk/milena/mln/transform/distance_geodesic.hh
+# /work/carlinet/trunk/milena/mln/transform/distance_geodesic.hh includes:
+# mln/canvas/distance_geodesic.hh
+# mln/transform/internal/distance_functor.hh
+test.o: /work/carlinet/trunk/milena/mln/canvas/distance_geodesic.hh
+# /work/carlinet/trunk/milena/mln/canvas/distance_geodesic.hh includes:
+# mln/core/concept/image.hh
+# mln/core/concept/neighborhood.hh
+# mln/core/routine/duplicate.hh
+# mln/core/site_set/p_queue_fast.hh
+# mln/data/fill.hh
+# mln/extension/adjust_fill.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/p_queue_fast.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/p_queue_fast.hh includes:
+# mln/core/site_set/p_array.hh
+test.o: /work/carlinet/trunk/milena/mln/extension/adjust_fill.hh
+# /work/carlinet/trunk/milena/mln/extension/adjust_fill.hh includes:
+# mln/extension/adjust.hh
+# mln/extension/fill.hh
+test.o: /work/carlinet/trunk/milena/mln/extension/adjust.hh
+# /work/carlinet/trunk/milena/mln/extension/adjust.hh includes:
+# mln/border/adjust.hh
+# mln/core/concept/window.hh
+# mln/core/concept/weighted_window.hh
+# mln/core/concept/neighborhood.hh
+# mln/geom/delta.hh
+test.o: /work/carlinet/trunk/milena/mln/border/adjust.hh
+# /work/carlinet/trunk/milena/mln/border/adjust.hh includes:
+# mln/border/resize.hh
+test.o: /work/carlinet/trunk/milena/mln/border/resize.hh
+# /work/carlinet/trunk/milena/mln/border/resize.hh includes:
+# mln/core/concept/image.hh
+# mln/core/routine/duplicate.hh
+# mln/core/routine/primary.hh
+# mln/border/get.hh
+# mln/data/fill.hh
+test.o: /work/carlinet/trunk/milena/mln/core/routine/primary.hh
+# /work/carlinet/trunk/milena/mln/core/routine/primary.hh includes:
+# mln/core/concept/image.hh
+test.o: /work/carlinet/trunk/milena/mln/geom/delta.hh
+# /work/carlinet/trunk/milena/mln/geom/delta.hh includes:
+# mln/core/concept/window.hh
+# mln/core/concept/weighted_window.hh
+# mln/core/concept/neighborhood.hh
+test.o: /work/carlinet/trunk/milena/mln/extension/fill.hh
+# /work/carlinet/trunk/milena/mln/extension/fill.hh includes:
+# mln/core/concept/image.hh
+# mln/trait/image/props.hh
+# mln/border/fill.hh
+# mln/data/fill_with_value.hh
+test.o: /work/carlinet/trunk/milena/mln/border/fill.hh
+# /work/carlinet/trunk/milena/mln/border/fill.hh includes:
+# mln/core/concept/image.hh
+# mln/core/box_runstart_piter.hh
+# mln/opt/element.hh
+test.o: /work/carlinet/trunk/milena/mln/transform/internal/distance_functor.hh
+# /work/carlinet/trunk/milena/mln/transform/internal/distance_functor.hh includes:
+# mln/core/macros.hh
+test.o: /work/carlinet/trunk/milena/mln/morpho/attribute/card.hh
+# /work/carlinet/trunk/milena/mln/morpho/attribute/card.hh includes:
+# mln/accu/internal/base.hh
+# mln/util/pix.hh
+test.o: ../attributes/bbox.hh
+# ../attributes/bbox.hh includes:
+# mln/core/concept/box.hh
+test.o: /work/carlinet/trunk/milena/mln/io/pbm/load.hh
+# /work/carlinet/trunk/milena/mln/io/pbm/load.hh includes:
+# mln/core/image/image2d.hh
+# mln/core/image/image3d.hh
+# mln/io/pnm/load_header.hh
+# mln/make/image3d.hh
+test.o: /work/carlinet/trunk/milena/mln/io/pnm/load_header.hh
+test.o: /work/carlinet/trunk/milena/mln/make/image3d.hh
+# /work/carlinet/trunk/milena/mln/make/image3d.hh includes:
+# mln/core/image/image3d.hh
+# mln/core/image/image2d.hh
+# mln/core/image/slice_image.hh
+# mln/data/paste.hh
+# mln/util/array.hh
+test.o: /work/carlinet/trunk/milena/mln/core/image/slice_image.hh
+# /work/carlinet/trunk/milena/mln/core/image/slice_image.hh includes:
+# mln/core/internal/image_domain_morpher.hh
+# mln/core/alias/box3d.hh
+# mln/core/alias/box2d.hh
+test.o: /work/carlinet/trunk/milena/mln/data/paste.hh
+# /work/carlinet/trunk/milena/mln/data/paste.hh includes:
+# mln/core/concept/image.hh
+# mln/data/paste.spe.hh
+test.o: /work/carlinet/trunk/milena/mln/data/paste.spe.hh
+# /work/carlinet/trunk/milena/mln/data/paste.spe.hh includes:
+# mln/core/pixel.hh
+# mln/data/fill_with_value.hh
+# mln/data/memcpy_.hh
+# mln/core/box_runstart_piter.hh
+# mln/border/get.hh
+# mln/opt/value.hh
+# mln/opt/element.hh
+test.o: /work/carlinet/trunk/milena/mln/io/pgm/save.hh
+# /work/carlinet/trunk/milena/mln/io/pgm/save.hh includes:
+# mln/io/pnm/save.hh
+# mln/geom/size2d.hh
+# mln/metal/bexpr.hh
+# mln/metal/is_not_a.hh
+# mln/value/concept/vectorial.hh
+test.o: /work/carlinet/trunk/milena/mln/io/pnm/save.hh
+# /work/carlinet/trunk/milena/mln/io/pnm/save.hh includes:
+# mln/core/concept/image.hh
+# mln/core/alias/point2d.hh
+# mln/value/concept/scalar.hh
+# mln/value/rgb.hh
+# mln/value/rgb8.hh
+# mln/value/int_u8.hh
+# mln/metal/templated_by.hh
+# mln/metal/not_equal.hh
+# mln/io/pnm/save_header.hh
+# mln/io/pnm/macros.hh
+# mln/geom/size2d.hh
+test.o: /work/carlinet/trunk/milena/mln/value/rgb.hh
+# /work/carlinet/trunk/milena/mln/value/rgb.hh includes:
+# mln/value/ops.hh
+# mln/value/concept/vectorial.hh
+# mln/value/int_u.hh
+# mln/algebra/vec.hh
+# mln/fun/v2v/rgb_to_hsl.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/v2v/rgb_to_hsl.hh
+# /work/carlinet/trunk/milena/mln/fun/v2v/rgb_to_hsl.hh includes:
+# mln/math/round.hh
+# mln/math/max.hh
+# mln/math/min.hh
+# mln/trait/value_.hh
+# mln/value/rgb.hh
+test.o: /work/carlinet/trunk/milena/mln/math/max.hh
+test.o: /work/carlinet/trunk/milena/mln/math/min.hh
+test.o: /work/carlinet/trunk/milena/mln/value/rgb8.hh
+# /work/carlinet/trunk/milena/mln/value/rgb8.hh includes:
+# mln/value/rgb.hh
+test.o: /work/carlinet/trunk/milena/mln/value/int_u8.hh
+# /work/carlinet/trunk/milena/mln/value/int_u8.hh includes:
+# mln/value/int_u.hh
+test.o: /work/carlinet/trunk/milena/mln/metal/templated_by.hh
+# /work/carlinet/trunk/milena/mln/metal/templated_by.hh includes:
+# mln/metal/bool.hh
+test.o: /work/carlinet/trunk/milena/mln/io/pnm/save_header.hh
+# /work/carlinet/trunk/milena/mln/io/pnm/save_header.hh includes:
+# mln/io/pnm/max_component.hh
+# mln/value/rgb.hh
+# mln/geom/nrows.hh
+# mln/geom/ncols.hh
+test.o: /work/carlinet/trunk/milena/mln/io/pnm/max_component.hh
+# /work/carlinet/trunk/milena/mln/io/pnm/max_component.hh includes:
+# mln/value/rgb.hh
+# mln/value/int_u.hh
+test.o: /work/carlinet/trunk/milena/mln/io/pnm/macros.hh
+test.o: /work/carlinet/trunk/milena/mln/io/ppm/save.hh
+# /work/carlinet/trunk/milena/mln/io/ppm/save.hh includes:
+# mln/core/concept/image.hh
+# mln/metal/templated_by.hh
+# mln/io/pnm/save.hh
+test.o: ./../../theo/color/change_attributes.hh
+test.o: /work/carlinet/trunk/milena/mln/fun/p2v/ternary.hh
+# /work/carlinet/trunk/milena/mln/fun/p2v/ternary.hh includes:
+# mln/fun/internal/selector.hh
+test.o: /work/carlinet/trunk/milena/mln/labeling/blobs.hh
+# /work/carlinet/trunk/milena/mln/labeling/blobs.hh includes:
+# mln/core/concept/image.hh
+# mln/core/concept/neighborhood.hh
+# mln/data/fill.hh
+# mln/core/site_set/p_queue_fast.hh
+test.o: /work/carlinet/trunk/milena/mln/debug/colorize.hh
+# /work/carlinet/trunk/milena/mln/debug/colorize.hh includes:
+# mln/core/concept/image.hh
+# mln/fun/i2v/array.hh
+# mln/value/rgb8.hh
+# mln/literal/black.hh
+# mln/level/transform.hh
+test.o: /work/carlinet/trunk/milena/mln/literal/black.hh
+# /work/carlinet/trunk/milena/mln/literal/black.hh includes:
+# mln/core/concept/literal.hh
+test.o: /work/carlinet/trunk/milena/mln/level/transform.hh
+# /work/carlinet/trunk/milena/mln/level/transform.hh includes:
+# mln/core/concept/image.hh
+# mln/core/concept/function.hh
+# mln/value/set.hh
+# mln/level/transform.spe.hh
+test.o: /work/carlinet/trunk/milena/mln/level/transform.spe.hh
+# /work/carlinet/trunk/milena/mln/level/transform.spe.hh includes:
+# mln/core/concept/image.hh
+# mln/core/concept/function.hh
+# mln/data/fill_with_value.hh
+# mln/value/set.hh
+# mln/value/lut_vec.hh
+# mln/opt/value.hh
+test.o: /work/carlinet/trunk/milena/mln/value/lut_vec.hh
+# /work/carlinet/trunk/milena/mln/value/lut_vec.hh includes:
+# mln/core/concept/value_set.hh
+# mln/core/concept/function.hh
+# mln/trait/value_.hh
+# mln/value/viter.hh
+test.o: /work/carlinet/trunk/milena/mln/draw/box.hh
+# /work/carlinet/trunk/milena/mln/draw/box.hh includes:
+# mln/core/concept/image.hh
+# mln/core/alias/box2d.hh
+# mln/data/paste.hh
+# mln/draw/line.hh
+# mln/pw/image.hh
+# mln/pw/cst.hh
+test.o: /work/carlinet/trunk/milena/mln/draw/line.hh
+# /work/carlinet/trunk/milena/mln/draw/line.hh includes:
+# mln/core/concept/image.hh
+# mln/core/site_set/p_line2d.hh
+# mln/core/image/safe.hh
+# mln/data/paste.hh
+# mln/pw/image.hh
+# mln/pw/cst.hh
+test.o: /work/carlinet/trunk/milena/mln/core/site_set/p_line2d.hh
+# /work/carlinet/trunk/milena/mln/core/site_set/p_line2d.hh includes:
+# mln/core/site_set/p_array.hh
+# mln/core/alias/box2d.hh
+# mln/math/sign.hh
+# mln/math/abs.hh
+# mln/math/min.hh
+# mln/math/max.hh
+test.o: /work/carlinet/trunk/milena/mln/math/sign.hh
+test.o: /work/carlinet/trunk/milena/mln/core/image/safe.hh
+# /work/carlinet/trunk/milena/mln/core/image/safe.hh includes:
+# mln/core/internal/image_identity.hh
+test.o: /work/carlinet/trunk/milena/mln/core/internal/image_identity.hh
+# /work/carlinet/trunk/milena/mln/core/internal/image_identity.hh includes:
+# mln/core/internal/image_morpher.hh
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
New source in ICDAR-HSC to go from input to lines.
* icdar/2009/hsc/input_to_lines.cc: Rename as...
* icdar/2009/hsc/old_input_to_lines.cc: ...this.
* icdar/2009/hsc/input_to_wsl.cc: New.
* icdar/2009/hsc/ws_to_wsl.hh: New.
input_to_wsl.cc | 130 +++++++++++++++++++
ws_to_wsl.hh | 373 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 503 insertions(+)
Index: icdar/2009/hsc/input_to_wsl.cc
--- icdar/2009/hsc/input_to_wsl.cc (revision 0)
+++ icdar/2009/hsc/input_to_wsl.cc (revision 0)
@@ -0,0 +1,130 @@
+#include <set>
+#include <vector>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/image/image_if.hh>
+#include <mln/core/alias/neighb2d.hh>
+
+#include <mln/pw/all.hh>
+#include <mln/data/fill.hh>
+#include <mln/level/saturate.hh>
+#include <mln/level/convert.hh>
+#include <mln/arith/revert.hh>
+
+#include <mln/value/int_u8.hh>
+#include <mln/value/rgb8.hh>
+#include <mln/literal/colors.hh>
+#include <mln/debug/colorize.hh>
+
+#include <mln/io/pbm/load.hh>
+#include <mln/io/pbm/save.hh>
+#include <mln/io/pgm/save.hh>
+#include <mln/io/ppm/save.hh>
+
+#include <mln/world/binary_2d/subsample.hh>
+
+#define MLN_FLOAT double
+#include <sandbox/theo/exec/gaussian_directional_2d.hh>
+
+#include <mln/morpho/closing/structural.hh>
+#include <mln/morpho/watershed/flooding.hh>
+#include <mln/win/rectangle2d.hh>
+
+#include <sandbox/icdar/2009/hsc/ws_to_wsl.hh>
+
+
+
+
+
+void usage(char* argv[])
+{
+ std::cerr << "usage: " << argv[0] << " input.pbm output.pgm [output.ppm]" << std::endl
+ << " HSC @ ICDAR'2009" << std::endl
+ << " input.pbm: input 2D binary image (text is black; background is white)" << std::endl
+ << " output.pgm: output image where line components are labeled (int_u8)" << std::endl
+ << " 0 is the background label." << std::endl;
+ std::abort();
+}
+
+
+
+int main(int argc, char* argv[])
+{
+ using namespace mln;
+ using value::int_u8;
+ using value::rgb8;
+
+ if (argc != 3 && argc != 4)
+ usage(argv);
+
+
+ // Parameters.
+
+ const unsigned
+ subsampling_factor = 4,
+ height = 5,
+ width = 25,
+ n_min_stats = 1000;
+ const float
+ h_sigma = 31,
+ v_sigma = 1.3;
+
+ // end of Parameters.
+
+
+ trace::entering("main");
+
+ image2d<bool> input;
+ io::pbm::load(input, argv[1]);
+
+ // Sub-sampling.
+ image2d<int_u8>
+ small = world::binary_2d::subsample(input, subsampling_factor),
+ fuzzy, clo,
+ ws,
+ spc;
+
+
+# ifdef LOG
+ io::pgm::save(small, "tmp_small.pgm");
+# endif
+
+
+ // Fuzzifying.
+ {
+ image2d<MLN_FLOAT> temp(small.domain()), out;
+ data::fill(temp, small);
+
+ out = linear::gaussian_directional_2d(temp, 1, h_sigma, 0);
+ out = linear::gaussian_directional_2d(out, 0, v_sigma, 0);
+
+ fuzzy = level::saturate(int_u8(), out);
+
+# ifdef LOG
+ io::pgm::save(fuzzy, "tmp_fuzzy.pgm");
+# endif
+ }
+
+
+ clo = morpho::closing::structural(fuzzy, win::rectangle2d(height, width));
+
+# ifdef LOG
+ io::pgm::save(clo, "tmp_clo.pgm");
+# endif
+
+ int_u8 n_basins;
+ ws = morpho::watershed::flooding(clo, c4(), n_basins);
+
+
+ image2d<int_u8> wsl = ws_to_wslines(input, small, ws, n_basins);
+
+ io::pgm::save(wsl, argv[2]);
+
+ if (argc == 4)
+ {
+ io::ppm::save(debug::colorize(rgb8(), wsl, n_basins),
+ argv[3]);
+ }
+
+ trace::exiting("main");
+}
Index: icdar/2009/hsc/ws_to_wsl.hh
--- icdar/2009/hsc/ws_to_wsl.hh (revision 0)
+++ icdar/2009/hsc/ws_to_wsl.hh (revision 0)
@@ -0,0 +1,373 @@
+#include <mln/core/var.hh>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/neighb2d.hh>
+
+#include <mln/pw/all.hh>
+
+#include <mln/value/int_u8.hh>
+
+#include <mln/util/array.hh>
+#include <mln/level/transform.hh>
+
+#include <mln/accu/internal/base.hh>
+
+#include <mln/algebra/vec.hh>
+#include <mln/algebra/mat.hh>
+
+#include <mln/make/region_adjacency_graph.hh>
+
+#include <mln/core/site_set/p_edges.hh>
+#include <mln/core/site_set/p_vertices.hh>
+#include <mln/core/image/graph_elt_neighborhood.hh>
+
+#include <mln/morpho/elementary/dilation.hh>
+
+
+
+
+
+
+namespace mln
+{
+
+
+ algebra::mat<1,2,float>
+ trans(const algebra::vec<2,float>& v)
+ {
+ algebra::mat<1,2,float> tmp;
+ tmp(0,0) = v[0];
+ tmp(0,1) = v[1];
+ return tmp;
+ }
+
+ algebra::mat<2,1,float>
+ to_mat(const algebra::vec<2,float>& v)
+ {
+ algebra::mat<2,1,float> tmp;
+ tmp(0,0) = v[0];
+ tmp(1,0) = v[1];
+ return tmp;
+ }
+
+
+ struct mahalanobis : public mln::accu::internal::base< unsigned , mahalanobis >
+ {
+ typedef point2d argument;
+ typedef unsigned result;
+
+ mahalanobis()
+ {
+ }
+
+ /// Manipulators.
+ /// \{
+ void init()
+ {
+ valid_ = false;
+ n_ = 0;
+ mean_.set_all(0);
+ cov_.set_all(0);
+ }
+
+ void take(const argument& p)
+ {
+ mln_invariant(0);
+ }
+
+ void take(const mahalanobis& other)
+ {
+ mln_invariant(0);
+ }
+
+ void take(unsigned n_times, const argument& p)
+ {
+ n_ += n_times;
+ float
+ r = p.row(),
+ c = p.col();
+ mean_[0] += r * n_times;
+ mean_[1] += c * n_times;
+ cov_(0, 0) += r * r * n_times;
+ cov_(0, 1) += r * c * n_times;
+ cov_(1, 0) += c * r * n_times;
+ cov_(1, 1) += c * c * n_times;
+ }
+
+ void finalize()
+ {
+ mln_invariant(! valid_);
+ valid_ = true;
+ if (n_ == 0)
+ return;
+ mean_ /= n_;
+ algebra::mat<2,1,float> mu;
+ cov_ = cov_ / n_ - to_mat(mean_) * trans(mean_);
+
+ float
+ a = cov_(0, 0), b = cov_(0, 1),
+ c = cov_(1, 0), d = cov_(1, 1),
+ r = a * d - b * c;
+ if (r > -0.001f && r < 0.001f) // too close to 0
+ {
+ n_ = 0; // invalidation
+ return;
+ }
+ cov_1_(0, 0) = + d / r;
+ cov_1_(0, 1) = - b / r;
+ cov_1_(1, 0) = - c / r;
+ cov_1_(1, 1) = + a / r;
+ }
+
+ /// Get the accumulator result; here DUMMY !!!
+ unsigned to_result() const
+ {
+ mln_invariant(0);
+ return n_;
+ }
+
+ /// Get the mean vector.
+ const algebra::vec<2,float>& mean() const
+ {
+ mln_invariant(valid_);
+ return mean_;
+ }
+
+ /// Get the center column.
+ def::coord col() const
+ {
+ mln_invariant(valid_);
+ return static_cast<def::coord>(0.49999f + mean_[1]); // col = coord #1
+ }
+
+ /// Get the covariance matrix.
+ const algebra::mat<2,2,float>& cov() const
+ {
+ mln_invariant(valid_);
+ return cov_;
+ }
+
+ /// Get the inverse of the covariance matrix.
+ const algebra::mat<2,2,float>& cov_1() const
+ {
+ mln_invariant(valid_);
+ return cov_1_;
+ }
+
+ float dist(const algebra::vec<2,float>& v) const
+ {
+ mln_invariant(valid_);
+ algebra::vec<2,float> v_ = v - mean_;
+ return (trans(v_) * cov_1_ * v_)[0];
+ }
+
+ /// Get the number of items.
+ unsigned n() const
+ {
+ return n_;
+ }
+
+ /// Check whether this accu is able to return a result.
+ /// Always true here.
+ bool is_valid() const
+ {
+ return valid_;
+ }
+
+ protected:
+
+ bool valid_;
+ unsigned n_;
+ algebra::vec<2,float> mean_;
+ algebra::mat<2,2,float> cov_, cov_1_;
+ };
+
+
+
+ template <typename L>
+ util::array<mahalanobis>
+ mahalanobis_from_images(const image2d<L>& ws,
+ const image2d<value::int_u8>& small,
+ L n_labels)
+ {
+ util::array<mahalanobis> arr(n_labels + 1);
+ for (unsigned l = 0; l <= n_labels; ++l)
+ arr[l].init();
+ mln_piter(box2d) p(ws.domain());
+ for_all(p)
+ {
+ if (ws(p) == 0 || small(p) == 255)
+ continue;
+ arr[ws(p)].take(255 - small(p), p);
+ }
+
+ for (unsigned l = 0; l <= n_labels; ++l)
+ arr[l].finalize();
+
+ return arr;
+ }
+
+
+ float dist(const mahalanobis& m1, const mahalanobis& m2)
+ {
+ return std::min(m1.dist(m2.mean()), m2.dist(m1.mean()));
+ }
+
+
+ template <typename L>
+ inline
+ L find_root_(util::array<L>& parent, L l)
+ {
+ if (parent[l] == l)
+ return l;
+ return parent[l] = find_root_(parent, parent[l]);
+ }
+
+
+
+
+ template <typename L>
+ image2d<L>
+ ws_to_wslines(const image2d<bool>& input,
+ const image2d<value::int_u8>& small,
+ const image2d<L>& ws,
+ L n_basins)
+ {
+ typedef util::graph G;
+
+ G gr = make::region_adjacency_graph(ws, c8(), n_basins);
+
+ util::array<mahalanobis> m;
+ m = mahalanobis_from_images(ws, small, n_basins);
+
+ typedef pw::cst_<int> P;
+ P no_f(0);
+ p_edges<G,P> pe(gr, no_f);
+
+
+ mln_VAR(d, fun::i2v::array<float>(gr.e_nmax()) | pe);
+
+
+ // Computing 'd'.
+
+ {
+ mln_piter_(d_t) e(pe);
+ for_all(e)
+ {
+ unsigned
+ i1 = e.element().v1(),
+ i2 = e.element().v2();
+ const mahalanobis
+ & m1 = m[i1],
+ & m2 = m[i2];
+
+ if (m1.n() > 1000 && m2.n() > 1000)
+ d(e) = dist(m1, m2);
+ else
+ d(e) = 666.f;
+ }
+ }
+
+
+ util::array<unsigned>
+ v_left (n_basins + 1),
+ v_right(n_basins + 1);
+
+
+ // Fill in v_left and v_right.
+
+ {
+
+ mln_vertex_iter_(G) v(gr);
+ mln_vertex_nbh_edge_iter_(G) e(v);
+ for_all(v)
+ {
+ int v_col = m[v.id()].col();
+ float
+ d_left_min = 666.f,
+ d_right_min = 666.f;
+ unsigned
+ v_left_best = 0,
+ v_right_best = 0;
+ for_all(e)
+ {
+ unsigned v2 = e.v_other(v);
+ float d_ = d.function()(e);
+ if (m[v2].col() < v_col)
+ {
+ // v2 <-- v
+ if (d_ < d_left_min)
+ {
+ d_left_min = d_;
+ v_left_best = v2;
+ }
+ }
+ else
+ {
+ // v --> v2
+ if (d_ < d_right_min)
+ {
+ d_right_min = d_;
+ v_right_best = v2;
+ }
+ }
+ }
+ v_left [v.id()] = v_left_best;
+ v_right[v.id()] = v_right_best;
+ }
+
+ }
+
+
+
+ util::array<L> parent(n_basins + 1);
+
+ // Computing parent.
+
+ {
+ for (L l = 0; l <= n_basins; ++l)
+ parent[l] = l;
+
+ for (L l = 1; l <= n_basins; ++l)
+ {
+ if (v_right[l] == 0)
+ continue;
+ unsigned r = v_right[l];
+ if (v_left[r] != l)
+ {
+ // std::cout << '.' << std::endl;
+ continue;
+ }
+ // std::cout << l << " -> " << r << std::endl;
+ parent[l] = r;
+ }
+
+ for (L l = 1; l <= n_basins; ++l)
+ parent[l] = find_root_(parent, l);
+ }
+
+
+ // Outputing.
+
+ image2d<L> output(input.domain());
+
+ {
+ unsigned s = input.nrows() / small.nrows();
+
+ image2d<L> ws_nol = morpho::elementary::dilation(ws, c8());
+
+ mln_piter(box2d) p(input.domain());
+ for_all(p)
+ if (input(p))
+ output(p) = 0;
+ else
+ {
+ L l = ws_nol.at_(p.row() / s, p.col() / s);
+ output(p) = parent[l];
+ }
+ }
+
+ return output;
+ }
+
+} // ! mln
1
0
[PATCH 10/10] mln/util/fibonacci_heap.hh: Convert to Unix line terminators.
by Roland Levillain 06 Apr '09
by Roland Levillain 06 Apr '09
06 Apr '09
---
milena/ChangeLog | 4 +
milena/mln/util/fibonacci_heap.hh | 2126 ++++++++++++++++++------------------
2 files changed, 1067 insertions(+), 1063 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 306a838..f8bdc57 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,9 @@
2009-04-06 Roland Levillain <roland(a)lrde.epita.fr>
+ * mln/util/fibonacci_heap.hh: Convert to Unix line terminators.
+
+2009-04-06 Roland Levillain <roland(a)lrde.epita.fr>
+
* mln/util/ord_pair.hh: Remove outdated FIXME.
2009-04-06 Roland Levillain <roland(a)lrde.epita.fr>
diff --git a/milena/mln/util/fibonacci_heap.hh b/milena/mln/util/fibonacci_heap.hh
index ef85508..597d87a 100644
--- a/milena/mln/util/fibonacci_heap.hh
+++ b/milena/mln/util/fibonacci_heap.hh
@@ -1,1063 +1,1063 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory
-// (LRDE)
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-//
-//***************************************************************************
-// The Fibonacci heap implementation is Copyright (c) 1996 by John Boyer
-//
-// Once this Fibonacci heap implementation (the software) has been published
-// by Dr. Dobb's Journal, permission to use and distribute the software is
-// granted provided that this copyright notice remains in the source and
-// and the author (John Boyer) is acknowledged in works that use this program.
-//
-// Every effort has been made to ensure that this implementation is free of
-// errors. Nonetheless, the author (John Boyer) assumes no liability regarding
-// your use of this software.
-//
-// The author would also be very glad to hear from anyone who uses the
-// software or has any feedback about it.
-// Email: jboyer(a)gulf.csc.uvic.ca
-//***************************************************************************
-
-
-#ifndef MLN_UTIL_FIBONACCI_HEAP_HH
-# define MLN_UTIL_FIBONACCI_HEAP_HH
-
-
-# include <iostream>
-# include <mln/core/concept/object.hh>
-# include <mln/util/ord.hh>
-
-
-
-namespace mln
-{
-
- namespace util
- {
-
-
- namespace internal
- {
-
- /*--------------------------\
- | Fibonacci Heap node Class |
- `--------------------------*/
-
- template <typename P, typename T>
- class fibonacci_heap_node
- {
-
- public:
- /// Default constructor.
- fibonacci_heap_node();
-
- /// Construct a new node with \p value as value.
- fibonacci_heap_node(const P& priority, const T& value);
-
- ~fibonacci_heap_node();
-
- /// Return the node value.
- const T& value() const;
-
- const P& priority() const;
-
- fibonacci_heap_node<P,T> *left() const;
- fibonacci_heap_node<P,T> *right() const;
- fibonacci_heap_node<P,T> *parent() const;
- fibonacci_heap_node<P,T> *child() const;
-
- short degree() const;
-
- short mark() const;
-
-
- void set_value(const T&);
- void set_left(fibonacci_heap_node<P,T> *node);
- void set_right(fibonacci_heap_node<P,T> *node);
- void set_parent(fibonacci_heap_node<P,T> *node);
- void set_child(fibonacci_heap_node<P,T> *node);
- void set_degree(short degree);
- void set_mark(short mark);
-
- void operator=(fibonacci_heap_node<P,T>& rhs);
- bool operator==(fibonacci_heap_node<P,T>& rhs);
- bool operator<(fibonacci_heap_node<P,T>& rhs);
-
- void print_() const;
-
-
- private:
-
- fibonacci_heap_node<P,T> *left_;
- fibonacci_heap_node<P,T> *right_;
- fibonacci_heap_node<P,T> *parent_;
- fibonacci_heap_node<P,T> *child_;
- short degree_;
- short mark_;
- P priority_;
- T value_;
- };
-
- } // end of namespace mln::util::internal
-
-
-
- /*---------------------\
- | Fibonacci Heap Class |
- `---------------------*/
-
- template <typename P, typename T>
- class fibonacci_heap : public Object< fibonacci_heap<P,T> >
- {
- public:
-
- typedef T element;
-
- /// Default constructor
- fibonacci_heap();
-
- /// Copy constructor
- /// Be ware that once this heap is constructed, the argument \p node
- /// is cleared and all its elements are part of this new heap.
- fibonacci_heap(const fibonacci_heap<P,T>& node);
-
- ~fibonacci_heap();
-
- /// Push a new element in the heap.
- /// \sa insert
- void push(const P& priority, const T& value);
-
- /// Take \p other_heap's elements and insert them in this heap.
- /// After this call \p other_heap is cleared.
- void push(fibonacci_heap<P,T>& other_heap);
-
- /// Return the minimum value in the heap.
- const T& front() const;
-
- /// Return and remove the minimum value in the heap.
- T pop_front();
-
- /// Is it empty?
- bool is_empty() const;
-
- /// return false if it is empty.
- bool is_valid() const;
-
- /// Return the number of elements.
- unsigned nelements() const;
-
- /// Clear all elements in the heap and make the heap empty.
- void clear();
-
- /// Assignment operator.
- /// Be ware that this operator do *not* copy the data from \p rhs to this heap.
- /// It moves all elements which means that afterwards, \p rhs is
- /// is cleared and all its elements are part of this new heap.
- fibonacci_heap<P,T>& operator=(fibonacci_heap<P,T>& rhs);
-
-
-
- std::ostream& print_(std::ostream& cout,
- internal::fibonacci_heap_node<P,T> *tree = 0,
- internal::fibonacci_heap_node<P,T> *parent = 0) const;
-
- private:
-
- // Internal functions that help to implement the Standard Operations
-
-
- /// Allow to change a node value.
- /// FIXME: cannot use that function efficiently except by passing the
- /// node pointer. Any idea?
- /// FIXME: may be part of the public interface.
- int decrease_key(internal::fibonacci_heap_node<P,T> *node,
- internal::fibonacci_heap_node<P,T>& key);
-
- /// Remove node \p node from the child list of its parent node.
- /// FIXME: cannot use that function efficiently except by passing the
- /// node pointer. Any idea?
- /// FIXME: may be part of the public interface.
- int remove(internal::fibonacci_heap_node<P,T> *node);
-
- /// Insert a new node \p node in the heap.
- void insert(internal::fibonacci_heap_node<P,T> *node);
-
- /// Swap the two given nodes.
- void exchange(internal::fibonacci_heap_node<P,T>*& lhs,
- internal::fibonacci_heap_node<P,T>*& rhs);
-
- /// Internal function that reorganizes heap as part of an pop_front().
- /// We must find new minimum in heap, which could be anywhere along the
- /// root list. The search could be O(n) since all nodes could be on
- /// the root list. So, we reorganize the tree into more of a binomial
- /// forest structure, and then find the new minimum on the consolidated
- /// O(lg n) sized root list, and in the process set each Parent pointer
- /// to 0, and count the number of resulting subtrees.
- ///
- /// Note that after a list of n inserts, there will be n nodes on the
- /// root list, so the first pop_front() will be O(n) regardless of
- /// whether or not we consolidate. However, the consolidation causes
- /// subsequent pop_front() operations to be O(lg n). Furthermore,
- /// the extra cost of the first pop_front() is covered by the higher
- /// amortized cost of insert(), which is the real governing factor in
- /// how costly the first pop_front() will be.
- void consolidate();
-
- /// The node \p lhs is removed from the root list and becomes a subtree
- /// of node \p rhs.
- void link(internal::fibonacci_heap_node<P,T> *lhs,
- internal::fibonacci_heap_node<P,T> *rhs);
-
- void add_to_root_list(internal::fibonacci_heap_node<P,T> *);
-
- /// Remove node \p lhs from the child list of its parent node \p rhs.
- void cut(internal::fibonacci_heap_node<P,T> *lhs,
- internal::fibonacci_heap_node<P,T> *rhs);
-
- /// Cuts each node in parent list, putting successive ancestor nodes on
- /// the root list until we either arrive at the root list or until we
- /// find an ancestor that is unmarked. When a mark is set (which only
- /// happens during a cascading cut), it means that one child subtree has
- /// been lost; if a second subtree is lost later during another
- /// cascading cut, then we move the node to the root list so that it
- /// can be re-balanced on the next consolidate.
- void cascading_cut(internal::fibonacci_heap_node<P,T> *);
-
- /// Clear the heap but do *NOT* delete elements.
- void soft_clear_();
-
- /// FIXME: ugly but we need to be able to soft_clear() the heap in the
- /// copy constructor... Any idea how to do without that?
- mutable internal::fibonacci_heap_node<P,T> *min_root;
- mutable long num_nodes;
- mutable long num_trees;
- mutable long num_marked_nodes;
-
- };
-
-
- template <typename P, typename T>
- std::ostream&
- operator<<(std::ostream& cout, const fibonacci_heap<P,T>& heap);
-
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- namespace internal
- {
-
-
- /*--------------------\
- | fibonacci_heap_node |
- `--------------------*/
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap_node<P,T>::fibonacci_heap_node()
- : left_(0), right_(0), parent_(0), child_(0),
- degree_(0), mark_(0), priority_(0)
- // FIXME: don't we want to initialize priority with literal::zero?
- {
- }
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap_node<P,T>::fibonacci_heap_node(const P& priority,
- const T& new_value)
- : left_(0), right_(0), parent_(0), child_(0),
- degree_(0), mark_(0), priority_(priority), value_(new_value)
- {
- }
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap_node<P,T>::~fibonacci_heap_node()
- {
- }
-
-
- template <typename P, typename T>
- inline
- const T&
- fibonacci_heap_node<P,T>::value() const
- {
- return value_;
- }
-
-
- template <typename P, typename T>
- inline
- const P&
- fibonacci_heap_node<P,T>::priority() const
- {
- return priority_;
- }
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap_node<P,T> *
- fibonacci_heap_node<P,T>::left() const
- {
- return left_;
- }
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap_node<P,T> *
- fibonacci_heap_node<P,T>::right() const
- {
- return right_;
- }
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap_node<P,T> *
- fibonacci_heap_node<P,T>::parent() const
- {
- return parent_;
- }
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap_node<P,T> *
- fibonacci_heap_node<P,T>::child() const
- {
- return child_;
- }
-
-
- template <typename P, typename T>
- inline
- short
- fibonacci_heap_node<P,T>::degree() const
- {
- return degree_;
- }
-
-
- template <typename P, typename T>
- inline
- short
- fibonacci_heap_node<P,T>::mark() const
- {
- return mark_;
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap_node<P,T>::set_value(const T& value)
- {
- value_ = value;
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap_node<P,T>::set_left(fibonacci_heap_node<P,T> *node)
- {
- left_ = node;
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap_node<P,T>::set_right(fibonacci_heap_node<P,T> *node)
- {
- right_ = node;
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap_node<P,T>::set_parent(fibonacci_heap_node<P,T> *node)
- {
- parent_ = node;
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap_node<P,T>::set_child(fibonacci_heap_node<P,T> *node)
- {
- child_ = node;
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap_node<P,T>::set_degree(short degree)
- {
- degree_ = degree;
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap_node<P,T>::set_mark(short mark)
- {
- mark_ = mark;
- }
-
-
- template <typename P, typename T>
- inline
- void fibonacci_heap_node<P,T>::operator=(fibonacci_heap_node<P,T>& rhs)
- {
- priority_ = rhs.priority();
- value_ = rhs.value();
- }
-
-
- template <typename P, typename T>
- inline
- bool
- fibonacci_heap_node<P,T>::operator==(fibonacci_heap_node<P,T>& rhs)
- {
- return priority_ == rhs.priority() && value_ == rhs.value();
- }
-
-
- template <typename P, typename T>
- inline
- bool
- fibonacci_heap_node<P,T>::operator<(fibonacci_heap_node<P,T>& rhs)
- {
- return util::ord_strict(priority_, rhs.priority())
- || (priority_ == rhs.priority() && util::ord_strict(value_, rhs.value()));
- }
-
-
- template <typename P, typename T>
- inline
- void fibonacci_heap_node<P,T>::print_() const
- {
- std::cout << value_ << " (" << priority_ << ")";
- }
-
-
- } // end of namespace mln::util::internal
-
-
-
- /*---------------\
- | fibonacci_heap |
- `---------------*/
-
- template <typename P, typename T>
- inline
- fibonacci_heap<P,T>::fibonacci_heap()
- {
- soft_clear_();
- }
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap<P,T>::fibonacci_heap(const fibonacci_heap<P,T>& rhs)
- : Object< fibonacci_heap<P,T> >()
- {
- min_root = rhs.min_root;
- num_nodes = rhs.num_nodes;
- num_trees = rhs.num_trees;
- num_marked_nodes = rhs.num_marked_nodes;
-
-// rhs is const, we cannot call that method.
-// rhs.soft_clear_();
- rhs.min_root = 0;
- rhs.num_nodes = 0;
- rhs.num_trees = 0;
- rhs.num_marked_nodes = 0;
- }
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap<P,T>::~fibonacci_heap()
- {
- clear();
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::push(const P& priority, const T& value)
- {
- typedef internal::fibonacci_heap_node<P,T> node_t;
- node_t *new_node = new node_t(priority, value);
-
- insert(new_node);
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::push(fibonacci_heap<P,T>& other_heap)
- {
- if (other_heap.is_empty() || &other_heap == this)
- return;
-
- if (min_root != 0)
- {
- internal::fibonacci_heap_node<P,T> *min1, *min2, *next1, *next2;
-
- // We join the two circular lists by cutting each list between its
- // min node and the node after the min. This code just pulls those
- // nodes into temporary variables so we don't get lost as changes
- // are made.
- min1 = min_root;
- min2 = other_heap.min_root;
- next1 = min1->right();
- next2 = min2->right();
-
- // To join the two circles, we join the minimum nodes to the next
- // nodes on the opposite chains. Conceptually, it looks like the way
- // two bubbles join to form one larger bubble. They meet at one point
- // of contact, then expand out to make the bigger circle.
- min1->set_right(next2);
- next2->set_left(min1);
- min2->set_right(next1);
- next1->set_left(min2);
-
- // Choose the new minimum for the heap
- if (*min2 < *min1)
- min_root = min2;
- }
- else
- min_root = other_heap.min_root;
-
- // Set the amortized analysis statistics and size of the new heap
- num_nodes += other_heap.num_nodes;
- num_marked_nodes += other_heap.num_marked_nodes;
- num_trees += other_heap.num_trees;
-
- // Complete the union by setting the other heap to emptiness
- other_heap.soft_clear_();
-
- mln_postcondition(other_heap.is_empty());
- }
-
-
- template <typename P, typename T>
- inline
- const T&
- fibonacci_heap<P,T>::front() const
- {
- return min_root->value();
- }
-
-
- template <typename P, typename T>
- inline
- T
- fibonacci_heap<P,T>::pop_front()
- {
- mln_precondition(is_valid());
- mln_precondition(!is_empty());
-
- internal::fibonacci_heap_node<P,T> *result = min_root;
- fibonacci_heap<P,T> *child_heap = 0;
-
- // Remove minimum node and set min_root to next node
- min_root = result->right();
- result->right()->set_left(result->left());
- result->left()->set_right(result->right());
- result->set_left(0);
- result->set_right(0);
-
- --num_nodes;
- if (result->mark())
- {
- --num_marked_nodes;
- result->set_mark(0);
- }
- result->set_degree(0);
-
- // Attach child list of minimum node to the root list of the heap
- // If there is no child list, then do no work
- if (result->child() == 0)
- {
- if (min_root == result)
- min_root = 0;
- }
-
- // If min_root==result then there was only one root tree, so the
- // root list is simply the child list of that node (which is
- // 0 if this is the last node in the list)
- else if (min_root == result)
- min_root = result->child();
-
- // If min_root is different, then the child list is pushed into a
- // new temporary heap, which is then merged by union() onto the
- // root list of this heap.
- else
- {
- child_heap = new fibonacci_heap<P,T>();
- child_heap->min_root = result->child();
- }
-
- // Complete the disassociation of the result node from the heap
- if (result->child() != 0)
- result->child()->set_parent(0);
- result->set_child(0);
- result->set_parent(0);
-
- // If there was a child list, then we now merge it with the
- // rest of the root list
- if (child_heap)
- {
- push(*child_heap);
- delete child_heap;
- }
-
- // Consolidate heap to find new minimum and do reorganize work
- if (min_root != 0)
- consolidate();
-
- // Return the minimum node, which is now disassociated with the heap
- // It has left, right, parent, child, mark and degree cleared.
- T val = result->value();
- delete result;
-
- return val;
- }
-
-
- template <typename P, typename T>
- inline
- int
- fibonacci_heap<P,T>::decrease_key(internal::fibonacci_heap_node<P,T> *node,
- internal::fibonacci_heap_node<P,T>& key)
- {
- internal::fibonacci_heap_node<P,T> *parent;
-
- if (node == 0 || *node < key)
- return -1;
-
- *node = key;
-
- parent = node->parent();
- if (parent != 0 && *node < *parent)
- {
- cut(node, parent);
- cascading_cut(parent);
- }
-
- if (*node < *min_root)
- min_root = node;
-
- return 0;
- }
-
-
- template <typename P, typename T>
- inline
- int
- fibonacci_heap<P,T>::remove(internal::fibonacci_heap_node<P,T> *node)
- {
- internal::fibonacci_heap_node<P,T> temp;
- int result;
-
- if (node == 0)
- return -1;
-
- result = decrease_key(node, temp);
-
- if (result == 0)
- if (pop_front() == 0)
- result = -1;
-
- if (result == 0)
- delete node;
-
- return result;
- }
-
-
- template <typename P, typename T>
- inline
- bool
- fibonacci_heap<P,T>::is_empty() const
- {
- return min_root == 0;
- }
-
-
- template <typename P, typename T>
- inline
- bool
- fibonacci_heap<P,T>::is_valid() const
- {
- return min_root != 0;
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::clear()
- {
- while (min_root != 0)
- pop_front();
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::soft_clear_()
- {
- min_root = 0;
- num_nodes = 0;
- num_trees = 0;
- num_marked_nodes = 0;
- }
-
-
- template <typename P, typename T>
- inline
- unsigned
- fibonacci_heap<P,T>::nelements() const
- {
- return num_nodes;
- };
-
-
- template <typename P, typename T>
- inline
- fibonacci_heap<P,T>&
- fibonacci_heap<P,T>::operator=(fibonacci_heap<P,T>& rhs)
- {
- if (&rhs != this)
- {
- min_root = rhs.min_root;
- num_nodes = rhs.num_nodes;
- num_trees = rhs.num_trees;
- num_marked_nodes = rhs.num_marked_nodes;
- rhs.soft_clear_();
- }
- return *this;
- }
-
-
- template <typename P, typename T>
- std::ostream&
- fibonacci_heap<P,T>::print_(std::ostream& cout,
- internal::fibonacci_heap_node<P,T> *tree,
- internal::fibonacci_heap_node<P,T> *parent) const
- {
- internal::fibonacci_heap_node<P,T>* temp = 0;
-
- if (tree == 0)
- tree = min_root;
-
- temp = tree;
- if (temp != 0)
- {
- do {
- if (temp->left() == 0)
- cout << "(left is 0)";
- temp->print_();
- if (temp->parent() != parent)
- cout << "(parent is incorrect)";
- if (temp->right() == 0)
- cout << "(right is 0)";
- else if (temp->right()->left() != temp)
- cout << "(Error in left link left) ->";
- else
- cout << " <-> ";
-
- temp = temp->right();
-
- } while (temp != 0 && temp != tree);
- }
- else
- cout << " <empty>" << std::endl;
- cout << std::endl;
-
- temp = tree;
- if (temp != 0)
- {
- do {
- cout << "children of " << temp->value() << ": ";
- if (temp->child() == 0)
- cout << "NONE" << std::endl;
- else print_(cout, temp->child(), temp);
- temp = temp->right();
- } while (temp!=0 && temp != tree);
- }
-
- return cout;
- }
-
-
- template <typename P, typename T>
- inline
- void fibonacci_heap<P,T>::consolidate()
- {
- internal::fibonacci_heap_node<P,T> *x, *y, *w;
- internal::fibonacci_heap_node<P,T> *a[1 + 8 * sizeof (long)]; // 1+lg(n)
- short dn = 1 + 8 * sizeof (long);
-
- // Initialize the consolidation detection array
- for (int i = 0; i < dn; ++i)
- a[i] = 0;
-
- // We need to loop through all elements on root list.
- // When a collision of degree is found, the two trees
- // are consolidated in favor of the one with the lesser
- // element key value. We first need to break the circle
- // so that we can have a stopping condition (we can't go
- // around until we reach the tree we started with
- // because all root trees are subject to becoming a
- // child during the consolidation).
- min_root->left()->set_right(0);
- min_root->set_left(0);
- w = min_root;
-
- short d;
- do {
- x = w;
- d = x->degree();
- w = w->right();
-
- // We need another loop here because the consolidated result
- // may collide with another large tree on the root list.
- while (a[d] != 0)
- {
- y = a[d];
- if (*y < *x)
- exchange(x, y);
- if (w == y) w = y->right();
- link(y, x);
- a[d] = 0;
- ++d;
- }
- a[d] = x;
-
- } while (w != 0);
-
- // Now we rebuild the root list, find the new minimum,
- // set all root list nodes' parent pointers to 0 and
- // count the number of subtrees.
- min_root = 0;
- num_trees = 0;
- for (int i = 0; i < dn; ++i)
- if (a[i] != 0)
- add_to_root_list(a[i]);
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::link(internal::fibonacci_heap_node<P,T> *y,
- internal::fibonacci_heap_node<P,T> *x)
- {
- // Remove node y from root list
- if (y->right() != 0)
- y->right()->set_left(y->left());
- if (y->left() != 0)
- y->left()->set_right(y->right());
- --num_trees;
-
- // Make node y a singleton circular list with a parent of x
- y->set_left(y);
- y->set_right(y);
- y->set_parent(x);
-
- // If node x has no children, then list y is its new child list
- if (x->child() == 0)
- x->set_child(y);
-
- // Otherwise, node y must be added to node x's child list
- else
- {
- y->set_left(x->child());
- y->set_right(x->child()->right());
- x->child()->set_right(y);
- y->right()->set_left(y);
- }
-
- // Increase the degree of node x because it's now a bigger tree
- x->set_degree(x->degree() + 1);
-
- // node y has just been made a child, so clear its mark
- if (y->mark())
- --num_marked_nodes;
- y->set_mark(0);
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::add_to_root_list(internal::fibonacci_heap_node<P,T> *x)
- {
- if (x->mark())
- --num_marked_nodes;
- x->set_mark(0);
-
- --num_nodes;
- insert(x);
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::cut(internal::fibonacci_heap_node<P,T> *x,
- internal::fibonacci_heap_node<P,T> *y)
- {
- if (y->child() == x)
- y->child() = x->right();
- if (y->child() == x)
- y->child() = 0;
-
- y->set_degree(y->degree() - 1);
-
- x->left()->right() = x->right();
- x->right()->left() = x->left();
-
- add_to_root_list(x);
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::cascading_cut(internal::fibonacci_heap_node<P,T> *y)
- {
- internal::fibonacci_heap_node<P,T> *z = y->parent();
-
- while (z != 0)
- {
- if (y->mark() == 0)
- {
- y->mark() = 1;
- ++num_marked_nodes;
- z = 0;
- }
- else
- {
- cut(y, z);
- y = z;
- z = y->parent();
- }
- }
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::insert(internal::fibonacci_heap_node<P,T> *node)
- {
- if (node == 0)
- return;
-
- // If the heap is currently empty, then new node becomes singleton
- // circular root list
- if (min_root == 0)
- {
- min_root = node;
- node->set_left(node);
- node->set_right(node);
- }
- else
- {
- // Pointers from node set to insert between min_root and
- // min_root->right()
- node->set_right(min_root->right());
- node->set_left(min_root);
-
- // Set Pointers to node
- node->left()->set_right(node);
- node->right()->set_left(node);
-
- // The new node becomes new min_root if it is less than current
- // min_root
- if (*node < *min_root)
- min_root = node;
- }
-
- // We have one more node in the heap, and it is a tree on the root list
- ++num_nodes;
- ++num_trees;
- node->set_parent(0);
- }
-
-
- template <typename P, typename T>
- inline
- void
- fibonacci_heap<P,T>::exchange(internal::fibonacci_heap_node<P,T>*& n1,
- internal::fibonacci_heap_node<P,T>*& n2)
- {
- internal::fibonacci_heap_node<P,T> *temp;
-
- temp = n1;
- n1 = n2;
- n2 = temp;
- }
-
-
- template <typename P, typename T>
- std::ostream&
- operator<<(std::ostream& cout, const fibonacci_heap<P,T>& heap)
- {
- return heap.print_(cout);
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-
- } // end of namespace mln::util
-
-} // end of namespace mln
-
-#endif // ! MLN_UTIL_FIBONACCI_HEAP_HH
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+//
+//***************************************************************************
+// The Fibonacci heap implementation is Copyright (c) 1996 by John Boyer
+//
+// Once this Fibonacci heap implementation (the software) has been published
+// by Dr. Dobb's Journal, permission to use and distribute the software is
+// granted provided that this copyright notice remains in the source and
+// and the author (John Boyer) is acknowledged in works that use this program.
+//
+// Every effort has been made to ensure that this implementation is free of
+// errors. Nonetheless, the author (John Boyer) assumes no liability regarding
+// your use of this software.
+//
+// The author would also be very glad to hear from anyone who uses the
+// software or has any feedback about it.
+// Email: jboyer(a)gulf.csc.uvic.ca
+//***************************************************************************
+
+
+#ifndef MLN_UTIL_FIBONACCI_HEAP_HH
+# define MLN_UTIL_FIBONACCI_HEAP_HH
+
+
+# include <iostream>
+# include <mln/core/concept/object.hh>
+# include <mln/util/ord.hh>
+
+
+
+namespace mln
+{
+
+ namespace util
+ {
+
+
+ namespace internal
+ {
+
+ /*--------------------------\
+ | Fibonacci Heap node Class |
+ `--------------------------*/
+
+ template <typename P, typename T>
+ class fibonacci_heap_node
+ {
+
+ public:
+ /// Default constructor.
+ fibonacci_heap_node();
+
+ /// Construct a new node with \p value as value.
+ fibonacci_heap_node(const P& priority, const T& value);
+
+ ~fibonacci_heap_node();
+
+ /// Return the node value.
+ const T& value() const;
+
+ const P& priority() const;
+
+ fibonacci_heap_node<P,T> *left() const;
+ fibonacci_heap_node<P,T> *right() const;
+ fibonacci_heap_node<P,T> *parent() const;
+ fibonacci_heap_node<P,T> *child() const;
+
+ short degree() const;
+
+ short mark() const;
+
+
+ void set_value(const T&);
+ void set_left(fibonacci_heap_node<P,T> *node);
+ void set_right(fibonacci_heap_node<P,T> *node);
+ void set_parent(fibonacci_heap_node<P,T> *node);
+ void set_child(fibonacci_heap_node<P,T> *node);
+ void set_degree(short degree);
+ void set_mark(short mark);
+
+ void operator=(fibonacci_heap_node<P,T>& rhs);
+ bool operator==(fibonacci_heap_node<P,T>& rhs);
+ bool operator<(fibonacci_heap_node<P,T>& rhs);
+
+ void print_() const;
+
+
+ private:
+
+ fibonacci_heap_node<P,T> *left_;
+ fibonacci_heap_node<P,T> *right_;
+ fibonacci_heap_node<P,T> *parent_;
+ fibonacci_heap_node<P,T> *child_;
+ short degree_;
+ short mark_;
+ P priority_;
+ T value_;
+ };
+
+ } // end of namespace mln::util::internal
+
+
+
+ /*---------------------\
+ | Fibonacci Heap Class |
+ `---------------------*/
+
+ template <typename P, typename T>
+ class fibonacci_heap : public Object< fibonacci_heap<P,T> >
+ {
+ public:
+
+ typedef T element;
+
+ /// Default constructor
+ fibonacci_heap();
+
+ /// Copy constructor
+ /// Be ware that once this heap is constructed, the argument \p node
+ /// is cleared and all its elements are part of this new heap.
+ fibonacci_heap(const fibonacci_heap<P,T>& node);
+
+ ~fibonacci_heap();
+
+ /// Push a new element in the heap.
+ /// \sa insert
+ void push(const P& priority, const T& value);
+
+ /// Take \p other_heap's elements and insert them in this heap.
+ /// After this call \p other_heap is cleared.
+ void push(fibonacci_heap<P,T>& other_heap);
+
+ /// Return the minimum value in the heap.
+ const T& front() const;
+
+ /// Return and remove the minimum value in the heap.
+ T pop_front();
+
+ /// Is it empty?
+ bool is_empty() const;
+
+ /// return false if it is empty.
+ bool is_valid() const;
+
+ /// Return the number of elements.
+ unsigned nelements() const;
+
+ /// Clear all elements in the heap and make the heap empty.
+ void clear();
+
+ /// Assignment operator.
+ /// Be ware that this operator do *not* copy the data from \p rhs to this heap.
+ /// It moves all elements which means that afterwards, \p rhs is
+ /// is cleared and all its elements are part of this new heap.
+ fibonacci_heap<P,T>& operator=(fibonacci_heap<P,T>& rhs);
+
+
+
+ std::ostream& print_(std::ostream& cout,
+ internal::fibonacci_heap_node<P,T> *tree = 0,
+ internal::fibonacci_heap_node<P,T> *parent = 0) const;
+
+ private:
+
+ // Internal functions that help to implement the Standard Operations
+
+
+ /// Allow to change a node value.
+ /// FIXME: cannot use that function efficiently except by passing the
+ /// node pointer. Any idea?
+ /// FIXME: may be part of the public interface.
+ int decrease_key(internal::fibonacci_heap_node<P,T> *node,
+ internal::fibonacci_heap_node<P,T>& key);
+
+ /// Remove node \p node from the child list of its parent node.
+ /// FIXME: cannot use that function efficiently except by passing the
+ /// node pointer. Any idea?
+ /// FIXME: may be part of the public interface.
+ int remove(internal::fibonacci_heap_node<P,T> *node);
+
+ /// Insert a new node \p node in the heap.
+ void insert(internal::fibonacci_heap_node<P,T> *node);
+
+ /// Swap the two given nodes.
+ void exchange(internal::fibonacci_heap_node<P,T>*& lhs,
+ internal::fibonacci_heap_node<P,T>*& rhs);
+
+ /// Internal function that reorganizes heap as part of an pop_front().
+ /// We must find new minimum in heap, which could be anywhere along the
+ /// root list. The search could be O(n) since all nodes could be on
+ /// the root list. So, we reorganize the tree into more of a binomial
+ /// forest structure, and then find the new minimum on the consolidated
+ /// O(lg n) sized root list, and in the process set each Parent pointer
+ /// to 0, and count the number of resulting subtrees.
+ ///
+ /// Note that after a list of n inserts, there will be n nodes on the
+ /// root list, so the first pop_front() will be O(n) regardless of
+ /// whether or not we consolidate. However, the consolidation causes
+ /// subsequent pop_front() operations to be O(lg n). Furthermore,
+ /// the extra cost of the first pop_front() is covered by the higher
+ /// amortized cost of insert(), which is the real governing factor in
+ /// how costly the first pop_front() will be.
+ void consolidate();
+
+ /// The node \p lhs is removed from the root list and becomes a subtree
+ /// of node \p rhs.
+ void link(internal::fibonacci_heap_node<P,T> *lhs,
+ internal::fibonacci_heap_node<P,T> *rhs);
+
+ void add_to_root_list(internal::fibonacci_heap_node<P,T> *);
+
+ /// Remove node \p lhs from the child list of its parent node \p rhs.
+ void cut(internal::fibonacci_heap_node<P,T> *lhs,
+ internal::fibonacci_heap_node<P,T> *rhs);
+
+ /// Cuts each node in parent list, putting successive ancestor nodes on
+ /// the root list until we either arrive at the root list or until we
+ /// find an ancestor that is unmarked. When a mark is set (which only
+ /// happens during a cascading cut), it means that one child subtree has
+ /// been lost; if a second subtree is lost later during another
+ /// cascading cut, then we move the node to the root list so that it
+ /// can be re-balanced on the next consolidate.
+ void cascading_cut(internal::fibonacci_heap_node<P,T> *);
+
+ /// Clear the heap but do *NOT* delete elements.
+ void soft_clear_();
+
+ /// FIXME: ugly but we need to be able to soft_clear() the heap in the
+ /// copy constructor... Any idea how to do without that?
+ mutable internal::fibonacci_heap_node<P,T> *min_root;
+ mutable long num_nodes;
+ mutable long num_trees;
+ mutable long num_marked_nodes;
+
+ };
+
+
+ template <typename P, typename T>
+ std::ostream&
+ operator<<(std::ostream& cout, const fibonacci_heap<P,T>& heap);
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ namespace internal
+ {
+
+
+ /*--------------------\
+ | fibonacci_heap_node |
+ `--------------------*/
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap_node<P,T>::fibonacci_heap_node()
+ : left_(0), right_(0), parent_(0), child_(0),
+ degree_(0), mark_(0), priority_(0)
+ // FIXME: don't we want to initialize priority with literal::zero?
+ {
+ }
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap_node<P,T>::fibonacci_heap_node(const P& priority,
+ const T& new_value)
+ : left_(0), right_(0), parent_(0), child_(0),
+ degree_(0), mark_(0), priority_(priority), value_(new_value)
+ {
+ }
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap_node<P,T>::~fibonacci_heap_node()
+ {
+ }
+
+
+ template <typename P, typename T>
+ inline
+ const T&
+ fibonacci_heap_node<P,T>::value() const
+ {
+ return value_;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ const P&
+ fibonacci_heap_node<P,T>::priority() const
+ {
+ return priority_;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap_node<P,T> *
+ fibonacci_heap_node<P,T>::left() const
+ {
+ return left_;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap_node<P,T> *
+ fibonacci_heap_node<P,T>::right() const
+ {
+ return right_;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap_node<P,T> *
+ fibonacci_heap_node<P,T>::parent() const
+ {
+ return parent_;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap_node<P,T> *
+ fibonacci_heap_node<P,T>::child() const
+ {
+ return child_;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ short
+ fibonacci_heap_node<P,T>::degree() const
+ {
+ return degree_;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ short
+ fibonacci_heap_node<P,T>::mark() const
+ {
+ return mark_;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap_node<P,T>::set_value(const T& value)
+ {
+ value_ = value;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap_node<P,T>::set_left(fibonacci_heap_node<P,T> *node)
+ {
+ left_ = node;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap_node<P,T>::set_right(fibonacci_heap_node<P,T> *node)
+ {
+ right_ = node;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap_node<P,T>::set_parent(fibonacci_heap_node<P,T> *node)
+ {
+ parent_ = node;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap_node<P,T>::set_child(fibonacci_heap_node<P,T> *node)
+ {
+ child_ = node;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap_node<P,T>::set_degree(short degree)
+ {
+ degree_ = degree;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap_node<P,T>::set_mark(short mark)
+ {
+ mark_ = mark;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void fibonacci_heap_node<P,T>::operator=(fibonacci_heap_node<P,T>& rhs)
+ {
+ priority_ = rhs.priority();
+ value_ = rhs.value();
+ }
+
+
+ template <typename P, typename T>
+ inline
+ bool
+ fibonacci_heap_node<P,T>::operator==(fibonacci_heap_node<P,T>& rhs)
+ {
+ return priority_ == rhs.priority() && value_ == rhs.value();
+ }
+
+
+ template <typename P, typename T>
+ inline
+ bool
+ fibonacci_heap_node<P,T>::operator<(fibonacci_heap_node<P,T>& rhs)
+ {
+ return util::ord_strict(priority_, rhs.priority())
+ || (priority_ == rhs.priority() && util::ord_strict(value_, rhs.value()));
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void fibonacci_heap_node<P,T>::print_() const
+ {
+ std::cout << value_ << " (" << priority_ << ")";
+ }
+
+
+ } // end of namespace mln::util::internal
+
+
+
+ /*---------------\
+ | fibonacci_heap |
+ `---------------*/
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap<P,T>::fibonacci_heap()
+ {
+ soft_clear_();
+ }
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap<P,T>::fibonacci_heap(const fibonacci_heap<P,T>& rhs)
+ : Object< fibonacci_heap<P,T> >()
+ {
+ min_root = rhs.min_root;
+ num_nodes = rhs.num_nodes;
+ num_trees = rhs.num_trees;
+ num_marked_nodes = rhs.num_marked_nodes;
+
+// rhs is const, we cannot call that method.
+// rhs.soft_clear_();
+ rhs.min_root = 0;
+ rhs.num_nodes = 0;
+ rhs.num_trees = 0;
+ rhs.num_marked_nodes = 0;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap<P,T>::~fibonacci_heap()
+ {
+ clear();
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::push(const P& priority, const T& value)
+ {
+ typedef internal::fibonacci_heap_node<P,T> node_t;
+ node_t *new_node = new node_t(priority, value);
+
+ insert(new_node);
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::push(fibonacci_heap<P,T>& other_heap)
+ {
+ if (other_heap.is_empty() || &other_heap == this)
+ return;
+
+ if (min_root != 0)
+ {
+ internal::fibonacci_heap_node<P,T> *min1, *min2, *next1, *next2;
+
+ // We join the two circular lists by cutting each list between its
+ // min node and the node after the min. This code just pulls those
+ // nodes into temporary variables so we don't get lost as changes
+ // are made.
+ min1 = min_root;
+ min2 = other_heap.min_root;
+ next1 = min1->right();
+ next2 = min2->right();
+
+ // To join the two circles, we join the minimum nodes to the next
+ // nodes on the opposite chains. Conceptually, it looks like the way
+ // two bubbles join to form one larger bubble. They meet at one point
+ // of contact, then expand out to make the bigger circle.
+ min1->set_right(next2);
+ next2->set_left(min1);
+ min2->set_right(next1);
+ next1->set_left(min2);
+
+ // Choose the new minimum for the heap
+ if (*min2 < *min1)
+ min_root = min2;
+ }
+ else
+ min_root = other_heap.min_root;
+
+ // Set the amortized analysis statistics and size of the new heap
+ num_nodes += other_heap.num_nodes;
+ num_marked_nodes += other_heap.num_marked_nodes;
+ num_trees += other_heap.num_trees;
+
+ // Complete the union by setting the other heap to emptiness
+ other_heap.soft_clear_();
+
+ mln_postcondition(other_heap.is_empty());
+ }
+
+
+ template <typename P, typename T>
+ inline
+ const T&
+ fibonacci_heap<P,T>::front() const
+ {
+ return min_root->value();
+ }
+
+
+ template <typename P, typename T>
+ inline
+ T
+ fibonacci_heap<P,T>::pop_front()
+ {
+ mln_precondition(is_valid());
+ mln_precondition(!is_empty());
+
+ internal::fibonacci_heap_node<P,T> *result = min_root;
+ fibonacci_heap<P,T> *child_heap = 0;
+
+ // Remove minimum node and set min_root to next node
+ min_root = result->right();
+ result->right()->set_left(result->left());
+ result->left()->set_right(result->right());
+ result->set_left(0);
+ result->set_right(0);
+
+ --num_nodes;
+ if (result->mark())
+ {
+ --num_marked_nodes;
+ result->set_mark(0);
+ }
+ result->set_degree(0);
+
+ // Attach child list of minimum node to the root list of the heap
+ // If there is no child list, then do no work
+ if (result->child() == 0)
+ {
+ if (min_root == result)
+ min_root = 0;
+ }
+
+ // If min_root==result then there was only one root tree, so the
+ // root list is simply the child list of that node (which is
+ // 0 if this is the last node in the list)
+ else if (min_root == result)
+ min_root = result->child();
+
+ // If min_root is different, then the child list is pushed into a
+ // new temporary heap, which is then merged by union() onto the
+ // root list of this heap.
+ else
+ {
+ child_heap = new fibonacci_heap<P,T>();
+ child_heap->min_root = result->child();
+ }
+
+ // Complete the disassociation of the result node from the heap
+ if (result->child() != 0)
+ result->child()->set_parent(0);
+ result->set_child(0);
+ result->set_parent(0);
+
+ // If there was a child list, then we now merge it with the
+ // rest of the root list
+ if (child_heap)
+ {
+ push(*child_heap);
+ delete child_heap;
+ }
+
+ // Consolidate heap to find new minimum and do reorganize work
+ if (min_root != 0)
+ consolidate();
+
+ // Return the minimum node, which is now disassociated with the heap
+ // It has left, right, parent, child, mark and degree cleared.
+ T val = result->value();
+ delete result;
+
+ return val;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ int
+ fibonacci_heap<P,T>::decrease_key(internal::fibonacci_heap_node<P,T> *node,
+ internal::fibonacci_heap_node<P,T>& key)
+ {
+ internal::fibonacci_heap_node<P,T> *parent;
+
+ if (node == 0 || *node < key)
+ return -1;
+
+ *node = key;
+
+ parent = node->parent();
+ if (parent != 0 && *node < *parent)
+ {
+ cut(node, parent);
+ cascading_cut(parent);
+ }
+
+ if (*node < *min_root)
+ min_root = node;
+
+ return 0;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ int
+ fibonacci_heap<P,T>::remove(internal::fibonacci_heap_node<P,T> *node)
+ {
+ internal::fibonacci_heap_node<P,T> temp;
+ int result;
+
+ if (node == 0)
+ return -1;
+
+ result = decrease_key(node, temp);
+
+ if (result == 0)
+ if (pop_front() == 0)
+ result = -1;
+
+ if (result == 0)
+ delete node;
+
+ return result;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ bool
+ fibonacci_heap<P,T>::is_empty() const
+ {
+ return min_root == 0;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ bool
+ fibonacci_heap<P,T>::is_valid() const
+ {
+ return min_root != 0;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::clear()
+ {
+ while (min_root != 0)
+ pop_front();
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::soft_clear_()
+ {
+ min_root = 0;
+ num_nodes = 0;
+ num_trees = 0;
+ num_marked_nodes = 0;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ unsigned
+ fibonacci_heap<P,T>::nelements() const
+ {
+ return num_nodes;
+ };
+
+
+ template <typename P, typename T>
+ inline
+ fibonacci_heap<P,T>&
+ fibonacci_heap<P,T>::operator=(fibonacci_heap<P,T>& rhs)
+ {
+ if (&rhs != this)
+ {
+ min_root = rhs.min_root;
+ num_nodes = rhs.num_nodes;
+ num_trees = rhs.num_trees;
+ num_marked_nodes = rhs.num_marked_nodes;
+ rhs.soft_clear_();
+ }
+ return *this;
+ }
+
+
+ template <typename P, typename T>
+ std::ostream&
+ fibonacci_heap<P,T>::print_(std::ostream& cout,
+ internal::fibonacci_heap_node<P,T> *tree,
+ internal::fibonacci_heap_node<P,T> *parent) const
+ {
+ internal::fibonacci_heap_node<P,T>* temp = 0;
+
+ if (tree == 0)
+ tree = min_root;
+
+ temp = tree;
+ if (temp != 0)
+ {
+ do {
+ if (temp->left() == 0)
+ cout << "(left is 0)";
+ temp->print_();
+ if (temp->parent() != parent)
+ cout << "(parent is incorrect)";
+ if (temp->right() == 0)
+ cout << "(right is 0)";
+ else if (temp->right()->left() != temp)
+ cout << "(Error in left link left) ->";
+ else
+ cout << " <-> ";
+
+ temp = temp->right();
+
+ } while (temp != 0 && temp != tree);
+ }
+ else
+ cout << " <empty>" << std::endl;
+ cout << std::endl;
+
+ temp = tree;
+ if (temp != 0)
+ {
+ do {
+ cout << "children of " << temp->value() << ": ";
+ if (temp->child() == 0)
+ cout << "NONE" << std::endl;
+ else print_(cout, temp->child(), temp);
+ temp = temp->right();
+ } while (temp!=0 && temp != tree);
+ }
+
+ return cout;
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void fibonacci_heap<P,T>::consolidate()
+ {
+ internal::fibonacci_heap_node<P,T> *x, *y, *w;
+ internal::fibonacci_heap_node<P,T> *a[1 + 8 * sizeof (long)]; // 1+lg(n)
+ short dn = 1 + 8 * sizeof (long);
+
+ // Initialize the consolidation detection array
+ for (int i = 0; i < dn; ++i)
+ a[i] = 0;
+
+ // We need to loop through all elements on root list.
+ // When a collision of degree is found, the two trees
+ // are consolidated in favor of the one with the lesser
+ // element key value. We first need to break the circle
+ // so that we can have a stopping condition (we can't go
+ // around until we reach the tree we started with
+ // because all root trees are subject to becoming a
+ // child during the consolidation).
+ min_root->left()->set_right(0);
+ min_root->set_left(0);
+ w = min_root;
+
+ short d;
+ do {
+ x = w;
+ d = x->degree();
+ w = w->right();
+
+ // We need another loop here because the consolidated result
+ // may collide with another large tree on the root list.
+ while (a[d] != 0)
+ {
+ y = a[d];
+ if (*y < *x)
+ exchange(x, y);
+ if (w == y) w = y->right();
+ link(y, x);
+ a[d] = 0;
+ ++d;
+ }
+ a[d] = x;
+
+ } while (w != 0);
+
+ // Now we rebuild the root list, find the new minimum,
+ // set all root list nodes' parent pointers to 0 and
+ // count the number of subtrees.
+ min_root = 0;
+ num_trees = 0;
+ for (int i = 0; i < dn; ++i)
+ if (a[i] != 0)
+ add_to_root_list(a[i]);
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::link(internal::fibonacci_heap_node<P,T> *y,
+ internal::fibonacci_heap_node<P,T> *x)
+ {
+ // Remove node y from root list
+ if (y->right() != 0)
+ y->right()->set_left(y->left());
+ if (y->left() != 0)
+ y->left()->set_right(y->right());
+ --num_trees;
+
+ // Make node y a singleton circular list with a parent of x
+ y->set_left(y);
+ y->set_right(y);
+ y->set_parent(x);
+
+ // If node x has no children, then list y is its new child list
+ if (x->child() == 0)
+ x->set_child(y);
+
+ // Otherwise, node y must be added to node x's child list
+ else
+ {
+ y->set_left(x->child());
+ y->set_right(x->child()->right());
+ x->child()->set_right(y);
+ y->right()->set_left(y);
+ }
+
+ // Increase the degree of node x because it's now a bigger tree
+ x->set_degree(x->degree() + 1);
+
+ // node y has just been made a child, so clear its mark
+ if (y->mark())
+ --num_marked_nodes;
+ y->set_mark(0);
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::add_to_root_list(internal::fibonacci_heap_node<P,T> *x)
+ {
+ if (x->mark())
+ --num_marked_nodes;
+ x->set_mark(0);
+
+ --num_nodes;
+ insert(x);
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::cut(internal::fibonacci_heap_node<P,T> *x,
+ internal::fibonacci_heap_node<P,T> *y)
+ {
+ if (y->child() == x)
+ y->child() = x->right();
+ if (y->child() == x)
+ y->child() = 0;
+
+ y->set_degree(y->degree() - 1);
+
+ x->left()->right() = x->right();
+ x->right()->left() = x->left();
+
+ add_to_root_list(x);
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::cascading_cut(internal::fibonacci_heap_node<P,T> *y)
+ {
+ internal::fibonacci_heap_node<P,T> *z = y->parent();
+
+ while (z != 0)
+ {
+ if (y->mark() == 0)
+ {
+ y->mark() = 1;
+ ++num_marked_nodes;
+ z = 0;
+ }
+ else
+ {
+ cut(y, z);
+ y = z;
+ z = y->parent();
+ }
+ }
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::insert(internal::fibonacci_heap_node<P,T> *node)
+ {
+ if (node == 0)
+ return;
+
+ // If the heap is currently empty, then new node becomes singleton
+ // circular root list
+ if (min_root == 0)
+ {
+ min_root = node;
+ node->set_left(node);
+ node->set_right(node);
+ }
+ else
+ {
+ // Pointers from node set to insert between min_root and
+ // min_root->right()
+ node->set_right(min_root->right());
+ node->set_left(min_root);
+
+ // Set Pointers to node
+ node->left()->set_right(node);
+ node->right()->set_left(node);
+
+ // The new node becomes new min_root if it is less than current
+ // min_root
+ if (*node < *min_root)
+ min_root = node;
+ }
+
+ // We have one more node in the heap, and it is a tree on the root list
+ ++num_nodes;
+ ++num_trees;
+ node->set_parent(0);
+ }
+
+
+ template <typename P, typename T>
+ inline
+ void
+ fibonacci_heap<P,T>::exchange(internal::fibonacci_heap_node<P,T>*& n1,
+ internal::fibonacci_heap_node<P,T>*& n2)
+ {
+ internal::fibonacci_heap_node<P,T> *temp;
+
+ temp = n1;
+ n1 = n2;
+ n2 = temp;
+ }
+
+
+ template <typename P, typename T>
+ std::ostream&
+ operator<<(std::ostream& cout, const fibonacci_heap<P,T>& heap)
+ {
+ return heap.print_(cout);
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+
+
+ } // end of namespace mln::util
+
+} // end of namespace mln
+
+#endif // ! MLN_UTIL_FIBONACCI_HEAP_HH
--
1.6.1.2
1
0
06 Apr '09
---
milena/ChangeLog | 4 ++++
milena/mln/util/ord_pair.hh | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f23692c..306a838 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,9 @@
2009-04-06 Roland Levillain <roland(a)lrde.epita.fr>
+ * mln/util/ord_pair.hh: Remove outdated FIXME.
+
+2009-04-06 Roland Levillain <roland(a)lrde.epita.fr>
+
Typos in comments.
* apps/statues/mesh-complex-max-curv-segm.cc,
diff --git a/milena/mln/util/ord_pair.hh b/milena/mln/util/ord_pair.hh
index 9802fab..674b98a 100644
--- a/milena/mln/util/ord_pair.hh
+++ b/milena/mln/util/ord_pair.hh
@@ -43,8 +43,6 @@ namespace mln
namespace util
{
- // FIXME: Rename as ord_pair.
-
/// Ordered pair structure s.a. this->first <= this->second;
/// ordered pairs are partially ordered using lexicographical
/// ordering.
--
1.6.1.2
1
0
* apps/statues/mesh-complex-max-curv-segm.cc,
* apps/statues/mesh-complex-segm.cc,
* tests/morpho/artificial_line_graph_image_wst.cc,
* tests/morpho/lena_line_graph_image_wst2.cc:
Here.
---
milena/ChangeLog | 10 ++++++++++
milena/apps/statues/mesh-complex-max-curv-segm.cc | 2 +-
milena/apps/statues/mesh-complex-segm.cc | 2 +-
.../morpho/artificial_line_graph_image_wst.cc | 2 +-
milena/tests/morpho/lena_line_graph_image_wst2.cc | 2 +-
5 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 910aac6..f23692c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,15 @@
2009-04-06 Roland Levillain <roland(a)lrde.epita.fr>
+ Typos in comments.
+
+ * apps/statues/mesh-complex-max-curv-segm.cc,
+ * apps/statues/mesh-complex-segm.cc,
+ * tests/morpho/artificial_line_graph_image_wst.cc,
+ * tests/morpho/lena_line_graph_image_wst2.cc:
+ Here.
+
+2009-04-06 Roland Levillain <roland(a)lrde.epita.fr>
+
Exercise apps/statues/mesh-complex-skel.
* apps/statues/test-mesh-complex-skel.in: New test.
diff --git a/milena/apps/statues/mesh-complex-max-curv-segm.cc b/milena/apps/statues/mesh-complex-max-curv-segm.cc
index e52d990..37d4fbb 100644
--- a/milena/apps/statues/mesh-complex-max-curv-segm.cc
+++ b/milena/apps/statues/mesh-complex-max-curv-segm.cc
@@ -125,7 +125,7 @@ int main(int argc, char* argv[])
| Simplification. |
`-----------------*/
- /// Adjancent edges are connected by shared polygons.
+ /// Adjacent edges are connected by shared polygons.
typedef
mln::complex_higher_dim_connected_n_face_neighborhood<D, G>
adj_edges_nbh_t;
diff --git a/milena/apps/statues/mesh-complex-segm.cc b/milena/apps/statues/mesh-complex-segm.cc
index b67d7f6..ab049fc 100644
--- a/milena/apps/statues/mesh-complex-segm.cc
+++ b/milena/apps/statues/mesh-complex-segm.cc
@@ -100,7 +100,7 @@ int main(int argc, char* argv[])
| Simplification. |
`-----------------*/
- /// Adjancent edges are connected by shared polygons.
+ /// Adjacent edges are connected by shared polygons.
typedef
mln::complex_higher_dim_connected_n_face_neighborhood<D, G>
adj_edges_nbh_t;
diff --git a/milena/tests/morpho/artificial_line_graph_image_wst.cc b/milena/tests/morpho/artificial_line_graph_image_wst.cc
index cf25180..65a31e6 100644
--- a/milena/tests/morpho/artificial_line_graph_image_wst.cc
+++ b/milena/tests/morpho/artificial_line_graph_image_wst.cc
@@ -39,7 +39,7 @@
\li create an artificial (checkboard) 2-D image ;
\li convert this 2-D image into a line graph-based one, where values
on edges are computed as the absolute value of the difference
- between the values on the vertices adjacent to the edge, so as to
+ between the values on the vertices adjacent to the edge, so as to
create a (norm of the) gradient ``between the pixels'' of the
input image;
\li perform a WST on this line graph image;
diff --git a/milena/tests/morpho/lena_line_graph_image_wst2.cc b/milena/tests/morpho/lena_line_graph_image_wst2.cc
index a7121ba..6922a83 100644
--- a/milena/tests/morpho/lena_line_graph_image_wst2.cc
+++ b/milena/tests/morpho/lena_line_graph_image_wst2.cc
@@ -39,7 +39,7 @@
\li load a 2-D, gray-level image from a PGM file;
\li convert this 2-D image into a line graph-based one, where values
on edges are computed as the absolute value of the difference
- between the values on the vertices adjacent to the edge, so as to
+ between the values on the vertices adjacent to the edge, so as to
create a (norm of the) gradient ``between the pixels'' of the
input image;
\li reduce the number of minima using an area opening (counting the
--
1.6.1.2
1
0
[PATCH 07/10] configure.ac: Configure milena/apps/statues/test-mesh-complex-skel.
by Roland Levillain 06 Apr '09
by Roland Levillain 06 Apr '09
06 Apr '09
---
ChangeLog | 4 ++++
configure.ac | 5 ++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 076c1f3..d14ea6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-06 Roland Levillain <roland(a)lrde.epita.fr>
+
+ * configure.ac: Configure milena/apps/statues/test-mesh-complex-skel.
+
2009-03-19 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
* configure.ac: configure tests/accu/site_set.
diff --git a/configure.ac b/configure.ac
index 3eac78d..00a99c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -289,7 +289,8 @@ AC_CONFIG_FILES([
#])
# Configure tests.
-# FIXME: Consider using `sed' instead of `configure' to create these tests.
+# FIXME: Consider using `sed' instead of `configure' to create these
+# tests for the sake of speed.
AC_CONFIG_FILES([milena/apps/statues/test-mesh-max-curv],
[chmod +x milena/apps/statues/test-mesh-max-curv])
AC_CONFIG_FILES([milena/apps/statues/test-mesh-complex-max-curv],
@@ -301,5 +302,7 @@ AC_CONFIG_FILES([milena/apps/statues/test-mesh-complex-segm],
AC_CONFIG_FILES([milena/apps/statues/test-mesh-complex-max-curv-segm],
[chmod +x milena/apps/statues/test-mesh-complex-max-curv-segm])
+AC_CONFIG_FILES([milena/apps/statues/test-mesh-complex-skel],
+ [chmod +x milena/apps/statues/test-mesh-complex-skel])
AC_OUTPUT
--
1.6.1.2
1
0