* doc/examples/split/tuto4_genericity_and_algorithms-4.cc.raw,
* doc/examples/split/tuto4_genericity_and_algorithms-5.cc.raw: Update.
* doc/examples/tuto4_genericity_and_algorithms.cc: Include last
column and last row in computation.
---
milena/ChangeLog | 10 ++++++++++
.../split/tuto4_genericity_and_algorithms-4.cc.raw | 4 ++--
.../split/tuto4_genericity_and_algorithms-5.cc.raw | 4 ++--
.../examples/tuto4_genericity_and_algorithms.cc | 8 ++++----
4 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 32b7764..4a14115 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,13 @@
+2012-05-23 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix a bug in a tutorial example.
+
+ * doc/examples/split/tuto4_genericity_and_algorithms-4.cc.raw,
+ * doc/examples/split/tuto4_genericity_and_algorithms-5.cc.raw: Update.
+
+ * doc/examples/tuto4_genericity_and_algorithms.cc: Include last
+ column and last row in computation.
+
2012-02-28 Guillaume Lazzara <z(a)lrde.epita.fr>
* doc/Makefile.am: Disable the use of installdox and fix doc
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-4.cc.raw
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-4.cc.raw
index 888c001..5471c2f 100644
--- a/milena/doc/examples/split/tuto4_genericity_and_algorithms-4.cc.raw
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-4.cc.raw
@@ -1,5 +1,5 @@
p_array<point2d> arr;
- for (def::coord row = geom::min_row(lena); row < geom::max_row(lena); ++row)
- for (def::coord col = geom::min_row(lena); col < geom::max_col(lena); ++col)
+ for (def::coord row = geom::min_row(lena); row <= geom::max_row(lena); ++row)
+ for (def::coord col = geom::min_row(lena); col <= geom::max_col(lena); ++col)
if (((row + col) % 2) == 0)
arr.append(point2d(row, col));
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-5.cc.raw
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-5.cc.raw
index 6a17639..e8822f1 100644
--- a/milena/doc/examples/split/tuto4_genericity_and_algorithms-5.cc.raw
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-5.cc.raw
@@ -1,4 +1,4 @@
- for (def::coord row = geom::min_row(lena); row < geom::max_row(lena); ++row)
- for (def::coord col = geom::min_row(lena); col < geom::max_col(lena); ++col)
+ for (def::coord row = geom::min_row(lena); row <= geom::max_row(lena); ++row)
+ for (def::coord col = geom::min_row(lena); col <= geom::max_col(lena); ++col)
if (((row + col) % 2) == 0)
opt::at(lena, row, col) = literal::green;
diff --git a/milena/doc/examples/tuto4_genericity_and_algorithms.cc
b/milena/doc/examples/tuto4_genericity_and_algorithms.cc
index 5639e84..16def80 100644
--- a/milena/doc/examples/tuto4_genericity_and_algorithms.cc
+++ b/milena/doc/examples/tuto4_genericity_and_algorithms.cc
@@ -95,14 +95,14 @@ int main()
lena = duplicate(lena_bak);
// \{
p_array<point2d> arr;
- for (def::coord row = geom::min_row(lena); row < geom::max_row(lena); ++row)
- for (def::coord col = geom::min_row(lena); col < geom::max_col(lena); ++col)
+ for (def::coord row = geom::min_row(lena); row <= geom::max_row(lena); ++row)
+ for (def::coord col = geom::min_row(lena); col <= geom::max_col(lena); ++col)
if (((row + col) % 2) == 0)
arr.append(point2d(row, col));
// \}
// \{
- for (def::coord row = geom::min_row(lena); row < geom::max_row(lena); ++row)
- for (def::coord col = geom::min_row(lena); col < geom::max_col(lena); ++col)
+ for (def::coord row = geom::min_row(lena); row <= geom::max_row(lena); ++row)
+ for (def::coord col = geom::min_row(lena); col <= geom::max_col(lena); ++col)
if (((row + col) % 2) == 0)
opt::at(lena, row, col) = literal::green;
// \}
--
1.7.2.5