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
June 2008
- 9 participants
- 135 discussions
https://svn.lrde.epita.fr/svn/oln/trunk
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Update external/README.
* external/README: Complete the list of files removed from the
initial Trimesh distribution.
README | 11 +++++++++++
1 file changed, 11 insertions(+)
Index: external/README
--- external/README (revision 2063)
+++ external/README (working copy)
@@ -20,6 +20,7 @@
This version of trimesh2 shipped with Olena has been autoconfiscated,
and no longer contains the following files and directories:
+ Makefile
bin.Linux/
mesh_align
mesh_cat
@@ -44,6 +45,7 @@
mesh_make.exe
mesh_shade.exe
mesh_view.exe
+ gluit/Makefile
lib.Linux/
libgluit.a
libtrimesh.a
@@ -53,8 +55,17 @@
lib.Win32/
libgluit.a
libtrimesh.a
+ libsrc/Makefile
+ utilsrc/Makefile
+
+(Old Makefiles have been converted to Automake's Makefile.am's.)
+
Local Variables:
ispell-local-dictionary: "american"
End:
+
+ LocalWords: trimesh Szymon Rusinkiewicz GPL autoconfiscated Makefile exe
+ LocalWords: gluit libgluit libtrimesh libsrc utilsrc Makefiles Automake's
+ LocalWords: ispell american
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
The only tests that do not work on my laptop now are:
- milena/tests/value/graylevel.cc
- milena/tests/value/graylevel_f.cc
because of an ambiguous conversion.
I have no time to try and fix it today, but any help is welcome! :)
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Have most of the test suite compile again.
* mln/algebra/quat.hh: Include missing header for mln/math/abs.hh.
* mln/draw/graph.hh
(graph(Image<I>&, const p_graph<P>&, mln_value(I), mln_value(I))):
s/n1/v1/.
s/n2/v2/.
* tests/draw/graph.cc (test): s/add_node/add_vertex/.
mln/algebra/quat.hh | 1 +
mln/draw/graph.hh | 4 ++--
tests/draw/graph.cc | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
Index: mln/algebra/quat.hh
--- mln/algebra/quat.hh (revision 2060)
+++ mln/algebra/quat.hh (working copy)
@@ -42,6 +42,7 @@
# include <mln/trait/value_.hh>
# include <mln/algebra/vec.hh>
+# include <mln/math/abs.hh>
# include <mln/norm/l2.hh>
//FIXME: pow, exp etc... are def here and in value::...
Index: mln/draw/graph.hh
--- mln/draw/graph.hh (revision 2060)
+++ mln/draw/graph.hh (working copy)
@@ -99,8 +99,8 @@
line (exact(ima),
// FIXME: Too low-level. See similar remarks
// in mln/core/graph_image.hh
- pg.gr_->vertex_data(pg.gr_->edge(l).n1()),
- pg.gr_->vertex_data(pg.gr_->edge(l).n2()),
+ pg.gr_->vertex_data(pg.gr_->edge(l).v1()),
+ pg.gr_->vertex_data(pg.gr_->edge(l).v2()),
edge_v);
// Draw the points (vertices).
for (size_t p = 0; p < pg.npoints(); ++p)
Index: tests/draw/graph.cc
--- tests/draw/graph.cc (revision 2060)
+++ tests/draw/graph.cc (working copy)
@@ -64,7 +64,7 @@
util::graph<mln::point2d> g;
// Populate the graph with nodes.
for (unsigned i = 0; i < points.size(); ++i)
- g.add_node (points[i]);
+ g.add_vertex(points[i]);
// Populate the graph with edges.
for (edges_type::const_iterator i = edges.begin(); i != edges.end(); ++i)
g.add_edge (i->first, i->second);
1
1
***SPAM*** L1 cleanup-2008 2063: Get rid of '_' at end of point_, dpoint_, and box_.
by Thierry Geraud 23 Jun '08
by Thierry Geraud 23 Jun '08
23 Jun '08
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Get rid of '_' at end of point_, dpoint_, and box_.
* mln/core/point.hh (dpoint): Remove this typedef.
(operator+=, operator-=): Use delta in sig.
(point_): Rename as...
(point): ...this.
* mln/core/dpoint.hh (point): Remove this typedef.
(dpoint_): Rename as...
(dpoint): ...this.
* mln/core/box.hh (box_): Rename as...
(box): ...this.
* mln/trait/image/props.hh,
* mln/core/dpoint2d.hh,
* mln/core/box_piter.hh,
* mln/core/point2d.hh,
* mln/core/box2d.hh,
* mln/geom/bbox.hh: Propagate renaming.
core/box.hh | 56 ++++++++++++-------------
core/box2d.hh | 4 -
core/box_piter.hh | 16 +++----
core/dpoint.hh | 83 ++++++++++++++++++-------------------
core/dpoint2d.hh | 4 -
core/point.hh | 113 ++++++++++++++++++++++++---------------------------
core/point2d.hh | 28 ++++++------
geom/bbox.hh | 12 ++---
trait/image/props.hh | 12 +++--
9 files changed, 162 insertions(+), 166 deletions(-)
Index: mln/trait/image/props.hh
--- mln/trait/image/props.hh (revision 2062)
+++ mln/trait/image/props.hh (working copy)
@@ -31,6 +31,8 @@
/*! \file mln/trait/image/props.hh
*
* \brief Properties of image classes.
+ *
+ * \todo Remove space_from_point and fwd decls at EOF.
*/
# include <string>
@@ -556,11 +558,11 @@
struct cube;
}
- template <typename M, typename C> struct point_;
- typedef point_<grid::tick, int> point1d;
- typedef point_<grid::square, int> point2d;
- typedef point_<grid::hexa, int> point2d_h;
- typedef point_<grid::cube, int> point3d;
+ template <typename M, typename C> struct point;
+ typedef point<grid::tick, int> point1d;
+ typedef point<grid::square, int> point2d;
+ typedef point<grid::hexa, int> point2d_h;
+ typedef point<grid::cube, int> point3d;
namespace trait
{
Index: mln/core/dpoint2d.hh
--- mln/core/dpoint2d.hh (revision 2062)
+++ mln/core/dpoint2d.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -43,7 +43,7 @@
/*! \brief Type alias for a delta-point defined on the 2D square
* grid with integer coordinates.
*/
- typedef dpoint_<grid::square, int> dpoint2d;
+ typedef dpoint<grid::square, int> dpoint2d;
} // end of namespace mln
Index: mln/core/point.hh
--- mln/core/point.hh (revision 2062)
+++ mln/core/point.hh (working copy)
@@ -49,8 +49,8 @@
{
/// \{ Fwd decls.
- template <typename G, typename C> struct point_;
- template <typename G, typename C> struct dpoint_;
+ template <typename G, typename C> struct point;
+ template <typename G, typename C> struct dpoint;
namespace literal {
struct zero_t;
struct one_t;
@@ -81,8 +81,8 @@
* coordinate type in this space.
*/
template <typename G, typename C>
- struct point_ : public Gpoint< point_<G,C> >,
- public internal::mutable_coord_impl_< G::dim, C, point_<G,C> >
+ struct point : public Gpoint< point<G,C> >,
+ public internal::mutable_coord_impl_< G::dim, C, point<G,C> >
{
/*! \var dim
* \brief Dimension of the space.
@@ -93,14 +93,11 @@
/// Grid associated type.
typedef G grid;
- /// Dpoint associated type.
- typedef dpoint_<G,C> dpoint;
-
/// Delta associated type.
- typedef dpoint_<G,C> delta;
+ typedef dpoint<G,C> delta;
/// DPsite associated type.
- typedef dpoint_<G,C> dpsite;
+ typedef dpoint<G,C> dpsite;
/// Coordinate associated type.
typedef C coord;
@@ -121,44 +118,44 @@
C& operator[](unsigned i);
/// Constructor without argument.
- point_();
+ point();
/// Constructor from an algebra vector.
template <typename C2>
- point_(const algebra::vec<dim,C2>& v);
+ point(const algebra::vec<dim,C2>& v);
/// \{ Constructors with different numbers of arguments
/// (coordinates) w.r.t. the dimension.
- point_(C ind);
- point_(C row, C col);
- point_(C sli, C row, C col);
+ point(C ind);
+ point(C row, C col);
+ point(C sli, C row, C col);
/// \}
/// \{ Constructors/assignments with literals.
- point_(const literal::origin_t&);
- point_<G,C>& operator=(const literal::origin_t&);
+ point(const literal::origin_t&);
+ point<G,C>& operator=(const literal::origin_t&);
// Works only in 1D:
- point_(const literal::zero_t&);
- point_<G,C>& operator=(const literal::zero_t&);
- point_(const literal::one_t&);
- point_<G,C>& operator=(const literal::one_t&);
+ point(const literal::zero_t&);
+ point<G,C>& operator=(const literal::zero_t&);
+ point(const literal::one_t&);
+ point<G,C>& operator=(const literal::one_t&);
/// \}
/// Constructor; coordinates are set by function \p f.
template <typename F>
- point_(const Function_i2v<F>& f);
+ point(const Function_i2v<F>& f);
/// Set all coordinates to the value \p c.
void set_all(C c);
/// Origin point (all coordinates are 0).
- static const point_<G,C> origin;
+ static const point<G,C> origin;
/// Shifting by \p dp.
- point_<G,C>& operator+=(const dpoint& dp);
+ point<G,C>& operator+=(const delta& dp);
/// Shifting by \p the inverse of dp.
- point_<G,C>& operator-=(const dpoint& dp);
+ point<G,C>& operator-=(const delta& dp);
/// Hook to coordinates.
operator typename internal::point_to_<G, C>::metal_vec () const;
@@ -191,8 +188,8 @@
* iterator.
*/
template <typename G, typename Cl, typename Cr>
- struct less_than< point_<G,Cl>,
- point_<G,Cr> >
+ struct less_than< point<G,Cl>,
+ point<G,Cr> >
{
/*! \brief Comparison between a couple of points \a lhs and \a
* rhs.
@@ -200,8 +197,8 @@
* \return True if \p lhs is before \p rhs in the sense of the
* coordinates lexicographic comparison, otherwise false.
*/
- bool operator()(const point_<G,Cl>& lhs,
- const point_<G,Cr>& rhs) const;
+ bool operator()(const point<G,Cl>& lhs,
+ const point<G,Cr>& rhs) const;
};
} // end of namespace mln::util
@@ -211,7 +208,7 @@
template <typename G, typename C>
inline
- C point_<G,C>::operator[](unsigned i) const
+ C point<G,C>::operator[](unsigned i) const
{
assert(i < dim);
return this->coord_[i];
@@ -219,7 +216,7 @@
template <typename G, typename C>
inline
- C& point_<G,C>::operator[](unsigned i)
+ C& point<G,C>::operator[](unsigned i)
{
assert(i < dim);
return this->coord_[i];
@@ -229,21 +226,21 @@
template <typename G, typename C>
inline
- point_<G,C>::point_()
+ point<G,C>::point()
{
}
template <typename G, typename C>
template <typename C2>
inline
- point_<G,C>::point_(const algebra::vec<dim,C2>& v)
+ point<G,C>::point(const algebra::vec<dim,C2>& v)
{
coord_ = v;
}
template <typename G, typename C>
inline
- point_<G,C>::point_(C ind)
+ point<G,C>::point(C ind)
{
metal::bool_<(dim == 1)>::check();
coord_[0] = ind;
@@ -251,7 +248,7 @@
template <typename G, typename C>
inline
- point_<G,C>::point_(C row, C col)
+ point<G,C>::point(C row, C col)
{
metal::bool_<(dim == 2)>::check();
coord_[0] = row;
@@ -260,7 +257,7 @@
template <typename G, typename C>
inline
- point_<G,C>::point_(C sli, C row, C col)
+ point<G,C>::point(C sli, C row, C col)
{
metal::bool_<(dim == 3)>::check();
coord_[0] = sli;
@@ -271,7 +268,7 @@
template <typename G, typename C>
template <typename F>
inline
- point_<G,C>::point_(const Function_i2v<F>& f_)
+ point<G,C>::point(const Function_i2v<F>& f_)
{
mlc_converts_to(mln_result(F), C)::check();
const F& f = exact(f_);
@@ -281,15 +278,15 @@
template <typename G, typename C>
inline
- point_<G,C>::point_(const literal::origin_t&)
+ point<G,C>::point(const literal::origin_t&)
{
coord_.set_all(0);
}
template <typename G, typename C>
inline
- point_<G,C>&
- point_<G,C>::operator=(const literal::origin_t&)
+ point<G,C>&
+ point<G,C>::operator=(const literal::origin_t&)
{
coord_.set_all(0);
return *this;
@@ -297,7 +294,7 @@
template <typename G, typename C>
inline
- point_<G,C>::point_(const literal::zero_t&)
+ point<G,C>::point(const literal::zero_t&)
{
metal::bool_<(dim == 1)>::check();
coord_[0] = 1;
@@ -305,8 +302,8 @@
template <typename G, typename C>
inline
- point_<G,C>&
- point_<G,C>::operator=(const literal::zero_t&)
+ point<G,C>&
+ point<G,C>::operator=(const literal::zero_t&)
{
metal::bool_<(dim == 1)>::check();
coord_[0] = 1;
@@ -315,7 +312,7 @@
template <typename G, typename C>
inline
- point_<G,C>::point_(const literal::one_t&)
+ point<G,C>::point(const literal::one_t&)
{
metal::bool_<(dim == 1)>::check();
coord_[0] = 1;
@@ -323,8 +320,8 @@
template <typename G, typename C>
inline
- point_<G,C>&
- point_<G,C>::operator=(const literal::one_t&)
+ point<G,C>&
+ point<G,C>::operator=(const literal::one_t&)
{
metal::bool_<(dim == 1)>::check();
coord_[0] = 1;
@@ -333,18 +330,18 @@
template <typename G, typename C>
inline
- void point_<G,C>::set_all(C c)
+ void point<G,C>::set_all(C c)
{
coord_.set_all(c);
}
template <typename G, typename C>
- const point_<G,C> point_<G,C>::origin = all_to(0);
+ const point<G,C> point<G,C>::origin = all_to(0);
template <typename G, typename C>
inline
- point_<G,C>&
- point_<G,C>::operator+=(const dpoint& dp)
+ point<G,C>&
+ point<G,C>::operator+=(const delta& dp)
{
for (unsigned i = 0; i < dim; ++i)
coord_[i] += dp[i];
@@ -353,8 +350,8 @@
template <typename G, typename C>
inline
- point_<G,C>&
- point_<G,C>::operator-=(const dpoint& dp)
+ point<G,C>&
+ point<G,C>::operator-=(const delta& dp)
{
for (unsigned i = 0; i < dim; ++i)
coord_[i] -= dp[i];
@@ -363,14 +360,14 @@
template <typename G, typename C>
inline
- point_<G,C>::operator typename internal::point_to_<G, C>::metal_vec () const
+ point<G,C>::operator typename internal::point_to_<G, C>::metal_vec () const
{
return coord_; // FIXGE: Is-it OK?
}
template <typename G, typename C>
inline
- point_<G,C>::operator algebra::vec<G::dim, float> () const
+ point<G,C>::operator algebra::vec<G::dim, float> () const
{
algebra::vec<dim, float> tmp;
for (unsigned i = 0; i < dim; ++i)
@@ -381,14 +378,14 @@
template <typename G, typename C>
inline
const algebra::vec<G::dim, C>&
- point_<G,C>::to_vec() const
+ point<G,C>::to_vec() const
{
return coord_;
}
template <typename G, typename C>
inline
- h_vec<G::dim, C> point_<G,C>::to_h_vec() const
+ h_vec<G::dim, C> point<G,C>::to_h_vec() const
{
h_vec<G::dim, C> tmp;
for (unsigned i = 0; i < dim; ++i)
@@ -403,9 +400,9 @@
template <typename G, typename Cl, typename Cr>
bool
- less_than< point_<G,Cl>,
- point_<G,Cr> >::operator()(const point_<G,Cl>& lhs,
- const point_<G,Cr>& rhs) const
+ less_than< point<G,Cl>,
+ point<G,Cr> >::operator()(const point<G,Cl>& lhs,
+ const point<G,Cr>& rhs) const
{
enum { n = G::dim };
typedef less_than< algebra::vec<n,Cl>, algebra::vec<n,Cr> > less_t;
Index: mln/core/box_piter.hh
--- mln/core/box_piter.hh (revision 2062)
+++ mln/core/box_piter.hh (working copy)
@@ -47,11 +47,11 @@
* \see mln::box_
*/
template <typename P>
- class box_fwd_piter_ : public internal::site_set_iterator_base< box_<P>,
+ class box_fwd_piter_ : public internal::site_set_iterator_base< box<P>,
box_fwd_piter_<P> >
{
typedef box_fwd_piter_<P> self_;
- typedef internal::site_iterator_base< box_<P>, self_ > super_;
+ typedef internal::site_iterator_base< box<P>, self_ > super_;
public:
@@ -65,7 +65,7 @@
*
* \param[in] b A box.
*/
- box_fwd_piter_(const box_<P>& b);
+ box_fwd_piter_(const box<P>& b);
/// Test the iterator validity.
bool is_valid_() const;
@@ -94,11 +94,11 @@
* \see mln::box_
*/
template <typename P>
- class box_bkd_piter_ : public internal::site_iterator_base< box_<P>,
+ class box_bkd_piter_ : public internal::site_iterator_base< box<P>,
box_bkd_piter_<P> >
{
typedef box_bkd_piter_<P> self_;
- typedef internal::site_iterator_base< box_<P>, self_ > super_;
+ typedef internal::site_iterator_base< box<P>, self_ > super_;
public:
@@ -112,7 +112,7 @@
*
* \param[in] b A box.
*/
- box_bkd_piter_(const box_<P>& b);
+ box_bkd_piter_(const box<P>& b);
/// Test the iterator validity.
bool is_valid_() const;
@@ -148,7 +148,7 @@
template <typename P>
inline
- box_fwd_piter_<P>::box_fwd_piter_(const box_<P>& b)
+ box_fwd_piter_<P>::box_fwd_piter_(const box<P>& b)
{
this->change_target(b);
}
@@ -205,7 +205,7 @@
template <typename P>
inline
- box_bkd_piter_<P>::box_bkd_piter_(const box_<P>& b)
+ box_bkd_piter_<P>::box_bkd_piter_(const box<P>& b)
{
this->change_target(b);
}
Index: mln/core/dpoint.hh
--- mln/core/dpoint.hh (revision 2062)
+++ mln/core/dpoint.hh (working copy)
@@ -30,7 +30,7 @@
/*! \file mln/core/dpoint.hh
*
- * \brief Definition of the generic delta-point class mln::dpoint_.
+ * \brief Definition of the generic delta-point class mln::dpoint.
*/
# include <mln/core/concept/gdpoint.hh>
@@ -43,7 +43,7 @@
{
/// \{ Fwd decls.
- template <typename G, typename C> struct point_;
+ template <typename G, typename C> struct point;
namespace literal {
struct zero_t;
struct one_t;
@@ -57,8 +57,8 @@
* coordinate type in this space.
*/
template <typename G, typename C>
- struct dpoint_ : public Gdpoint< dpoint_<G,C> >,
- public internal::mutable_coord_impl_< G::dim, C, dpoint_<G,C> >
+ struct dpoint : public Gdpoint< dpoint<G,C> >,
+ public internal::mutable_coord_impl_< G::dim, C, dpoint<G,C> >
{
/*! \var dim
* \brief Dimension of the space.
@@ -69,14 +69,11 @@
/// Grid associated type.
typedef G grid;
- /// Point associated type.
- typedef point_<G,C> point;
-
/// Psite associated type.
- typedef point_<G,C> psite;
+ typedef point<G,C> psite;
/// Site associated type.
- typedef point_<G,C> site;
+ typedef point<G,C> site;
/// Coordinate associated type.
typedef C coord;
@@ -97,30 +94,30 @@
C& operator[](unsigned i);
/// Constructor without argument.
- dpoint_();
+ dpoint();
/// Constructor from an algebra vector.
template <typename C2>
- dpoint_(const algebra::vec<dim,C2>& v);
+ dpoint(const algebra::vec<dim,C2>& v);
/// \{ Constructors with different numbers of arguments
/// (coordinates) w.r.t. the dimension.
- dpoint_(C ind);
- dpoint_(C row, C col);
- dpoint_(C sli, C row, C col);
+ dpoint(C ind);
+ dpoint(C row, C col);
+ dpoint(C sli, C row, C col);
/// \}
/// \{ Constructors/assignments with literals.
- dpoint_(const literal::zero_t&);
- dpoint_<G,C>& operator=(const literal::zero_t&);
+ dpoint(const literal::zero_t&);
+ dpoint<G,C>& operator=(const literal::zero_t&);
// Works only in 1D:
- dpoint_(const literal::one_t&);
- dpoint_<G,C>& operator=(const literal::one_t&);
+ dpoint(const literal::one_t&);
+ dpoint<G,C>& operator=(const literal::one_t&);
/// \}
/// Constructor; coordinates are set by function \p f.
template <typename F>
- dpoint_(const Function_i2v<F>& f);
+ dpoint(const Function_i2v<F>& f);
/// Set all coordinates to the value \p c.
void set_all(C c);
@@ -149,8 +146,8 @@
* Both delta-points have to be defined on the same topology.
*/
template <typename G, typename Cl, typename Cr>
- struct less_than< dpoint_<G,Cl>,
- dpoint_<G,Cr> >
+ struct less_than< dpoint<G,Cl>,
+ dpoint<G,Cr> >
{
/*! \brief Comparison between a couple of delta-points \a lhs
* and \a rhs.
@@ -158,8 +155,8 @@
* \return True if \p lhs is before \p rhs in the sense of the
* coordinates lexicographic comparison, otherwise false.
*/
- bool operator()(const dpoint_<G,Cl>& lhs,
- const dpoint_<G,Cr>& rhs) const;
+ bool operator()(const dpoint<G,Cl>& lhs,
+ const dpoint<G,Cr>& rhs) const;
};
} // end of namespace mln::util
@@ -169,7 +166,7 @@
template <typename G, typename C>
inline
- C dpoint_<G,C>::operator[](unsigned i) const
+ C dpoint<G,C>::operator[](unsigned i) const
{
assert(i < dim);
return coord_[i];
@@ -177,7 +174,7 @@
template <typename G, typename C>
inline
- C& dpoint_<G,C>::operator[](unsigned i)
+ C& dpoint<G,C>::operator[](unsigned i)
{
assert(i < dim);
return coord_[i];
@@ -185,21 +182,21 @@
template <typename G, typename C>
inline
- dpoint_<G,C>::dpoint_()
+ dpoint<G,C>::dpoint()
{
}
template <typename G, typename C>
template <typename C2>
inline
- dpoint_<G,C>::dpoint_(const algebra::vec<dim,C2>& v)
+ dpoint<G,C>::dpoint(const algebra::vec<dim,C2>& v)
{
coord_ = v;
}
template <typename G, typename C>
inline
- dpoint_<G,C>::dpoint_(C ind)
+ dpoint<G,C>::dpoint(C ind)
{
metal::bool_<(dim == 1)>::check();
coord_[0] = ind;
@@ -207,7 +204,7 @@
template <typename G, typename C>
inline
- dpoint_<G,C>::dpoint_(C row, C col)
+ dpoint<G,C>::dpoint(C row, C col)
{
metal::bool_<(dim == 2)>::check();
coord_[0] = row;
@@ -216,7 +213,7 @@
template <typename G, typename C>
inline
- dpoint_<G,C>::dpoint_(C sli, C row, C col)
+ dpoint<G,C>::dpoint(C sli, C row, C col)
{
metal::bool_<(dim == 3)>::check();
coord_[0] = sli;
@@ -226,15 +223,15 @@
template <typename G, typename C>
inline
- dpoint_<G,C>::dpoint_(const literal::zero_t&)
+ dpoint<G,C>::dpoint(const literal::zero_t&)
{
coord_.set_all(0);
}
template <typename G, typename C>
inline
- dpoint_<G,C>&
- dpoint_<G,C>::operator=(const literal::zero_t&)
+ dpoint<G,C>&
+ dpoint<G,C>::operator=(const literal::zero_t&)
{
coord_.set_all(0);
return *this;
@@ -242,7 +239,7 @@
template <typename G, typename C>
inline
- dpoint_<G,C>::dpoint_(const literal::one_t&)
+ dpoint<G,C>::dpoint(const literal::one_t&)
{
metal::bool_<(dim == 1)>::check();
coord_[0] = 1;
@@ -250,8 +247,8 @@
template <typename G, typename C>
inline
- dpoint_<G,C>&
- dpoint_<G,C>::operator=(const literal::one_t&)
+ dpoint<G,C>&
+ dpoint<G,C>::operator=(const literal::one_t&)
{
metal::bool_<(dim == 1)>::check();
coord_[0] = 1;
@@ -261,7 +258,7 @@
template <typename G, typename C>
template <typename F>
inline
- dpoint_<G,C>::dpoint_(const Function_i2v<F>& f_)
+ dpoint<G,C>::dpoint(const Function_i2v<F>& f_)
{
mlc_converts_to(mln_result(F), C)::check();
const F& f = exact(f_);
@@ -271,7 +268,7 @@
template <typename G, typename C>
inline
- void dpoint_<G,C>::set_all(C c)
+ void dpoint<G,C>::set_all(C c)
{
for (unsigned i = 0; i < dim; ++i)
coord_[i] = c;
@@ -280,7 +277,7 @@
template <typename G, typename C>
template <typename Q>
inline
- dpoint_<G,C>::operator algebra::vec<G::dim, Q> () const
+ dpoint<G,C>::operator algebra::vec<G::dim, Q> () const
{
return coord_;
}
@@ -288,7 +285,7 @@
template <typename G, typename C>
inline
const algebra::vec<G::dim, C>&
- dpoint_<G,C>::to_vec() const
+ dpoint<G,C>::to_vec() const
{
return coord_;
}
@@ -298,9 +295,9 @@
template <typename G, typename Cl, typename Cr>
bool
- less_than< dpoint_<G,Cl>,
- dpoint_<G,Cr> >::operator()(const dpoint_<G,Cl>& lhs,
- const dpoint_<G,Cr>& rhs) const
+ less_than< dpoint<G,Cl>,
+ dpoint<G,Cr> >::operator()(const dpoint<G,Cl>& lhs,
+ const dpoint<G,Cr>& rhs) const
{
enum { n = G::dim };
typedef less_than< algebra::vec<n,Cl>, algebra::vec<n,Cr> > less_t;
Index: mln/core/box.hh
--- mln/core/box.hh (revision 2062)
+++ mln/core/box.hh (working copy)
@@ -44,7 +44,7 @@
{
// Fwd decls.
- template <typename P> struct box_;
+ template <typename P> struct box;
template <typename P> struct box_fwd_piter_;
template <typename P> struct box_bkd_piter_;
@@ -53,7 +53,7 @@
{
template <typename P>
- struct site_set_< box_<P> >
+ struct site_set_< box<P> >
{
typedef trait::site_set::nsites::known nsites;
typedef trait::site_set::bbox::straight bbox;
@@ -70,8 +70,8 @@
* Parameter \c P is the corresponding type of point.
*/
template <typename P>
- struct box_ : public Box< box_<P> >,
- public internal::box_impl_< P::dim, mln_coord(P), box_<P> >
+ struct box : public Box< box<P> >,
+ public internal::box_impl_< P::dim, mln_coord(P), box<P> >
{
/// Dimension.
enum { dim = P::dim };
@@ -104,16 +104,16 @@
P& pmax();
/// Constructor without argument.
- box_();
+ box();
/// Constructor of a box going from \p pmin to \p pmax.
- box_(const site& pmin, const site& pmax);
+ box(const site& pmin, const site& pmax);
/// \{ Constructors with different numbers of arguments
/// (sizes) w.r.t. the dimension.
- explicit box_(mln_coord(P) ninds);
- box_(mln_coord(P) nrows, mln_coord(P) ncols);
- box_(mln_coord(P) nslis, mln_coord(P) nrows, mln_coord(P) ncols);
+ explicit box(mln_coord(P) ninds);
+ box(mln_coord(P) nrows, mln_coord(P) ncols);
+ box(mln_coord(P) nslis, mln_coord(P) nrows, mln_coord(P) ncols);
/// \}
/*! \brief Test if \p p belongs to the box.
@@ -126,7 +126,7 @@
void enlarge(unsigned b);
/// Give a larger box.
- box_<P> to_larger(unsigned b) const;
+ box<P> to_larger(unsigned b) const;
/// Test that the box owns valid data, i.e., pmin is 'less-than'
/// pmax.
@@ -145,10 +145,10 @@
*
* \return The modified output stream \p ostr.
*
- * \relates mln::box_
+ * \relates mln::box<P>
*/
template <typename P>
- std::ostream& operator<<(std::ostream& ostr, const box_<P>& b);
+ std::ostream& operator<<(std::ostream& ostr, const box<P>& b);
# ifndef MLN_INCLUDE_ONLY
@@ -156,7 +156,7 @@
template <typename P>
inline
bool
- box_<P>::is_valid() const
+ box<P>::is_valid() const
{
typedef util::less<P> less_t;
static const less_t op = less_t();
@@ -166,7 +166,7 @@
template <typename P>
inline
P
- box_<P>::pmin() const
+ box<P>::pmin() const
{
mln_precondition(is_valid());
return pmin_;
@@ -175,7 +175,7 @@
template <typename P>
inline
P&
- box_<P>::pmin()
+ box<P>::pmin()
{
return pmin_;
}
@@ -183,7 +183,7 @@
template <typename P>
inline
P
- box_<P>::pmax() const
+ box<P>::pmax() const
{
mln_precondition(is_valid());
return pmax_;
@@ -192,20 +192,20 @@
template <typename P>
inline
P&
- box_<P>::pmax()
+ box<P>::pmax()
{
return pmax_;
}
template <typename P>
inline
- box_<P>::box_()
+ box<P>::box()
{
}
template <typename P>
inline
- box_<P>::box_(const site& pmin, const site& pmax)
+ box<P>::box(const site& pmin, const site& pmax)
: pmin_(pmin),
pmax_(pmax)
{
@@ -214,7 +214,7 @@
template <typename P>
inline
- box_<P>::box_(mln_coord(P) ninds)
+ box<P>::box(mln_coord(P) ninds)
{
metal::bool_<(dim == 1)>::check();
pmin_ = literal::origin;
@@ -223,7 +223,7 @@
template <typename P>
inline
- box_<P>::box_(mln_coord(P) nrows, mln_coord(P) ncols)
+ box<P>::box(mln_coord(P) nrows, mln_coord(P) ncols)
{
metal::bool_<(dim == 2)>::check();
pmin_ = literal::origin;
@@ -233,7 +233,7 @@
template <typename P>
inline
- box_<P>::box_(mln_coord(P) nslis, mln_coord(P) nrows, mln_coord(P) ncols)
+ box<P>::box(mln_coord(P) nslis, mln_coord(P) nrows, mln_coord(P) ncols)
{
metal::bool_<(dim == 3)>::check();
pmin_ = literal::origin;
@@ -244,7 +244,7 @@
template <typename P>
inline
bool
- box_<P>::has(const P& p) const
+ box<P>::has(const P& p) const
{
mln_precondition(is_valid());
for (unsigned i = 0; i < P::dim; ++i)
@@ -256,7 +256,7 @@
template <typename P>
inline
void
- box_<P>::enlarge(unsigned b)
+ box<P>::enlarge(unsigned b)
{
mln_precondition(is_valid());
for (unsigned i = 0; i < P::dim; ++i)
@@ -270,11 +270,11 @@
template <typename P>
inline
- box_<P>
- box_<P>::to_larger(unsigned b) const
+ box<P>
+ box<P>::to_larger(unsigned b) const
{
mln_precondition(is_valid());
- box_<P> tmp(*this);
+ box<P> tmp(*this);
for (unsigned i = 0; i < P::dim; ++i)
{
@@ -287,7 +287,7 @@
template <typename P>
inline
- std::ostream& operator<<(std::ostream& ostr, const box_<P>& b)
+ std::ostream& operator<<(std::ostream& ostr, const box<P>& b)
{
mln_precondition(b.is_valid());
return ostr << "[" << b.pmin() << ".." << b.pmax() << ']';
Index: mln/core/point2d.hh
--- mln/core/point2d.hh (revision 2062)
+++ mln/core/point2d.hh (working copy)
@@ -45,7 +45,7 @@
/*! \brief Type alias for a point defined on the 2D square grid with
* integer coordinates.
*/
- typedef point_<grid::square, int> point2d;
+ typedef point<grid::square, int> point2d;
namespace internal
@@ -54,7 +54,7 @@
// Specialization.
template <typename C, typename E>
- struct site_const_impl< point_<grid::square, C>, E >
+ struct site_const_impl< point<grid::square, C>, E >
{
C row() const;
C col() const;
@@ -64,17 +64,17 @@
};
- // Specialization for point_<M,C>.
+ // Specialization for point<M,C>.
template <typename C, typename E>
- struct site_mutable_impl< point_<grid::square, C>, E > :
- site_const_impl < point_<grid::square, C>, E >
+ struct site_mutable_impl< point<grid::square, C>, E > :
+ site_const_impl < point<grid::square, C>, E >
{
C& row();
C& col();
C& operator[](unsigned i);
private:
- typedef site_const_impl< point_<grid::square, C>, E > super;
+ typedef site_const_impl< point<grid::square, C>, E > super;
E& exact_();
};
@@ -90,21 +90,21 @@
template <typename C, typename E>
C
- site_const_impl< point_<grid::square, C>, E >::row() const
+ site_const_impl< point<grid::square, C>, E >::row() const
{
return exact_().to_site().row();
}
template <typename C, typename E>
C
- site_const_impl< point_<grid::square, C>, E >::col() const
+ site_const_impl< point<grid::square, C>, E >::col() const
{
return exact_().to_site().col();
}
template <typename C, typename E>
C
- site_const_impl< point_<grid::square, C>, E >::operator[](unsigned i) const
+ site_const_impl< point<grid::square, C>, E >::operator[](unsigned i) const
{
mln_precondition(i < 2);
return exact_().to_site()[i];
@@ -112,7 +112,7 @@
template <typename C, typename E>
const E&
- site_const_impl< point_<grid::square, C>, E >::exact_() const
+ site_const_impl< point<grid::square, C>, E >::exact_() const
{
return internal::force_exact<const E>(*this);
}
@@ -121,21 +121,21 @@
template <typename C, typename E>
C&
- site_mutable_impl< point_<grid::square, C>, E >::row()
+ site_mutable_impl< point<grid::square, C>, E >::row()
{
return exact_().to_site().row();
}
template <typename C, typename E>
C&
- site_mutable_impl< point_<grid::square, C>, E >::col()
+ site_mutable_impl< point<grid::square, C>, E >::col()
{
return exact_().to_site().col();
}
template <typename C, typename E>
C&
- site_mutable_impl< point_<grid::square, C>, E >::operator[](unsigned i)
+ site_mutable_impl< point<grid::square, C>, E >::operator[](unsigned i)
{
mln_precondition(i < 2);
return exact_().to_site()[i];
@@ -143,7 +143,7 @@
template <typename C, typename E>
E&
- site_mutable_impl< point_<grid::square, C>, E >::exact_()
+ site_mutable_impl< point<grid::square, C>, E >::exact_()
{
return internal::force_exact<E>(*this);
}
Index: mln/core/box2d.hh
--- mln/core/box2d.hh (revision 2062)
+++ mln/core/box2d.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -46,7 +46,7 @@
*
* \see mln::win::rectangle2d.
*/
- typedef box_<point2d> box2d;
+ typedef box<point2d> box2d;
} // end of namespace mln
Index: mln/geom/bbox.hh
--- mln/geom/bbox.hh (revision 2062)
+++ mln/geom/bbox.hh (working copy)
@@ -50,7 +50,7 @@
/// Compute the precise bounding box of a point set \p pset.
template <typename S>
- box_<mln_site(S)> bbox(const Site_Set<S>& pset);
+ box<mln_site(S)> bbox(const Site_Set<S>& pset);
# ifndef MLN_INCLUDE_ONLY
@@ -59,14 +59,14 @@
{
template <typename S>
- box_<mln_site(S)> bbox_(trait::site_set::bbox::known,
+ box<mln_site(S)> bbox_(trait::site_set::bbox::known,
const S& pset)
{
return pset.bbox();
}
template <typename S>
- box_<mln_site(S)> bbox_(trait::site_set::bbox::unknown,
+ box<mln_site(S)> bbox_(trait::site_set::bbox::unknown,
const S& pset)
{
typedef mln_site(S) P;
@@ -87,7 +87,7 @@
if (p[i] > pmax[i])
pmax[i] = p[i];
- box_<P> bb(pmin, pmax);
+ box<P> bb(pmin, pmax);
return bb;
}
@@ -98,12 +98,12 @@
template <typename S>
inline
- box_<mln_site(S)> bbox(const Site_Set<S>& pset)
+ box<mln_site(S)> bbox(const Site_Set<S>& pset)
{
trace::entering("geom::bbox");
// mln_precondition(set::is_empty(pset) != 0);
- box_<mln_site(S)> b = impl::bbox_(mln_trait_site_set_bbox(S)(),
+ box<mln_site(S)> b = impl::bbox_(mln_trait_site_set_bbox(S)(),
exact(pset));
trace::exiting("geom::bbox");
1
0
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Remove the final '_' in image_morpher.
* mln/core/internal/image_morpher.hh
(image_morpher_): Rename as...
(image_morpher): ...this.
* mln/trait/images.hh,
* mln/core/translate_image.hh,
* mln/core/internal/image_if_base.hh,
* mln/core/internal/image_identity.hh,
* mln/core/internal/image_domain_morpher.hh,
* mln/core/internal/image_value_morpher.hh,
* mln/core/cast_image.hh,
* mln/core/sub_image.hh,
* mln/core/t_image.hh,
* mln/core/image_if.hh,
* mln/core/hexa.hh,
* mln/neighb/image.hh,
* mln/value/stack.hh,
* mln/border/find.hh,
* sandbox/duhamel/translate_image.hh,
* sandbox/jardonnet/subsampling/sub_sampled_image.hh,
* sandbox/garrigues/image_identity/image_domain_morpher.hh,
* sandbox/garrigues/image_identity/image_value_morpher.hh:
Propagate renaming.
* mln/core/internal/image_base.hh (data): Move into...
* mln/core/internal/data.hh: ...this new file.
mln/border/find.hh | 2
mln/core/cast_image.hh | 2
mln/core/hexa.hh | 2
mln/core/image_if.hh | 2
mln/core/internal/data.hh | 54 +++++++++++++++
mln/core/internal/image_base.hh | 17 ----
mln/core/internal/image_domain_morpher.hh | 2
mln/core/internal/image_identity.hh | 2
mln/core/internal/image_if_base.hh | 2
mln/core/internal/image_morpher.hh | 20 ++---
mln/core/internal/image_value_morpher.hh | 2
mln/core/sub_image.hh | 2
mln/core/t_image.hh | 4 -
mln/core/translate_image.hh | 4 -
mln/neighb/image.hh | 2
mln/trait/images.hh | 2
mln/value/stack.hh | 2
sandbox/duhamel/translate_image.hh | 4 -
sandbox/garrigues/image_identity/image_domain_morpher.hh | 2
sandbox/garrigues/image_identity/image_value_morpher.hh | 2
sandbox/jardonnet/subsampling/sub_sampled_image.hh | 4 -
21 files changed, 88 insertions(+), 47 deletions(-)
Index: mln/trait/images.hh
--- mln/trait/images.hh (revision 2060)
+++ mln/trait/images.hh (working copy)
@@ -175,7 +175,7 @@
template <typename D, typename T, typename I>
- struct default_image_morpher_ : default_image_<T, I>
+ struct default_image_morpher : default_image_<T, I>
{
// misc => delegation except for 'category'
typedef typename image_<D>::size size;
Index: mln/core/translate_image.hh
--- mln/core/translate_image.hh (revision 2060)
+++ mln/core/translate_image.hh (working copy)
@@ -72,7 +72,7 @@
{
template <typename I>
- struct image_< translate_image<I> > : default_image_morpher_< I, mln_value(I),
+ struct image_< translate_image<I> > : default_image_morpher< I, mln_value(I),
translate_image<I> >
{
typedef trait::image::category::domain_morpher category;
@@ -101,7 +101,7 @@
struct translate_image : public mln::internal::image_identity< I, mln_pset(I), translate_image<I> >
{
- typedef mln::internal::image_morpher_< I, mln_pset(I), translate_image<I> > super_;
+ typedef mln::internal::image_morpher< I, mln_pset(I), translate_image<I> > super_;
typedef line_piter_<mln_psite(I)> line_piter;
/// Return type of read-write access.
Index: mln/core/internal/image_if_base.hh
--- mln/core/internal/image_if_base.hh (revision 2060)
+++ mln/core/internal/image_if_base.hh (working copy)
@@ -68,7 +68,7 @@
{
template <typename I, typename F, typename E>
- struct image_< mln::internal::image_if_base_<I,F,E> > : default_image_morpher_< I, mln_value(I), E >
+ struct image_< mln::internal::image_if_base_<I,F,E> > : default_image_morpher< I, mln_value(I), E >
{
private:
typedef mln_trait_image_data(I) I_data_;
Index: mln/core/internal/data.hh
--- mln/core/internal/data.hh (revision 0)
+++ mln/core/internal/data.hh (revision 0)
@@ -0,0 +1,54 @@
+// Copyright (C) 2007, 2008 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 MLN_CORE_INTERNAL_DATA_HH
+# define MLN_CORE_INTERNAL_DATA_HH
+
+/*! \file mln/core/internal/data.hh
+ *
+ * \brief Declaration of the type of image data.
+ */
+
+
+namespace mln
+{
+
+ namespace internal
+ {
+
+ /// \internal Class of image internal data.
+ /// It has to be specialized for every image type.
+
+ template <typename I>
+ struct data;
+
+ } // end of namespace mln::internal
+
+} // end of namespace mln
+
+
+#endif // ! MLN_CORE_INTERNAL_DATA_HH
Index: mln/core/internal/image_base.hh
--- mln/core/internal/image_base.hh (revision 2060)
+++ mln/core/internal/image_base.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -37,6 +37,7 @@
# include <mln/core/grids.hh>
# include <mln/core/trait/qlf_value.hh>
# include <mln/core/internal/check/image_all.hh>
+# include <mln/core/internal/data.hh>
# include <mln/util/tracked_ptr.hh>
@@ -56,20 +57,6 @@
namespace mln
{
-
- namespace internal
- {
-
- /// \internal Class of image internal data.
- /// FIXME: Say more about it!
-
- template <typename I>
- struct data;
-
- } // end of namespace mln::internal
-
-
-
namespace internal
{
Index: mln/core/internal/image_morpher.hh
--- mln/core/internal/image_morpher.hh (revision 2060)
+++ mln/core/internal/image_morpher.hh (working copy)
@@ -49,7 +49,7 @@
*
*/
template <typename I, typename S, typename E>
- class image_morpher_ : public image_base<S, E>
+ class image_morpher : public image_base<S, E>
{
public:
@@ -72,7 +72,7 @@
operator I() const; // FIXME: Very dangerous? Remove?
protected:
- image_morpher_();
+ image_morpher();
};
} // end of namespace mln::internal
@@ -87,7 +87,7 @@
// template <typename Subject, typename T,
// typename I, typename S, typename E>
// void init_(Subject s, T& target,
-// const internal::image_morpher_<I,S,E>& model);
+// const internal::image_morpher<I,S,E>& model);
// FIXME: Lines above have been inactivated because they are either
// prioritary or ambiguous.
@@ -108,14 +108,14 @@
template <typename I, typename S, typename E>
inline
- image_morpher_<I,S,E>::image_morpher_()
+ image_morpher<I,S,E>::image_morpher()
{
}
template <typename I, typename S, typename E>
inline
mlc_const(I)*
- image_morpher_<I,S,E>::delegatee_() const
+ image_morpher<I,S,E>::delegatee_() const
{
return this->data_ == 0 ? 0 : & this->data_->ima_;
}
@@ -123,14 +123,14 @@
template <typename I, typename S, typename E>
inline
I*
- image_morpher_<I,S,E>::delegatee_()
+ image_morpher<I,S,E>::delegatee_()
{
return this->data_ == 0 ? 0 : & this->data_->ima_;
}
template <typename I, typename S, typename E>
inline
- image_morpher_<I,S,E>::operator I() const
+ image_morpher<I,S,E>::operator I() const
{
mln_precondition(exact(this)->has_data());
return * this->delegatee_();
@@ -139,7 +139,7 @@
template <typename I, typename S, typename E>
inline
bool
- image_morpher_<I,S,E>::has_data() const
+ image_morpher<I,S,E>::has_data() const
{
return
this->data_ != 0 &&
@@ -154,7 +154,7 @@
// template <typename Subject, typename T,
// typename I, typename S, typename E>
// void init_(Subject s, T& target,
-// const internal::image_morpher_<I,S,E>& model)
+// const internal::image_morpher<I,S,E>& model)
// {
// std::cout << "deleg... ";
// // FIXME: Precondition.
@@ -167,7 +167,7 @@
void init_(Subject s, T& target, const Image<J>& model_)
{
// FIXME: Precondition.
- // FIXME: Properly check that J is an internal::image_morpher_.
+ // FIXME: Properly check that J is an internal::image_morpher.
const J& model = exact(model_);
init_(s, target, * model.delegatee_());
}
Index: mln/core/internal/image_identity.hh
--- mln/core/internal/image_identity.hh (revision 2060)
+++ mln/core/internal/image_identity.hh (working copy)
@@ -48,7 +48,7 @@
*
*/
template <typename I, typename S, typename E>
- class image_identity : public image_morpher_<I, S, E>
+ class image_identity : public image_morpher<I, S, E>
{
public:
Index: mln/core/internal/image_domain_morpher.hh
--- mln/core/internal/image_domain_morpher.hh (revision 2060)
+++ mln/core/internal/image_domain_morpher.hh (working copy)
@@ -48,7 +48,7 @@
*
*/
template <typename I, typename S, typename E>
- class image_domain_morpher : public image_morpher_<I, S, E>
+ class image_domain_morpher : public image_morpher<I, S, E>
{
public:
Index: mln/core/internal/image_value_morpher.hh
--- mln/core/internal/image_value_morpher.hh (revision 2060)
+++ mln/core/internal/image_value_morpher.hh (working copy)
@@ -51,7 +51,7 @@
*
*/
template <typename I, typename E>
- class image_value_morpher : public image_morpher_<I, mln_pset(I), E>
+ class image_value_morpher : public image_morpher<I, mln_pset(I), E>
{
public:
Index: mln/core/cast_image.hh
--- mln/core/cast_image.hh (revision 2060)
+++ mln/core/cast_image.hh (working copy)
@@ -66,7 +66,7 @@
{
template <typename T, typename I>
- struct image_< cast_image_<T,I> > : default_image_morpher_< I, T, cast_image_<T,I> >
+ struct image_< cast_image_<T,I> > : default_image_morpher< I, T, cast_image_<T,I> >
{
typedef trait::image::io::read_only io;
};
Index: mln/core/sub_image.hh
--- mln/core/sub_image.hh (revision 2060)
+++ mln/core/sub_image.hh (working copy)
@@ -67,7 +67,7 @@
{
template <typename I, typename S>
- struct image_< sub_image<I,S> > : default_image_morpher_< I,
+ struct image_< sub_image<I,S> > : default_image_morpher< I,
mln_value(I),
sub_image<I,S> >
{
Index: mln/core/t_image.hh
--- mln/core/t_image.hh (revision 2060)
+++ mln/core/t_image.hh (working copy)
@@ -81,12 +81,12 @@
*/
template <typename I>
class t_image
- : public internal::image_morpher_< I, mln_pset(I), t_image<I> >
+ : public internal::image_morpher< I, mln_pset(I), t_image<I> >
{
public:
/// Super type.
typedef
- internal::image_morpher_< I, mln_pset(I), t_image<I> > super_;
+ internal::image_morpher< I, mln_pset(I), t_image<I> > super_;
/// Point_Site associated type.
typedef mln_psite(I) psite;
Index: mln/core/image_if.hh
--- mln/core/image_if.hh (revision 2060)
+++ mln/core/image_if.hh (working copy)
@@ -68,7 +68,7 @@
{
template <typename I, typename F>
- struct image_< image_if<I,F> > : default_image_morpher_< I,
+ struct image_< image_if<I,F> > : default_image_morpher< I,
mln_value(I),
image_if<I,F> >
{
Index: mln/core/hexa.hh
--- mln/core/hexa.hh (revision 2060)
+++ mln/core/hexa.hh (working copy)
@@ -67,7 +67,7 @@
{
template <typename I>
- struct image_< hexa<I> > : default_image_morpher_< I, mln_value(I),
+ struct image_< hexa<I> > : default_image_morpher< I, mln_value(I),
hexa<I> >
{
// private:
Index: mln/neighb/image.hh
--- mln/neighb/image.hh (revision 2060)
+++ mln/neighb/image.hh (working copy)
@@ -71,7 +71,7 @@
template <typename I, typename N>
struct image_< neighb::image<I, N> >
- : public default_image_morpher_< I, mln_value(I), neighb::image<I, N> >
+ : public default_image_morpher< I, mln_value(I), neighb::image<I, N> >
{
typedef trait::image::category::morpher category;
Index: mln/value/stack.hh
--- mln/value/stack.hh (revision 2060)
+++ mln/value/stack.hh (working copy)
@@ -101,7 +101,7 @@
template <unsigned n, typename I>
struct image_< mln::value::stack_image<n, I> >
- : default_image_morpher_< I,
+ : default_image_morpher< I,
algebra::vec<n, mln_value(I)>,
mln::value::stack_image<n, I> >
{
Index: mln/border/find.hh
--- mln/border/find.hh (revision 2060)
+++ mln/border/find.hh (working copy)
@@ -61,7 +61,7 @@
template <typename I, typename S, typename E>
inline
- unsigned find__(const mln::internal::image_morpher_<I,S,E>& ima)
+ unsigned find__(const mln::internal::image_morpher<I,S,E>& ima)
{
return border::find(*ima.delegatee_());
}
Index: sandbox/duhamel/translate_image.hh
--- sandbox/duhamel/translate_image.hh (revision 2060)
+++ sandbox/duhamel/translate_image.hh (working copy)
@@ -66,7 +66,7 @@
{
template <typename I>
- struct image_< translate_image<I> > : default_image_morpher_< I, mln_value(I),
+ struct image_< translate_image<I> > : default_image_morpher< I, mln_value(I),
translate_image<I> >
{
@@ -89,7 +89,7 @@
struct translate_image : public mln::internal::image_identity< I, mln_pset(I), translate_image<I> >
{
- typedef mln::internal::image_morpher_< I, mln_pset(I), translate_image<I> > super_;
+ typedef mln::internal::image_morpher< I, mln_pset(I), translate_image<I> > super_;
/// Return type of read-write access.
typedef typename internal::morpher_lvalue_<I>::ret lvalue;
Index: sandbox/jardonnet/subsampling/sub_sampled_image.hh
--- sandbox/jardonnet/subsampling/sub_sampled_image.hh (revision 2060)
+++ sandbox/jardonnet/subsampling/sub_sampled_image.hh (working copy)
@@ -68,12 +68,12 @@
template <typename I>
class sub_sampled_image
- : public internal::image_morpher_< I, mln_pset(I), sub_sampled_image<I> >
+ : public internal::image_morpher< I, mln_pset(I), sub_sampled_image<I> >
{
public:
/// Super type.
typedef
- internal::image_morpher_< I, mln_pset(I), sub_sampled_image<I> > super_;
+ internal::image_morpher< I, mln_pset(I), sub_sampled_image<I> > super_;
/// Point_Site associated type.
typedef mln_psite(I) psite;
Index: sandbox/garrigues/image_identity/image_domain_morpher.hh
--- sandbox/garrigues/image_identity/image_domain_morpher.hh (revision 2060)
+++ sandbox/garrigues/image_identity/image_domain_morpher.hh (working copy)
@@ -50,7 +50,7 @@
* \internal
*/
template <typename I, typename S, typename E>
- class image_domain_morpher : public virtual image_morpher_<I, S, E>
+ class image_domain_morpher : public virtual image_morpher<I, S, E>
{
public:
Index: sandbox/garrigues/image_identity/image_value_morpher.hh
--- sandbox/garrigues/image_identity/image_value_morpher.hh (revision 2060)
+++ sandbox/garrigues/image_identity/image_value_morpher.hh (working copy)
@@ -50,7 +50,7 @@
* \internal
*/
template <typename I, typename E>
- class image_value_morpher : public virtual image_morpher_<I, mln_pset(I), E>
+ class image_value_morpher : public virtual image_morpher<I, mln_pset(I), E>
{
public:
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Now you can compile tests (without running them) by using `make tests' in
any subdirectory of milena/tests/:
make -C _build/milena/tests tests
It can be convenient for tests that take a long time to execute (for
instance, the ones from milena/tests/core/ and milena/tests/morpho/).
However, you are still encouraged to often run the test suite before
sending your patches! :)
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Add a tests target to Makefiles of tests/.
* tests/tests-recursive.mk: New file.
Include it...
* tests/tests.mk: ...here.
tests-recursive.mk | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
tests.mk | 5 ++++-
2 files changed, 56 insertions(+), 1 deletion(-)
Index: tests/tests.mk
--- tests/tests.mk (revision 2059)
+++ tests/tests.mk (working copy)
@@ -1,4 +1,4 @@
-## FIXME: Revamp (see Olena 0.11's test suite).
+## FIXME: Revamp (see Olena 0.11's test suite). -*- Automake -*-
# Look for Milena header in srcdir and for (generated) test headers
# (like data.hh) in builddir.
@@ -15,3 +15,6 @@
TESTS_CXXFLAGS_SPEED = @TESTS_CXXFLAGS_SPEED@
TESTS_CXXFLAGS_DEBUG = @TESTS_CXXFLAGS_DEBUG@
+
+# Inject rules to compile tests (recursively), without running them.
+include $(top_srcdir)/milena/tests/tests-recursive.mk
Index: tests/tests-recursive.mk
--- tests/tests-recursive.mk (revision 0)
+++ tests/tests-recursive.mk (revision 0)
@@ -0,0 +1,52 @@
+# tests-recursive.mk -*- Automake -*-
+# Compile tests recursively, but don't them.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+# Sometimes, we just want to check whether tests compile, without
+# actually running them. Hence this `tests' target, which does half
+# the job of the `check' target.
+
+.PHONY: tests-am tests-recursive tests
+# ``Halved'' version of check-am.
+tests-am: $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+# FIXME: Copied from a generated Makefile.in (rule `$(RECURSIVE_TARGETS)').
+# (Automake does not allow us to interact with the code it generates in
+# Makefile.in.) We might want to propose this as a patch to the Automake
+# project.
+tests-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+tests: tests-recursive
1
0
2059: Fix a precondition in the construction of mln::line_graph_image.
by Roland Levillain 23 Jun '08
by Roland Levillain 23 Jun '08
23 Jun '08
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Hum, patching without testing is bad! Shame on me!
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Fix a precondition in the construction of mln::line_graph_image.
* mln/core/line_graph_image.hh
(mln::internal::data_< line_graph_image<P, V> >::data_):
Fix the second precondition.
line_graph_image.hh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mln/core/line_graph_image.hh
--- mln/core/line_graph_image.hh (revision 2058)
+++ mln/core/line_graph_image.hh (working copy)
@@ -218,7 +218,7 @@
plg_(g)
{
mln_precondition(g.nvertices() == vertex_val.size());
- mln_precondition(g.edges() == edge_val.size());
+ mln_precondition(g.nedges() == edge_val.size());
}
} // end of namespace mln::internal
1
0
23 Jun '08
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Remove the '_' postfix in some core internals.
* mln/core/internal/image_base.hh (image_base_): Rename as...
(image_base_): ...this.
(internal::data_): Rename as...
(internal::data): ...this.
* mln/core/internal/image_morpher.hh
(image_morpher_): Rename as...
(image_morpher): ...this.
* mln/core/internal/image_primary.hh
(image_primary_): Rename as...
(image_primary): ...this.
* mln/core/internal/image_identity.hh: .
(image_identity_): Rename as...
(image_identity): ...this.
* mln/core/internal/image_domain_morpher.hh: .
(image_domain_morpher_): Rename as...
(image_domain_morpher): ...this.
* mln/core/internal/image_value_morpher.hh
(image_value_morpher_): Rename as...
(image_value_morpher): ...this.
Propagate renaming.
* mln/core/translate_image.hh,
* mln/core/line_graph_image.hh,
* mln/core/internal/image_if_base.hh,
* mln/core/internal/run_image.hh,
* mln/core/interpolated.hh,
* mln/core/bgraph_image.hh,
* mln/core/cast_image.hh,
* mln/core/graph_image.hh,
* mln/core/sub_image.hh,
* mln/core/image1d.hh,
* mln/core/fi_adaptor.hh,
* mln/core/image3d.hh,
* mln/core/decorated_image.hh,
* mln/core/image_if.hh,
* mln/core/value_enc_image.hh,
* mln/core/hexa.hh,
* mln/core/tr_image.hh,
* mln/core/safe.hh,
* mln/core/concept/image.hh,
* mln/core/plain.hh,
* mln/core/image2d.hh,
* mln/neighb/image.hh,
* mln/value/stack.hh,
* mln/border/find.hh,
* mln/pw/image.hh,
* sandbox/duhamel/translate_image.hh,
* sandbox/duhamel/mesh_image.hh,
* sandbox/nivault/plugin-gimp/src/gimp-image.hh,
* sandbox/garrigues/tiled_image2d/tiled_image2d.hh,
* sandbox/garrigues/image_identity/image_domain_morpher.hh,
* sandbox/garrigues/image_identity/image_value_morpher.hh,
* sandbox/garrigues/image_identity/interpolated.hh,
* sandbox/garrigues/image_identity/image_identity.hh,
* sandbox/ballas/refactorization/rle_image.hh,
* sandbox/ballas/refactorization/image2d.hh,
* sandbox/ballas/refactorization/internal/image_base.hh: Update.
mln/border/find.hh | 2
mln/core/bgraph_image.hh | 4 -
mln/core/cast_image.hh | 2
mln/core/concept/image.hh | 4 -
mln/core/decorated_image.hh | 2
mln/core/fi_adaptor.hh | 2
mln/core/graph_image.hh | 4 -
mln/core/hexa.hh | 2
mln/core/image1d.hh | 2
mln/core/image2d.hh | 32 +++++------
mln/core/image3d.hh | 4 -
mln/core/image_if.hh | 12 ++--
mln/core/internal/image_base.hh | 42 +++++++++------
mln/core/internal/image_domain_morpher.hh | 14 ++---
mln/core/internal/image_identity.hh | 19 +++---
mln/core/internal/image_if_base.hh | 2
mln/core/internal/image_morpher.hh | 4 -
mln/core/internal/image_primary.hh | 6 +-
mln/core/internal/image_value_morpher.hh | 10 +--
mln/core/internal/run_image.hh | 2
mln/core/interpolated.hh | 4 -
mln/core/line_graph_image.hh | 4 -
mln/core/plain.hh | 4 -
mln/core/safe.hh | 4 -
mln/core/sub_image.hh | 12 ++--
mln/core/tr_image.hh | 4 -
mln/core/translate_image.hh | 2
mln/core/value_enc_image.hh | 2
mln/neighb/image.hh | 2
mln/pw/image.hh | 12 ++--
mln/value/stack.hh | 2
sandbox/ballas/refactorization/image2d.hh | 2
sandbox/ballas/refactorization/internal/image_base.hh | 8 +-
sandbox/ballas/refactorization/rle_image.hh | 2
sandbox/duhamel/mesh_image.hh | 4 -
sandbox/duhamel/translate_image.hh | 2
sandbox/garrigues/image_identity/image_domain_morpher.hh | 14 ++---
sandbox/garrigues/image_identity/image_identity.hh | 8 +-
sandbox/garrigues/image_identity/image_value_morpher.hh | 10 +--
sandbox/garrigues/image_identity/interpolated.hh | 4 -
sandbox/garrigues/tiled_image2d/tiled_image2d.hh | 2
sandbox/nivault/plugin-gimp/src/gimp-image.hh | 2
42 files changed, 147 insertions(+), 134 deletions(-)
Index: mln/core/translate_image.hh
--- mln/core/translate_image.hh (revision 2057)
+++ mln/core/translate_image.hh (working copy)
@@ -98,7 +98,7 @@
*
*/
template <typename I>
- struct translate_image : public mln::internal::image_identity_< I, mln_pset(I), translate_image<I> >
+ struct translate_image : public mln::internal::image_identity< I, mln_pset(I), translate_image<I> >
{
typedef mln::internal::image_morpher_< I, mln_pset(I), translate_image<I> > super_;
Index: mln/core/line_graph_image.hh
--- mln/core/line_graph_image.hh (revision 2057)
+++ mln/core/line_graph_image.hh (working copy)
@@ -108,10 +108,10 @@
/// Values are stored on the vertices of the graph.
template <typename P, typename V>
struct line_graph_image :
- public internal::image_primary_< p_line_graph<P>, line_graph_image<P, V> >
+ public internal::image_primary< p_line_graph<P>, line_graph_image<P, V> >
{
/// Super type.
- typedef mln::internal::image_base_< p_line_graph<P>,
+ typedef mln::internal::image_base< p_line_graph<P>,
line_graph_image<P, V> > super_;
/// Value associated type.
Index: mln/core/internal/image_if_base.hh
--- mln/core/internal/image_if_base.hh (revision 2057)
+++ mln/core/internal/image_if_base.hh (working copy)
@@ -99,7 +99,7 @@
*
*/
template <typename I, typename F, typename E>
- struct image_if_base_ : public internal::image_domain_morpher_< I, pset_if<mln_pset(I),F>, E >
+ struct image_if_base_ : public internal::image_domain_morpher< I, pset_if<mln_pset(I),F>, E >
{
/// Give the definition domain.
Index: mln/core/internal/run_image.hh
--- mln/core/internal/run_image.hh (revision 2057)
+++ mln/core/internal/run_image.hh (working copy)
@@ -49,7 +49,7 @@
* Parameter \c E is the Exact type of the image.
*/
template <typename T, typename P, typename E>
- class run_image_ : public internal::image_primary_< p_runs_<P>, E >
+ class run_image_ : public internal::image_primary< p_runs_<P>, E >
{
protected:
run_image_();
Index: mln/core/internal/image_base.hh
--- mln/core/internal/image_base.hh (revision 2057)
+++ mln/core/internal/image_base.hh (working copy)
@@ -40,6 +40,18 @@
# include <mln/util/tracked_ptr.hh>
+// image_base
+// ^
+// |
+// ---------------------------
+// | |
+// image_primary image_morpher
+// ^
+// |
+// -----------------------------------------
+// | | |
+// image_domain_morpher image_value_morpher image_identity
+
namespace mln
{
@@ -52,7 +64,7 @@
/// FIXME: Say more about it!
template <typename I>
- struct data_;
+ struct data;
} // end of namespace mln::internal
@@ -94,7 +106,7 @@
*
*/
template <typename S, typename E>
- struct image_base_
+ struct image_base
:
public image_checked_<E>
@@ -134,23 +146,23 @@
/// Assignment operator.
- image_base_& operator=(const image_base_& rhs);
+ image_base& operator=(const image_base& rhs);
/// Copy constructor.
- image_base_(const image_base_& rhs);
+ image_base(const image_base& rhs);
/// Detach data from an image (free it if nobody else hold it).
void destroy();
- const util::tracked_ptr< internal::data_<E> >& hook_data_() const { return data_; }
+ const util::tracked_ptr< internal::data<E> >& hook_data_() const { return data_; }
const void* id_() const { return data_.ptr_; }
protected:
- image_base_();
+ image_base();
// Internal data, sharable by several images.
- util::tracked_ptr< internal::data_<E> > data_;
+ util::tracked_ptr< internal::data<E> > data_;
};
@@ -159,13 +171,13 @@
template <typename S, typename E>
inline
- image_base_<S,E>::image_base_()
+ image_base<S,E>::image_base()
{
}
template <typename S, typename E>
inline
- image_base_<S,E>::image_base_(const image_base_& rhs)
+ image_base<S,E>::image_base(const image_base& rhs)
: image_checked_<E>()
{
mln_precondition(exact(rhs).has_data()); // FIXME: Is-it too restrictive?
@@ -174,8 +186,8 @@
template <typename S, typename E>
inline
- image_base_<S,E>&
- image_base_<S,E>::operator=(const image_base_<S,E>& rhs)
+ image_base<S,E>&
+ image_base<S,E>::operator=(const image_base<S,E>& rhs)
{
mln_precondition(exact(rhs).has_data()); // FIXME: Is-it too restrictive?
if (& rhs == this) // || ! exact(rhs).has_data())
@@ -187,7 +199,7 @@
template <typename S, typename E>
inline
bool
- image_base_<S,E>::has_data() const
+ image_base<S,E>::has_data() const
{
return data_ != 0;
}
@@ -195,7 +207,7 @@
template <typename S, typename E>
inline
bool
- image_base_<S,E>::has(const psite& p) const
+ image_base<S,E>::has(const psite& p) const
{
mln_precondition(exact(this)->has_data());
return exact(this)->domain().has(p);
@@ -204,7 +216,7 @@
template <typename S, typename E>
inline
std::size_t
- image_base_<S,E>::nsites() const
+ image_base<S,E>::nsites() const
{
mlc_equal(mln_trait_site_set_nsites(S),
mln::trait::site_set::nsites::known)::check();
@@ -215,7 +227,7 @@
template <typename S, typename E>
inline
void
- image_base_<S,E>::destroy()
+ image_base<S,E>::destroy()
{
data_.clean_();
}
Index: mln/core/internal/image_morpher.hh
--- mln/core/internal/image_morpher.hh (revision 2057)
+++ mln/core/internal/image_morpher.hh (working copy)
@@ -49,7 +49,7 @@
*
*/
template <typename I, typename S, typename E>
- class image_morpher_ : public image_base_<S, E>
+ class image_morpher_ : public image_base<S, E>
{
public:
@@ -64,7 +64,7 @@
/* \brief Test if this image has been initialized; default impl.
*
* This default impl is stronger than the one inherited from
- * image_base_.
+ * image_base.
*/
bool has_data() const;
Index: mln/core/internal/image_primary.hh
--- mln/core/internal/image_primary.hh (revision 2057)
+++ mln/core/internal/image_primary.hh (working copy)
@@ -47,10 +47,10 @@
*
*/
template <typename S, typename E>
- struct image_primary_ : public image_base_<S, E>
+ struct image_primary : public image_base<S, E>
{
protected:
- image_primary_();
+ image_primary();
};
@@ -58,7 +58,7 @@
template <typename S, typename E>
inline
- image_primary_<S,E>::image_primary_()
+ image_primary<S,E>::image_primary()
{
}
Index: mln/core/internal/image_identity.hh
--- mln/core/internal/image_identity.hh (revision 2057)
+++ mln/core/internal/image_identity.hh (working copy)
@@ -48,7 +48,7 @@
*
*/
template <typename I, typename S, typename E>
- class image_identity_ : public image_morpher_<I, S, E>
+ class image_identity : public image_morpher_<I, S, E>
{
public:
@@ -81,7 +81,7 @@
protected:
/// Constructor.
- image_identity_();
+ image_identity();
};
@@ -89,14 +89,14 @@
template <typename I, typename S, typename E>
inline
- image_identity_<I,S,E>::image_identity_()
+ image_identity<I,S,E>::image_identity()
{
}
template <typename I, typename S, typename E>
inline
const mln_vset(I)&
- image_identity_<I,S,E>::values() const
+ image_identity<I,S,E>::values() const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->values();
@@ -105,7 +105,7 @@
template <typename I, typename S, typename E>
inline
mln_rvalue(I)
- image_identity_<I,S,E>::operator()(const mln_psite(S)& p) const
+ image_identity<I,S,E>::operator()(const mln_psite(S)& p) const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->operator()(p);
@@ -113,8 +113,8 @@
template <typename I, typename S, typename E>
inline
- typename image_identity_<I,S,E>::lvalue
- image_identity_<I,S,E>::operator()(const mln_psite(S)& p)
+ typename image_identity<I,S,E>::lvalue
+ image_identity<I,S,E>::operator()(const mln_psite(S)& p)
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->operator()(p);
@@ -123,7 +123,7 @@
template <typename I, typename S, typename E>
inline
const mln_pset(I)&
- image_identity_<I,S,E>::domain() const
+ image_identity<I,S,E>::domain() const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->domain();
@@ -132,11 +132,12 @@
template <typename I, typename S, typename E>
inline
bool
- image_identity_<I,S,E>::has(const mln_psite(I)& p) const
+ image_identity<I,S,E>::has(const mln_psite(I)& p) const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->has(p);
}
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::internal
Index: mln/core/internal/image_domain_morpher.hh
--- mln/core/internal/image_domain_morpher.hh (revision 2057)
+++ mln/core/internal/image_domain_morpher.hh (working copy)
@@ -48,7 +48,7 @@
*
*/
template <typename I, typename S, typename E>
- class image_domain_morpher_ : public image_morpher_<I, S, E>
+ class image_domain_morpher : public image_morpher_<I, S, E>
{
public:
@@ -75,7 +75,7 @@
lvalue operator()(const mln_psite(S)& p);
protected:
- image_domain_morpher_();
+ image_domain_morpher();
};
@@ -83,14 +83,14 @@
template <typename I, typename S, typename E>
inline
- image_domain_morpher_<I,S,E>::image_domain_morpher_()
+ image_domain_morpher<I,S,E>::image_domain_morpher()
{
}
template <typename I, typename S, typename E>
inline
const mln_vset(I)&
- image_domain_morpher_<I,S,E>::values() const
+ image_domain_morpher<I,S,E>::values() const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->values();
@@ -99,7 +99,7 @@
template <typename I, typename S, typename E>
inline
mln_rvalue(I)
- image_domain_morpher_<I,S,E>::operator()(const mln_psite(S)& p) const
+ image_domain_morpher<I,S,E>::operator()(const mln_psite(S)& p) const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->operator()(p);
@@ -107,8 +107,8 @@
template <typename I, typename S, typename E>
inline
- typename image_domain_morpher_<I,S,E>::lvalue
- image_domain_morpher_<I,S,E>::operator()(const mln_psite(S)& p)
+ typename image_domain_morpher<I,S,E>::lvalue
+ image_domain_morpher<I,S,E>::operator()(const mln_psite(S)& p)
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->operator()(p);
Index: mln/core/internal/image_value_morpher.hh
--- mln/core/internal/image_value_morpher.hh (revision 2057)
+++ mln/core/internal/image_value_morpher.hh (working copy)
@@ -51,7 +51,7 @@
*
*/
template <typename I, typename E>
- class image_value_morpher_ : public image_morpher_<I, mln_pset(I), E>
+ class image_value_morpher : public image_morpher_<I, mln_pset(I), E>
{
public:
@@ -59,7 +59,7 @@
bool has(const mln_psite(I)& p) const;
protected:
- image_value_morpher_();
+ image_value_morpher();
};
@@ -67,14 +67,14 @@
template <typename I, typename E>
inline
- image_value_morpher_<I,E>::image_value_morpher_()
+ image_value_morpher<I,E>::image_value_morpher()
{
}
template <typename I, typename E>
inline
const mln_pset(I)&
- image_value_morpher_<I,E>::domain() const
+ image_value_morpher<I,E>::domain() const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->domain();
@@ -83,7 +83,7 @@
template <typename I, typename E>
inline
bool
- image_value_morpher_<I,E>::has(const mln_psite(I)& p) const
+ image_value_morpher<I,E>::has(const mln_psite(I)& p) const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->has(p);
Index: mln/core/interpolated.hh
--- mln/core/interpolated.hh (revision 2057)
+++ mln/core/interpolated.hh (working copy)
@@ -64,10 +64,10 @@
*
*/
template <typename I>
- struct interpolated : public mln::internal::image_identity_< I, mln_pset(I), interpolated<I> >
+ struct interpolated : public mln::internal::image_identity< I, mln_pset(I), interpolated<I> >
{
- typedef mln::internal::image_identity_< I, mln_pset(I), interpolated<I> > super_;
+ typedef mln::internal::image_identity< I, mln_pset(I), interpolated<I> > super_;
/// Point_Site associated type.
typedef mln_psite(I) psite;
Index: mln/core/bgraph_image.hh
--- mln/core/bgraph_image.hh (revision 2057)
+++ mln/core/bgraph_image.hh (working copy)
@@ -94,10 +94,10 @@
*/
template <typename P, typename V>
struct bgraph_image :
- public internal::image_primary_< p_bgraph<P>, bgraph_image<P, V> >
+ public internal::image_primary< p_bgraph<P>, bgraph_image<P, V> >
{
- typedef mln::internal::image_base_< p_bgraph<P>, bgraph_image<P, V> >
+ typedef mln::internal::image_base< p_bgraph<P>, bgraph_image<P, V> >
super_;
/// Value associated type.
Index: mln/core/cast_image.hh
--- mln/core/cast_image.hh (revision 2057)
+++ mln/core/cast_image.hh (working copy)
@@ -80,7 +80,7 @@
*
*/
template <typename T, typename I>
- struct cast_image_ : public internal::image_value_morpher_< I, cast_image_<T,I> >
+ struct cast_image_ : public internal::image_value_morpher< I, cast_image_<T,I> >
{
/// Value associated type.
typedef T value;
Index: mln/core/graph_image.hh
--- mln/core/graph_image.hh (revision 2057)
+++ mln/core/graph_image.hh (working copy)
@@ -91,10 +91,10 @@
/// Values are stored on the edges of the graph, not on its vertices.
template <typename P, typename V>
struct graph_image :
- public internal::image_primary_< p_graph<P>, graph_image<P, V> >
+ public internal::image_primary< p_graph<P>, graph_image<P, V> >
{
/// Super type.
- typedef mln::internal::image_base_< p_graph<P>, graph_image<P, V> > super_;
+ typedef mln::internal::image_base< p_graph<P>, graph_image<P, V> > super_;
/// Value associated type.
typedef V value;
Index: mln/core/sub_image.hh
--- mln/core/sub_image.hh (revision 2057)
+++ mln/core/sub_image.hh (working copy)
@@ -51,9 +51,9 @@
/// \internal Data structure for \c mln::sub_image<I,S>.
template <typename I, typename S>
- struct data_< sub_image<I,S> >
+ struct data< sub_image<I,S> >
{
- data_(I& ima, const S& pset);
+ data(I& ima, const S& pset);
I ima_;
S pset_;
@@ -93,7 +93,7 @@
// FIXME: Doc!
template <typename I, typename S>
- struct sub_image : public internal::image_domain_morpher_< I,
+ struct sub_image : public internal::image_domain_morpher< I,
S,
sub_image<I,S> >
{
@@ -150,14 +150,14 @@
}
- // internal::data_< sub_image<I,S> >
+ // internal::data< sub_image<I,S> >
namespace internal
{
template <typename I, typename S>
inline
- data_< sub_image<I,S> >::data_(I& ima, const S& pset)
+ data< sub_image<I,S> >::data(I& ima, const S& pset)
: ima_(ima),
pset_(pset)
{
@@ -187,7 +187,7 @@
sub_image<I,S>::init_(I& ima, const S& pset)
{
mln_precondition(! this->has_data());
- this->data_ = new internal::data_< sub_image<I,S> >(ima, pset);
+ this->data_ = new internal::data< sub_image<I,S> >(ima, pset);
}
template <typename I, typename S>
Index: mln/core/image1d.hh
--- mln/core/image1d.hh (revision 2057)
+++ mln/core/image1d.hh (working copy)
@@ -112,7 +112,7 @@
* thickness before and after data.
*/
template <typename T>
- struct image1d : public internal::image_primary_< box1d, image1d<T> >
+ struct image1d : public internal::image_primary< box1d, image1d<T> >
{
// Warning: just to make effective types appear in Doxygen:
typedef box1d pset;
Index: mln/core/fi_adaptor.hh
--- mln/core/fi_adaptor.hh (revision 2057)
+++ mln/core/fi_adaptor.hh (working copy)
@@ -127,7 +127,7 @@
*/
template <typename I>
- struct fi_adaptor : public internal::image_primary_< box2d, fi_adaptor<I> >
+ struct fi_adaptor : public internal::image_primary< box2d, fi_adaptor<I> >
{
// Warning: just to make effective types appear in Doxygen:
typedef box2d pset;
Index: mln/core/image3d.hh
--- mln/core/image3d.hh (revision 2057)
+++ mln/core/image3d.hh (working copy)
@@ -113,7 +113,7 @@
* thickness around data.
*/
template <typename T>
- struct image3d : public internal::image_primary_< box3d, image3d<T> >
+ struct image3d : public internal::image_primary< box3d, image3d<T> >
{
// Warning: just to make effective types appear in Doxygen:
typedef box3d pset;
@@ -127,7 +127,7 @@
/// Super type
- typedef internal::image_primary_< box3d, image3d<T> > super_;
+ typedef internal::image_primary< box3d, image3d<T> > super_;
/// Value associated type.
typedef T value;
Index: mln/core/decorated_image.hh
--- mln/core/decorated_image.hh (revision 2057)
+++ mln/core/decorated_image.hh (working copy)
@@ -83,7 +83,7 @@
template <typename I, typename D>
struct decorated_image :
public internal::decorated_image_impl_< I, decorated_image<I,D> >,
- public internal::image_identity_< I, mln_pset(I), decorated_image<I,D> >
+ public internal::image_identity< I, mln_pset(I), decorated_image<I,D> >
{
public:
typedef decorated_image<I, D> self_;
Index: mln/core/image_if.hh
--- mln/core/image_if.hh (revision 2057)
+++ mln/core/image_if.hh (working copy)
@@ -53,9 +53,9 @@
/// \internal Data structure for \c mln::image_if<I,F>.
template <typename I, typename F>
- struct data_< image_if<I,F> >
+ struct data< image_if<I,F> >
{
- data_(I& ima, const F& f);
+ data(I& ima, const F& f);
I ima_;
pset_if<mln_pset(I), F> pset_;
@@ -89,7 +89,7 @@
*
*/
template <typename I, typename F>
- struct image_if : public internal::image_domain_morpher_< I,
+ struct image_if : public internal::image_domain_morpher< I,
pset_if<mln_pset(I), F>,
image_if<I, F> >
{
@@ -151,14 +151,14 @@
# ifndef MLN_INCLUDE_ONLY
- // internal::data_< image_if<I,F> >
+ // internal::data< image_if<I,F> >
namespace internal
{
template <typename I, typename F>
inline
- data_< image_if<I,F> >::data_(I& ima, const F& f)
+ data< image_if<I,F> >::data(I& ima, const F& f)
: ima_(ima),
pset_(ima.domain() | f)
{
@@ -188,7 +188,7 @@
image_if<I,F>::init_(I& ima, const F& f)
{
mln_precondition(! this->has_data());
- this->data_ = new internal::data_< image_if<I,F> >(ima, f);
+ this->data_ = new internal::data< image_if<I,F> >(ima, f);
}
template <typename I, typename F>
Index: mln/core/value_enc_image.hh
--- mln/core/value_enc_image.hh (revision 2057)
+++ mln/core/value_enc_image.hh (working copy)
@@ -99,7 +99,7 @@
*/
template <typename P, typename T>
class value_enc_image :
- public internal::image_primary_< pset_array< p_runs_<P> >,
+ public internal::image_primary< pset_array< p_runs_<P> >,
value_enc_image<P, T> >
{
public:
Index: mln/core/hexa.hh
--- mln/core/hexa.hh (revision 2057)
+++ mln/core/hexa.hh (working copy)
@@ -116,7 +116,7 @@
*
*/
template <typename I>
- struct hexa : public internal::image_domain_morpher_< I, box2d_h, hexa<I> >
+ struct hexa : public internal::image_domain_morpher< I, box2d_h, hexa<I> >
{
/// Skeleton.
typedef hexa< tag::image_<I> > skeleton;
Index: mln/core/tr_image.hh
--- mln/core/tr_image.hh (revision 2057)
+++ mln/core/tr_image.hh (working copy)
@@ -69,12 +69,12 @@
*/
template <typename T, typename I>
struct tr_image :
- public mln::internal::image_identity_< I, mln_pset(I), tr_image<T,I> >
+ public mln::internal::image_identity< I, mln_pset(I), tr_image<T,I> >
{
/// Super type.
typedef
- mln::internal::image_identity_< I, mln_pset(I), tr_image<T,I> > super_;
+ mln::internal::image_identity< I, mln_pset(I), tr_image<T,I> > super_;
/// Point_Site associated type.
typedef mln_psite(I) psite;
Index: mln/core/safe.hh
--- mln/core/safe.hh (revision 2057)
+++ mln/core/safe.hh (working copy)
@@ -66,9 +66,9 @@
// FIXME: Doc!
template <typename I>
- class safe_image : public internal::image_identity_< I, mln_pset(I), safe_image<I> >
+ class safe_image : public internal::image_identity< I, mln_pset(I), safe_image<I> >
{
- typedef internal::image_identity_< I, mln_pset(I), safe_image<I> > super_;
+ typedef internal::image_identity< I, mln_pset(I), safe_image<I> > super_;
public:
/// Skeleton.
Index: mln/core/concept/image.hh
--- mln/core/concept/image.hh (revision 2057)
+++ mln/core/concept/image.hh (working copy)
@@ -73,7 +73,7 @@
typedef Image<void> category;
/*
- // provided by internal::image_base_:
+ // provided by internal::image_base:
typedef pset;
typedef site;
@@ -115,7 +115,7 @@
inline
Image<E>::Image()
{
- // provided by internal::image_base_:
+ // provided by internal::image_base:
typedef mln_pset(E) pset;
typedef mln_site(E) site;
Index: mln/core/plain.hh
--- mln/core/plain.hh (revision 2057)
+++ mln/core/plain.hh (working copy)
@@ -66,10 +66,10 @@
*
*/
template <typename I>
- struct plain : public mln::internal::image_identity_< I, mln_pset(I), plain<I> >
+ struct plain : public mln::internal::image_identity< I, mln_pset(I), plain<I> >
{
- typedef mln::internal::image_identity_< I, mln_pset(I), plain<I> > super_;
+ typedef mln::internal::image_identity< I, mln_pset(I), plain<I> > super_;
/// Point_Site associated type.
typedef mln_psite(I) psite;
Index: mln/core/image2d.hh
--- mln/core/image2d.hh (revision 2057)
+++ mln/core/image2d.hh (working copy)
@@ -60,10 +60,10 @@
/// \internal Data structure for \c mln::image2d<T>.
template <typename T>
- struct data_< image2d<T> >
+ struct data< image2d<T> >
{
- data_(const box2d& b, unsigned bdr);
- ~data_();
+ data(const box2d& b, unsigned bdr);
+ ~data();
T* buffer_;
T** array_;
@@ -75,7 +75,7 @@
void update_vb_();
void allocate_();
void deallocate_();
- void swap_(data_< image2d<T> >& other_);
+ void swap_(data< image2d<T> >& other_);
void reallocate_(unsigned new_border);
};
@@ -120,7 +120,7 @@
* thickness around data.
*/
template <typename T>
- struct image2d : public internal::image_primary_< box2d, image2d<T> >
+ struct image2d : public internal::image_primary< box2d, image2d<T> >
{
/// Value associated type.
typedef T value;
@@ -247,13 +247,13 @@
}
- // internal::data_< image2d<T> >
+ // internal::data< image2d<T> >
namespace internal
{
template <typename T>
inline
- data_< image2d<T> >::data_(const box2d& b, unsigned bdr)
+ data< image2d<T> >::data(const box2d& b, unsigned bdr)
: buffer_(0),
array_ (0),
b_ (b),
@@ -264,7 +264,7 @@
template <typename T>
inline
- data_< image2d<T> >::~data_()
+ data< image2d<T> >::~data()
{
deallocate_();
}
@@ -272,7 +272,7 @@
template <typename T>
inline
void
- data_< image2d<T> >::update_vb_()
+ data< image2d<T> >::update_vb_()
{
vb_.pmin() = b_.pmin() - dpoint2d(all_to(bdr_));
vb_.pmax() = b_.pmax() + dpoint2d(all_to(bdr_));
@@ -281,7 +281,7 @@
template <typename T>
inline
void
- data_< image2d<T> >::allocate_()
+ data< image2d<T> >::allocate_()
{
update_vb_();
unsigned
@@ -303,7 +303,7 @@
template <typename T>
inline
void
- data_< image2d<T> >::deallocate_()
+ data< image2d<T> >::deallocate_()
{
if (buffer_)
{
@@ -321,9 +321,9 @@
template <typename T>
inline
void
- data_< image2d<T> >::swap_(data_< image2d<T> >& other_)
+ data< image2d<T> >::swap_(data< image2d<T> >& other_)
{
- data_< image2d<T> > self_ = *this;
+ data< image2d<T> > self_ = *this;
*this = other_;
other_ = self_;
}
@@ -331,9 +331,9 @@
template <typename T>
inline
void
- data_< image2d<T> >::reallocate_(unsigned new_border)
+ data< image2d<T> >::reallocate_(unsigned new_border)
{
- data_< image2d<T> >& tmp = *(new data_< image2d<T> >(this->b_, new_border));
+ data< image2d<T> >& tmp = *(new data< image2d<T> >(this->b_, new_border));
this->swap_(tmp);
}
@@ -369,7 +369,7 @@
image2d<T>::init_(const box2d& b, unsigned bdr)
{
mln_precondition(! this->has_data());
- this->data_ = new internal::data_< image2d<T> >(b, bdr);
+ this->data_ = new internal::data< image2d<T> >(b, bdr);
}
template <typename T>
Index: mln/neighb/image.hh
--- mln/neighb/image.hh (revision 2057)
+++ mln/neighb/image.hh (working copy)
@@ -93,7 +93,7 @@
/// \pre The domains of \c I and \c N must be compatible.
template <typename I, typename N>
struct image
- : public internal::image_identity_ < I, mln_pset(I), image <I, N> >
+ : public internal::image_identity < I, mln_pset(I), image <I, N> >
{
/// Point_Site associated type.
typedef mln_psite(I) psite;
Index: mln/value/stack.hh
--- mln/value/stack.hh (revision 2057)
+++ mln/value/stack.hh (working copy)
@@ -146,7 +146,7 @@
*/
template <unsigned n, typename I>
struct stack_image
- : public mln::internal::image_value_morpher_< I, stack_image<n,I> >
+ : public mln::internal::image_value_morpher< I, stack_image<n,I> >
{
/// Point_Site associated type.
typedef mln_psite(I) psite;
Index: mln/border/find.hh
--- mln/border/find.hh (revision 2057)
+++ mln/border/find.hh (working copy)
@@ -68,7 +68,7 @@
template <typename S, typename E>
inline
- unsigned find__(const mln::internal::image_base_<S,E>&)
+ unsigned find__(const mln::internal::image_base<S,E>&)
{
return 0;
}
Index: mln/pw/image.hh
--- mln/pw/image.hh (revision 2057)
+++ mln/pw/image.hh (working copy)
@@ -63,9 +63,9 @@
/// \internal Data structure for mln::pw::image
template <typename F, typename S>
- struct data_< mln::pw::image<F,S> >
+ struct data< mln::pw::image<F,S> >
{
- data_(const F& f, const S& ps);
+ data(const F& f, const S& ps);
F f_;
S pset_;
};
@@ -114,7 +114,7 @@
*
*/
template <typename F, typename S>
- struct image : public internal::image_primary_< S, image<F,S> >
+ struct image : public internal::image_primary< S, image<F,S> >
{
/// Skeleton.
typedef image< tag::function_<F>, tag::pset_<S> > skeleton;
@@ -171,14 +171,14 @@
return tmp;
}
- // internal::data_< pw::image<F,S> >
+ // internal::data< pw::image<F,S> >
namespace internal
{
/// \internal
template <typename F, typename S>
inline
- data_< pw::image<F,S> >::data_(const F& f, const S& ps)
+ data< pw::image<F,S> >::data(const F& f, const S& ps)
: f_(f),
pset_(ps)
{
@@ -201,7 +201,7 @@
inline
image<F,S>::image(const Function_p2v<F>& f, const Site_Set<S>& ps)
{
- this->data_ = new internal::data_< pw::image<F,S> >(exact(f), exact(ps));
+ this->data_ = new internal::data< pw::image<F,S> >(exact(f), exact(ps));
}
template <typename F, typename S>
Index: sandbox/duhamel/translate_image.hh
--- sandbox/duhamel/translate_image.hh (revision 2057)
+++ sandbox/duhamel/translate_image.hh (working copy)
@@ -86,7 +86,7 @@
*
*/
template <typename I>
- struct translate_image : public mln::internal::image_identity_< I, mln_pset(I), translate_image<I> >
+ struct translate_image : public mln::internal::image_identity< I, mln_pset(I), translate_image<I> >
{
typedef mln::internal::image_morpher_< I, mln_pset(I), translate_image<I> > super_;
Index: sandbox/duhamel/mesh_image.hh
--- sandbox/duhamel/mesh_image.hh (revision 2057)
+++ sandbox/duhamel/mesh_image.hh (working copy)
@@ -67,10 +67,10 @@
*
*/
template <typename P, typename V>
- struct mesh_image : public internal::image_primary_< mesh_p<P>, mesh_image<P, V> >
+ struct mesh_image : public internal::image_primary< mesh_p<P>, mesh_image<P, V> >
{
- typedef mln::internal::image_base_< mesh_p<P>, mesh_image<P, V> > super_;
+ typedef mln::internal::image_base< mesh_p<P>, mesh_image<P, V> > super_;
/// Value associated type.
typedef V value;
Index: sandbox/nivault/plugin-gimp/src/gimp-image.hh
--- sandbox/nivault/plugin-gimp/src/gimp-image.hh (revision 2057)
+++ sandbox/nivault/plugin-gimp/src/gimp-image.hh (working copy)
@@ -131,7 +131,7 @@
*
*/
template <GimpImageType t>
- struct gimp_image : public internal::image_primary_< box2d, gimp_image<t> >
+ struct gimp_image : public internal::image_primary< box2d, gimp_image<t> >
{
// Warning: just to make effective types appear in Doxygen:
typedef box2d pset;
Index: sandbox/garrigues/tiled_image2d/tiled_image2d.hh
--- sandbox/garrigues/tiled_image2d/tiled_image2d.hh (revision 2057)
+++ sandbox/garrigues/tiled_image2d/tiled_image2d.hh (working copy)
@@ -122,7 +122,7 @@
* FIXME
*/
template <typename T>
- struct tiled_image2d : public internal::image_primary_< box2d, tiled_image2d<T> >
+ struct tiled_image2d : public internal::image_primary< box2d, tiled_image2d<T> >
{
// Warning: just to make effective types appear in Doxygen:
typedef box2d pset;
Index: sandbox/garrigues/image_identity/image_domain_morpher.hh
--- sandbox/garrigues/image_identity/image_domain_morpher.hh (revision 2057)
+++ sandbox/garrigues/image_identity/image_domain_morpher.hh (working copy)
@@ -50,7 +50,7 @@
* \internal
*/
template <typename I, typename S, typename E>
- class image_domain_morpher_ : public virtual image_morpher_<I, S, E>
+ class image_domain_morpher : public virtual image_morpher_<I, S, E>
{
public:
@@ -77,20 +77,20 @@
lvalue operator()(const mln_psite(S)& p);
protected:
- image_domain_morpher_();
+ image_domain_morpher();
};
# ifndef MLN_INCLUDE_ONLY
template <typename I, typename S, typename E>
- image_domain_morpher_<I,S,E>::image_domain_morpher_()
+ image_domain_morpher<I,S,E>::image_domain_morpher()
{
}
template <typename I, typename S, typename E>
const mln_vset(I)&
- image_domain_morpher_<I,S,E>::values() const
+ image_domain_morpher<I,S,E>::values() const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->values();
@@ -98,15 +98,15 @@
template <typename I, typename S, typename E>
mln_rvalue(I)
- image_domain_morpher_<I,S,E>::operator()(const mln_psite(S)& p) const
+ image_domain_morpher<I,S,E>::operator()(const mln_psite(S)& p) const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->operator()(p);
}
template <typename I, typename S, typename E>
- typename image_domain_morpher_<I,S,E>::lvalue
- image_domain_morpher_<I,S,E>::operator()(const mln_psite(S)& p)
+ typename image_domain_morpher<I,S,E>::lvalue
+ image_domain_morpher<I,S,E>::operator()(const mln_psite(S)& p)
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->operator()(p);
Index: sandbox/garrigues/image_identity/image_value_morpher.hh
--- sandbox/garrigues/image_identity/image_value_morpher.hh (revision 2057)
+++ sandbox/garrigues/image_identity/image_value_morpher.hh (working copy)
@@ -50,7 +50,7 @@
* \internal
*/
template <typename I, typename E>
- class image_value_morpher_ : public virtual image_morpher_<I, mln_pset(I), E>
+ class image_value_morpher : public virtual image_morpher_<I, mln_pset(I), E>
{
public:
@@ -58,20 +58,20 @@
bool has(const mln_psite(I)& p) const;
protected:
- image_value_morpher_();
+ image_value_morpher();
};
# ifndef MLN_INCLUDE_ONLY
template <typename I, typename E>
- image_value_morpher_<I,E>::image_value_morpher_()
+ image_value_morpher<I,E>::image_value_morpher()
{
}
template <typename I, typename E>
const mln_pset(I)&
- image_value_morpher_<I,E>::domain() const
+ image_value_morpher<I,E>::domain() const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->domain();
@@ -79,7 +79,7 @@
template <typename I, typename E>
bool
- image_value_morpher_<I,E>::has(const mln_psite(I)& p) const
+ image_value_morpher<I,E>::has(const mln_psite(I)& p) const
{
mln_precondition(this->delegatee_() != 0);
return this->delegatee_()->has(p);
Index: sandbox/garrigues/image_identity/interpolated.hh
--- sandbox/garrigues/image_identity/interpolated.hh (revision 2057)
+++ sandbox/garrigues/image_identity/interpolated.hh (working copy)
@@ -62,10 +62,10 @@
*
*/
template <typename I>
- struct interpolated : public mln::internal::image_identity_< I, mln_pset(I), interpolated<I> >
+ struct interpolated : public mln::internal::image_identity< I, mln_pset(I), interpolated<I> >
{
- typedef mln::internal::image_identity_< I, mln_pset(I), interpolated<I> > super_;
+ typedef mln::internal::image_identity< I, mln_pset(I), interpolated<I> > super_;
/// Point_Site associated type.
typedef mln_psite(I) psite;
Index: sandbox/garrigues/image_identity/image_identity.hh
--- sandbox/garrigues/image_identity/image_identity.hh (revision 2057)
+++ sandbox/garrigues/image_identity/image_identity.hh (working copy)
@@ -50,20 +50,20 @@
* \internal
*/
template <typename I, typename S, typename E>
- class image_identity_ : public image_domain_morpher_<I, S, E>,
- public image_value_morpher_<I, E>
+ class image_identity : public image_domain_morpher<I, S, E>,
+ public image_value_morpher<I, E>
{
public:
protected:
- image_identity_();
+ image_identity();
};
# ifndef MLN_INCLUDE_ONLY
template <typename I, typename S, typename E>
- image_identity_<I,S,E>::image_identity_()
+ image_identity<I,S,E>::image_identity()
{
}
Index: sandbox/ballas/refactorization/rle_image.hh
--- sandbox/ballas/refactorization/rle_image.hh (revision 2057)
+++ sandbox/ballas/refactorization/rle_image.hh (working copy)
@@ -11,7 +11,7 @@
// note P must be a point
template <typename P, typename T>
class rle_image :
- public internal::image_base_<rle_pset<P>, rle_image<P, T> >
+ public internal::image_base<rle_pset<P>, rle_image<P, T> >
{
public:
Index: sandbox/ballas/refactorization/image2d.hh
--- sandbox/ballas/refactorization/image2d.hh (revision 2057)
+++ sandbox/ballas/refactorization/image2d.hh (working copy)
@@ -9,7 +9,7 @@
{
template <typename T>
- class image2d : public internal::image_base_< box2d<int>, image2d<T> >
+ class image2d : public internal::image_base< box2d<int>, image2d<T> >
{
public:
Index: sandbox/ballas/refactorization/internal/image_base.hh
--- sandbox/ballas/refactorization/internal/image_base.hh (revision 2057)
+++ sandbox/ballas/refactorization/internal/image_base.hh (working copy)
@@ -10,7 +10,7 @@
/// Image base
/// S is the point set type
template <typename S, typename E>
- struct image_base_ : public Image<E>
+ struct image_base : public Image<E>
{
typedef S pset;
typedef typename S::psite psite;
@@ -22,7 +22,7 @@
bool has(const psite& ps) const;
protected:
- image_base_();
+ image_base();
};
///FIXME: is_ready
@@ -30,13 +30,13 @@
# ifndef MLN_INCLUDE_ONLY
template <typename S, typename E>
- image_base_<S, E>::image_base_()
+ image_base<S, E>::image_base()
{
}
template <typename S, typename E>
bool
- image_base_<S, E>::has(const psite& ps) const
+ image_base<S, E>::has(const psite& ps) const
{
return exact(this)->has(ps);
}
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Fix the labeling in Meyer's WST algorithm.
* mln/morpho/meyer_wst.hh: Use 0 for the label of the watershed,
to be consistent with other labeling algorithms (computation of
regional minima, for instance).
meyer_wst.hh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: mln/morpho/meyer_wst.hh
--- mln/morpho/meyer_wst.hh (revision 2056)
+++ mln/morpho/meyer_wst.hh (working copy)
@@ -110,7 +110,8 @@
/* FIXME: Ensure the input image has scalar values. */
typedef L marker;
- const marker unmarked = mln_min(marker);
+ // FIXME: Use literal::zero.
+ const marker unmarked = 0;
// Initialize the output with the markers (minima components).
mln_ch_value(I, marker) output =
1
0
23 Jun '08
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
More checks in the construction of graph-based images.
* mln/core/graph_image.hh
(mln::internal::data_< graph_image<P, V> >::data_)
* mln/core/line_graph_image.hh
(mln::internal::data_< line_graph_image<P, V> >::data_):
Ensure the graph pset and its associated data are consistent.
graph_image.hh | 1 +
line_graph_image.hh | 2 ++
2 files changed, 3 insertions(+)
Index: mln/core/graph_image.hh
--- mln/core/graph_image.hh (revision 2055)
+++ mln/core/graph_image.hh (working copy)
@@ -188,6 +188,7 @@
: val_ (val),
pg_ (g)
{
+ mln_precondition(g.nvertices() == val.size());
}
} // end of namespace mln::internal
Index: mln/core/line_graph_image.hh
--- mln/core/line_graph_image.hh (revision 2055)
+++ mln/core/line_graph_image.hh (working copy)
@@ -217,6 +217,8 @@
edge_val_(edge_val),
plg_(g)
{
+ mln_precondition(g.nvertices() == vertex_val.size());
+ mln_precondition(g.edges() == edge_val.size());
}
} // end of namespace mln::internal
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Start a 3-D mesh surface skeletonization tool.
* apps/statues/mesh-skel.cc: New.
* apps/statues/io.hh: Update header guards.
(write_faces_asc_binary, write_off_binary): New functions.
* apps/statues/Makefile.am (bin_PROGRAMS): Add mesh-skel.
(mesh_skel_SOURCES): New.
Add mesh-skel.cc and io.hh.
Makefile.am | 3
io.hh | 48 ++++++++++++-
mesh-skel.cc | 211 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 258 insertions(+), 4 deletions(-)
Index: apps/statues/mesh-skel.cc
--- apps/statues/mesh-skel.cc (revision 0)
+++ apps/statues/mesh-skel.cc (revision 0)
@@ -0,0 +1,211 @@
+// Copyright (C) 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 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.
+
+/// \file apps/statues/mesh-segm.cc
+/// \brief A program computing a skeleton of the surface of the
+/// (triangle) mesh of a statue.
+
+// FIXME: Factor commons parts between mesh-segm and mesh-skel.
+
+#include <cstdlib>
+#include <cmath>
+
+#include <utility>
+#include <iostream>
+
+#include <TriMesh.h>
+
+#include <mln/value/rgb8.hh>
+
+#include <mln/core/point3d.hh>
+#include <mln/make/point3d.hh>
+
+#include <mln/util/graph.hh>
+#include <mln/core/graph_image.hh>
+#include <mln/core/graph_elt_neighborhood.hh>
+
+#include <mln/morpho/closing_area.hh>
+#include <mln/labeling/regional_minima.hh>
+
+#include "io.hh"
+
+
+// Doesn't C++ have a better way to express Pi ?
+const float pi = 4 * atanf(1);
+
+
+int main(int argc, char* argv[])
+{
+ if (argc != 4)
+ {
+ std::cerr << "usage: " << argv[1] << " input.off lambda output.off";
+ exit(1);
+ }
+
+ std::string input_filename = argv[1];
+ unsigned lambda = atoi(argv[2]);
+ std::string output_filename = argv[3];
+
+
+ /*-------.
+ | Mesh. |
+ `-------*/
+
+ // TriMesh is a pain: it systematically allocates on the heap.
+ // Introduce another name to manipulate the mesh as a (non-pointer)
+ // object.
+ TriMesh* mesh_ptr = TriMesh::read(input_filename.c_str());
+ if (!mesh_ptr)
+ exit(2);
+ TriMesh& mesh = *mesh_ptr;
+
+ // Computes faces (triangles).
+ mesh.need_faces();
+ // Computation of the mean curvature on each vertex of the mesh.
+ mesh.need_curvatures();
+ std::vector<float> vertex_h_inv(mesh.faces.size(), 0.f);
+ for (unsigned v = 0; v < mesh.vertices.size(); ++v)
+ {
+ float h = (mesh.curv1[v] + mesh.curv2[v]) / 2;
+ float h_inv = 1 / pi * atan(-h) + pi / 2;
+ vertex_h_inv[v] = h_inv;
+ }
+ // Computation of the mean curvature on each face of the mesh.
+ /* FIXME: Our implementation of the computation of the regional
+ minima doesn't work well with floats (yet). Convert floating
+ point values to a proportional integer value for the moment. */
+ typedef int curv_t;
+ std::vector<curv_t> face_h_inv(mesh.faces.size(), 0.f);
+ for (unsigned f = 0; f < mesh.faces.size(); ++f)
+ {
+ float h_inv =
+ (vertex_h_inv[mesh.faces[f][0]] +
+ vertex_h_inv[mesh.faces[f][1]] +
+ vertex_h_inv[mesh.faces[f][2]])
+ / 3;
+ /* FIXME: This coefficient is used to distinguish small
+ curvature values. We should get rid of it as soon as
+ labeling::regional_minima works correctly on images of float
+ values. */
+ face_h_inv[f] = 1000 * h_inv;
+ }
+
+ /*--------.
+ | Graph. |
+ `--------*/
+
+ /* Build a graph whose vertices correspond to the faces of the mesh,
+ whose edges (between two vertices) correspond to edges (between
+ two faces) of the mesh. */
+
+ /* FIXME: We don't have the required site type yet. Simulate with a
+ dummy type (point3d). */
+ mln::util::graph<mln::point3d> g;
+ // Populate the graph with vertices.
+ for (unsigned i = 0; i < mesh.faces.size(); ++i)
+ g.add_vertex (mln::make::point3d(i, i, i));
+
+ // Populate the graph with edges.
+ mesh.need_across_edge();
+ for (unsigned f = 0; f < mesh.faces.size(); ++f)
+ for (unsigned e = 0; e < 3; ++e)
+ {
+ int f_adj = mesh.across_edge[f][e];
+ if (f_adj != -1)
+ // Add an edge into the graph.
+ g.add_edge(f, f_adj);
+ }
+
+ /*--------------.
+ | Graph image. |
+ `--------------*/
+
+ mln::p_graph<mln::point3d> pg(g);
+
+ typedef mln::graph_image<mln::point3d, curv_t> ima_t;
+ ima_t g_ima(pg, face_h_inv);
+
+ /*-----------------.
+ | Simplification. |
+ `-----------------*/
+
+ typedef mln::graph_elt_neighborhood<mln::point3d> nbh_t;
+ nbh_t nbh;
+
+ ima_t closed_g_ima (g_ima.domain());
+ mln::morpho::closing_area(g_ima, nbh, lambda, closed_g_ima);
+
+ /*------------------.
+ | Regional minima. |
+ `------------------*/
+
+ typedef unsigned label_t;
+ label_t nlabels;
+ typedef mln::graph_image<mln::point3d, label_t> label_ima_t;
+ label_ima_t minima =
+ mln::labeling::regional_minima(closed_g_ima, nbh, nlabels);
+ std::cout << "nlabels = " << nlabels << std::endl;
+
+ /*-----------.
+ | Skeleton. |
+ `-----------*/
+
+ // FIXME: To do.
+
+ /*---------.
+ | Output. |
+ `---------*/
+
+ /* FIXME We should created a boolean graph_image instead. But as
+ we cannot directly save a graph_image as an OFF file now, just
+ store the values of this would-be image into an array. */
+ // Assign a boolean value to graph vertices (mesh faces).
+ std::vector<bool> face_value (minima.domain().nvertices(), true);
+ mln_piter_(label_ima_t) pm(minima.domain());
+ for_all(pm)
+ // FIXME: Use literal::zero.
+ if (minima(pm) != 0)
+ {
+ // The face belongs to a regional minima: ``remove'' it from
+ // the mesh by tagging it as false.
+ mln_psite_(label_ima_t) pp(pm);
+ face_value[pp.id().to_equiv()] = false;
+ }
+
+ // Taken and adapted from TriMesh_io.cc
+ FILE* f_out = fopen(output_filename.c_str(), "wb");
+ if (!f_out)
+ {
+ std::cerr << "Error opening " << output_filename.c_str()
+ << " for writing." << std::endl;
+ exit(2);
+ }
+ write_off_binary(mesh_ptr, face_value, f_out);
+ fclose(f_out);
+
+ delete mesh_ptr;
+}
Index: apps/statues/io.hh
--- apps/statues/io.hh (revision 2054)
+++ apps/statues/io.hh (working copy)
@@ -25,11 +25,17 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef SANDBOX_LEVILLAIN_IO_HH
-# define SANDBOX_LEVILLAIN_IO_HH
+#ifndef APPS_STATUES_IO_HH
+# define APPS_STATUES_IO_HH
+/// \file apps/statues/io.hh
/// \brief I/O routines adapted from TriMesh's ones.
+#include <algorithm>
+
+#include <TriMesh.h>
+
+
/// Taken from TriMesh_io.cc
/// \{
// Convert colors float -> uchar
@@ -112,4 +118,40 @@
/// \}
-#endif // ! SANDBOX_LEVILLAIN_IO_HH
+/// Taken and adapted from TriMesh_io.cc
+/// \{
+/// Write a bunch of faces to an ASCII file, removing the ones tagged
+/// as ``false'' in \a face_value.
+inline void write_faces_asc_binary(TriMesh *mesh,
+ const std::vector<bool>& face_value,
+ FILE *f,
+ const char *before_face,
+ const char *after_line)
+{
+ mesh->need_faces();
+ for (int i = 0; i < mesh->faces.size(); i++)
+ if (face_value[i])
+ {
+ fprintf(f, "%s%d %d %d%s\n",
+ before_face,
+ mesh->faces[i][0], mesh->faces[i][1], mesh->faces[i][2],
+ after_line);
+ }
+}
+
+/// Write an off file, removing faces tagged as ``false'' in \a face_value.
+inline void write_off_binary(TriMesh *mesh,
+ const std::vector<bool>& face_value,
+ FILE *f)
+{
+ fprintf(f, "OFF\n");
+ mesh->need_faces();
+ unsigned long nfaces =
+ std::count(face_value.begin(), face_value.end(), true);
+ fprintf(f, "%lu %lu 0\n", (unsigned long) mesh->vertices.size(), nfaces);
+ write_verts_asc(mesh, f, "", 0, 0, false, 0, "");
+ write_faces_asc_binary(mesh, face_value, f, "3 ", "");
+}
+/// \}
+
+#endif // ! APPS_STATUES_IO_HH
Index: apps/statues/Makefile.am
--- apps/statues/Makefile.am (revision 2054)
+++ apps/statues/Makefile.am (working copy)
@@ -7,7 +7,8 @@
# Find trimesh archive.
AM_LDFLAGS = -L$(top_builddir)/external/trimesh/libsrc -ltrimesh
-bin_PROGRAMS = mesh-segm
+bin_PROGRAMS = mesh-segm mesh-skel
mesh_segm_SOURCES = mesh-segm.cc io.hh
+mesh_skel_SOURCES = mesh-skel.cc io.hh
TESTS = test
1
0