I haven't checked whether this bug has been fixed in SWIG's
Subversion repository yet (but it wasn't present in SWIG 1.3.28).
2006-07-04 Roland Levillain <roland(a)lrde.epita.fr>
Work around a bug in SWIG 1.3.29.
* generate_arith_instantiations.py (write_algorithms)
* generate_morpho_instantiations.py (write_algorithms): Work
around a bug in SWIG 1.3.29 in the generation of C++ wrappers.
Index: 10.229/tools/swilena/generate_morpho_instantiations.py
--- 10.229/tools/swilena/generate_morpho_instantiations.py Fri, 30 Jun 2006 17:26:15 +0200 levill_r (oln/v/24_generate_m 1.8.1.1 700)
+++ 10.229(w)/tools/swilena/generate_morpho_instantiations.py Mon, 03 Jul 2006 12:23:42 +0200 levill_r (oln/v/24_generate_m 1.8.1.1 700)
@@ -57,7 +57,13 @@
"ntg_int_u8", "ntg_int_u32",
"ntg_int_s8", "ntg_int_s32",
"ntg_float" ]:
- img_type = "::oln::image%(dim)sd< %(type)s >" % vars()
+ # FIXME: SWIG 1.3.29 Bug. We used to refer to `oln::image' from
+ # the global (top-level) namespace, i.e. `::oln::image',
+ # but it makes swig 1.3.29 generate invalid C++ code when
+ # used ad a template argument: the space between `<' and
+ # `::' is eaten by swig, and `<:' is understood as a
+ # trigraph (for `[') by the C++ compiler.
+ img_type = "oln::image%(dim)sd< %(type)s >" % vars()
win_type = "::oln::window%(dim)sd" % vars()
neighb_type = "::oln::neighborhood%(dim)sd" % vars()
@@ -135,10 +141,12 @@
instantiate(idx, "top_hat_contrast_op", img_type, img_type, win_type)
instantiate(idx, "fast_top_hat_contrast_op", img_type, img_type, win_type)
# Watershed
- img_ret_type = "::oln::image%(dim)sd< ntg_int_u32 >" % vars()
+ # FIXME: SWIG 1.3.29 Bug (same as above).
+ img_ret_type = "oln::image%(dim)sd< ntg_int_u32 >" % vars()
instantiate(idx, "watershed_seg", img_ret_type, img_type, neighb_type)
instantiate(idx, "watershed_con", img_ret_type, img_type, neighb_type)
- bin_img_type = "::oln::image%(dim)sd< ntg_bin >" % vars()
+ # FIXME: SWIG 1.3.29 Bug (same as above).
+ bin_img_type = "oln::image%(dim)sd< ntg_bin >" % vars()
instantiate(idx, "sure_minima_imposition", img_type, img_type, bin_img_type, neighb_type)
instantiate(idx, "sequential_minima_imposition", img_type, img_type, bin_img_type, neighb_type)
instantiate(idx, "hybrid_minima_imposition", img_type, img_type, bin_img_type, neighb_type)
Index: 10.229/tools/swilena/generate_arith_instantiations.py
--- 10.229/tools/swilena/generate_arith_instantiations.py Fri, 30 Jun 2006 17:26:15 +0200 levill_r (oln/v/51_generate_a 1.1.1.1 700)
+++ 10.229(w)/tools/swilena/generate_arith_instantiations.py Mon, 03 Jul 2006 11:44:33 +0200 levill_r (oln/v/51_generate_a 1.1.1.1 700)
@@ -59,13 +59,19 @@
"ntg_int_u8", "ntg_int_u32",
"ntg_int_s8", "ntg_int_s32",
"ntg_float" ]:
- img_type = "::oln::image%(dim)sd< %(type)s >" % vars()
+ # FIXME: SWIG 1.3.29 Bug. We used to refer to `oln::image' from
+ # the global (top-level) namespace, i.e. `::oln::image',
+ # but it makes swig 1.3.29 generate invalid C++ code when
+ # used ad a template argument: the space between `<' and
+ # `::' is eaten by swig, and `<:' is understood as a
+ # trigraph (for `[') by the C++ compiler.
+ img_type = "oln::image%(dim)sd< %(type)s >" % vars()
bigger_type = get_bigger_type(type)
- return_img_type = "::oln::image%(dim)sd< %(bigger_type)s >" % vars()
+ return_img_type = "oln::image%(dim)sd< %(bigger_type)s >" % vars()
# FIXME: these algorithms do not work with bin
if type != "ntg_bin":
- for algo in [ "plus", "minus", "times", "div" ]:
+ for algo in [ "plus", "minus", "times", "div" ]:
instantiate(dim, algo, return_img_type, img_type, img_type)
instantiate(dim, "min", return_img_type, img_type, img_type)
2006-08-31 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
Add dpoint, oln traits, and operators on point/dpoint.
* oln/core/type.hh: New.
* oln/core/traits_id.hh: New.
* oln/core/abstract/dpoint.hh: New.
* oln/core/abstract/dpoint_nd.hh: New.
* oln/core/traits.hh: New.
* oln/core/2d/dpoint2d.hh: New.
* oln/core/abstract/point.hh (point): Add inheritance to
oln::type.
(operators): New.
* oln/core/abstract/point_nd.hh (point_): New meta-function.
(impl_eq): Rename as...
(impl_equal): ...this.
(coord): Rename as...
(coord_t): ...this.
(impl_less): New.
(impl_plus_equal, impl_plus): New.
(impl_minus_equal, impl_minus, impl_minus): New.
(vec): New.
(case_): New specializations.
(point_nd): New ctor.
* oln/core/2d/point2d.hh: Update forward declarations.
(point_, dpoint_): New specializations.
(point2d): New ctor.
(coord): Rename as...
(coord_t): ...this.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 509)
+++ ChangeLog (working copy)
@@ -1,5 +1,7 @@
2006-08-30 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
+ Start point hierarchy.
+
* oln/core/typedefs.hh (oln_type_of): New macro.
(dim_type): New typedef decl.
* oln/core/abstract/point.hh: New.
Index: oln/core/type.hh
===================================================================
--- oln/core/type.hh (revision 0)
+++ oln/core/type.hh (revision 0)
@@ -0,0 +1,44 @@
+// Copyright (C) 2006 EPITA Research and Development Laboratory
+//
+// 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 OLENA_CORE_TYPE_HH
+# define OLENA_CORE_TYPE_HH
+
+
+namespace oln
+{
+
+ struct type
+ {
+ protected:
+ type() {}
+ };
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_TYPE_HH
Index: oln/core/traits_id.hh
===================================================================
--- oln/core/traits_id.hh (revision 0)
+++ oln/core/traits_id.hh (revision 0)
@@ -0,0 +1,69 @@
+// Copyright (C) 2006 EPITA Research and Development Laboratory
+//
+// 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 OLENA_CORE_TRAITS_ID_HH
+# define OLENA_CORE_TRAITS_ID_HH
+
+# include <oln/core/traits.hh>
+
+
+namespace oln
+{
+
+ namespace id
+ {
+
+
+ /// \{
+ /// Identifiers for oln operators +.
+
+ enum {
+ op_plus_pointnd_dpointnd = 1
+ };
+
+ /// \}
+
+
+
+ /// \{
+ /// Identifiers for oln operators -.
+
+ enum {
+ op_minus_pointnd_pointnd = 1,
+ op_minus_pointnd_dpointnd = 2
+ };
+
+ /// \}
+
+
+ } // end of namespace oln::id
+
+} // end of namespace oln
+
+
+
+#endif // ! OLENA_CORE_TRAITS_ID_HH
Index: oln/core/abstract/point.hh
===================================================================
--- oln/core/abstract/point.hh (revision 509)
+++ oln/core/abstract/point.hh (working copy)
@@ -34,28 +34,264 @@
# include <stc/any.hh>
# include <stc/vtypes.hh>
+# include <stc/exact.hh>
+# include <oln/core/type.hh>
# include <oln/core/typedefs.hh>
+# include <oln/core/abstract/dpoint.hh>
+# include <oln/core/traits_id.hh>
+
namespace oln {
+
+ namespace ERROR
+ {
+ struct OPERANDS_ARE_NOT_COMPATIBLE;
+
+ } // end of namespace oln::ERROR
+
+
+
namespace abstract {
+
/// Abstract point class.
template <typename E>
- class point : public stc::any__simple<E>
+ class point : public stc::any__simple<E>,
+ public oln::type
{
+ typedef E exact_t;
+ typedef oln_type_of(E, dpoint) dpoint_t;
+
public:
- bool operator==(const abstract::point<E>& rhs) const
+
+ /// \{
+ /// Operator ==.
+
+ bool operator==(const exact_t& rhs) const
{
- return this->exact().impl_eq(rhs.exact());
+ return this->exact().impl_equal(rhs);
}
+ template <typename P>
+ bool operator==(const abstract::point<P>& rhs) const
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(P, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return this->exact().impl_equal(rhs.exact());
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator !=.
+
+ bool operator!=(const exact_t& rhs) const
+ {
+ return not (*this == rhs);
+ }
+
+ template <typename P>
+ bool operator!=(const abstract::point<P>& rhs) const
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(P, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return not (*this == rhs);
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator <.
+
+ bool operator<(const exact_t& rhs) const
+ {
+ return this->exact().impl_less(rhs);
+ }
+
+ template <typename P>
+ bool operator<(const abstract::point<P>& rhs) const
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(P, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return this->exact().impl_less(rhs.exact());
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator >.
+
+ bool operator>(const exact_t& rhs) const
+ {
+ return rhs < *this;
+ }
+
+ template <typename P>
+ bool operator>(const abstract::point<P>& rhs) const
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(P, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return rhs < *this;
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator >=.
+
+ bool operator>=(const exact_t& rhs) const
+ {
+ return not (*this < rhs);
+ }
+
+ template <typename P>
+ bool operator>=(const abstract::point<P>& rhs) const
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(P, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return not (*this < rhs);
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator <=.
+
+ bool operator<=(const exact_t& rhs) const
+ {
+ return not (rhs < *this);
+ }
+
+ template <typename P>
+ bool operator<=(const abstract::point<P>& rhs) const
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(P, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return not (rhs < *this);
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator +=.
+
+ exact_t& operator+=(const dpoint_t& rhs)
+ {
+ return this->exact().impl_plus_equal(rhs);
+ }
+
+ template <typename D>
+ exact_t& operator+=(const abstract::dpoint<D>& rhs)
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(D, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return this->exact().impl_plus_equal(rhs.exact());
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator +.
+
+ exact_t operator+(const dpoint_t& rhs) const
+ {
+ return this->exact().impl_plus(rhs);
+ }
+
+ template <typename D>
+ xtd_op_plus_trait(E,D) operator+(const abstract::dpoint<D>& rhs)
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(D, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return this->exact().impl_plus(rhs.exact());
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator -=.
+
+ exact_t& operator-=(const dpoint_t& rhs)
+ {
+ return this->exact().impl_minus_equal(rhs);
+ }
+
+ template <typename D>
+ exact_t& operator-=(const abstract::dpoint<D>& rhs) const
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(D, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return this->exact().impl_minus_equal(rhs.exact());
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator -.
+
+ exact_t operator-(const dpoint_t& rhs) const
+ {
+ return this->exact().impl_minus(rhs);
+ }
+
+ template <typename D>
+ xtd_op_minus_trait(E, D) operator-(const abstract::dpoint<D>& rhs) const
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(D, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return this->exact().impl_minus(rhs.exact());
+ }
+
+ /// \}
+
+
+ /// \{
+ /// Operator -.
+
+ dpoint_t operator-(const exact_t& rhs) const
+ {
+ return this->exact().impl_minus(rhs);
+ }
+
+ template <typename P>
+ xtd_op_minus_trait(E, P) operator-(const abstract::point<P>& rhs) const
+ {
+ mlc::assert_equal_< oln_type_of(E, grid),
+ oln_type_of(P, grid),
+ oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
+ return this->exact().impl_minus(rhs.exact());
+ }
+
+ /// \}
+
+
protected:
+
point()
{}
@@ -69,6 +305,8 @@
} // end of namespace oln::abstract
+
+
} // end of namespace oln
Index: oln/core/abstract/point_nd.hh
===================================================================
--- oln/core/abstract/point_nd.hh (revision 509)
+++ oln/core/abstract/point_nd.hh (working copy)
@@ -30,52 +30,164 @@
# define OLENA_CORE_ABSTRACT_POINT_ND_HH
# include <mlc/value.hh>
+
# include <xtd/vec.hh>
+# include <xtd/optraits.hh>
+
+# include <oln/core/traits_id.hh>
# include <oln/core/abstract/point.hh>
+# include <oln/core/abstract/dpoint_nd.hh>
namespace oln
{
+
+
+ /// Function "point_ : (n, coord) -> point type".
+ template <unsigned n, typename C>
+ struct point_
+ {
+ typedef mlc::undefined ret;
+ };
+
+
+
namespace abstract
{
template <typename E>
class point_nd : public abstract::point<E>
{
- typedef point_nd<E> self;
+ typedef point_nd<E> self_t;
typedef oln_type_of(E, dim) dim;
- typedef oln_type_of(E, coord) coord;
+ typedef oln_type_of(E, coord) coord_t;
+ typedef oln_type_of(E, dpoint) dpoint_t;
public:
enum { n = mlc_value(dim) };
-
- bool impl_eq(const self& rhs) const
- {
- return v_ == rhs.v_;
- }
- const coord operator[](unsigned i) const
+ coord_t operator[](unsigned i) const
{
assert(i < n);
return v_[i];
}
- coord& operator[](unsigned i)
+ coord_t& operator[](unsigned i)
{
assert(i < n);
return v_[i];
}
+ bool impl_equal(const self_t& rhs) const
+ {
+ return v_ == rhs.vec();
+ }
+
+ bool impl_less(const self_t& rhs) const
+ {
+ return xtd::lexi(v_, rhs.vec());
+ }
+
+ E& impl_plus_equal(const dpoint_t& rhs)
+ {
+ v_ += rhs.vec();
+ return this->exact();
+ }
+
+ E impl_plus(const dpoint_t& rhs) const
+ {
+ E tmp(v_ + rhs.vec());
+ return tmp;
+ }
+
+ E& impl_minus_equal(const dpoint_t& rhs)
+ {
+ v_ += rhs.vec();
+ return this->exact();
+ }
+
+ E impl_minus(const dpoint_t& rhs) const
+ {
+ E tmp(v_ - rhs.vec());
+ return tmp;
+ }
+
+ dpoint_t impl_minus(const self_t& rhs) const
+ {
+ dpoint_t tmp(v_ - rhs.vec());
+ return tmp;
+ }
+
+ const xtd::vec<n,coord_t>& vec() const
+ {
+ return v_;
+ }
+
protected:
- xtd::vec<n,coord> v_;
+ /// Ctor.
+ point_nd()
+ {}
+
+ /// Ctor.
+ point_nd(const xtd::vec<n,coord_t>& v) :
+ v_(v)
+ {}
+
+ xtd::vec<n,coord_t> v_;
};
} // end of namespace oln::abstract
+
+ /// abstract::point_nd + abstract::dpoint_nd
+ template <typename P, typename D>
+ struct case_ < xtd::op_plus, mlc::pair_<P,D>,
+ oln::id::op_plus_pointnd_dpointnd >
+ : where_< mlc::and_< mlc_is_a(P, abstract::point_nd),
+ mlc_is_a(D, abstract::dpoint_nd) > >
+ {
+ typedef oln_type_of(P, coord) P_coord;
+ typedef oln_type_of(D, coord) D_coord;
+ typedef xtd_op_plus_trait(P_coord, D_coord) coord;
+ typedef oln_type_of(P, dim) dim;
+ typedef typename point_<mlc_value(dim), coord>::ret ret;
+ };
+
+
+ /// abstract::point_nd - abstract::dpoint_nd
+ template <typename P, typename D>
+ struct case_ < xtd::op_minus, mlc::pair_<P,D>,
+ oln::id::op_minus_pointnd_dpointnd >
+ : where_< mlc::and_< mlc_is_a(P, abstract::point_nd),
+ mlc_is_a(D, abstract::dpoint_nd) > >
+ {
+ typedef oln_type_of(P, coord) P_coord;
+ typedef oln_type_of(D, coord) D_coord;
+ typedef xtd_op_minus_trait(P_coord, D_coord) coord;
+ typedef oln_type_of(P, dim) dim;
+ typedef typename point_<mlc_value(dim), coord>::ret ret;
+ };
+
+
+ /// abstract::point_nd - abstract::point_nd
+ template <typename P1, typename P2>
+ struct case_ < xtd::op_minus, mlc::pair_<P1,P2>,
+ oln::id::op_minus_pointnd_pointnd >
+ : where_< mlc::and_< mlc_is_a(P1, abstract::point_nd),
+ mlc_is_a(P2, abstract::point_nd) > >
+ {
+ typedef oln_type_of(P1, coord) P1_coord;
+ typedef oln_type_of(P2, coord) P2_coord;
+ typedef xtd_op_minus_trait(P1_coord, P2_coord) coord;
+ typedef oln_type_of(P1, dim) dim;
+ typedef typename dpoint_<mlc_value(dim), coord>::ret ret;
+ };
+
+
} // end of namespace oln
Index: oln/core/abstract/dpoint.hh
===================================================================
--- oln/core/abstract/dpoint.hh (revision 0)
+++ oln/core/abstract/dpoint.hh (revision 0)
@@ -0,0 +1,100 @@
+// Copyright (C) 2001, 2002, 2003, 2004, 2006 EPITA Research and
+// Development Laboratory
+//
+// 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 OLENA_CORE_ABSTRACT_DPOINT_HH
+# define OLENA_CORE_ABSTRACT_DPOINT_HH
+
+# include <mlc/assert.hh>
+# include <mlc/cmp.hh>
+
+# include <stc/any.hh>
+# include <stc/vtypes.hh>
+
+# include <oln/core/type.hh>
+# include <oln/core/typedefs.hh>
+
+
+
+
+namespace oln
+{
+
+
+ /// Function "dpoint_ : (n, coord) -> dpoint type".
+ template <unsigned n, typename C>
+ struct dpoint_
+ {
+ typedef mlc::undefined ret;
+ };
+
+
+ namespace abstract
+ {
+
+ /// Abstract dpoint class.
+ template <typename E>
+ class dpoint : public stc::any__simple<E>,
+ public oln::type
+ {
+ public:
+
+ bool operator==(const abstract::dpoint<E>& rhs) const
+ {
+ return this->exact().impl_eq(rhs.exact());
+ }
+
+ bool operator!=(const abstract::dpoint<E>& rhs) const { return not (*this == rhs); }
+
+ bool operator<(const abstract::dpoint<E>& rhs) const
+ {
+ return this->exact().impl_less(rhs.exact());
+ }
+
+ bool operator> (const abstract::dpoint<E>& rhs) const { return rhs < *this; }
+ bool operator>=(const abstract::dpoint<E>& rhs) const { return not (*this < rhs); }
+ bool operator<=(const abstract::dpoint<E>& rhs) const { return not (rhs < *this); }
+
+ protected:
+ dpoint()
+ {}
+
+ ~dpoint() {
+ mlc::assert_defined_< oln_type_of(E, grid) >::check();
+ mlc::assert_defined_< oln_type_of(E, point) >::check();
+ mlc::assert_defined_< oln_type_of(E, coord) >::check();
+ mlc::assert_defined_< oln_type_of(E, dim) >::check();
+ }
+ };
+
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_DPOINT_HH
Index: oln/core/abstract/dpoint_nd.hh
===================================================================
--- oln/core/abstract/dpoint_nd.hh (revision 0)
+++ oln/core/abstract/dpoint_nd.hh (revision 0)
@@ -0,0 +1,96 @@
+// Copyright (C) 2001, 2002, 2003, 2004, 2006 EPITA Research and
+// Development Laboratory
+//
+// 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 OLENA_CORE_ABSTRACT_DPOINT_ND_HH
+# define OLENA_CORE_ABSTRACT_DPOINT_ND_HH
+
+# include <mlc/value.hh>
+# include <xtd/vec.hh>
+# include <oln/core/abstract/dpoint.hh>
+
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ template <typename E>
+ class dpoint_nd : public abstract::dpoint<E>
+ {
+ typedef dpoint_nd<E> self_t;
+ typedef oln_type_of(E, dim) dim;
+ typedef oln_type_of(E, coord) coord_t;
+
+ public:
+
+ enum { n = mlc_value(dim) };
+
+ bool impl_equal(const self_t& rhs) const
+ {
+ return v_ == rhs.v_;
+ }
+
+ coord_t operator[](unsigned i) const
+ {
+ assert(i < n);
+ return v_[i];
+ }
+
+ coord_t& operator[](unsigned i)
+ {
+ assert(i < n);
+ return v_[i];
+ }
+
+ const xtd::vec<n,coord_t>& vec() const
+ {
+ return v_;
+ }
+
+ protected:
+
+ /// Ctor.
+ dpoint_nd()
+ {}
+
+ /// Ctor.
+ dpoint_nd(const xtd::vec<n,coord_t>& v) :
+ v_(v)
+ {}
+
+ xtd::vec<n,coord_t> v_;
+ };
+
+ } // end of namespace oln::abstract
+
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_DPOINT_ND_HH
Index: oln/core/traits.hh
===================================================================
--- oln/core/traits.hh (revision 0)
+++ oln/core/traits.hh (revision 0)
@@ -0,0 +1,95 @@
+// Copyright (C) 2006 EPITA Research and Development Laboratory
+//
+// 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 OLENA_CORE_TRAITS_HH
+# define OLENA_CORE_TRAITS_HH
+
+
+# include <mlc/assert.hh>
+# include <mlc/case.hh>
+# include <mlc/abort.hh>
+# include <xtd/optraits.hh>
+# include <stc/exact.hh>
+
+# include <oln/core/type.hh>
+
+
+mlc_case_equipment_for_namespace(oln);
+
+
+
+namespace oln
+{
+
+ template <typename data> struct default_case_ < xtd::op_eq, data > { typedef bool ret; };
+ template <typename data> struct default_case_ < xtd::op_neq, data > { typedef bool ret; };
+ template <typename data> struct default_case_ < xtd::op_less, data > { typedef bool ret; };
+ template <typename data> struct default_case_ < xtd::op_leq, data > { typedef bool ret; };
+ template <typename data> struct default_case_ < xtd::op_greater, data > { typedef bool ret; };
+ template <typename data> struct default_case_ < xtd::op_geq, data > { typedef bool ret; };
+
+} // end of namespace oln
+
+
+
+namespace xtd
+{
+
+ static const unsigned oln_xtd_case_op_id = 2;
+
+
+ template <typename name,
+ typename T>
+ struct case_ < xtd::op_<name>, T,
+ oln_xtd_case_op_id > : public mlc::where_< mlc_is_a(T, oln::type) >
+ {
+ struct protected_ {
+ typedef typename oln::switch_< xtd::op_<name>,
+ stc_to_exact(T) >::ret ret;
+ };
+ };
+
+
+ template <typename name,
+ typename L, typename R>
+ struct case_ < xtd::op_<name>, mlc::pair_<L, R>,
+ oln_xtd_case_op_id > : public mlc::where_< mlc::or_<mlc_is_a(L, oln::type),
+ mlc_is_a(R, oln::type)> >
+ {
+ struct protected_ {
+ typedef typename oln::switch_< xtd::op_<name>,
+ mlc::pair_<stc_to_exact(L),
+ stc_to_exact(R)> >::ret ret;
+ };
+ };
+
+
+} // end of namespace xtd
+
+
+
+#endif // ! OLENA_CORE_TRAITS_HH
Index: oln/core/2d/dpoint2d.hh
===================================================================
--- oln/core/2d/dpoint2d.hh (revision 0)
+++ oln/core/2d/dpoint2d.hh (revision 0)
@@ -0,0 +1,95 @@
+// Copyright (C) 2001, 2002, 2003, 2004, 2006 EPITA Research and Development Laboratory
+//
+// 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 OLENA_CORE_2D_DPOINT2D_HH
+# define OLENA_CORE_2D_DPOINT2D_HH
+
+# include <mlc/int.hh>
+# include <oln/core/2d/point2d.hh>
+# include <oln/core/abstract/dpoint_nd.hh>
+
+
+namespace oln
+{
+
+
+// /// Super type.
+// template<typename C>
+// struct set_super_type< dpoint2d_<C> >
+// {
+// typedef abstract::dpoint< dpoint2d_<C> > ret;
+// };
+
+
+ /// Virtual types associated to oln::abstract::image.
+ template <typename C>
+ struct vtypes_< dpoint2d_<C> >
+ {
+ typedef grid2d grid_type;
+ typedef point2d point_type;
+ typedef C coord_type;
+ typedef mlc::uint_<2> dim_type;
+ };
+
+
+ /// General 2D dpoint class.
+ template <typename C>
+ class dpoint2d_ : public abstract::dpoint_nd< dpoint2d_<C> > // FIXME: stc_get_super_(dpoint2d_<C>)
+ {
+ typedef dpoint2d_<C> self_t;
+ typedef abstract::dpoint_nd<self_t> super_t; // FIXME: stc_get_super(self)
+ typedef oln_type_of(self_t, coord) coord_t;
+
+ using super_t::v_;
+
+ public:
+
+ /// Ctor.
+ dpoint2d_()
+ {
+ }
+
+ /// Ctor.
+ dpoint2d_(const xtd::vec<2,coord_t>& v) :
+ super_t(v)
+ {
+ }
+
+ coord_t row() const { return v_[0]; }
+ coord_t& row() { return v_[0]; }
+
+ coord_t col() const { return v_[1]; }
+ coord_t& col() { return v_[1]; }
+ };
+
+
+
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_2D_DPOINT2D_HH
Index: oln/core/2d/point2d.hh
===================================================================
--- oln/core/2d/point2d.hh (revision 509)
+++ oln/core/2d/point2d.hh (working copy)
@@ -28,6 +28,8 @@
#ifndef OLENA_CORE_2D_POINT2D_HH
# define OLENA_CORE_2D_POINT2D_HH
+# include <string>
+
# include <mlc/int.hh>
# include <oln/core/abstract/point_nd.hh>
@@ -35,20 +37,36 @@
namespace oln
{
- // Forward declarations.
+
+ /// \{
+ /// Forward declarations.
template <typename C> class point2d_;
- class dpoint2d;
+ template <typename C> class dpoint2d_;
class grid2d;
+ /// \}
-// /// Super type.
-// template<typename C>
-// struct set_super_type< point2d_<C> >
-// {
-// typedef abstract::point< point2d_<C> > ret;
-// };
+ /// \{
+ /// Classical 2D point classes.
+ typedef point2d_<int> point2d;
+ typedef point2d_<float> point2df;
+ /// \}
+ /// \{
+ /// Classical 2D point classes.
+ typedef dpoint2d_<int> dpoint2d;
+ typedef dpoint2d_<float> dpoint2df;
+ /// \}
+
+
+ /// \{
+ /// Specializations of functions point and dpoint : (n,coord) -> type for n = 2.
+ template <typename C> struct point_ <2, C> { typedef point2d_<C> ret; };
+ template <typename C> struct dpoint_ <2, C> { typedef dpoint2d_<C> ret; };
+ /// \}
+
+
/// Virtual types associated to oln::abstract::image.
template <typename C>
struct vtypes_< point2d_<C> >
@@ -64,27 +82,36 @@
template <typename C>
class point2d_ : public abstract::point_nd< point2d_<C> > // FIXME: stc_get_super_(point2d_<C>)
{
- typedef point2d_<C> self;
- typedef abstract::point_nd<self> super; // FIXME: stc_get_super(self)
- typedef oln_type_of(self, coord) coord;
+ typedef point2d_<C> self_t;
+ typedef abstract::point_nd<self_t> super_t;
+ typedef oln_type_of(self_t, coord) coord_t;
- using super::v_;
+ using super_t::v_;
public:
- const coord row() const { return v_[0]; }
- coord& row() { return v_[0]; }
+ /// Ctor.
+ point2d_()
+ {
+ }
- const coord col() const { return v_[1]; }
- coord& col() { return v_[1]; }
- };
+ /// Ctor.
+ point2d_(const xtd::vec<2,coord_t>& v) :
+ super_t(v)
+ {
+ }
+ coord_t row() const { return v_[0]; }
+ coord_t& row() { return v_[0]; }
- /// Classical 2D point class.
- typedef point2d_<int> point2d;
+ coord_t col() const { return v_[1]; }
+ coord_t& col() { return v_[1]; }
+ };
} // end of namespace oln
+# include <oln/core/2d/dpoint2d.hh>
+
#endif // ! OLENA_CORE_2D_POINT2D_HH
2006-08-30 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
Start point hierarchy.
* oln/core/typedefs.hh (oln_type_of): New macro.
(dim_type): New typedef decl.
* oln/core/abstract/point.hh: New.
* oln/core/abstract/point_nd.hh: New.
* oln/core/2d/point2d.hh: New.
\svn ci
Index: oln/core/typedefs.hh
===================================================================
--- oln/core/typedefs.hh (revision 506)
+++ oln/core/typedefs.hh (working copy)
@@ -37,6 +37,18 @@
# include <stc/vtypes.hh>
+
+/*! \macro oln_type_of(OlnType, Alias)
+**
+** Macro to retrieve an associated type \Alias from an oln type
+** \OlnType whose category is not specified.
+*/
+
+# define oln_type_of(OlnType, Alias) \
+stc_type_of(oln, void, OlnType, Alias)
+
+
+
namespace oln
{
@@ -48,6 +60,7 @@
// triggers Metalic's typedef introspection equipment.
stc_equip_namespace_with_vtypes();
+
/*-------.
| Misc. |
`-------*/
@@ -154,6 +167,13 @@
mlc_decl_typedef(coord_type);
+ /*-----------------.
+ | category::point. |
+ `-----------------*/
+
+ mlc_decl_typedef(dim_type);
+
+
/*------------------------------------.
| category::fun1 and category::fun2. |
`------------------------------------*/
Index: oln/core/abstract/point.hh
===================================================================
--- oln/core/abstract/point.hh (revision 0)
+++ oln/core/abstract/point.hh (revision 0)
@@ -0,0 +1,75 @@
+// Copyright (C) 2001, 2002, 2003, 2004, 2006 EPITA Research and
+// Development Laboratory
+//
+// 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 OLENA_CORE_ABSTRACT_POINT_HH
+# define OLENA_CORE_ABSTRACT_POINT_HH
+
+# include <mlc/assert.hh>
+# include <mlc/cmp.hh>
+
+# include <stc/any.hh>
+# include <stc/vtypes.hh>
+
+# include <oln/core/typedefs.hh>
+
+
+
+
+namespace oln {
+
+ namespace abstract {
+
+ /// Abstract point class.
+ template <typename E>
+ class point : public stc::any__simple<E>
+ {
+ public:
+
+ bool operator==(const abstract::point<E>& rhs) const
+ {
+ return this->exact().impl_eq(rhs.exact());
+ }
+
+ protected:
+ point()
+ {}
+
+ ~point() {
+ mlc::assert_defined_< oln_type_of(E, grid) >::check();
+ mlc::assert_defined_< oln_type_of(E, dpoint) >::check();
+ mlc::assert_defined_< oln_type_of(E, coord) >::check();
+ mlc::assert_defined_< oln_type_of(E, dim) >::check();
+ }
+ };
+
+ } // end of namespace oln::abstract
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_POINT_HH
Index: oln/core/abstract/point_nd.hh
===================================================================
--- oln/core/abstract/point_nd.hh (revision 0)
+++ oln/core/abstract/point_nd.hh (revision 0)
@@ -0,0 +1,82 @@
+// Copyright (C) 2001, 2002, 2003, 2004, 2006 EPITA Research and
+// Development Laboratory
+//
+// 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 OLENA_CORE_ABSTRACT_POINT_ND_HH
+# define OLENA_CORE_ABSTRACT_POINT_ND_HH
+
+# include <mlc/value.hh>
+# include <xtd/vec.hh>
+# include <oln/core/abstract/point.hh>
+
+
+namespace oln
+{
+
+ namespace abstract
+ {
+
+ template <typename E>
+ class point_nd : public abstract::point<E>
+ {
+ typedef point_nd<E> self;
+ typedef oln_type_of(E, dim) dim;
+ typedef oln_type_of(E, coord) coord;
+
+ public:
+
+ enum { n = mlc_value(dim) };
+
+ bool impl_eq(const self& rhs) const
+ {
+ return v_ == rhs.v_;
+ }
+
+ const coord operator[](unsigned i) const
+ {
+ assert(i < n);
+ return v_[i];
+ }
+
+ coord& operator[](unsigned i)
+ {
+ assert(i < n);
+ return v_[i];
+ }
+
+ protected:
+
+ xtd::vec<n,coord> v_;
+ };
+
+ } // end of namespace oln::abstract
+
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_ABSTRACT_POINT_ND_HH
Index: oln/core/2d/point2d.hh
===================================================================
--- oln/core/2d/point2d.hh (revision 0)
+++ oln/core/2d/point2d.hh (revision 0)
@@ -0,0 +1,90 @@
+// Copyright (C) 2001, 2002, 2003, 2004, 2006 EPITA Research and Development Laboratory
+//
+// 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 OLENA_CORE_2D_POINT2D_HH
+# define OLENA_CORE_2D_POINT2D_HH
+
+# include <mlc/int.hh>
+# include <oln/core/abstract/point_nd.hh>
+
+
+namespace oln
+{
+
+ // Forward declarations.
+ template <typename C> class point2d_;
+ class dpoint2d;
+ class grid2d;
+
+
+// /// Super type.
+// template<typename C>
+// struct set_super_type< point2d_<C> >
+// {
+// typedef abstract::point< point2d_<C> > ret;
+// };
+
+
+ /// Virtual types associated to oln::abstract::image.
+ template <typename C>
+ struct vtypes_< point2d_<C> >
+ {
+ typedef grid2d grid_type;
+ typedef dpoint2d dpoint_type;
+ typedef C coord_type;
+ typedef mlc::uint_<2> dim_type;
+ };
+
+
+ /// General 2D point class.
+ template <typename C>
+ class point2d_ : public abstract::point_nd< point2d_<C> > // FIXME: stc_get_super_(point2d_<C>)
+ {
+ typedef point2d_<C> self;
+ typedef abstract::point_nd<self> super; // FIXME: stc_get_super(self)
+ typedef oln_type_of(self, coord) coord;
+
+ using super::v_;
+
+ public:
+
+ const coord row() const { return v_[0]; }
+ coord& row() { return v_[0]; }
+
+ const coord col() const { return v_[1]; }
+ coord& col() { return v_[1]; }
+ };
+
+
+ /// Classical 2D point class.
+ typedef point2d_<int> point2d;
+
+
+} // end of namespace oln
+
+
+#endif // ! OLENA_CORE_2D_POINT2D_HH
2006-08-29 Roland Levillain <roland(a)lrde.epita.fr>
Add a third version of the computation of a the max-tree based on
Fiorio's and Gustedt's labelling algorithm.
* oln/lrde/ufmt/fiorio-3.hh: New file.
* oln/lrde/ufmt/bin/fiorio.cc: Handle fiorio-3.hh.
Add copyright notice.
* oln/lrde/ufmt/bin/Makefile.am (AM_CXXFLAGS): Add -DNDEBUG.
(check_PROGRAMS): Add fiorio-3.
(fiorio_3_SOURCES, fiorio_3_CPPFLAGS): New.
* oln/lrde/ufmt/Makefile.am (noinst_HEADERS): Add fiorio-3.hh.
* oln/lrde/ufmt/fiorio-1.hh, oln/lrde/ufmt/fiorio-2.hh: Typo in
comment.
* oln/lrde/ufmt/README: Update.
--- 10.255/olena/oln/lrde/ufmt/README Mon, 28 Aug 2006 14:48:16 +0200 theo (oln/x/22_README 1.5 644)
+++ 10.256/olena/oln/lrde/ufmt/README Tue, 29 Aug 2006 14:48:46 +0200 levill_r (oln/x/22_README 1.6 644)
@@ -142,3 +142,12 @@
** fiorio-2.hh
My second implementation of the max-tree computation using Fiorio's and
Gustedt's algorithm, using routines of Theo's (anc, insert, etc.)
+
+** fiorio-3.hh
+A variation on fiorio-2.hh, which computes a max-tree for each line
+of the image independently, and then merges them column per column.
+
+
+Local Variables:
+ispell-local-dictionary: "american"
+End:
--- 10.255/olena/oln/lrde/ufmt/Makefile.am Mon, 28 Aug 2006 18:31:56 +0200 berger_c (oln/x/26_Makefile.a 1.2 644)
+++ 10.256/olena/oln/lrde/ufmt/Makefile.am Tue, 29 Aug 2006 14:48:46 +0200 levill_r (oln/x/26_Makefile.a 1.3 644)
@@ -16,6 +16,7 @@
basic_salembier.hh \
fiorio-1.hh \
fiorio-2.hh \
+ fiorio-3.hh \
hdc_maxtree.hh \
hpc_maxtree.hh \
log.hh \
--- 10.255/olena/oln/lrde/ufmt/fiorio-1.hh Fri, 25 Aug 2006 18:19:26 +0200 levill_r (oln/x/27_fiorio-1.h 1.2 644)
+++ 10.256/olena/oln/lrde/ufmt/fiorio-1.hh Tue, 29 Aug 2006 14:48:46 +0200 levill_r (oln/x/27_fiorio-1.h 1.3 644)
@@ -26,7 +26,7 @@
// Public License.
-/** \brief An adadpatation of Fiorio's and Gustedt's algorithm
+/** \brief An adaptation of Fiorio's and Gustedt's algorithm
(fiorio.96.tcs).
Ref.: Christophe Fiorio and Jens Gustedt. Two linear time
--- 10.255/olena/oln/lrde/ufmt/fiorio-2.hh Fri, 25 Aug 2006 18:19:26 +0200 levill_r (oln/x/28_fiorio-2.h 1.2 644)
+++ 10.256/olena/oln/lrde/ufmt/fiorio-2.hh Tue, 29 Aug 2006 14:48:46 +0200 levill_r (oln/x/28_fiorio-2.h 1.3 644)
@@ -26,7 +26,7 @@
// Public License.
-/** \brief An adadpatation of Fiorio's and Gustedt's algorithm
+/** \brief An adaptation of Fiorio's and Gustedt's algorithm
(fiorio.96.tcs).
Ref.: Christophe Fiorio and Jens Gustedt. Two linear time
@@ -237,6 +237,44 @@
merge_(r, t);
}
+// FIXME: ``New'' Version (iterative, instead of recursive). To be tested.
+#if 0
+ void merge_(point p, point q)
+ {
+ precondition (p != q);
+ precondition (ima_[p] >= ima_[q]);
+
+ point r = find_ancestor(p, ima_[q]);
+ point s = find_level_root(q);
+
+ // Stop the recursion when R and S are equal (i.e., they are
+ // already merged).
+ while (r != s)
+ {
+ invariant (p != q);
+ invariant (ima_[p] >= ima_[q]);
+
+ point t = parent_[s];
+ if (ima_[s] == ima_[r])
+ {
+ parent_[s] = r;
+ // Update the number of level roots.
+ --n_level_roots_cpt_;
+ }
+ else
+ {
+ if (not is_top(r))
+ parent_[s] = parent_[r];
+ parent_[r] = s;
+ }
+ p = r;
+ q = t;
+ r = find_ancestor(p, ima_[q]);
+ s = find_level_root(q);
+ }
+ }
+#endif
+
/// \note Theo calls this function ``is_root'.
bool is_top(const point& p) const
{
--- 10.255/olena/oln/lrde/ufmt/bin/Makefile.am Mon, 28 Aug 2006 18:31:56 +0200 berger_c (oln/x/29_Makefile.a 1.2 644)
+++ 10.256/olena/oln/lrde/ufmt/bin/Makefile.am Tue, 29 Aug 2006 14:48:46 +0200 levill_r (oln/x/29_Makefile.a 1.3 644)
@@ -1,19 +1,22 @@
-AM_CXXFLAGS = -O3 -ggdb -Wall -Werror -ansi -pedantic
+AM_CXXFLAGS = -Wall -Werror -ansi -pedantic -ggdb -O3 -DNDEBUG
AM_LDFLAGS = $(ZLIB_LDFLAGS)
-check_PROGRAMS = basic_maxtree basic_najman basic_salembier fiorio-1 fiorio-2 \
+check_PROGRAMS = \
+ basic_maxtree basic_najman basic_salembier \
+ fiorio-1 fiorio-2 fiorio-3 \
hdc_maxtree hpc_maxtree r1ic_maxtree rpc_maxtree
basic_maxtree_SOURCES = basic_maxtree.cc
basic_najman_SOURCES = basic_najman.cc
basic_salembier_SOURCES = basic_salembier.cc
+fiorio_1_SOURCES = fiorio.cc
+fiorio_2_SOURCES = fiorio.cc
+fiorio_2_CPPFLAGS = -DFIORIO_VERSION=2
+fiorio_3_SOURCES = fiorio.cc
+fiorio_3_CPPFLAGS = -DFIORIO_VERSION=3
hdc_maxtree_SOURCES = hdc_maxtree.cc
hpc_maxtree_SOURCES = hpc_maxtree.cc
r1ic_maxtree_SOURCES = r1ic_maxtree.cc
rpc_maxtree_SOURCES = rpc_maxtree.cc
-fiorio_1_SOURCES = fiorio.cc
-fiorio_2_SOURCES = fiorio.cc
-fiorio_2_CPPFLAGS = -DFIORIO_VERSION=2
-
# FIXME: Write (runtime) tests!
--- 10.255/olena/oln/lrde/ufmt/bin/fiorio.cc Fri, 25 Aug 2006 18:19:26 +0200 levill_r (oln/x/30_fiorio.cc 1.2 644)
+++ 10.256/olena/oln/lrde/ufmt/bin/fiorio.cc Tue, 29 Aug 2006 14:48:46 +0200 levill_r (oln/x/30_fiorio.cc 1.3 644)
@@ -1,3 +1,30 @@
+// Copyright (C) 2006 EPITA Research and Development Laboratory
+//
+// 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.
+
#include <cstdlib>
#include <ntg/int.hh>
@@ -7,10 +34,14 @@
#include <oln/level/fill.hh>
// Max-tree computation base on Fiorio's and Gustedt's algorithm.
-#if defined(FIORIO_VERSION) && FIORIO_VERSION == 2
-# include <oln/lrde/ufmt/fiorio-2.hh>
+#if defined(FIORIO_VERSION) && FIORIO_VERSION == 3
+# include <oln/lrde/ufmt/fiorio-3.hh>
#else
-# include <oln/lrde/ufmt/fiorio-1.hh>
+# if defined(FIORIO_VERSION) && FIORIO_VERSION == 2
+# include <oln/lrde/ufmt/fiorio-2.hh>
+# else
+# include <oln/lrde/ufmt/fiorio-1.hh>
+# endif
#endif
--- 10.255/olena/oln/lrde/ufmt/fiorio-3.hh Tue, 29 Aug 2006 14:52:01 +0200 levill_r ()
+++ 10.256/olena/oln/lrde/ufmt/fiorio-3.hh Tue, 29 Aug 2006 14:48:46 +0200 levill_r (oln/x/44_fiorio-3.h 1.1 644)
@@ -0,0 +1,281 @@
+// Copyright (C) 2006 EPITA Research and Development Laboratory
+//
+// 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.
+
+
+/** \brief An adaptation of Fiorio's and Gustedt's algorithm
+ (fiorio.96.tcs).
+
+ Ref.: Christophe Fiorio and Jens Gustedt. Two linear time
+ Union-Find strategies for image processing. Theoretical Computer
+ Science, 1996.
+
+ \note This is the third version of my implementation, augmented
+ with Theo's (better) routines and ideas + another merge/update
+ method. */
+
+
+#ifndef OLENA_LRDE_UFMT_FIORIO_3_HH
+# define OLENA_LRDE_UFMT_FIORIO_3_HH
+
+# include <algorithm>
+
+# include <oln/core/image2d.hh>
+# include <oln/level/fill.hh>
+
+namespace oln
+{
+ namespace lrde
+ {
+ namespace ufmt
+ {
+
+ // FIXME: Not generic (works only on 2-D images).
+ template <typename I>
+ class fiorio
+ {
+ typedef oln_point_type(I) point;
+ typedef oln_value_type(I) value;
+ typedef oln_iter_type(I) piter;
+ typedef typename mute<I, point>::ret parent_type;
+
+ public:
+ fiorio(const abstract::image<I>& ima) :
+ ima_(ima.exact().clone()), parent_(ima.size()),
+ n_level_roots_cpt_(ima.npoints())
+ {
+ // Init the image of parents.
+ piter p (parent_);
+ for_all (p)
+ parent_[p] = p;
+ }
+
+ /// Entry point of the algorithm.
+ void go()
+ {
+ scan_line();
+ }
+
+
+ /// Images accessors.
+ /// \{
+ public:
+ const I& ima() const
+ {
+ return ima_;
+ }
+
+ const parent_type& parent() const
+ {
+ return parent_;
+ }
+ /// \}
+
+
+ /// Level roots.
+ /// \{
+ /// Get the number of level roots (method 1, using a counter
+ /// updated by the algorithm).
+ unsigned n_level_roots1() const
+ {
+ return n_level_roots_cpt_;
+ }
+
+ /// Get the number of level roots (method 2, computing from the
+ /// PARENT image.
+ unsigned n_level_roots2() const
+ {
+ unsigned n_level_roots = 0;
+ oln_iter_type(parent_type) p(parent_);
+ for_all (p)
+ if (is_level_root(p))
+ ++n_level_roots;
+ return n_level_roots;
+ }
+
+ /// The type of an image of level roots
+ typedef typename mute<parent_type, bool>::ret level_roots_image_type;
+
+ /// \brief Compute the image of level roots.
+ ///
+ /// A value of \a true means that the point is a level root in ima.
+ level_roots_image_type level_roots() const
+ {
+ // Image of level roots.
+ level_roots_image_type level_roots (ima_.size());
+ oln_iter_type(parent_type) p(ima_);
+ for_all (p)
+ level_roots[p] = is_level_root(p);
+ return level_roots;
+ }
+ /// \}
+
+
+ protected:
+ // FIXME: Improve to handle other neighborhoods than 4-c.
+ void scan_line()
+ {
+ // Build the max-tree of each line separately.
+ for (coord i = 0; i < ima_.nrows(); ++i)
+ build_tree_of_line(i);
+ // Then merge all max-trees, line per line.
+ for (coord j = 0; j < ima_.ncols(); ++j)
+ for (coord i = 0; i < ima_.nrows() - 1; ++i)
+ merge(point(i, j), point(i + 1, j));
+ }
+
+ void build_tree_of_line(coord row)
+ {
+ // Start at the second pixel (the first pixel has no left
+ // neighbor.
+ for (coord j = 1; j < ima_.ncols(); ++j)
+ {
+ point left = find_level_root(point(row, j - 1));
+ point this_one = point(row, j);
+ insert(this_one, left);
+ }
+ }
+
+ /// Insert \a p in a tree of which \a n is a neighbor of \a p.
+ void insert(const point& p, const point& n)
+ {
+ point r = find_ancestor(n, ima_[p]);
+ if (ima_[r] <= ima_[p])
+ {
+ parent_[p] = r;
+ if (ima_[r] == ima_[p])
+ // Update the number of level roots.
+ --n_level_roots_cpt_;
+ }
+ else
+ {
+ if (not is_top(r))
+ parent_[p] = parent_[r];
+ parent_[r] = p;
+ }
+ }
+
+ /// \brief Front-end to \a merge_.
+ /// \note Theo calls this method ``update'.
+ void merge(const point& p, const point& q)
+ {
+ // The \a merge_ routine assumes that P has a value greater
+ // or equal to Q; swap them if needed.
+ if (ima_[p] >= ima_[q])
+ merge_(p, q);
+ else
+ merge_(q, p);
+ }
+
+ // FIXME: Turn this recursive method into a loop!
+ void merge_(const point& p, const point& q)
+ {
+ precondition (p != q);
+ precondition (ima_[p] >= ima_[q]);
+
+ point r = find_ancestor(p, ima_[q]);
+ point s = find_level_root(q);
+
+ // Stop the recursion when R and S are equal (i.e., they are
+ // already merged).
+ if (r == s)
+ return;
+
+ point t = parent_[s];
+
+ if (ima_[s] == ima_[r])
+ {
+ parent_[s] = r;
+ // Update the number of level roots.
+ --n_level_roots_cpt_;
+ }
+ else
+ {
+ if (not is_top(r))
+ parent_[s] = parent_[r];
+ parent_[r] = s;
+ }
+ merge_(r, t);
+ }
+
+ /// \note Theo calls this function ``is_root'.
+ bool is_top(const point& p) const
+ {
+ return parent_[p] == p;
+ }
+
+ point find_top(point p) const
+ {
+ while (not is_top(p))
+ p = parent_[p];
+ return p;
+ }
+
+ bool is_level_root(const point& p) const
+ {
+ return
+ is_top(p) ||
+ (ima_[parent_[p]] != ima_[p]);
+ }
+
+ /// \brief Find the level root of the component that P belongs to.
+ /// \note From Theo.
+ point find_level_root(const point& p)
+ {
+ // Is P a level root at the end the routine?
+ if (is_level_root(p))
+ return p;
+ else
+ // Path compression.
+ return parent_[p] = find_level_root(parent_[p]);
+ }
+
+ /// \note From Theo.
+ /// \note Theo calls this method ``anc''.
+ point find_ancestor(point p, const value& level)
+ {
+ while (not is_top(p) and ima_[parent_[p]] >= level)
+ p = find_level_root(parent_[p]);
+ return p;
+ }
+
+ protected:
+ /// \note Theo calls this image ``f''.
+ I ima_;
+ /// \note Theo calls this image ``par''.
+ parent_type parent_;
+ // Counter of level roots (method 1).
+ unsigned n_level_roots_cpt_;
+
+ };
+
+ } // end of namespace oln::lrde::ufmt
+
+ } // end of namespace oln::lrde
+
+} // end of namespace oln
+
+#endif // ! OLENA_LRDE_UFMT_FIORIO_3_HH
--- 10.255/oln.prj
+++ 10.256/oln.prj
@@ -1,13 +1,27 @@
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Olena")
-(Project-Version oln 10 255)
-(Parent-Version oln 10 254)
-(Version-Log "Fix ChangeLog and add entries for basic_najman in Makefiles(.am).
+(Project-Version oln 10 256)
+(Parent-Version oln 10 251)
+(Version-Log "2006-08-29 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Add a third version of the computation of a the max-tree based on
+ Fiorio's and Gustedt's labelling algorithm.
+
+ * oln/lrde/ufmt/fiorio-3.hh: New file.
+ * oln/lrde/ufmt/bin/fiorio.cc: Handle fiorio-3.hh.
+ Add copyright notice.
+ * oln/lrde/ufmt/bin/Makefile.am (AM_CXXFLAGS): Add -DNDEBUG.
+ (check_PROGRAMS): Add fiorio-3.
+ (fiorio_3_SOURCES, fiorio_3_CPPFLAGS): New.
+ * oln/lrde/ufmt/Makefile.am (noinst_HEADERS): Add fiorio-3.hh.
+ * oln/lrde/ufmt/fiorio-1.hh, oln/lrde/ufmt/fiorio-2.hh: Typo in
+ comment.
+ * oln/lrde/ufmt/README: Update.
")
(New-Version-Log "")
-(Checkin-Time "Mon, 28 Aug 2006 18:31:56 +0200")
-(Checkin-Login berger_c)
+(Checkin-Time "Tue, 29 Aug 2006 14:48:46 +0200")
+(Checkin-Login levill_r)
;; diff-ignore tests/data/.*pbm$
;; diff-ignore .*\.pbm$
;; diff-ignore .*\.pgm$
@@ -36,6 +50,7 @@
"stamp-h\\([0-9]\\)\\?$"
"CVS/"
".cvsignore$"
+ "^_build"
"obsolete/"
"/obsolete/"
"autom4te.cache"
@@ -67,11 +82,15 @@
"^\\(.*/\\)\\?aclocal.m4$"
"/configure$"
"^configure$"
+ "^config\\.site$"
"utilities/morpho/morpho-rules.make$"
"doc/ref/filelists.make$"
"config.h\\(in\\)\\?$"
"doc/ref/ref-level.tex"
"doc/ref/ref-morpho.tex"
+ "^doc/ref/exdoc\\.mk$"
+ "^doc/ref/doxygen\\.config$"
+ "^doc/ref/out/exdoc\\.config$"
"utilities/.*\\.1$"
"^attic/"
"oln-"
@@ -93,6 +112,7 @@
"olena/img/lena16b.ppgm"
"olena/img/lena16b.pgm"
"^tools/swilena/src/.*\\.i"
+ "^tools/swilena/doc/swilena\\.info$"
"olena/img/lena1d.ppbm"
"olena/img/lena1d128.pgm"
"olena/img/lena1d.pppm"
@@ -106,16 +126,10 @@
"olena/img/lena1d16b.ppbm"
"\\.xvpics/"
"old/"
- "^config/config\\.sub$"
- "^doc/ref/exdoc\\.mk$"
- "^doc/ref/out/exdoc\\.config$"
- "^config/config\\.guess$"
- "^doc/ref/doxygen\\.config$"
- "^config/ltmain\\.sh$"
"^libtool$"
- "^_build"
- "^tools/swilena/doc/swilena\\.info$"
- "^config\\.site$"))
+ "^config/ltmain\\.sh$"
+ "^config/config\\.guess$"
+ "^config/config\\.sub$"))
(Project-Keywords)
(Files
@@ -123,7 +137,7 @@
(doc/ChangeLog (oln/o/31_ChangeLog 1.38.1.7.1.5.1.14.1.17 600))
(integre/ChangeLog (oln/q/35_ChangeLog 1.12.1.2.1.51 600))
(metalic/ChangeLog (oln/q/30_ChangeLog 1.3.1.44 600))
- (olena/ChangeLog (oln/o/30_ChangeLog 1.27.1.36.1.3.1.11.1.5.1.64.1.47.1.93.1.27.2.17 600))
+ (olena/ChangeLog (oln/o/30_ChangeLog 1.27.1.36.1.3.1.11.1.5.1.64.1.47.1.93.1.27.2.18 600))
(tools/ChangeLog (oln/o/32_ChangeLog 1.10.1.17 600))
(tools/swilena/ChangeLog (oln/n/37_ChangeLog 1.7.1.48 600))
@@ -1559,7 +1573,7 @@
- (olena/oln/lrde/ufmt/README (oln/x/22_README 1.5 644))
+ (olena/oln/lrde/ufmt/README (oln/x/22_README 1.6 644))
;; Files deleted by depopulate at Fri, 04 Aug 2006 18:41:16 +0200,
;; from version 10.245(w), by theo:
@@ -1571,17 +1585,29 @@
; (olena/oln/lrde/ufmt/bin/exe/basic_salembier () :no-keywords)
; (olena/oln/lrde/ufmt/bin/exe/basic_maxtree () :no-keywords)
+;; Files deleted by depopulate at Thu, 17 Aug 2006 10:46:05 +0200,
+;; from version 10.246(w), by levill_r:
+
+ ; (libtool ())
+ ; (config/ltmain.sh ())
+ ; (config/config.sub ())
+ ; (config/config.guess ())
+ ; (doc/ref/exdoc.mk ())
+ ; (doc/ref/doxygen.config ())
+ ; (doc/ref/out/exdoc.config ())
+
+;; Files added by populate at Fri, 25 Aug 2006 17:30:22 +0200,
+;; to version 10.248(w), by levill_r:
(TODO (oln/x/23_TODO 1.1 644))
(olena/TODO (oln/x/24_TODO 1.1 644))
(olena/oln/lrde/Makefile.am (oln/x/25_Makefile.a 1.1 644))
- (olena/oln/lrde/ufmt/Makefile.am (oln/x/26_Makefile.a 1.2 644))
- (olena/oln/lrde/ufmt/fiorio-1.hh (oln/x/27_fiorio-1.h 1.2 644))
- (olena/oln/lrde/ufmt/fiorio-2.hh (oln/x/28_fiorio-2.h 1.2 644))
- (olena/oln/lrde/ufmt/bin/Makefile.am (oln/x/29_Makefile.a 1.2 644))
- (olena/oln/lrde/ufmt/bin/fiorio.cc (oln/x/30_fiorio.cc 1.2 644))
-;; Files added by populate at Mon, 28 Aug 2006 10:51:36 +0200,
-;; to version 10.249(w), by theo:
+ (olena/oln/lrde/ufmt/Makefile.am (oln/x/26_Makefile.a 1.3 644))
+ (olena/oln/lrde/ufmt/fiorio-1.hh (oln/x/27_fiorio-1.h 1.3 644))
+ (olena/oln/lrde/ufmt/fiorio-2.hh (oln/x/28_fiorio-2.h 1.3 644))
+ (olena/oln/lrde/ufmt/bin/Makefile.am (oln/x/29_Makefile.a 1.3 644))
+ (olena/oln/lrde/ufmt/bin/fiorio.cc (oln/x/30_fiorio.cc 1.3 644))
+
(olena/oln/lrde/ufmt/hpx_maxtree.hh (oln/x/31_hpx_maxtre 1.1 644))
(olena/oln/lrde/ufmt/attributes.hh (oln/x/32_attributes 1.1 644))
@@ -1590,38 +1616,29 @@
(olena/oln/lrde/ufmt/bin/hdx_maxtree.cc (oln/x/35_hdx_maxtre 1.1 644))
(olena/oln/lrde/ufmt/bin/gen_worst_salembier.cc (oln/x/36_gen_worst_ 1.1 644))
(olena/oln/lrde/ufmt/bin/hpx_maxtree.cc (oln/x/37_hpx_maxtre 1.1 644))
-
-;; Files added by populate at Mon, 28 Aug 2006 14:40:45 +0200,
-;; to version 10.252(w), by theo:
-
(olena/oln/lrde/ufmt/bin/sp_maxtree.cc (oln/x/38_sp_maxtree 1.1 644))
-
-;; Files added by populate at Mon, 28 Aug 2006 14:40:49 +0200,
-;; to version 10.252(w), by theo:
-
(olena/oln/lrde/ufmt/bin/spx_maxtree.cc (oln/x/39_spx_maxtre 1.1 644))
-
-;; Files added by populate at Mon, 28 Aug 2006 14:40:54 +0200,
-;; to version 10.252(w), by theo:
-
(olena/oln/lrde/ufmt/spx_maxtree.hh (oln/x/40_spx_maxtre 1.1 644))
-
-;; Files added by populate at Mon, 28 Aug 2006 14:40:58 +0200,
-;; to version 10.252(w), by theo:
-
(olena/oln/lrde/ufmt/sp_maxtree.hh (oln/x/41_sp_maxtree 1.1 644))
-
-;; Files added by populate at Mon, 28 Aug 2006 18:08:07 +0200,
-;; to version 10.253(w), by berger_c:
-
(olena/oln/lrde/ufmt/basic_najman.hh (oln/x/42_basic_najm 1.1 644))
+ (olena/oln/lrde/ufmt/bin/basic_najman.cc (oln/x/43_basic_najm 1.1 644))
-;; Files added by populate at Mon, 28 Aug 2006 18:08:14 +0200,
-;; to version 10.253(w), by berger_c:
+;; Files added by populate at Tue, 29 Aug 2006 11:05:19 +0200,
+;; to version 10.251(w), by levill_r:
- (olena/oln/lrde/ufmt/bin/basic_najman.cc (oln/x/43_basic_najm 1.1 644))
+ (olena/oln/lrde/ufmt/fiorio-3.hh (oln/x/44_fiorio-3.h 1.1 644))
)
(Merge-Parents
- (10.254 complete)
+ (10.255 complete
+ (olena/ChangeLog olena/ChangeLog olena/ChangeLog r) (olena/oln/lrde/ufmt/utils.hh olena/oln/lrde/ufmt/utils.hh olena/oln/lrde/ufmt/utils.hh r)
+ (olena/oln/lrde/ufmt/rpc_maxtree.hh olena/oln/lrde/ufmt/rpc_maxtree.hh olena/oln/lrde/ufmt/rpc_maxtree.hh r) (olena/oln/lrde/ufmt/hpc_maxtree.hh olena/oln/lrde/ufmt/hpc_maxtree.hh olena/oln/lrde/ufmt/hpc_maxtree.hh r)
+ (olena/oln/lrde/ufmt/README olena/oln/lrde/ufmt/README olena/oln/lrde/ufmt/README m) (olena/oln/lrde/ufmt/Makefile.am olena/oln/lrde/ufmt/Makefile.am olena/oln/lrde/ufmt/Makefile.am m)
+ (olena/oln/lrde/ufmt/bin/Makefile.am olena/oln/lrde/ufmt/bin/Makefile.am olena/oln/lrde/ufmt/bin/Makefile.am m) (() () olena/oln/lrde/ufmt/hpx_maxtree.hh a)
+ (() () olena/oln/lrde/ufmt/attributes.hh a) (() () olena/oln/lrde/ufmt/hdx_maxtree.hh a)
+ (() () olena/oln/lrde/ufmt/attributes_bis.hh a) (() () olena/oln/lrde/ufmt/bin/hdx_maxtree.cc a)
+ (() () olena/oln/lrde/ufmt/bin/gen_worst_salembier.cc a) (() () olena/oln/lrde/ufmt/bin/hpx_maxtree.cc a)
+ (() () olena/oln/lrde/ufmt/bin/sp_maxtree.cc a) (() () olena/oln/lrde/ufmt/bin/spx_maxtree.cc a)
+ (() () olena/oln/lrde/ufmt/spx_maxtree.hh a) (() () olena/oln/lrde/ufmt/sp_maxtree.hh a)
+ (() () olena/oln/lrde/ufmt/basic_najman.hh a) (() () olena/oln/lrde/ufmt/bin/basic_najman.cc a))
)
(New-Merge-Parents)
`prcs diff' ne fonctionne pas tout à fait comme `svn diff', ce qui
peut être perturbant. Deux différences notoires :
1. les fichiers fraîchement ajoutés (mais encore non enregistrés dans
le dépôt) ne sont pas mentionnés par défaut par `prcs diff'; il
faut ajouter lui passer l'option `-N' pour cela ;
2. lorsque l'on ne lui passe aucun numéro de révision, `prcs diff'
compare la version de la copie de travail avec la révision dont
elle a été extraite. Et ce, même après que vous ayez éventuellement
intégré dans votre copie de travail des changements (extérieurs)
postérieurs à cette révision (via `prcs merge'). Pour faire un
diff avec la toute dernière révision figurant dans le dépôt
(l'équivalent du HEAD dans Subversion), utilisez l'option `-r@'.
En résumé :
- pour faire un diff « complet » de votre copie de travail avec la
la révision d'où vous êtes partis, faites :
prcs diff -N
- pour faire un diff « complet » de votre copie de travail avec la
toute dernière version du dépôt (notamment, après un `prcs merge'),
faites :
prcs diff -r@ -N