---
ChangeLog | 19 +++++++++++++++++++
.../tutorial/samples/borderthickness-output.tex | 13 +++++++++++++
milena/doc/tutorial/samples/borderthickness.tex | 8 ++++++++
milena/doc/tutorial/samples/extension-ignore.tex | 1 +
milena/doc/tutorial/samples/extension-ignore2.tex | 1 +
milena/doc/tutorial/samples/ima-load.tex | 6 ++++++
milena/doc/tutorial/samples/ima-save.tex | 9 +++++++++
milena/doc/tutorial/samples/ima-size-output.tex | 1 +
milena/doc/tutorial/samples/ima-size.tex | 11 +++++++++++
milena/doc/tutorial/samples/ima2d-1-output.tex | 2 ++
milena/doc/tutorial/samples/ima2d-3-output.tex | 6 ++++++
.../doc/tutorial/samples/paste-call-1-output.tex | 3 +++
milena/doc/tutorial/samples/point-1-output.tex | 2 ++
milena/doc/tutorial/tutorial.tex | 1 +
14 files changed, 83 insertions(+), 0 deletions(-)
create mode 100644 milena/doc/tutorial/samples/borderthickness-output.tex
create mode 100644 milena/doc/tutorial/samples/borderthickness.tex
create mode 100644 milena/doc/tutorial/samples/extension-ignore.tex
create mode 100644 milena/doc/tutorial/samples/extension-ignore2.tex
create mode 100644 milena/doc/tutorial/samples/ima-load.tex
create mode 100644 milena/doc/tutorial/samples/ima-save.tex
create mode 100644 milena/doc/tutorial/samples/ima-size-output.tex
create mode 100644 milena/doc/tutorial/samples/ima-size.tex
create mode 100644 milena/doc/tutorial/samples/ima2d-1-output.tex
create mode 100644 milena/doc/tutorial/samples/ima2d-3-output.tex
create mode 100644 milena/doc/tutorial/samples/paste-call-1-output.tex
create mode 100644 milena/doc/tutorial/samples/point-1-output.tex
diff --git a/ChangeLog b/ChangeLog
index a94185c..5e7c1a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2008-17-07 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Add sample code for the tutorial.
+ * milena/mln/doc/tutorial/samples/borderthickness-output.tex,
+ * milena/mln/doc/tutorial/samples/borderthickness.tex,
+ * milena/mln/doc/tutorial/samples/extension-ignore.tex,
+ * milena/mln/doc/tutorial/samples/extension-ignore2.tex,
+ * milena/mln/doc/tutorial/samples/ima-load.tex,
+ * milena/mln/doc/tutorial/samples/ima-save.tex,
+ * milena/mln/doc/tutorial/samples/ima-size-output.tex,
+ * milena/mln/doc/tutorial/samples/ima-size.tex,
+ * milena/mln/doc/tutorial/samples/ima2d-1-output.tex,
+ * milena/mln/doc/tutorial/samples/ima2d-3-output.tex,
+ * milena/mln/doc/tutorial/samples/paste-call-1-output.tex,
+ * milena/mln/doc/tutorial/samples/point-1-output.tex,
+ * milena/mln/doc/tutorial/tutorial.tex:
+ Add these sample codes for the tutorial.
+
+
2008-10-15 Roland Levillain <roland(a)lrde.epita.fr>
* configure.ac: Configure milena/tests/io/off/Makefile.
diff --git a/milena/doc/tutorial/samples/borderthickness-output.tex
b/milena/doc/tutorial/samples/borderthickness-output.tex
new file mode 100644
index 0000000..e1db166
--- /dev/null
+++ b/milena/doc/tutorial/samples/borderthickness-output.tex
@@ -0,0 +1,13 @@
+ima_def - border = 3
+- - - - - - - -
+- - - - - - - -
+- - - - - - - -
+- - - - | - - -
+- - - | - - - -
+- - - - - - - -
+- - - - - - - -
+- - - - - - - -
+
+ima_bt0 - border = 0
+- |
+| -
diff --git a/milena/doc/tutorial/samples/borderthickness.tex
b/milena/doc/tutorial/samples/borderthickness.tex
new file mode 100644
index 0000000..d491f16
--- /dev/null
+++ b/milena/doc/tutorial/samples/borderthickness.tex
@@ -0,0 +1,8 @@
+bool vals[2][2] = { {0, 1},
+ {1, 0} };
+image2d<bool> ima_def = make::image2d(vals);
+display::format(ima_def);
+
+border::thickness = 0;
+image2d<bool> ima_bt0 = make::image2d(vals);
+display::format(ima_bt0);
diff --git a/milena/doc/tutorial/samples/extension-ignore.tex
b/milena/doc/tutorial/samples/extension-ignore.tex
new file mode 100644
index 0000000..a8d0be5
--- /dev/null
+++ b/milena/doc/tutorial/samples/extension-ignore.tex
@@ -0,0 +1 @@
+my_routine(ima | ima.domain());
diff --git a/milena/doc/tutorial/samples/extension-ignore2.tex
b/milena/doc/tutorial/samples/extension-ignore2.tex
new file mode 100644
index 0000000..7e7ef54
--- /dev/null
+++ b/milena/doc/tutorial/samples/extension-ignore2.tex
@@ -0,0 +1 @@
+my_routine(ima.domain());
diff --git a/milena/doc/tutorial/samples/ima-load.tex
b/milena/doc/tutorial/samples/ima-load.tex
new file mode 100644
index 0000000..e4a68ee
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima-load.tex
@@ -0,0 +1,6 @@
+# include <mln/core/io/pbm/load.hh>
+int main()
+{
+ mln::image2d<bool> ima;
+ io::pbm::load(ima, "my_image.pbm");
+}
diff --git a/milena/doc/tutorial/samples/ima-save.tex
b/milena/doc/tutorial/samples/ima-save.tex
new file mode 100644
index 0000000..47086e2
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima-save.tex
@@ -0,0 +1,9 @@
+# include <mln/core/io/pgm/save.hh>
+int main()
+{
+ mln::image2d<mln::value::int_u8> ima;
+
+ // ...
+
+ io::pgm::save(ima, "my_image.pgm");
+}
diff --git a/milena/doc/tutorial/samples/ima-size-output.tex
b/milena/doc/tutorial/samples/ima-size-output.tex
new file mode 100644
index 0000000..6be445f
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima-size-output.tex
@@ -0,0 +1 @@
+nrows = 10 - ncols = 12
diff --git a/milena/doc/tutorial/samples/ima-size.tex
b/milena/doc/tutorial/samples/ima-size.tex
new file mode 100644
index 0000000..46d5a08
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima-size.tex
@@ -0,0 +1,11 @@
+#include <core/image/image2d.hh>
+#include <core/site_set/box2d.hh>
+int main()
+{
+ mln::image2d<int> ima(box2d(0,0, 10,12));
+
+ std::cout << "nrows = " << ima.nrows()
+ << " - "
+ << "ncols = " << ima.ncols()
+ << std::endl;
+}
diff --git a/milena/doc/tutorial/samples/ima2d-1-output.tex
b/milena/doc/tutorial/samples/ima2d-1-output.tex
new file mode 100644
index 0000000..e689fa5
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima2d-1-output.tex
@@ -0,0 +1,2 @@
+b = [(-2,3)...(3,-5)]
+domain = [(-2,3)...(3,-5)]
diff --git a/milena/doc/tutorial/samples/ima2d-3-output.tex
b/milena/doc/tutorial/samples/ima2d-3-output.tex
new file mode 100644
index 0000000..096ef4f
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima2d-3-output.tex
@@ -0,0 +1,6 @@
+ima.at(1,2) = 9
+ima(p) = 9
+---
+ima.at(1,2) = 2
+ima(p) = 2
+
diff --git a/milena/doc/tutorial/samples/paste-call-1-output.tex
b/milena/doc/tutorial/samples/paste-call-1-output.tex
new file mode 100644
index 0000000..987bf30
--- /dev/null
+++ b/milena/doc/tutorial/samples/paste-call-1-output.tex
@@ -0,0 +1,3 @@
+b b b b
+b b b b
+b b b b
diff --git a/milena/doc/tutorial/samples/point-1-output.tex
b/milena/doc/tutorial/samples/point-1-output.tex
new file mode 100644
index 0000000..d5a3da6
--- /dev/null
+++ b/milena/doc/tutorial/samples/point-1-output.tex
@@ -0,0 +1,2 @@
+has(p1)? true
+has(p2)? false
diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex
index f675045..2e7ddfe 100644
--- a/milena/doc/tutorial/tutorial.tex
+++ b/milena/doc/tutorial/tutorial.tex
@@ -80,6 +80,7 @@ showstringspaces=false,linewidth=14cm}
- \backslash subpage winneigh
- \backslash subpage sitesandco
- \backslash subpage iterators
+- \backslash subpage imamemmgmt
- \backslash subpage basicops
- \backslash subpage graphes
\backslash htmlonly
--
1.5.6.5