https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Propagate a few renamings to some test code.
* tests/core/site_set/p_queue_fast.cc,
* tests/core/site_set/p_priority_queue_fast.cc,
* tests/core/site_set/p_queue.cc,
* tests/core/site_set/p_priority_queue.cc,
* tests/core/site_set/p_runs.cc,
* tests/core/site_set/p_image2d.cc,
* tests/core/site_set/pset_array.cc,
* tests/core/site_set/pset_if.cc,
* tests/core/site_set/p_priority_queue_fast_with_array.cc,
* tests/core/site_set/p_set.cc,
* tests/core/other/neighb.cc,
* tests/core/other/pixter2d.cc,
* tests/core/other/pixter3d.cc,
* tests/core/image/complex_image.cc,
* tests/core/image/image3d.cc,
* tests/core/image/image_if.cc,
* tests/draw/line.cc,
* tests/level/median_fast.cc,
* tests/border/mirror_full.cc,
* tests/border/duplicate_full.cc,
* tests/border/fill_full.cc,
* tests/border/mirror.cc,
* tests/border/duplicate.cc,
* tests/border/fill.cc,
* tests/convert/to_p_set.cc,
* tests/convert/to_p_array.cc,
* tests/util/lemmings.cc,
* tests/labeling/level.cc (npoints): Update to...
(nsites): ...this.
(image::operator[]): Update to...
(image::element): ...this.
(mln_point): Update to...
(mln_site): ...this.
border/duplicate.cc | 52 +++++-----
border/duplicate_full.cc | 6 -
border/fill.cc | 4
border/fill_full.cc | 24 ++--
border/mirror.cc | 108 +++++++++++-----------
border/mirror_full.cc | 6 -
convert/to_p_array.cc | 4
convert/to_p_set.cc | 4
core/image/complex_image.cc | 2
core/image/image3d.cc | 6 -
core/image/image_if.cc | 2
core/other/neighb.cc | 2
core/other/pixter2d.cc | 4
core/other/pixter3d.cc | 4
core/site_set/p_image2d.cc | 6 -
core/site_set/p_priority_queue.cc | 12 +-
core/site_set/p_priority_queue_fast.cc | 12 +-
core/site_set/p_priority_queue_fast_with_array.cc | 18 +--
core/site_set/p_queue.cc | 8 -
core/site_set/p_queue_fast.cc | 8 -
core/site_set/p_runs.cc | 6 -
core/site_set/p_set.cc | 6 -
core/site_set/pset_array.cc | 4
core/site_set/pset_if.cc | 4
draw/line.cc | 2
labeling/level.cc | 2
level/median_fast.cc | 2
util/lemmings.cc | 20 ++--
28 files changed, 169 insertions(+), 169 deletions(-)
Index: tests/core/site_set/p_queue_fast.cc
--- tests/core/site_set/p_queue_fast.cc (revision 2224)
+++ tests/core/site_set/p_queue_fast.cc (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
@@ -44,14 +44,14 @@
.push(make::point2d(6, 9))
.push(make::point2d(5, 1))
.push(make::point2d(4, 2));
- mln_assertion(q.npoints() == 3);
+ mln_assertion(q.nsites() == 3);
std::cout << q.bbox() << std::endl;
std::cout << q << std::endl;
q.pop();
- mln_assertion(q.npoints() == 2);
+ mln_assertion(q.nsites() == 2);
point2d p = q.front();
- mln_assertion(q.npoints() == 2);
+ mln_assertion(q.nsites() == 2);
mln_assertion(p == make::point2d(5, 1));
}
Index: tests/core/site_set/p_priority_queue_fast.cc
--- tests/core/site_set/p_priority_queue_fast.cc (revision 2224)
+++ tests/core/site_set/p_priority_queue_fast.cc (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
@@ -44,7 +44,7 @@
mln_assertion (q.is_empty ());
- mln_assertion (q.npoints () == 0);
+ mln_assertion (q.nsites() == 0);
q.push_force (p3);
q.push_force (p1, 3);
@@ -59,7 +59,7 @@
mln_assertion (q.has (p2));
mln_assertion (q.has (p3));
- mln_assertion (q.npoints () == 3);
+ mln_assertion (q.nsites() == 3);
mln_assertion (q.front () == p2);
q.pop ();
@@ -67,7 +67,7 @@
mln_assertion (!q.has (p2));
mln_assertion (q.has (p3));
- mln_assertion (q.npoints () == 2);
+ mln_assertion (q.nsites() == 2);
mln_assertion (q.front () == p1);
q.pop ();
@@ -75,14 +75,14 @@
mln_assertion (!q.has (p2));
mln_assertion (q.has (p3));
- mln_assertion (q.npoints () == 1);
+ mln_assertion (q.nsites() == 1);
mln_assertion (q.front () == p3);
q.pop ();
mln_assertion (!q.has (p1));
mln_assertion (!q.has (p2));
mln_assertion (!q.has (p3));
- mln_assertion (q.npoints () == 0);
+ mln_assertion (q.nsites() == 0);
mln_assertion (q.is_empty ());
Index: tests/core/site_set/p_queue.cc
--- tests/core/site_set/p_queue.cc (revision 2224)
+++ tests/core/site_set/p_queue.cc (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
@@ -44,14 +44,14 @@
.push(make::point2d(6, 9))
.push(make::point2d(5, 1))
.push(make::point2d(4, 2));
- mln_assertion(q.npoints() == 3);
+ mln_assertion(q.nsites() == 3);
std::cout << q.bbox() << std::endl;
std::cout << q << std::endl;
q.pop();
- mln_assertion(q.npoints() == 2);
+ mln_assertion(q.nsites() == 2);
point2d p = q.front();
- mln_assertion(q.npoints() == 2);
+ mln_assertion(q.nsites() == 2);
mln_assertion(p == make::point2d(5, 1));
}
Index: tests/core/site_set/p_priority_queue.cc
--- tests/core/site_set/p_priority_queue.cc (revision 2224)
+++ tests/core/site_set/p_priority_queue.cc (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
@@ -44,7 +44,7 @@
mln_assertion (q.is_empty ());
- mln_assertion (q.npoints () == 0);
+ mln_assertion (q.nsites() == 0);
q.push_force (p3);
q.push_force (p1, 3);
@@ -59,7 +59,7 @@
mln_assertion (q.has (p2));
mln_assertion (q.has (p3));
- mln_assertion (q.npoints () == 3);
+ mln_assertion (q.nsites() == 3);
mln_assertion (q.front () == p2);
q.pop ();
@@ -67,7 +67,7 @@
mln_assertion (!q.has (p2));
mln_assertion (q.has (p3));
- mln_assertion (q.npoints () == 2);
+ mln_assertion (q.nsites() == 2);
mln_assertion (q.front () == p1);
q.pop ();
@@ -75,14 +75,14 @@
mln_assertion (!q.has (p2));
mln_assertion (q.has (p3));
- mln_assertion (q.npoints () == 1);
+ mln_assertion (q.nsites() == 1);
mln_assertion (q.front () == p3);
q.pop ();
mln_assertion (!q.has (p1));
mln_assertion (!q.has (p2));
mln_assertion (!q.has (p3));
- mln_assertion (q.npoints () == 0);
+ mln_assertion (q.nsites() == 0);
mln_assertion (q.is_empty ());
Index: tests/core/site_set/p_runs.cc
--- tests/core/site_set/p_runs.cc (revision 2224)
+++ tests/core/site_set/p_runs.cc (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
@@ -61,10 +61,10 @@
p_runs_<point2d> ps2;
ps.insert(p_run<point2d>(p, 7));
- mln_assertion(ps.npoints() == 7);
+ mln_assertion(ps.nsites() == 7);
ps.insert(p_run<point2d>(q, 5));
- mln_assertion(ps.npoints() == 12);
+ mln_assertion(ps.nsites() == 12);
ps.insert(p_run<point2d>(r, 2));
Index: tests/core/site_set/p_image2d.cc
--- tests/core/site_set/p_image2d.cc (revision 2224)
+++ tests/core/site_set/p_image2d.cc (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 @@
.insert(make::point2d(4, 2))
.insert(make::point2d(4, 2))
.insert(make::point2d(5, 1));
- mln_assertion(ps.npoints() == 3);
+ mln_assertion(ps.nsites() == 3);
ps.remove(make::point2d(5, 1));
ps.remove(make::point2d(5, 1));
@@ -51,7 +51,7 @@
ps.remove(make::point2d(6, 9));
ps.remove(make::point2d(4, 2));
- mln_assertion(ps.npoints() == 0);
+ mln_assertion(ps.nsites() == 0);
mln_assertion(ps.is_empty());
std::cout << ps << std::endl;
Index: tests/core/site_set/pset_array.cc
--- tests/core/site_set/pset_array.cc (revision 2224)
+++ tests/core/site_set/pset_array.cc (working copy)
@@ -64,11 +64,11 @@
assert(array.npsets() == 0);
array.insert(pruns0);
assert(array.npsets() == 1);
- assert(array.npoints() == 2);
+ assert(array.nsites() == 2);
array.insert(pruns2);
assert(array.npsets() == 2);
- assert(array.npoints() == 7);
+ assert(array.nsites() == 7);
array.insert(pruns1);
Index: tests/core/site_set/pset_if.cc
--- tests/core/site_set/pset_if.cc (revision 2224)
+++ tests/core/site_set/pset_if.cc (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 @@
using namespace mln;
box2d box_8x8 = make::box2d(8, 8);
- mln_assertion((box_8x8 | fun::p2b::chess).npoints() == 32);
+ mln_assertion((box_8x8 | fun::p2b::chess).nsites() == 32);
{
p_set<point2d> s = convert::to_p_set(box_8x8 | fun::p2b::chess);
Index: tests/core/site_set/p_priority_queue_fast_with_array.cc
--- tests/core/site_set/p_priority_queue_fast_with_array.cc (revision 2224)
+++ tests/core/site_set/p_priority_queue_fast_with_array.cc (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,19 +43,19 @@
point2d p3 (4, 2);
mln_assertion (q.is_empty ());
- mln_assertion (q.npoints () == 0);
+ mln_assertion (q.nsites() == 0);
q.push_force (p3);
mln_assertion (!q.is_empty ());
- mln_assertion (q.npoints () == 1);
+ mln_assertion (q.nsites() == 1);
q.push_force (p1, 3);
mln_assertion (!q.is_empty ());
- mln_assertion (q.npoints () == 2);
+ mln_assertion (q.nsites() == 2);
q.push_force (p2, 5);
mln_assertion (!q.is_empty ());
- mln_assertion (q.npoints () == 3);
+ mln_assertion (q.nsites() == 3);
std::cout << q.bbox () << std::endl;
std::cout << q << std::endl;
@@ -66,7 +66,7 @@
mln_assertion (q.has (p2));
mln_assertion (q.has (p3));
- mln_assertion (q.npoints () == 3);
+ mln_assertion (q.nsites() == 3);
mln_assertion (q.front () == p2);
q.pop ();
@@ -74,7 +74,7 @@
mln_assertion (!q.has (p2));
mln_assertion (q.has (p3));
- mln_assertion (q.npoints () == 2);
+ mln_assertion (q.nsites() == 2);
mln_assertion (q.front () == p1);
q.pop ();
@@ -82,14 +82,14 @@
mln_assertion (!q.has (p2));
mln_assertion (q.has (p3));
- mln_assertion (q.npoints () == 1);
+ mln_assertion (q.nsites() == 1);
mln_assertion (q.front () == p3);
q.pop ();
mln_assertion (!q.has (p1));
mln_assertion (!q.has (p2));
mln_assertion (!q.has (p3));
- mln_assertion (q.npoints () == 0);
+ mln_assertion (q.nsites() == 0);
mln_assertion (q.is_empty ());
Index: tests/core/site_set/p_set.cc
--- tests/core/site_set/p_set.cc (revision 2224)
+++ tests/core/site_set/p_set.cc (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
@@ -47,7 +47,7 @@
.insert(make::point2d(4, 2))
.insert(make::point2d(4, 2))
.insert(make::point2d(5, 1));
- mln_assertion(ps.npoints() == 3);
+ mln_assertion(ps.nsites() == 3);
std::cout << ps.bbox() << std::endl;
std::copy(ps.vect().begin(), ps.vect().end(),
@@ -55,7 +55,7 @@
std::cout << std::endl;
ps.remove(make::point2d(4, 2));
- mln_assertion(ps.npoints() == 2);
+ mln_assertion(ps.nsites() == 2);
std::cout << ps.bbox() << std::endl;
std::copy(ps.vect().begin(), ps.vect().end(),
Index: tests/core/other/neighb.cc
--- tests/core/other/neighb.cc (revision 2224)
+++ tests/core/other/neighb.cc (working copy)
@@ -35,7 +35,7 @@
using namespace mln;
template <typename N>
-void test(const Neighborhood<N>& nbh, const mln_point(N)& p_ref,
+void test(const Neighborhood<N>& nbh, const mln_site(N)& p_ref,
unsigned size)
{
mln_niter(N) n(nbh, p_ref);
Index: tests/core/other/pixter2d.cc
--- tests/core/other/pixter2d.cc (revision 2224)
+++ tests/core/other/pixter2d.cc (working copy)
@@ -63,7 +63,7 @@
p.next();
++i;
}
- mln_assertion(i == b.npoints());
+ mln_assertion(i == b.nsites());
}
{
@@ -79,7 +79,7 @@
p.next();
++i;
}
- mln_assertion(i == b.npoints());
+ mln_assertion(i == b.nsites());
}
}
}
Index: tests/core/other/pixter3d.cc
--- tests/core/other/pixter3d.cc (revision 2224)
+++ tests/core/other/pixter3d.cc (working copy)
@@ -64,7 +64,7 @@
p.next();
++i;
}
- mln_assertion(i == b.npoints());
+ mln_assertion(i == b.nsites());
}
{
@@ -80,7 +80,7 @@
p.next();
++i;
}
- mln_assertion(i == b.npoints());
+ mln_assertion(i == b.nsites());
}
}
}
Index: tests/core/image/complex_image.cc
--- tests/core/image/complex_image.cc (revision 2224)
+++ tests/core/image/complex_image.cc (working copy)
@@ -136,7 +136,7 @@
typename mln::complex_image<D, P, V>::lvalue
mln::complex_image<D, P, V>::operator()(const mln::complex_psite<D,
P>&)
[with unsigned int D = 2u,
- P = mln::point_<mln::grid::square, int>,
+ P = mln::point<mln::grid::square, int>,
V = mln::value::int_u<8u>]:
Assertion `this->data_->pc_.has(p)' failed.
Index: tests/core/image/image3d.cc
--- tests/core/image/image3d.cc (revision 2224)
+++ tests/core/image/image3d.cc (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
@@ -45,8 +45,8 @@
image3d<int> f(nslis, nrows, ncols, border);
- mln_assertion(f.npoints() == geom::nslis(f) * geom::nrows(f) * geom::ncols(f));
- mln_assertion(f.ncells() == ((nrows + 2 * border)
+ mln_assertion(f.nsites() == geom::nslis(f) * geom::nrows(f) * geom::ncols(f));
+ mln_assertion(f.nelements() == ((nrows + 2 * border)
* (ncols + 2 * border)
* (nslis + 2 * border)));
}
Index: tests/core/image/image_if.cc
--- tests/core/image/image_if.cc (revision 2224)
+++ tests/core/image/image_if.cc (working copy)
@@ -44,7 +44,7 @@
I ima(8, 8);
// debug::println(ima | fun::p2b::chess);
// FIXME: is this line corret?
- ///mln_assertion((ima | fun::p2b::chess).npoints() == 32);
+ ///mln_assertion((ima | fun::p2b::chess).nsites() == 32);
{
typedef image_if<I, fun::p2b::chess_t> II;
Index: tests/draw/line.cc
--- tests/draw/line.cc (revision 2224)
+++ tests/draw/line.cc (working copy)
@@ -48,7 +48,7 @@
point2d b = make::point2d(0,0), e = make::point2d(6,9);
line2d l(b, e);
- mln_assertion(l.npoints() == 10);
+ mln_assertion(l.nsites() == 10);
image2d<bool> ima(10,10);
level::fill(ima, false);
Index: tests/level/median_fast.cc
--- tests/level/median_fast.cc (revision 2224)
+++ tests/level/median_fast.cc (working copy)
@@ -53,7 +53,7 @@
template <typename I, typename W>
void test(I& input, const W& win)
{
- mln_point(I) p;
+ mln_site(I) p;
p.row() = p.col() = 1;
{
Index: tests/border/mirror_full.cc
--- tests/border/mirror_full.cc (revision 2224)
+++ tests/border/mirror_full.cc (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
@@ -51,7 +51,7 @@
border::mirror(ima);
for (int i = 0; i < c; ++i)
- mln_assertion(ima[i] == ref[i]);
+ mln_assertion(ima.element(i) == ref[i]);
}
template <typename T>
@@ -65,7 +65,7 @@
border::mirror(ima);
for (int i = 0; i < c * r; ++i)
- mln_assertion(ima[i] == ref[i]);
+ mln_assertion(ima.element(i) == ref[i]);
}
}
Index: tests/border/duplicate_full.cc
--- tests/border/duplicate_full.cc (revision 2224)
+++ tests/border/duplicate_full.cc (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
@@ -50,7 +50,7 @@
border::duplicate(ima);
for (int i = 0; i < c; ++i)
- mln_assertion(ima[i] == ref[i]);
+ mln_assertion(ima.element(i) == ref[i]);
}
template <typename T>
@@ -64,7 +64,7 @@
border::duplicate(ima);
for (int i = 0; i < c * r; ++i)
- mln_assertion(ima[i] == ref[i]);
+ mln_assertion(ima.element(i) == ref[i]);
}
}
Index: tests/border/fill_full.cc
--- tests/border/fill_full.cc (revision 2224)
+++ tests/border/fill_full.cc (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
@@ -58,13 +58,13 @@
unsigned i = 0;
for(i = 0; i < border; ++i)
- mln_assertion (ima[i] == value);
+ mln_assertion (ima.element(i) == value);
unsigned bo = border + row;
for(; i < bo; ++i)
- mln_assertion (ima[i] == v);
+ mln_assertion (ima.element(i) == v);
bo += border;
for(; i < bo; ++i)
- mln_assertion (ima[i] == value);
+ mln_assertion (ima.element(i) == value);
}
template <typename T>
@@ -83,18 +83,18 @@
unsigned ww = r * c;
for(i = 0; i < bo; ++i)
- mln_assertion (ima[i] == value);
+ mln_assertion (ima.element(i) == value);
bo += c * row;
for(; i < bo; ++i)
{
unsigned cur = i % c;
if (cur < border || cur >= u)
- mln_assertion (ima[i] == value);
+ mln_assertion (ima.element(i) == value);
else
- mln_assertion (ima[i] == v);
+ mln_assertion (ima.element(i) == v);
}
for(; i < ww; ++i)
- mln_assertion (ima[i] == value);
+ mln_assertion (ima.element(i) == value);
}
template <typename T>
@@ -113,18 +113,18 @@
unsigned ww = r * c;
for(i = 0; i < bo; ++i)
- mln_assertion (ima[i] == value);
+ mln_assertion (ima.element(i) == value);
bo += c * row;
for(; i < bo; ++i)
{
unsigned cur = i % c;
if (cur < border || cur >= u)
- mln_assertion (ima[i] == value);
+ mln_assertion (ima.element(i) == value);
else
- mln_assertion (ima[i] == v);
+ mln_assertion (ima.element(i) == v);
}
for(; i < ww; ++i)
- mln_assertion (ima[i] == value);
+ mln_assertion (ima.element(i) == value);
}
Index: tests/border/mirror.cc
--- tests/border/mirror.cc (revision 2224)
+++ tests/border/mirror.cc (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,17 +43,17 @@
main (void)
{
{
- image1d<int> im(2, 3);
- debug::iota(im);
- border::mirror(im);
- mln_assertion(im[0] == 2);
- mln_assertion(im[1] == 2);
- mln_assertion(im[2] == 1);
- mln_assertion(im[3] == 1);
- mln_assertion(im[4] == 2);
- mln_assertion(im[5] == 2);
- mln_assertion(im[6] == 1);
- mln_assertion(im[7] == 1);
+ image1d<int> ima(2, 3);
+ debug::iota(ima);
+ border::mirror(ima);
+ mln_assertion(ima.element(0) == 2);
+ mln_assertion(ima.element(1) == 2);
+ mln_assertion(ima.element(2) == 1);
+ mln_assertion(ima.element(3) == 1);
+ mln_assertion(ima.element(4) == 2);
+ mln_assertion(ima.element(5) == 2);
+ mln_assertion(ima.element(6) == 1);
+ mln_assertion(ima.element(7) == 1);
}
@@ -62,47 +62,47 @@
debug::iota(ima);
border::mirror(ima);
- mln_assertion(ima[ 0] == 1);
- mln_assertion(ima[ 1] == 1);
- mln_assertion(ima[ 2] == 4);
- mln_assertion(ima[ 3] == 5);
- mln_assertion(ima[ 4] == 6);
- mln_assertion(ima[ 5] == 3);
- mln_assertion(ima[ 6] == 3);
- mln_assertion(ima[ 7] == 1);
- mln_assertion(ima[ 8] == 1);
- mln_assertion(ima[ 9] == 1);
- mln_assertion(ima[10] == 2);
- mln_assertion(ima[11] == 3);
- mln_assertion(ima[12] == 3);
- mln_assertion(ima[13] == 3);
- mln_assertion(ima[14] == 2);
- mln_assertion(ima[15] == 1);
- mln_assertion(ima[16] == 1);
- mln_assertion(ima[17] == 2);
- mln_assertion(ima[18] == 3);
- mln_assertion(ima[19] == 3);
- mln_assertion(ima[20] == 2);
- mln_assertion(ima[21] == 5);
- mln_assertion(ima[22] == 4);
- mln_assertion(ima[23] == 4);
- mln_assertion(ima[24] == 5);
- mln_assertion(ima[25] == 6);
- mln_assertion(ima[26] == 6);
- mln_assertion(ima[27] == 5);
- mln_assertion(ima[28] == 4);
- mln_assertion(ima[29] == 4);
- mln_assertion(ima[30] == 4);
- mln_assertion(ima[31] == 5);
- mln_assertion(ima[32] == 6);
- mln_assertion(ima[33] == 6);
- mln_assertion(ima[34] == 6);
- mln_assertion(ima[35] == 4);
- mln_assertion(ima[36] == 4);
- mln_assertion(ima[37] == 1);
- mln_assertion(ima[38] == 2);
- mln_assertion(ima[39] == 3);
- mln_assertion(ima[40] == 6);
- mln_assertion(ima[41] == 6);
+ mln_assertion(ima.element( 0) == 1);
+ mln_assertion(ima.element( 1) == 1);
+ mln_assertion(ima.element( 2) == 4);
+ mln_assertion(ima.element( 3) == 5);
+ mln_assertion(ima.element( 4) == 6);
+ mln_assertion(ima.element( 5) == 3);
+ mln_assertion(ima.element( 6) == 3);
+ mln_assertion(ima.element( 7) == 1);
+ mln_assertion(ima.element( 8) == 1);
+ mln_assertion(ima.element( 9) == 1);
+ mln_assertion(ima.element(10) == 2);
+ mln_assertion(ima.element(11) == 3);
+ mln_assertion(ima.element(12) == 3);
+ mln_assertion(ima.element(13) == 3);
+ mln_assertion(ima.element(14) == 2);
+ mln_assertion(ima.element(15) == 1);
+ mln_assertion(ima.element(16) == 1);
+ mln_assertion(ima.element(17) == 2);
+ mln_assertion(ima.element(18) == 3);
+ mln_assertion(ima.element(19) == 3);
+ mln_assertion(ima.element(20) == 2);
+ mln_assertion(ima.element(21) == 5);
+ mln_assertion(ima.element(22) == 4);
+ mln_assertion(ima.element(23) == 4);
+ mln_assertion(ima.element(24) == 5);
+ mln_assertion(ima.element(25) == 6);
+ mln_assertion(ima.element(26) == 6);
+ mln_assertion(ima.element(27) == 5);
+ mln_assertion(ima.element(28) == 4);
+ mln_assertion(ima.element(29) == 4);
+ mln_assertion(ima.element(30) == 4);
+ mln_assertion(ima.element(31) == 5);
+ mln_assertion(ima.element(32) == 6);
+ mln_assertion(ima.element(33) == 6);
+ mln_assertion(ima.element(34) == 6);
+ mln_assertion(ima.element(35) == 4);
+ mln_assertion(ima.element(36) == 4);
+ mln_assertion(ima.element(37) == 1);
+ mln_assertion(ima.element(38) == 2);
+ mln_assertion(ima.element(39) == 3);
+ mln_assertion(ima.element(40) == 6);
+ mln_assertion(ima.element(41) == 6);
}
Index: tests/border/duplicate.cc
--- tests/border/duplicate.cc (revision 2224)
+++ tests/border/duplicate.cc (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
@@ -45,31 +45,31 @@
debug::iota (ima);
border::duplicate (ima);
- mln_assertion(ima[ 0] == 1);
- mln_assertion(ima[ 1] == 1);
- mln_assertion(ima[ 2] == 2);
- mln_assertion(ima[ 3] == 3);
- mln_assertion(ima[ 4] == 3);
- mln_assertion(ima[ 5] == 1);
- mln_assertion(ima[ 6] == 1);
- mln_assertion(ima[ 7] == 2);
- mln_assertion(ima[ 8] == 3);
- mln_assertion(ima[ 9] == 3);
- mln_assertion(ima[10] == 4);
- mln_assertion(ima[11] == 4);
- mln_assertion(ima[12] == 5);
- mln_assertion(ima[13] == 6);
- mln_assertion(ima[14] == 6);
- mln_assertion(ima[15] == 7);
- mln_assertion(ima[16] == 7);
- mln_assertion(ima[17] == 8);
- mln_assertion(ima[18] == 9);
- mln_assertion(ima[19] == 9);
- mln_assertion(ima[20] == 7);
- mln_assertion(ima[21] == 7);
- mln_assertion(ima[22] == 8);
- mln_assertion(ima[23] == 9);
- mln_assertion(ima[24] == 9);
+ mln_assertion(ima.element( 0) == 1);
+ mln_assertion(ima.element( 1) == 1);
+ mln_assertion(ima.element( 2) == 2);
+ mln_assertion(ima.element( 3) == 3);
+ mln_assertion(ima.element( 4) == 3);
+ mln_assertion(ima.element( 5) == 1);
+ mln_assertion(ima.element( 6) == 1);
+ mln_assertion(ima.element( 7) == 2);
+ mln_assertion(ima.element( 8) == 3);
+ mln_assertion(ima.element( 9) == 3);
+ mln_assertion(ima.element(10) == 4);
+ mln_assertion(ima.element(11) == 4);
+ mln_assertion(ima.element(12) == 5);
+ mln_assertion(ima.element(13) == 6);
+ mln_assertion(ima.element(14) == 6);
+ mln_assertion(ima.element(15) == 7);
+ mln_assertion(ima.element(16) == 7);
+ mln_assertion(ima.element(17) == 8);
+ mln_assertion(ima.element(18) == 9);
+ mln_assertion(ima.element(19) == 9);
+ mln_assertion(ima.element(20) == 7);
+ mln_assertion(ima.element(21) == 7);
+ mln_assertion(ima.element(22) == 8);
+ mln_assertion(ima.element(23) == 9);
+ mln_assertion(ima.element(24) == 9);
}
Index: tests/border/fill.cc
--- tests/border/fill.cc (revision 2224)
+++ tests/border/fill.cc (working copy)
@@ -48,11 +48,11 @@
border::fill (ima, 42);
for(int i = 0; i < ww; ++i)
if ((i / w < border) || (i / w > border + size))
- mln_assertion (ima[i] == 42u);
+ mln_assertion (ima.element(i) == 42u);
else
if ((i % w < border) &&
(border + size <= i % w))
- mln_assertion (ima[i] == 42u);
+ mln_assertion (ima.element(i) == 42u);
}
int
Index: tests/convert/to_p_set.cc
--- tests/convert/to_p_set.cc (revision 2224)
+++ tests/convert/to_p_set.cc (working copy)
@@ -46,8 +46,8 @@
void test(p_set<point2d> ref, p_set<point2d> cmp)
{
- mln_assertion(ref.npoints() == cmp.npoints());
- for (unsigned i = 0; i < ref.npoints(); ++i)
+ mln_assertion(ref.nsites() == cmp.nsites());
+ for (unsigned i = 0; i < ref.nsites(); ++i)
mln_assertion(ref[i] == cmp[i]);
}
Index: tests/convert/to_p_array.cc
--- tests/convert/to_p_array.cc (revision 2224)
+++ tests/convert/to_p_array.cc (working copy)
@@ -48,7 +48,7 @@
win::segment1d win1d(5);
vec1d v1(convert::to_p_array(win1d, p1));
- for (size_t i=0; i < v1.npoints(); i++)
+ for (size_t i=0; i < v1.nsites(); i++)
std::cout << (v1[i]);
std::cout << "\n";
@@ -58,7 +58,7 @@
win::rectangle2d win2d(3, 3);
vec2d v2(convert::to_p_array(win2d, p2));
- for (size_t i=0; i < v2.npoints(); i++)
+ for (size_t i=0; i < v2.nsites(); i++)
std::cout << (v2[i]);
}
Index: tests/util/lemmings.cc
--- tests/util/lemmings.cc (revision 2224)
+++ tests/util/lemmings.cc (working copy)
@@ -48,11 +48,11 @@
I ima = make::image2d<int>(vals);
- mln_point_(I) pt1(1, 0);
- mln_point_(I) pt2(0, 2);
- mln_point_(I) pt3(2, 3);
- mln_point_(I) pt4(3, 1);
- mln_point_(I) pt5(1, 1);
+ mln_site_(I) pt1(1, 0);
+ mln_site_(I) pt2(0, 2);
+ mln_site_(I) pt3(2, 3);
+ mln_site_(I) pt4(3, 1);
+ mln_site_(I) pt5(1, 1);
mln_value_(I) vl1 = ima(pt1);
mln_value_(I) vl2 = ima(pt2);
@@ -60,11 +60,11 @@
mln_value_(I) vl4 = ima(pt4);
mln_value_(I) vl5 = ima(pt5);
- mln_point_(I) ptl1 = util::lemmings(ima, pt1, right, vl1);
- mln_point_(I) ptl2 = util::lemmings(ima, pt2, down, vl2);
- mln_point_(I) ptl3 = util::lemmings(ima, pt3, left, vl3);
- mln_point_(I) ptl4 = util::lemmings(ima, pt4, up, vl4);
- mln_point_(I) ptl5 = util::lemmings(ima, pt5, up, vl5);
+ mln_site_(I) ptl1 = util::lemmings(ima, pt1, right, vl1);
+ mln_site_(I) ptl2 = util::lemmings(ima, pt2, down, vl2);
+ mln_site_(I) ptl3 = util::lemmings(ima, pt3, left, vl3);
+ mln_site_(I) ptl4 = util::lemmings(ima, pt4, up, vl4);
+ mln_site_(I) ptl5 = util::lemmings(ima, pt5, up, vl5);
mln_assertion(ptl1 == point2d(1, 2));
mln_assertion(ptl2 == point2d(2, 2));
Index: tests/labeling/level.cc
--- tests/labeling/level.cc (revision 2224)
+++ tests/labeling/level.cc (working copy)
@@ -63,5 +63,5 @@
accu::compute<accu::count>(labels | (pw::value(labels) != pw::cst(0u)));
npixels += npix;
}
- mln_assertion(npixels == lena.npoints());
+ mln_assertion(npixels == lena.nsites());
}