Commit ce9d9c45 authored by Thierry Geraud's avatar Thierry Geraud
Browse files

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.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008@2225 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 085727de
2008-09-12 Thierry Geraud <thierry.geraud@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.
2008-09-11 Guillaume Lazzara <z@lrde.epita.fr> 2008-09-11 Guillaume Lazzara <z@lrde.epita.fr>
   
Fix most of Doxygen's warnings. Fix most of Doxygen's warnings.
......
// 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 // This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms // software; you can redistribute it and/or modify it under the terms
...@@ -45,31 +45,31 @@ main (void) ...@@ -45,31 +45,31 @@ main (void)
debug::iota (ima); debug::iota (ima);
border::duplicate (ima); border::duplicate (ima);
mln_assertion(ima[ 0] == 1); mln_assertion(ima.element( 0) == 1);
mln_assertion(ima[ 1] == 1); mln_assertion(ima.element( 1) == 1);
mln_assertion(ima[ 2] == 2); mln_assertion(ima.element( 2) == 2);
mln_assertion(ima[ 3] == 3); mln_assertion(ima.element( 3) == 3);
mln_assertion(ima[ 4] == 3); mln_assertion(ima.element( 4) == 3);
mln_assertion(ima[ 5] == 1); mln_assertion(ima.element( 5) == 1);
mln_assertion(ima[ 6] == 1); mln_assertion(ima.element( 6) == 1);
mln_assertion(ima[ 7] == 2); mln_assertion(ima.element( 7) == 2);
mln_assertion(ima[ 8] == 3); mln_assertion(ima.element( 8) == 3);
mln_assertion(ima[ 9] == 3); mln_assertion(ima.element( 9) == 3);
mln_assertion(ima[10] == 4); mln_assertion(ima.element(10) == 4);
mln_assertion(ima[11] == 4); mln_assertion(ima.element(11) == 4);
mln_assertion(ima[12] == 5); mln_assertion(ima.element(12) == 5);
mln_assertion(ima[13] == 6); mln_assertion(ima.element(13) == 6);
mln_assertion(ima[14] == 6); mln_assertion(ima.element(14) == 6);
mln_assertion(ima[15] == 7); mln_assertion(ima.element(15) == 7);
mln_assertion(ima[16] == 7); mln_assertion(ima.element(16) == 7);
mln_assertion(ima[17] == 8); mln_assertion(ima.element(17) == 8);
mln_assertion(ima[18] == 9); mln_assertion(ima.element(18) == 9);
mln_assertion(ima[19] == 9); mln_assertion(ima.element(19) == 9);
mln_assertion(ima[20] == 7); mln_assertion(ima.element(20) == 7);
mln_assertion(ima[21] == 7); mln_assertion(ima.element(21) == 7);
mln_assertion(ima[22] == 8); mln_assertion(ima.element(22) == 8);
mln_assertion(ima[23] == 9); mln_assertion(ima.element(23) == 9);
mln_assertion(ima[24] == 9); mln_assertion(ima.element(24) == 9);
} }
// 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 // This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms // software; you can redistribute it and/or modify it under the terms
...@@ -50,7 +50,7 @@ namespace mln ...@@ -50,7 +50,7 @@ namespace mln
border::duplicate(ima); border::duplicate(ima);
for (int i = 0; i < c; ++i) for (int i = 0; i < c; ++i)
mln_assertion(ima[i] == ref[i]); mln_assertion(ima.element(i) == ref[i]);
} }
template <typename T> template <typename T>
...@@ -64,7 +64,7 @@ namespace mln ...@@ -64,7 +64,7 @@ namespace mln
border::duplicate(ima); border::duplicate(ima);
for (int i = 0; i < c * r; ++i) for (int i = 0; i < c * r; ++i)
mln_assertion(ima[i] == ref[i]); mln_assertion(ima.element(i) == ref[i]);
} }
} }
......
...@@ -48,11 +48,11 @@ check(int size, int border) ...@@ -48,11 +48,11 @@ check(int size, int border)
border::fill (ima, 42); border::fill (ima, 42);
for(int i = 0; i < ww; ++i) for(int i = 0; i < ww; ++i)
if ((i / w < border) || (i / w > border + size)) if ((i / w < border) || (i / w > border + size))
mln_assertion (ima[i] == 42u); mln_assertion (ima.element(i) == 42u);
else else
if ((i % w < border) && if ((i % w < border) &&
(border + size <= i % w)) (border + size <= i % w))
mln_assertion (ima[i] == 42u); mln_assertion (ima.element(i) == 42u);
} }
int int
......
// 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 // This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms // software; you can redistribute it and/or modify it under the terms
...@@ -58,13 +58,13 @@ check1d(unsigned row, unsigned border, T& value, T& v) ...@@ -58,13 +58,13 @@ check1d(unsigned row, unsigned border, T& value, T& v)
unsigned i = 0; unsigned i = 0;
for(i = 0; i < border; ++i) for(i = 0; i < border; ++i)
mln_assertion (ima[i] == value); mln_assertion (ima.element(i) == value);
unsigned bo = border + row; unsigned bo = border + row;
for(; i < bo; ++i) for(; i < bo; ++i)
mln_assertion (ima[i] == v); mln_assertion (ima.element(i) == v);
bo += border; bo += border;
for(; i < bo; ++i) for(; i < bo; ++i)
mln_assertion (ima[i] == value); mln_assertion (ima.element(i) == value);
} }
template <typename T> template <typename T>
...@@ -83,18 +83,18 @@ check2d(unsigned row, unsigned col, unsigned border, T& value, T& v) ...@@ -83,18 +83,18 @@ check2d(unsigned row, unsigned col, unsigned border, T& value, T& v)
unsigned ww = r * c; unsigned ww = r * c;
for(i = 0; i < bo; ++i) for(i = 0; i < bo; ++i)
mln_assertion (ima[i] == value); mln_assertion (ima.element(i) == value);
bo += c * row; bo += c * row;
for(; i < bo; ++i) for(; i < bo; ++i)
{ {
unsigned cur = i % c; unsigned cur = i % c;
if (cur < border || cur >= u) if (cur < border || cur >= u)
mln_assertion (ima[i] == value); mln_assertion (ima.element(i) == value);
else else
mln_assertion (ima[i] == v); mln_assertion (ima.element(i) == v);
} }
for(; i < ww; ++i) for(; i < ww; ++i)
mln_assertion (ima[i] == value); mln_assertion (ima.element(i) == value);
} }
template <typename T> template <typename T>
...@@ -113,18 +113,18 @@ check3d(unsigned sli, unsigned row, unsigned col, unsigned border, T& value, T& ...@@ -113,18 +113,18 @@ check3d(unsigned sli, unsigned row, unsigned col, unsigned border, T& value, T&
unsigned ww = r * c; unsigned ww = r * c;
for(i = 0; i < bo; ++i) for(i = 0; i < bo; ++i)
mln_assertion (ima[i] == value); mln_assertion (ima.element(i) == value);
bo += c * row; bo += c * row;
for(; i < bo; ++i) for(; i < bo; ++i)
{ {
unsigned cur = i % c; unsigned cur = i % c;
if (cur < border || cur >= u) if (cur < border || cur >= u)
mln_assertion (ima[i] == value); mln_assertion (ima.element(i) == value);
else else
mln_assertion (ima[i] == v); mln_assertion (ima.element(i) == v);
} }
for(; i < ww; ++i) for(; i < ww; ++i)
mln_assertion (ima[i] == value); mln_assertion (ima.element(i) == value);
} }
......
// 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 // This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms // software; you can redistribute it and/or modify it under the terms
...@@ -43,17 +43,17 @@ int ...@@ -43,17 +43,17 @@ int
main (void) main (void)
{ {
{ {
image1d<int> im(2, 3); image1d<int> ima(2, 3);
debug::iota(im); debug::iota(ima);
border::mirror(im); border::mirror(ima);
mln_assertion(im[0] == 2); mln_assertion(ima.element(0) == 2);
mln_assertion(im[1] == 2); mln_assertion(ima.element(1) == 2);
mln_assertion(im[2] == 1); mln_assertion(ima.element(2) == 1);
mln_assertion(im[3] == 1); mln_assertion(ima.element(3) == 1);
mln_assertion(im[4] == 2); mln_assertion(ima.element(4) == 2);
mln_assertion(im[5] == 2); mln_assertion(ima.element(5) == 2);
mln_assertion(im[6] == 1); mln_assertion(ima.element(6) == 1);
mln_assertion(im[7] == 1); mln_assertion(ima.element(7) == 1);
} }
...@@ -62,47 +62,47 @@ main (void) ...@@ -62,47 +62,47 @@ main (void)
debug::iota(ima); debug::iota(ima);
border::mirror(ima); border::mirror(ima);
mln_assertion(ima[ 0] == 1); mln_assertion(ima.element( 0) == 1);
mln_assertion(ima[ 1] == 1); mln_assertion(ima.element( 1) == 1);
mln_assertion(ima[ 2] == 4); mln_assertion(ima.element( 2) == 4);
mln_assertion(ima[ 3] == 5); mln_assertion(ima.element( 3) == 5);
mln_assertion(ima[ 4] == 6); mln_assertion(ima.element( 4) == 6);
mln_assertion(ima[ 5] == 3); mln_assertion(ima.element( 5) == 3);
mln_assertion(ima[ 6] == 3); mln_assertion(ima.element( 6) == 3);
mln_assertion(ima[ 7] == 1); mln_assertion(ima.element( 7) == 1);
mln_assertion(ima[ 8] == 1); mln_assertion(ima.element( 8) == 1);
mln_assertion(ima[ 9] == 1); mln_assertion(ima.element( 9) == 1);
mln_assertion(ima[10] == 2); mln_assertion(ima.element(10) == 2);
mln_assertion(ima[11] == 3); mln_assertion(ima.element(11) == 3);
mln_assertion(ima[12] == 3); mln_assertion(ima.element(12) == 3);
mln_assertion(ima[13] == 3); mln_assertion(ima.element(13) == 3);
mln_assertion(ima[14] == 2); mln_assertion(ima.element(14) == 2);
mln_assertion(ima[15] == 1); mln_assertion(ima.element(15) == 1);
mln_assertion(ima[16] == 1); mln_assertion(ima.element(16) == 1);
mln_assertion(ima[17] == 2); mln_assertion(ima.element(17) == 2);
mln_assertion(ima[18] == 3); mln_assertion(ima.element(18) == 3);
mln_assertion(ima[19] == 3); mln_assertion(ima.element(19) == 3);
mln_assertion(ima[20] == 2); mln_assertion(ima.element(20) == 2);
mln_assertion(ima[21] == 5); mln_assertion(ima.element(21) == 5);
mln_assertion(ima[22] == 4); mln_assertion(ima.element(22) == 4);
mln_assertion(ima[23] == 4); mln_assertion(ima.element(23) == 4);
mln_assertion(ima[24] == 5); mln_assertion(ima.element(24) == 5);
mln_assertion(ima[25] == 6); mln_assertion(ima.element(25) == 6);
mln_assertion(ima[26] == 6); mln_assertion(ima.element(26) == 6);
mln_assertion(ima[27] == 5); mln_assertion(ima.element(27) == 5);
mln_assertion(ima[28] == 4); mln_assertion(ima.element(28) == 4);
mln_assertion(ima[29] == 4); mln_assertion(ima.element(29) == 4);
mln_assertion(ima[30] == 4); mln_assertion(ima.element(30) == 4);
mln_assertion(ima[31] == 5); mln_assertion(ima.element(31) == 5);
mln_assertion(ima[32] == 6); mln_assertion(ima.element(32) == 6);
mln_assertion(ima[33] == 6); mln_assertion(ima.element(33) == 6);
mln_assertion(ima[34] == 6); mln_assertion(ima.element(34) == 6);
mln_assertion(ima[35] == 4); mln_assertion(ima.element(35) == 4);
mln_assertion(ima[36] == 4); mln_assertion(ima.element(36) == 4);
mln_assertion(ima[37] == 1); mln_assertion(ima.element(37) == 1);
mln_assertion(ima[38] == 2); mln_assertion(ima.element(38) == 2);
mln_assertion(ima[39] == 3); mln_assertion(ima.element(39) == 3);
mln_assertion(ima[40] == 6); mln_assertion(ima.element(40) == 6);
mln_assertion(ima[41] == 6); mln_assertion(ima.element(41) == 6);
} }
// 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 // This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms // software; you can redistribute it and/or modify it under the terms
...@@ -51,7 +51,7 @@ namespace mln ...@@ -51,7 +51,7 @@ namespace mln
border::mirror(ima); border::mirror(ima);
for (int i = 0; i < c; ++i) for (int i = 0; i < c; ++i)
mln_assertion(ima[i] == ref[i]); mln_assertion(ima.element(i) == ref[i]);
} }
template <typename T> template <typename T>
...@@ -65,7 +65,7 @@ namespace mln ...@@ -65,7 +65,7 @@ namespace mln
border::mirror(ima); border::mirror(ima);
for (int i = 0; i < c * r; ++i) for (int i = 0; i < c * r; ++i)
mln_assertion(ima[i] == ref[i]); mln_assertion(ima.element(i) == ref[i]);
} }
} }
......
...@@ -48,7 +48,7 @@ int main() ...@@ -48,7 +48,7 @@ int main()
win::segment1d win1d(5); win::segment1d win1d(5);
vec1d v1(convert::to_p_array(win1d, p1)); 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 << (v1[i]);
std::cout << "\n"; std::cout << "\n";
...@@ -58,7 +58,7 @@ int main() ...@@ -58,7 +58,7 @@ int main()
win::rectangle2d win2d(3, 3); win::rectangle2d win2d(3, 3);
vec2d v2(convert::to_p_array(win2d, p2)); 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]); std::cout << (v2[i]);
} }
...@@ -46,8 +46,8 @@ using namespace mln; ...@@ -46,8 +46,8 @@ using namespace mln;
void test(p_set<point2d> ref, p_set<point2d> cmp) void test(p_set<point2d> ref, p_set<point2d> cmp)
{ {
mln_assertion(ref.npoints() == cmp.npoints()); mln_assertion(ref.nsites() == cmp.nsites());
for (unsigned i = 0; i < ref.npoints(); ++i) for (unsigned i = 0; i < ref.nsites(); ++i)
mln_assertion(ref[i] == cmp[i]); mln_assertion(ref[i] == cmp[i]);
} }
......
...@@ -136,7 +136,7 @@ int main() ...@@ -136,7 +136,7 @@ int main()
typename mln::complex_image<D, P, V>::lvalue typename mln::complex_image<D, P, V>::lvalue
mln::complex_image<D, P, V>::operator()(const mln::complex_psite<D, P>&) mln::complex_image<D, P, V>::operator()(const mln::complex_psite<D, P>&)
[with unsigned int D = 2u, [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>]: V = mln::value::int_u<8u>]:
Assertion `this->data_->pc_.has(p)' failed. Assertion `this->data_->pc_.has(p)' failed.
......
// 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 // This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms // software; you can redistribute it and/or modify it under the terms
...@@ -45,8 +45,8 @@ int main() ...@@ -45,8 +45,8 @@ int main()
image3d<int> f(nslis, nrows, ncols, border); image3d<int> f(nslis, nrows, ncols, border);
mln_assertion(f.npoints() == geom::nslis(f) * geom::nrows(f) * geom::ncols(f)); mln_assertion(f.nsites() == geom::nslis(f) * geom::nrows(f) * geom::ncols(f));
mln_assertion(f.ncells() == ((nrows + 2 * border) mln_assertion(f.nelements() == ((nrows + 2 * border)
* (ncols + 2 * border) * (ncols + 2 * border)
* (nslis + 2 * border))); * (nslis + 2 * border)));
} }
...@@ -44,7 +44,7 @@ int main() ...@@ -44,7 +44,7 @@ int main()
I ima(8, 8); I ima(8, 8);
// debug::println(ima | fun::p2b::chess); // debug::println(ima | fun::p2b::chess);
// FIXME: is this line corret? // 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; typedef image_if<I, fun::p2b::chess_t> II;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
using namespace mln; using namespace mln;
template <typename N> 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) unsigned size)
{ {
mln_niter(N) n(nbh, p_ref); mln_niter(N) n(nbh, p_ref);
......
...@@ -63,7 +63,7 @@ int main() ...@@ -63,7 +63,7 @@ int main()
p.next(); p.next();
++i; ++i;
} }
mln_assertion(i == b.npoints()); mln_assertion(i == b.nsites());
} }
{ {
...@@ -79,7 +79,7 @@ int main() ...@@ -79,7 +79,7 @@ int main()
p.next(); p.next();
++i; ++i;
} }
mln_assertion(i == b.npoints()); mln_assertion(i == b.nsites());
} }
} }
} }
...@@ -64,7 +64,7 @@ int main() ...@@ -64,7 +64,7 @@ int main()
p.next(); p.next();
++i; ++i;
} }
mln_assertion(i == b.npoints()); mln_assertion(i == b.nsites());
} }
{ {
...@@ -80,7 +80,7 @@ int main() ...@@ -80,7 +80,7 @@ int main()
p.next();