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");