
https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Nicolas Ballas <ballas@lrde.epita.fr> Replace some remaining .at by opt::at. * sandbox/aroumougame/skeleton/sedt.hh, * sandbox/dalila/demat.hh, * sandbox/abraham/mln/transform/fft.hh, * sandbox/ballas/color/min_tree_volume_filter.cc, * sandbox/ballas/color/reference.cc, * sandbox/ballas/color/min_tree_area_filter.cc, * sandbox/ballas/color/min_tree_height_filter.cc, * sandbox/ballas/color/min_tree_color.cc, * sandbox/ballas/color/reference2.cc, * sandbox/ballas/color/src/graph.hh, * sandbox/ballas/color/min_tree_color_v2.cc, * sandbox/geraud/wst_edge.cc, * sandbox/geraud/fllt.svg.6.cc, * sandbox/geraud/fllt/fllt.svg.2.cc, * sandbox/geraud/fllt/fllt.svg.3.cc, * sandbox/geraud/fllt/fllt.svg.4.cc, * sandbox/geraud/fllt/fllt.svg.5.cc, * sandbox/geraud/fllt/fllt.svg.6.cc: Update. abraham/mln/transform/fft.hh | 2 +- aroumougame/skeleton/sedt.hh | 6 +++--- ballas/color/min_tree_area_filter.cc | 4 ++-- ballas/color/min_tree_color.cc | 6 ++++-- ballas/color/min_tree_color_v2.cc | 6 ++++-- ballas/color/min_tree_height_filter.cc | 6 ++++-- ballas/color/min_tree_volume_filter.cc | 4 ++-- ballas/color/reference.cc | 4 ++-- ballas/color/reference2.cc | 4 ++-- ballas/color/src/graph.hh | 3 ++- dalila/demat.hh | 22 ++++++++++++---------- geraud/fllt.svg.6.cc | 3 ++- geraud/fllt/fllt.svg.2.cc | 3 ++- geraud/fllt/fllt.svg.3.cc | 3 ++- geraud/fllt/fllt.svg.4.cc | 3 ++- geraud/fllt/fllt.svg.5.cc | 3 ++- geraud/fllt/fllt.svg.6.cc | 2 +- geraud/wst_edge.cc | 5 +++-- 18 files changed, 52 insertions(+), 37 deletions(-) Index: sandbox/aroumougame/skeleton/sedt.hh --- sandbox/aroumougame/skeleton/sedt.hh (revision 3064) +++ sandbox/aroumougame/skeleton/sedt.hh (working copy) @@ -92,7 +92,7 @@ } else { - v=1+(j*j-s[q]*s[q]+g.at(j,i)*g.at(j,i)-g.at(s[q],i)*opt::at(g, s[q],i))/(2*(j-s[q])); + v=1+(j*j-s[q]*s[q]+opt::at(g,j,i)*opt::at(g,j,i)-opt::at(g,s[q],i)*opt::at(g, s[q],i))/(2*(j-s[q])); if(v<h) { q++; @@ -104,7 +104,7 @@ for(int j= h-1; j>=0; j--) { - dt.at(j,i)= opt::at(g, s[q],i)*opt::at(g, s[q],i)+(j-s[q])*(j-s[q]); + opt::at(dt,j,i)= opt::at(g, s[q],i)*opt::at(g, s[q],i)+(j-s[q])*(j-s[q]); if(j==t[q]) q--; } @@ -184,7 +184,7 @@ { for( int j=0; j<L; j++) { - dt.at(i,j) = opt::at(DTg, i,j); + opt::at(dt,i,j) = opt::at(DTg, i,j); } } return dt; Index: sandbox/dalila/demat.hh --- sandbox/dalila/demat.hh (revision 3064) +++ sandbox/dalila/demat.hh (working copy) @@ -45,6 +45,8 @@ # include <mln/core/site_set/p_vaccess.hh> # include <mln/core/site_set/p_set.hh> +# include <mln/opt/at.hh> + # include <mln/accu/bbox.hh> # include <mln/accu/count.hh> @@ -199,16 +201,16 @@ for (unsigned i = 1; i < tboxes.first.nelements(); ++i) { - ++vend.at(tboxes.first[i].pmin().row()); - ++vend.at(tboxes.first[i].pmax().row()); - ++vcol.at(tboxes.first[i].center().col()); + opt::at(++vend, tboxes.first[i].pmin().row()); + opt::at(++vend, tboxes.first[i].pmax().row()); + opt::at(++vcol, tboxes.first[i].center().col()); } for (unsigned i = 1; i < tboxes.second.nelements(); ++i) { - ++hend.at(tboxes.second[i].pmin().col()); - ++hend.at(tboxes.second[i].pmax().col()); - ++hrow.at(tboxes.second[i].center().row()); + opt::at(++hend, tboxes.second[i].pmin().col()); + opt::at(++hend, tboxes.second[i].pmax().col()); + opt::at(++hrow, tboxes.second[i].center().row()); } #ifndef NOUT @@ -217,17 +219,17 @@ for (unsigned i = 1; i < in.ncols(); ++i) { - if (hend.at(i) > 0) + if (opt::at(hend, i) > 0) draw_col(tmp, i, literal::orange); - if (vcol.at(i) > 0) + if (opt::at(vcol, i) > 0) draw_col(tmp, i, literal::orange); } for (unsigned i = 1; i < in.nrows(); ++i) { - if (hrow.at(i) > 0) + if (opt::at(hrow, i) > 0) draw_row(tmp, i, literal::magenta); - if (vend.at(i) > 0) + if (opt::at(vend, i) > 0) draw_row(tmp, i, literal::magenta); } Index: sandbox/abraham/mln/transform/fft.hh --- sandbox/abraham/mln/transform/fft.hh (revision 3064) +++ sandbox/abraham/mln/transform/fft.hh (working copy) @@ -442,7 +442,7 @@ } for (unsigned row = 0; row < this->trans_im.nrows(); ++row) for (unsigned col = this->trans_im.ncols() - 1; col > this->trans_im.ncols() / 2; --col) - this->trans_im.at(row, col) = opt::at(this->trans_im, this->trans_im.nrows() - row - 1, + at(this->trans_im, row, col) = opt::at(this->trans_im, this->trans_im.nrows() - row - 1, this->trans_im.ncols() - col - 1); return this->trans_im; } Index: sandbox/ballas/color/min_tree_volume_filter.cc --- sandbox/ballas/color/min_tree_volume_filter.cc (revision 3064) +++ sandbox/ballas/color/min_tree_volume_filter.cc (working copy) @@ -387,7 +387,7 @@ 2 * input.ncols() - 1); for (unsigned row = 0; row < input.nrows(); ++row) for (unsigned col = 0; col < input.ncols(); ++col) - output.at(2 * row, 2 * col) = mln::opt::at(input, row, col); + mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col); return output; } @@ -400,7 +400,7 @@ (input.ncols() + 1) / 2); for (unsigned row = 0; row < input.nrows(); row += 2) for (unsigned col = 0; col < input.ncols(); col += 2) - output.at(row / 2, col / 2) = mln::opt::at(input, row, col); + mln::opt::at(output, row / 2, col / 2) = mln::opt::at(input, row, col); return output; } Index: sandbox/ballas/color/reference.cc --- sandbox/ballas/color/reference.cc (revision 3064) +++ sandbox/ballas/color/reference.cc (working copy) @@ -351,7 +351,7 @@ 2 * input.ncols() - 1); for (int row = 0; row < input.nrows(); ++row) for (int col = 0; col < input.ncols(); ++col) - output.at(2 * row, 2 * col) = mln::opt::at(input, row, col); + mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col); return output; } @@ -417,7 +417,7 @@ (input.ncols() + 1) / 2); for (int row = 0; row < input.nrows(); row += 2) for (int col = 0; col < input.ncols(); col += 2) - output.at(row / 2, col / 2) = mln::opt::at(input, row, col); + mln::opt::at(output, row / 2, col / 2) = mln::opt::at(input, row, col); return output; } Index: sandbox/ballas/color/min_tree_area_filter.cc --- sandbox/ballas/color/min_tree_area_filter.cc (revision 3064) +++ sandbox/ballas/color/min_tree_area_filter.cc (working copy) @@ -364,7 +364,7 @@ 2 * input.ncols() - 1); for (unsigned row = 0; row < input.nrows(); ++row) for (unsigned col = 0; col < input.ncols(); ++col) - output.at(2 * row, 2 * col) = mln::opt::at(input, row, col); + mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col); return output; } @@ -377,7 +377,7 @@ (input.ncols() + 1) / 2); for (unsigned row = 0; row < input.nrows(); row += 2) for (unsigned col = 0; col < input.ncols(); col += 2) - output.at(row / 2, col / 2) = mln::opt::at(input, row, col); + mln::opt::at(output, row / 2, col / 2) = mln::opt::at(input, row, col); return output; } Index: sandbox/ballas/color/min_tree_height_filter.cc --- sandbox/ballas/color/min_tree_height_filter.cc (revision 3064) +++ sandbox/ballas/color/min_tree_height_filter.cc (working copy) @@ -387,7 +387,8 @@ 2 * input.ncols() - 1); for (unsigned row = 0; row < input.nrows(); ++row) for (unsigned col = 0; col < input.ncols(); ++col) - output.at(2 * row, 2 * col) = mln::opt::at(input, row, col); + mln::opt::at(output, 2 * row, 2 * col) = + mln::opt::at(input, row, col); return output; } @@ -400,7 +401,8 @@ (input.ncols() + 1) / 2); for (unsigned row = 0; row < input.nrows(); row += 2) for (unsigned col = 0; col < input.ncols(); col += 2) - output.at(row / 2, col / 2) = mln::opt::at(input, row, col); + mln::opt::at(output, row / 2, col / 2) = + mln::opt::at(input, row, col); return output; } Index: sandbox/ballas/color/min_tree_color.cc --- sandbox/ballas/color/min_tree_color.cc (revision 3064) +++ sandbox/ballas/color/min_tree_color.cc (working copy) @@ -381,7 +381,8 @@ 2 * input.ncols() - 1); for (unsigned row = 0; row < input.nrows(); ++row) for (unsigned col = 0; col < input.ncols(); ++col) - output.at(2 * row, 2 * col) = mln::opt::at(input, row, col); + mln::opt::at(output, 2 * row, 2 * col) = + mln::opt::at(input, row, col); return output; } @@ -394,7 +395,8 @@ (input.ncols() + 1) / 2); for (unsigned row = 0; row < input.nrows(); row += 2) for (unsigned col = 0; col < input.ncols(); col += 2) - output.at(row / 2, col / 2) = mln::opt::at(input, row, col); + mln::opt::at(output, row / 2, col / 2) = + mln::opt::at(input, row, col); return output; } Index: sandbox/ballas/color/reference2.cc --- sandbox/ballas/color/reference2.cc (revision 3064) +++ sandbox/ballas/color/reference2.cc (working copy) @@ -295,7 +295,7 @@ 2 * input.ncols() - 1); for (int row = 0; row < input.nrows(); ++row) for (int col = 0; col < input.ncols(); ++col) - output.at(2 * row, 2 * col) = mln::opt::at(input, row, col); + mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col); return output; } @@ -308,7 +308,7 @@ (input.ncols() + 1) / 2); for (int row = 0; row < input.nrows(); row += 2) for (int col = 0; col < input.ncols(); col += 2) - output.at(row / 2, col / 2) = mln::opt::at(input, row, col); + mln::opt::at(output, row / 2, col / 2) = mln::opt::at(input, row, col); return output; } Index: sandbox/ballas/color/src/graph.hh --- sandbox/ballas/color/src/graph.hh (revision 3064) +++ sandbox/ballas/color/src/graph.hh (working copy) @@ -10,6 +10,7 @@ # include <mln/value/rgb8.hh> # include <mln/level/fill.hh> +# include <mln/opt/at.hh> # include <mln/core/image/image2d.hh> @@ -54,7 +55,7 @@ mln_piter(I) p(ima.domain()); for_all(p) - graph.at(p.row() * 2, p.col() * 2) = ima(p); + mln::opt::at(graph, p.row() * 2, p.col() * 2) = ima(p); } Index: sandbox/ballas/color/min_tree_color_v2.cc --- sandbox/ballas/color/min_tree_color_v2.cc (revision 3064) +++ sandbox/ballas/color/min_tree_color_v2.cc (working copy) @@ -370,7 +370,8 @@ 2 * input.ncols() - 1); for (unsigned row = 0; row < input.nrows(); ++row) for (unsigned col = 0; col < input.ncols(); ++col) - output.at(2 * row, 2 * col) = mln::opt::at(input, row, col); + mln::opt::at(output, 2 * row, 2 * col) = + mln::opt::at(input, row, col); return output; } @@ -383,7 +384,8 @@ (input.ncols() + 1) / 2); for (unsigned row = 0; row < input.nrows(); row += 2) for (unsigned col = 0; col < input.ncols(); col += 2) - output.at(row / 2, col / 2) = mln::opt::at(input, row, col); + mln::opt::at(output, row / 2, col / 2) = + mln::opt::at(input, row, col); return output; } Index: sandbox/geraud/wst_edge.cc --- sandbox/geraud/wst_edge.cc (revision 3064) +++ sandbox/geraud/wst_edge.cc (working copy) @@ -242,7 +242,7 @@ 2 * input.ncols() - 1); for (int row = 0; row < input.nrows(); ++row) for (int col = 0; col < input.ncols(); ++col) - output.at(2 * row, 2 * col) = mln::opt::at(input, row, col); + mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col); return output; } @@ -255,7 +255,8 @@ (input.ncols() + 1) / 2); for (int row = 0; row < input.nrows(); row += 2) for (int col = 0; col < input.ncols(); col += 2) - output.at(row / 2, col / 2) = mln::opt::at(input, row, col); + mln::opt::at(output, row / 2, col / 2) = + mln::opt::at(input, row, col); return output; } Index: sandbox/geraud/fllt.svg.6.cc --- sandbox/geraud/fllt.svg.6.cc (revision 3064) +++ sandbox/geraud/fllt.svg.6.cc (working copy) @@ -179,7 +179,8 @@ image2d<T> output(nrows_, ncols_); for (int row = 0; row < nrows_; ++row) for (int col = 0; col < ncols_; ++col) - output.at(row, col) = mln::opt::at(input, row / coef, col / coef); + mln::opt::at(output, row, col) = + mln::opt::at(input, row / coef, col / coef); return output; } Index: sandbox/geraud/fllt/fllt.svg.2.cc --- sandbox/geraud/fllt/fllt.svg.2.cc (revision 3064) +++ sandbox/geraud/fllt/fllt.svg.2.cc (working copy) @@ -102,7 +102,8 @@ image2d<T> output(nrows_, ncols_); for (int row = 0; row < nrows_; ++row) for (int col = 0; col < ncols_; ++col) - output.at(row, col) = mln::opt::at(input, row / coef, col / coef); + opt::at(output, row, col) = + mln::opt::at(input, row / coef, col / coef); return output; } Index: sandbox/geraud/fllt/fllt.svg.3.cc --- sandbox/geraud/fllt/fllt.svg.3.cc (revision 3064) +++ sandbox/geraud/fllt/fllt.svg.3.cc (working copy) @@ -103,7 +103,8 @@ image2d<T> output(nrows_, ncols_); for (int row = 0; row < nrows_; ++row) for (int col = 0; col < ncols_; ++col) - output.at(row, col) = mln::opt::at(input, row / coef, col / coef); + mln::opt::at(output, row, col) = + mln::opt::at(input, row / coef, col / coef); return output; } Index: sandbox/geraud/fllt/fllt.svg.4.cc --- sandbox/geraud/fllt/fllt.svg.4.cc (revision 3064) +++ sandbox/geraud/fllt/fllt.svg.4.cc (working copy) @@ -105,7 +105,8 @@ image2d<T> output(nrows_, ncols_); for (int row = 0; row < nrows_; ++row) for (int col = 0; col < ncols_; ++col) - output.at(row, col) = mln::opt::at(input, row / coef, col / coef); + mln::opt::at(output, row, col) = + mln::opt::at(input, row / coef, col / coef); return output; } Index: sandbox/geraud/fllt/fllt.svg.5.cc --- sandbox/geraud/fllt/fllt.svg.5.cc (revision 3064) +++ sandbox/geraud/fllt/fllt.svg.5.cc (working copy) @@ -105,7 +105,8 @@ image2d<T> output(nrows_, ncols_); for (int row = 0; row < nrows_; ++row) for (int col = 0; col < ncols_; ++col) - output.at(row, col) = mln::opt::at(input, row / coef, col / coef); + opt::at(output, row, col) = + mln::opt::at(input, row / coef, col / coef); return output; } Index: sandbox/geraud/fllt/fllt.svg.6.cc --- sandbox/geraud/fllt/fllt.svg.6.cc (revision 3064) +++ sandbox/geraud/fllt/fllt.svg.6.cc (working copy) @@ -177,7 +177,7 @@ image2d<T> output(nrows_, ncols_); for (int row = 0; row < nrows_; ++row) for (int col = 0; col < ncols_; ++col) - output.at(row, col) = input.at(row / coef, col / coef); + opt::at(output, row, col) = opt::at(input, row / coef, col / coef); return output; }