URL:
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
ChangeLog:
2008-09-12 Guillaume Lazzara <z(a)lrde.epita.fr>
Fix few tests.
* milena/mln/core/site_set/p_complex.hh,
* milena/mln/core/site_set/p_complex_piter.hh,
* milena/mln/core/site_set/p_faces.hh,
* milena/mln/core/site_set/p_bgraph_piter.hh,
* milena/mln/core/site_set/p_graph_piter.hh:
remove useless '_' in class names.
* milena/tests/canvas/browsing/directional.cc,
* milena/tests/canvas/browsing/fwd.cc,
* milena/tests/canvas/browsing/snake_fwd.cc: rename point to site.
* milena/mln/core/alias/dpoint2d_h.hh,
* milena/mln/core/alias/point2d_h.hh,
* milena/tests/algebra/h_vec.cc,
* milena/tests/core/alias/point2d.cc,
* milena/tests/core/alias/point1d.cc: Use def::coord instead of int.
* milena/tests/set/diff.cc,
* milena/tests/core/site_set/p_image2d.cc: Update.
---
mln/core/alias/dpoint2d_h.hh | 2 -
mln/core/alias/point2d_h.hh | 2 -
mln/core/site_set/p_bgraph_piter.hh | 4 +-
mln/core/site_set/p_complex.hh | 4 +-
mln/core/site_set/p_complex_piter.hh | 10 +++---
mln/core/site_set/p_faces.hh | 4 +-
mln/core/site_set/p_graph_piter.hh | 9 ++----
tests/algebra/h_vec.cc | 10 +++---
tests/canvas/browsing/directional.cc | 2 -
tests/canvas/browsing/fwd.cc | 2 -
tests/canvas/browsing/snake_fwd.cc | 2 -
tests/core/alias/point1d.cc | 2 -
tests/core/alias/point2d.cc | 2 -
tests/core/site_set/p_image2d.cc | 15 +++++-----
tests/set/diff.cc | 52 +++++++++++++++++------------------
15 files changed, 61 insertions(+), 61 deletions(-)
Index: branches/cleanup-2008/milena/tests/core/site_set/p_image2d.cc
===================================================================
--- branches/cleanup-2008/milena/tests/core/site_set/p_image2d.cc (revision 2239)
+++ branches/cleanup-2008/milena/tests/core/site_set/p_image2d.cc (revision 2240)
@@ -30,19 +30,20 @@
* \brief Tests on mln::p_image2d.
*/
-#include <mln/core/p_image2d.hh>
+#include <mln/core/image/image2d.hh>
+#include <mln/core/site_set/p_image.hh>
int main()
{
using namespace mln;
trace::quiet = false;
- p_image2d<point2d> ps(20,20);
- ps
- .insert(make::point2d(6, 9))
- .insert(make::point2d(4, 2))
- .insert(make::point2d(4, 2))
- .insert(make::point2d(5, 1));
+ image2d<bool> ima(box2d(20,20));
+ p_image<image2d<bool> > ps(ima);
+ ps.insert(make::point2d(6, 9));
+ ps.insert(make::point2d(4, 2));
+ ps.insert(make::point2d(4, 2));
+ ps.insert(make::point2d(5, 1));
mln_assertion(ps.nsites() == 3);
ps.remove(make::point2d(5, 1));
Index: branches/cleanup-2008/milena/tests/core/alias/point1d.cc
===================================================================
--- branches/cleanup-2008/milena/tests/core/alias/point1d.cc (revision 2239)
+++ branches/cleanup-2008/milena/tests/core/alias/point1d.cc (revision 2240)
@@ -43,7 +43,7 @@
// assignment
p[0] = 4;
- algebra::vec<1,int> v = p;
+ algebra::vec<1,def::coord> v = p;
std::cout << v << std::endl;
p.ind() += 1;
Index: branches/cleanup-2008/milena/tests/core/alias/point2d.cc
===================================================================
--- branches/cleanup-2008/milena/tests/core/alias/point2d.cc (revision 2239)
+++ branches/cleanup-2008/milena/tests/core/alias/point2d.cc (revision 2240)
@@ -74,5 +74,5 @@
for (unsigned i = 0; i < p.dim; ++i)
mln_assertion(q[i] == 0);
- std::cout << 3.4 * algebra::vec<2, int>(p) << std::endl;
+ std::cout << 3.4 * algebra::vec<2, def::coord>(p) << std::endl;
}
Index: branches/cleanup-2008/milena/tests/set/diff.cc
===================================================================
--- branches/cleanup-2008/milena/tests/set/diff.cc (revision 2239)
+++ branches/cleanup-2008/milena/tests/set/diff.cc (revision 2240)
@@ -39,20 +39,20 @@
{
window<dpoint2d> win1;
- win1
- .insert( 2, 7)
- .insert( 2, 1)
- .insert(-4, 0)
- .insert( 0, 0)
- .insert( 1, 1)
- .insert( 6, 5);
+ win1.insert( 2, 7);
+ win1.insert( 2, 1);
+ win1.insert(-4, 0);
+ win1.insert( 0, 0);
+ win1.insert( 1, 1);
+ win1.insert( 6, 5);
+
window<dpoint2d> win2;
- win2
- .insert( 2, 7)
- .insert(-2, 1)
- .insert(-4, 0)
- .insert( 1,-1)
- .insert( 6, 5);
+ win2.insert( 2, 7);
+ win2.insert(-2, 1);
+ win2.insert(-4, 0);
+ win2.insert( 1,-1);
+ win2.insert( 6, 5);
+
window<dpoint2d> win3 = set::diff(win1, win2);
mln_assertion(win3.has(dpoint2d( 2, 1)));
mln_assertion(win3.has(dpoint2d( 0, 0)));
@@ -66,20 +66,20 @@
{
p_set<point2d> pst1;
- pst1
- .insert(point2d( 2, 7))
- .insert(point2d( 2, 1))
- .insert(point2d(-4, 0))
- .insert(point2d( 0, 0))
- .insert(point2d( 1, 1))
- .insert(point2d( 6, 5));
+ pst1.insert(point2d( 2, 7));
+ pst1.insert(point2d( 2, 1));
+ pst1.insert(point2d(-4, 0));
+ pst1.insert(point2d( 0, 0));
+ pst1.insert(point2d( 1, 1));
+ pst1.insert(point2d( 6, 5));
+
p_set<point2d> pst2;
- pst2
- .insert(point2d( 2, 7))
- .insert(point2d(-2, 1))
- .insert(point2d(-4, 0))
- .insert(point2d( 1,-1))
- .insert(point2d( 6, 5));
+ pst2.insert(point2d( 2, 7));
+ pst2.insert(point2d(-2, 1));
+ pst2.insert(point2d(-4, 0));
+ pst2.insert(point2d( 1,-1));
+ pst2.insert(point2d( 6, 5));
+
p_set<point2d> pst3 = set::diff(pst1, pst2);
mln_assertion(pst3.has(point2d( 2, 1)));
mln_assertion(pst3.has(point2d( 0, 0)));
Index: branches/cleanup-2008/milena/tests/algebra/h_vec.cc
===================================================================
--- branches/cleanup-2008/milena/tests/algebra/h_vec.cc (revision 2239)
+++ branches/cleanup-2008/milena/tests/algebra/h_vec.cc (revision 2240)
@@ -36,11 +36,11 @@
using namespace mln;
-void run_in_3d(const algebra::vec<3, int>&)
+void run_in_3d(const algebra::vec<3, def::coord>&)
{
}
-void run_in_3d_h(const algebra::h_vec<3, int>&)
+void run_in_3d_h(const algebra::h_vec<3, def::coord>&)
{
}
@@ -53,10 +53,10 @@
int main()
{
- algebra::vec<3, int> x;
- algebra::h_vec<3, int> w = x.to_h_vec();
+ algebra::vec<3, def::coord> x;
+ algebra::h_vec<3, def::coord> w = x.to_h_vec();
- typedef algebra::h_vec<3, int> p3d;
+ typedef algebra::h_vec<3, def::coord> p3d;
p3d p;
run_in_3d(p.to_vec());
Index: branches/cleanup-2008/milena/tests/canvas/browsing/directional.cc
===================================================================
--- branches/cleanup-2008/milena/tests/canvas/browsing/directional.cc (revision 2239)
+++ branches/cleanup-2008/milena/tests/canvas/browsing/directional.cc (revision 2240)
@@ -44,7 +44,7 @@
struct assign_browsing_functor
{
typedef I_ I;
- enum { dim = I::point::dim };
+ enum { dim = I::site::dim };
I input;
Index: branches/cleanup-2008/milena/tests/canvas/browsing/fwd.cc
===================================================================
--- branches/cleanup-2008/milena/tests/canvas/browsing/fwd.cc (revision 2239)
+++ branches/cleanup-2008/milena/tests/canvas/browsing/fwd.cc (revision 2240)
@@ -42,7 +42,7 @@
struct assign_browsing_functor
{
typedef I_ I;
- enum { dim = I::point::dim };
+ enum { dim = I::site::dim };
I input;
Index: branches/cleanup-2008/milena/tests/canvas/browsing/snake_fwd.cc
===================================================================
--- branches/cleanup-2008/milena/tests/canvas/browsing/snake_fwd.cc (revision 2239)
+++ branches/cleanup-2008/milena/tests/canvas/browsing/snake_fwd.cc (revision 2240)
@@ -41,7 +41,7 @@
template <typename I, typename F>
struct assign_browsing_functor
{
- enum { dim = I::point::dim };
+ enum { dim = I::site::dim };
I input;
Index: branches/cleanup-2008/milena/mln/core/site_set/p_graph_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_graph_piter.hh (revision 2239)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_graph_piter.hh (revision 2240)
@@ -41,7 +41,6 @@
template <typename P> class p_graph;
template <typename P> class graph_psite;
-
/*------------------------.
| p_graph_fwd_piter_<P>. |
`------------------------*/
@@ -49,10 +48,10 @@
/// \brief Forward iterator on point sites of a mln::p_graph<P>.
template <typename P>
class p_graph_fwd_piter_
- : public internal::site_iterator_base_< P, p_graph_fwd_piter_<P> >
+ : public internal::site_iterator_base< P, p_graph_fwd_piter_<P> >
{
typedef p_graph_fwd_piter_<P> self_;
- typedef internal::site_iterator_base_< P, self_ > super_;
+ typedef internal::site_iterator_base< P, self_ > super_;
public:
// Make definitions from super class available.
@@ -125,10 +124,10 @@
/// \brief Backward iterator on point sites of a mln::p_graph<P>.
template <typename P>
class p_graph_bkd_piter_
- : public internal::site_iterator_base_< P, p_graph_bkd_piter_<P> >
+ : public internal::site_iterator_base< P, p_graph_bkd_piter_<P> >
{
typedef p_graph_bkd_piter_<P> self_;
- typedef internal::site_iterator_base_< P, self_ > super_;
+ typedef internal::site_iterator_base< P, self_ > super_;
public:
// Make definitions from super class available.
Index: branches/cleanup-2008/milena/mln/core/site_set/p_bgraph_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_bgraph_piter.hh (revision 2239)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_bgraph_piter.hh (revision 2240)
@@ -49,10 +49,10 @@
// FIXME: check the constraint due to the boost iterators
template<typename P>
class p_bgraph_piter_
- : public internal::site_iterator_base_< P, p_bgraph_piter_<P> >
+ : public internal::site_iterator_base< P, p_bgraph_piter_<P> >
{
typedef p_bgraph_piter_<P> self_;
- typedef internal::site_iterator_base_< P, self_ > super_;
+ typedef internal::site_iterator_base< P, self_ > super_;
typedef std::pair<typename p_bgraph<P>::node_iterator,
typename p_bgraph<P>::node_iterator> iterators_type_;
Index: branches/cleanup-2008/milena/mln/core/site_set/p_complex.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_complex.hh (revision 2239)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_complex.hh (revision 2240)
@@ -31,7 +31,7 @@
/// \file mln/core/site_set/p_complex.hh
/// \brief Definition of a point set based on a complex.
-# include <mln/core/internal/point_set_base.hh>
+# include <mln/core/internal/site_set_base.hh>
# include <mln/accu/bbox.hh>
# include <mln/util/tracked_ptr.hh>
@@ -59,7 +59,7 @@
/// dimension \p D (a \p D-complex).
template <unsigned D, typename P>
struct p_complex
- : public internal::point_set_base_< complex_psite<D, P>,
+ : public internal::site_set_base_< complex_psite<D, P>,
p_complex<D, P> >
{
/// \brief Construct a complex psite set from a complex.
Index: branches/cleanup-2008/milena/mln/core/site_set/p_complex_piter.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_complex_piter.hh (revision 2239)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_complex_piter.hh (revision 2240)
@@ -30,7 +30,7 @@
# include <limits>
-# include <mln/core/internal/point_iterator_base.hh>
+# include <mln/core/internal/site_iterator_base.hh>
# include <mln/core/site_set/p_complex.hh>
# include <mln/core/complex_psite.hh>
@@ -55,10 +55,10 @@
/// \brief Forward iterator on point sites of a mln::p_complex<D, P>.
template <unsigned D, typename P>
class p_complex_fwd_piter_
- : public internal::point_iterator_base_< P, p_complex_fwd_piter_<D, P> >
+ : public internal::site_iterator_base< P, p_complex_fwd_piter_<D, P> >
{
typedef p_complex_fwd_piter_<D, P> self_;
- typedef internal::point_iterator_base_< P, self_ > super_;
+ typedef internal::site_iterator_base< P, self_ > super_;
public:
// Make definitions from super class available.
@@ -148,10 +148,10 @@
/// \brief Backward iterator on point sites of a mln::p_complex<D, P>.
template <unsigned D, typename P>
class p_complex_bkd_piter_
- : public internal::point_iterator_base_< P, p_complex_bkd_piter_<D, P> >
+ : public internal::site_iterator_base< P, p_complex_bkd_piter_<D, P> >
{
typedef p_complex_bkd_piter_<D, P> self_;
- typedef internal::point_iterator_base_< P, self_ > super_;
+ typedef internal::site_iterator_base< P, self_ > super_;
public:
// Make definitions from super class available.
Index: branches/cleanup-2008/milena/mln/core/site_set/p_faces.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/site_set/p_faces.hh (revision 2239)
+++ branches/cleanup-2008/milena/mln/core/site_set/p_faces.hh (revision 2240)
@@ -32,7 +32,7 @@
/// \brief Definition of a point set based on the set of n-faces of a
/// complex.
-# include <mln/core/internal/point_set_base.hh>
+# include <mln/core/internal/site_set_base.hh>
# include <mln/accu/bbox.hh>
# include <mln/util/tracked_ptr.hh>
@@ -57,7 +57,7 @@
/// dimension \p D (a \p D-complex).
template <unsigned N, unsigned D, typename P>
struct p_faces
- : public internal::point_set_base_< faces_psite<N, D, P>,
+ : public internal::site_set_base_< faces_psite<N, D, P>,
p_faces<N, D, P> >
{
/// \brief Construct a complex psite set from a complex.
Index: branches/cleanup-2008/milena/mln/core/alias/point2d_h.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/point2d_h.hh (revision 2239)
+++ branches/cleanup-2008/milena/mln/core/alias/point2d_h.hh (revision 2240)
@@ -42,7 +42,7 @@
/// \brief Type alias for a point defined on the 2D hexagonal grid
/// with integer coordinates.
- typedef point_<grid::hexa, int> point2d_h;
+ typedef point<grid::hexa, def::coord> point2d_h;
} // end of namespace mln
Index: branches/cleanup-2008/milena/mln/core/alias/dpoint2d_h.hh
===================================================================
--- branches/cleanup-2008/milena/mln/core/alias/dpoint2d_h.hh (revision 2239)
+++ branches/cleanup-2008/milena/mln/core/alias/dpoint2d_h.hh (revision 2240)
@@ -44,7 +44,7 @@
/*! \brief Type alias for a delta-point defined on the 2D square
* grid with integer coordinates.
*/
- typedef dpoint_<mln::grid::hexa, int> dpoint2d_h;
+ typedef dpoint<mln::grid::hexa, def::coord> dpoint2d_h;
} // end of namespace mln