* doc/Doxyfile.in: update example path.
* doc/doc.mk: new variables.
* doc/doxyfuns.sty: Fix a typo in a directory path.
* doc/ref_guide/Makefile.am,
* doc/tutorial/Makefile.am,
* doc/white_paper/Makefile.am,
* doc/Makefile.am: improve rules dependencies.
* doc/examples/Makefile.am:
- Compare split files to references.
- Add a rule 'data-regen'. Reference data is now generated on demand
only.
* doc/examples/split/accu-right-instanciation-1.cc,
* doc/examples/split/borderthickness-1.cc,
* doc/examples/split/box2d-bbox-1.cc,
* doc/examples/split/domain-display-1.cc,
* doc/examples/split/dpoint-1-1.cc,
* doc/examples/split/estim-sites-1.cc,
* doc/examples/split/extend-1.cc,
* doc/examples/split/extend-2.cc,
* doc/examples/split/extend-3.cc,
* doc/examples/split/extend-4.cc,
* doc/examples/split/extend-5.cc,
* doc/examples/split/extension-ignore-1.cc,
* doc/examples/split/fill-1.cc,
* doc/examples/split/fill-2.cc,
* doc/examples/split/fill-3.cc,
* doc/examples/split/fill-call-1-1.cc,
* doc/examples/split/fill-call-1-2.cc,
* doc/examples/split/fill-call-1-3.cc,
* doc/examples/split/fill-part-image-1.cc,
* doc/examples/split/fill-part-image-2.cc,
* doc/examples/split/fill-subdomain-1.cc,
* doc/examples/split/fill-subdomain-2.cc,
* doc/examples/split/fill-subdomain-3.cc,
* doc/examples/split/fill-subdomain-4.cc,
* doc/examples/split/fill-subdomain-shorter-1.cc,
* doc/examples/split/fill-subdomain-shorter-2.cc,
* doc/examples/split/fill-subimage-cfun-1.cc,
* doc/examples/split/fill-subimage-cfun-2.cc,
* doc/examples/split/fill-subimage-cfun-3.cc,
* doc/examples/split/forall-piter-1.cc,
* doc/examples/split/fun-p2v-1-1.cc,
* doc/examples/split/graph-data-1.cc,
* doc/examples/split/graph-data-2.cc,
* doc/examples/split/graph-data-3.cc,
* doc/examples/split/graph-data-4.cc,
* doc/examples/split/graph-data-5.cc,
* doc/examples/split/graph-data-6.cc,
* doc/examples/split/graph-iter-1.cc,
* doc/examples/split/graph-iter-2.cc,
* doc/examples/split/graph-iter-3.cc,
* doc/examples/split/graph-iter-4.cc,
* doc/examples/split/ima-has-1.cc,
* doc/examples/split/ima-load-1.cc,
* doc/examples/split/ima-save-1.cc,
* doc/examples/split/ima-size-1.cc,
* doc/examples/split/ima2d-1-1.cc,
* doc/examples/split/ima2d-2-1.cc,
* doc/examples/split/ima2d-3-1.cc,
* doc/examples/split/ima2d-4-1.cc,
* doc/examples/split/ima2d-5-1.cc,
* doc/examples/split/ima2d-6-clone-1.cc,
* doc/examples/split/ima2d-7-1.cc,
* doc/examples/split/ima2d-rot-1.cc,
* doc/examples/split/labeling-compute-1.cc,
* doc/examples/split/labeling-compute-2.cc,
* doc/examples/split/labeling-compute-3.cc,
* doc/examples/split/labeling-compute-4.cc,
* doc/examples/split/logical-not-1.cc,
* doc/examples/split/logical-not-2.cc,
* doc/examples/split/logical-not-3.cc,
* doc/examples/split/mln_var-1.cc,
* doc/examples/split/mln_var-2.cc,
* doc/examples/split/mln_var-3.cc,
* doc/examples/split/parray-append-1.cc,
* doc/examples/split/parray-bbox-1.cc,
* doc/examples/split/paste-1.cc,
* doc/examples/split/paste-call-1-1.cc,
* doc/examples/split/point-1-1.cc,
* doc/examples/split/predicate-1-1.cc,
* doc/examples/split/tuto2_first_image-1.cc,
* doc/examples/split/tuto2_first_image-2.cc,
* doc/examples/split/tuto2_first_image-3.cc,
* doc/examples/split/tuto2_first_image-4.cc,
* doc/examples/split/tuto3_colorize-1.cc,
* doc/examples/split/tuto3_first_routine-1.cc,
* doc/examples/split/tuto3_first_routine-2.cc,
* doc/examples/split/tuto3_first_routine-3.cc,
* doc/examples/split/tuto3_first_routine-4.cc,
* doc/examples/split/tuto3_first_routine-5.cc,
* doc/examples/split/tuto3_first_routine-6.cc,
* doc/examples/split/tuto3_first_routine-7.cc,
* doc/examples/split/tuto3_first_routine-8.cc,
* doc/examples/split/tuto3_println-1.cc,
* doc/examples/split/tuto3_println-2.cc,
* doc/examples/split/tuto3_rw_image-1.cc,
* doc/examples/split/tuto3_rw_image-2.cc,
* doc/examples/split/tuto3_rw_image-3.cc,
* doc/examples/split/tuto3_rw_image-4.cc,
* doc/examples/split/tuto3_rw_image-5.cc,
* doc/examples/split/tuto3_rw_image-6.cc,
* doc/examples/split/tuto3_rw_image-7.cc,
* doc/examples/split/tuto3_trace-1.cc,
* doc/examples/split/tuto3_trace-2.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-1.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-10.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-11.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-12.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-2.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-3.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-4.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-5.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-6.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-7.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-8.cc,
* doc/examples/split/tuto4_genericity_and_algorithms-9.cc,
* doc/examples/split/tuto4_point2d-1.cc,
* doc/examples/split/tuto4_site_set_create-1.cc,
* doc/examples/split/tuto4_site_set_create-2.cc,
* doc/examples/split/tuto4_site_set_create-3.cc,
* doc/examples/split/tuto4_site_set_create-4.cc,
* doc/examples/split/win-create-1-1.cc,
* doc/examples/split/win-create-2-1.cc,
* doc/outputs/split/graph-iter-1.txt,
* doc/outputs/split/graph-iter-2.txt,
* doc/outputs/split/graph-iter-3.txt,
* doc/outputs/split/graph-iter-4.txt,
* doc/outputs/split/tuto3_println-1.txt,
* doc/outputs/split/tuto3_println-2.txt: new reference files.
* doc/tools/split_sample.sh: fix a typo.
* doc/white_paper/white_paper.tex: fix path to figures.
---
milena/ChangeLog | 143 ++++++++++++++++++++
milena/doc/Doxyfile.in | 13 +-
milena/doc/Makefile.am | 48 ++++---
milena/doc/doc.mk | 5 +-
milena/doc/doxyfuns.sty | 4 +-
milena/doc/examples/Makefile.am | 62 +++++++--
.../examples/split/accu-right-instanciation-1.cc | 1 +
milena/doc/examples/split/borderthickness-1.cc | 13 ++
milena/doc/examples/split/box2d-bbox-1.cc | 7 +
milena/doc/examples/split/domain-display-1.cc | 7 +
milena/doc/examples/split/dpoint-1-1.cc | 4 +
milena/doc/examples/split/estim-sites-1.cc | 1 +
milena/doc/examples/split/extend-1.cc | 18 +++
milena/doc/examples/split/extend-2.cc | 5 +
milena/doc/examples/split/extend-3.cc | 1 +
milena/doc/examples/split/extend-4.cc | 1 +
milena/doc/examples/split/extend-5.cc | 1 +
milena/doc/examples/split/extension-ignore-1.cc | 1 +
milena/doc/examples/split/fill-1.cc | 7 +
milena/doc/examples/split/fill-2.cc | 2 +
milena/doc/examples/split/fill-3.cc | 1 +
milena/doc/examples/split/fill-call-1-1.cc | 1 +
milena/doc/examples/split/fill-call-1-2.cc | 1 +
milena/doc/examples/split/fill-call-1-3.cc | 1 +
milena/doc/examples/split/fill-part-image-1.cc | 9 ++
milena/doc/examples/split/fill-part-image-2.cc | 17 +++
milena/doc/examples/split/fill-subdomain-1.cc | 9 ++
milena/doc/examples/split/fill-subdomain-2.cc | 2 +
milena/doc/examples/split/fill-subdomain-3.cc | 1 +
milena/doc/examples/split/fill-subdomain-4.cc | 5 +
.../doc/examples/split/fill-subdomain-shorter-1.cc | 9 ++
.../doc/examples/split/fill-subdomain-shorter-2.cc | 8 +
milena/doc/examples/split/fill-subimage-cfun-1.cc | 4 +
milena/doc/examples/split/fill-subimage-cfun-2.cc | 9 ++
milena/doc/examples/split/fill-subimage-cfun-3.cc | 5 +
milena/doc/examples/split/forall-piter-1.cc | 5 +
milena/doc/examples/split/fun-p2v-1-1.cc | 6 +
milena/doc/examples/split/graph-data-1.cc | 21 +++
milena/doc/examples/split/graph-data-2.cc | 4 +
milena/doc/examples/split/graph-data-3.cc | 5 +
milena/doc/examples/split/graph-data-4.cc | 7 +
milena/doc/examples/split/graph-data-5.cc | 2 +
milena/doc/examples/split/graph-data-6.cc | 11 ++
milena/doc/examples/split/graph-iter-1.cc | 9 ++
milena/doc/examples/split/graph-iter-2.cc | 15 ++
milena/doc/examples/split/graph-iter-3.cc | 15 ++
milena/doc/examples/split/graph-iter-4.cc | 15 ++
milena/doc/examples/split/ima-has-1.cc | 32 +++++
milena/doc/examples/split/ima-load-1.cc | 2 +
milena/doc/examples/split/ima-save-1.cc | 1 +
milena/doc/examples/split/ima-size-1.cc | 6 +
milena/doc/examples/split/ima2d-1-1.cc | 7 +
milena/doc/examples/split/ima2d-2-1.cc | 7 +
milena/doc/examples/split/ima2d-3-1.cc | 23 +++
milena/doc/examples/split/ima2d-4-1.cc | 8 +
milena/doc/examples/split/ima2d-5-1.cc | 13 ++
milena/doc/examples/split/ima2d-6-clone-1.cc | 8 +
milena/doc/examples/split/ima2d-7-1.cc | 5 +
milena/doc/examples/split/ima2d-rot-1.cc | 34 +++++
milena/doc/examples/split/labeling-compute-1.cc | 9 ++
milena/doc/examples/split/labeling-compute-2.cc | 2 +
milena/doc/examples/split/labeling-compute-3.cc | 4 +
milena/doc/examples/split/labeling-compute-4.cc | 2 +
milena/doc/examples/split/logical-not-1.cc | 8 +
milena/doc/examples/split/logical-not-2.cc | 1 +
milena/doc/examples/split/logical-not-3.cc | 1 +
milena/doc/examples/split/mln_var-1.cc | 1 +
milena/doc/examples/split/mln_var-2.cc | 1 +
milena/doc/examples/split/mln_var-3.cc | 5 +
milena/doc/examples/split/parray-append-1.cc | 6 +
milena/doc/examples/split/parray-bbox-1.cc | 11 ++
milena/doc/examples/split/paste-1.cc | 7 +
milena/doc/examples/split/paste-call-1-1.cc | 11 ++
milena/doc/examples/split/point-1-1.cc | 14 ++
milena/doc/examples/split/predicate-1-1.cc | 7 +
milena/doc/examples/split/tuto2_first_image-1.cc | 15 ++
milena/doc/examples/split/tuto2_first_image-2.cc | 1 +
milena/doc/examples/split/tuto2_first_image-3.cc | 1 +
milena/doc/examples/split/tuto2_first_image-4.cc | 1 +
milena/doc/examples/split/tuto3_colorize-1.cc | 8 +
milena/doc/examples/split/tuto3_first_routine-1.cc | 34 +++++
milena/doc/examples/split/tuto3_first_routine-2.cc | 4 +
milena/doc/examples/split/tuto3_first_routine-3.cc | 1 +
milena/doc/examples/split/tuto3_first_routine-4.cc | 4 +
milena/doc/examples/split/tuto3_first_routine-5.cc | 5 +
milena/doc/examples/split/tuto3_first_routine-6.cc | 3 +
milena/doc/examples/split/tuto3_first_routine-7.cc | 3 +
milena/doc/examples/split/tuto3_first_routine-8.cc | 2 +
milena/doc/examples/split/tuto3_println-1.cc | 3 +
milena/doc/examples/split/tuto3_println-2.cc | 4 +
milena/doc/examples/split/tuto3_rw_image-1.cc | 1 +
milena/doc/examples/split/tuto3_rw_image-2.cc | 1 +
milena/doc/examples/split/tuto3_rw_image-3.cc | 3 +
milena/doc/examples/split/tuto3_rw_image-4.cc | 3 +
milena/doc/examples/split/tuto3_rw_image-5.cc | 2 +
milena/doc/examples/split/tuto3_rw_image-6.cc | 1 +
milena/doc/examples/split/tuto3_rw_image-7.cc | 1 +
milena/doc/examples/split/tuto3_trace-1.cc | 2 +
milena/doc/examples/split/tuto3_trace-2.cc | 6 +
.../split/tuto4_genericity_and_algorithms-1.cc | 2 +
.../split/tuto4_genericity_and_algorithms-10.cc | 1 +
.../split/tuto4_genericity_and_algorithms-11.cc | 1 +
.../split/tuto4_genericity_and_algorithms-12.cc | 2 +
.../split/tuto4_genericity_and_algorithms-2.cc | 1 +
.../split/tuto4_genericity_and_algorithms-3.cc | 1 +
.../split/tuto4_genericity_and_algorithms-4.cc | 5 +
.../split/tuto4_genericity_and_algorithms-5.cc | 4 +
.../split/tuto4_genericity_and_algorithms-6.cc | 1 +
.../split/tuto4_genericity_and_algorithms-7.cc | 6 +
.../split/tuto4_genericity_and_algorithms-8.cc | 1 +
.../split/tuto4_genericity_and_algorithms-9.cc | 3 +
milena/doc/examples/split/tuto4_point2d-1.cc | 2 +
.../doc/examples/split/tuto4_site_set_create-1.cc | 1 +
.../doc/examples/split/tuto4_site_set_create-2.cc | 3 +
.../doc/examples/split/tuto4_site_set_create-3.cc | 4 +
.../doc/examples/split/tuto4_site_set_create-4.cc | 1 +
milena/doc/examples/split/win-create-1-1.cc | 4 +
milena/doc/examples/split/win-create-2-1.cc | 10 ++
milena/doc/outputs/split/graph-iter-1.txt | 5 +
milena/doc/outputs/split/graph-iter-2.txt | 5 +
milena/doc/outputs/split/graph-iter-3.txt | 5 +
milena/doc/outputs/split/graph-iter-4.txt | 5 +
milena/doc/outputs/split/tuto3_println-1.txt | 6 +
milena/doc/outputs/split/tuto3_println-2.txt | 12 ++
milena/doc/ref_guide/Makefile.am | 14 ++-
milena/doc/tools/split_sample.sh | 2 +-
milena/doc/tutorial/Makefile.am | 14 ++-
milena/doc/white_paper/Makefile.am | 27 +++--
milena/doc/white_paper/white_paper.tex | 8 +-
129 files changed, 974 insertions(+), 68 deletions(-)
create mode 100644 milena/doc/examples/split/accu-right-instanciation-1.cc
create mode 100644 milena/doc/examples/split/borderthickness-1.cc
create mode 100644 milena/doc/examples/split/box2d-bbox-1.cc
create mode 100644 milena/doc/examples/split/domain-display-1.cc
create mode 100644 milena/doc/examples/split/dpoint-1-1.cc
create mode 100644 milena/doc/examples/split/estim-sites-1.cc
create mode 100644 milena/doc/examples/split/extend-1.cc
create mode 100644 milena/doc/examples/split/extend-2.cc
create mode 100644 milena/doc/examples/split/extend-3.cc
create mode 100644 milena/doc/examples/split/extend-4.cc
create mode 100644 milena/doc/examples/split/extend-5.cc
create mode 100644 milena/doc/examples/split/extension-ignore-1.cc
create mode 100644 milena/doc/examples/split/fill-1.cc
create mode 100644 milena/doc/examples/split/fill-2.cc
create mode 100644 milena/doc/examples/split/fill-3.cc
create mode 100644 milena/doc/examples/split/fill-call-1-1.cc
create mode 100644 milena/doc/examples/split/fill-call-1-2.cc
create mode 100644 milena/doc/examples/split/fill-call-1-3.cc
create mode 100644 milena/doc/examples/split/fill-part-image-1.cc
create mode 100644 milena/doc/examples/split/fill-part-image-2.cc
create mode 100644 milena/doc/examples/split/fill-subdomain-1.cc
create mode 100644 milena/doc/examples/split/fill-subdomain-2.cc
create mode 100644 milena/doc/examples/split/fill-subdomain-3.cc
create mode 100644 milena/doc/examples/split/fill-subdomain-4.cc
create mode 100644 milena/doc/examples/split/fill-subdomain-shorter-1.cc
create mode 100644 milena/doc/examples/split/fill-subdomain-shorter-2.cc
create mode 100644 milena/doc/examples/split/fill-subimage-cfun-1.cc
create mode 100644 milena/doc/examples/split/fill-subimage-cfun-2.cc
create mode 100644 milena/doc/examples/split/fill-subimage-cfun-3.cc
create mode 100644 milena/doc/examples/split/forall-piter-1.cc
create mode 100644 milena/doc/examples/split/fun-p2v-1-1.cc
create mode 100644 milena/doc/examples/split/graph-data-1.cc
create mode 100644 milena/doc/examples/split/graph-data-2.cc
create mode 100644 milena/doc/examples/split/graph-data-3.cc
create mode 100644 milena/doc/examples/split/graph-data-4.cc
create mode 100644 milena/doc/examples/split/graph-data-5.cc
create mode 100644 milena/doc/examples/split/graph-data-6.cc
create mode 100644 milena/doc/examples/split/graph-iter-1.cc
create mode 100644 milena/doc/examples/split/graph-iter-2.cc
create mode 100644 milena/doc/examples/split/graph-iter-3.cc
create mode 100644 milena/doc/examples/split/graph-iter-4.cc
create mode 100644 milena/doc/examples/split/ima-has-1.cc
create mode 100644 milena/doc/examples/split/ima-load-1.cc
create mode 100644 milena/doc/examples/split/ima-save-1.cc
create mode 100644 milena/doc/examples/split/ima-size-1.cc
create mode 100644 milena/doc/examples/split/ima2d-1-1.cc
create mode 100644 milena/doc/examples/split/ima2d-2-1.cc
create mode 100644 milena/doc/examples/split/ima2d-3-1.cc
create mode 100644 milena/doc/examples/split/ima2d-4-1.cc
create mode 100644 milena/doc/examples/split/ima2d-5-1.cc
create mode 100644 milena/doc/examples/split/ima2d-6-clone-1.cc
create mode 100644 milena/doc/examples/split/ima2d-7-1.cc
create mode 100644 milena/doc/examples/split/ima2d-rot-1.cc
create mode 100644 milena/doc/examples/split/labeling-compute-1.cc
create mode 100644 milena/doc/examples/split/labeling-compute-2.cc
create mode 100644 milena/doc/examples/split/labeling-compute-3.cc
create mode 100644 milena/doc/examples/split/labeling-compute-4.cc
create mode 100644 milena/doc/examples/split/logical-not-1.cc
create mode 100644 milena/doc/examples/split/logical-not-2.cc
create mode 100644 milena/doc/examples/split/logical-not-3.cc
create mode 100644 milena/doc/examples/split/mln_var-1.cc
create mode 100644 milena/doc/examples/split/mln_var-2.cc
create mode 100644 milena/doc/examples/split/mln_var-3.cc
create mode 100644 milena/doc/examples/split/parray-append-1.cc
create mode 100644 milena/doc/examples/split/parray-bbox-1.cc
create mode 100644 milena/doc/examples/split/paste-1.cc
create mode 100644 milena/doc/examples/split/paste-call-1-1.cc
create mode 100644 milena/doc/examples/split/point-1-1.cc
create mode 100644 milena/doc/examples/split/predicate-1-1.cc
create mode 100644 milena/doc/examples/split/tuto2_first_image-1.cc
create mode 100644 milena/doc/examples/split/tuto2_first_image-2.cc
create mode 100644 milena/doc/examples/split/tuto2_first_image-3.cc
create mode 100644 milena/doc/examples/split/tuto2_first_image-4.cc
create mode 100644 milena/doc/examples/split/tuto3_colorize-1.cc
create mode 100644 milena/doc/examples/split/tuto3_first_routine-1.cc
create mode 100644 milena/doc/examples/split/tuto3_first_routine-2.cc
create mode 100644 milena/doc/examples/split/tuto3_first_routine-3.cc
create mode 100644 milena/doc/examples/split/tuto3_first_routine-4.cc
create mode 100644 milena/doc/examples/split/tuto3_first_routine-5.cc
create mode 100644 milena/doc/examples/split/tuto3_first_routine-6.cc
create mode 100644 milena/doc/examples/split/tuto3_first_routine-7.cc
create mode 100644 milena/doc/examples/split/tuto3_first_routine-8.cc
create mode 100644 milena/doc/examples/split/tuto3_println-1.cc
create mode 100644 milena/doc/examples/split/tuto3_println-2.cc
create mode 100644 milena/doc/examples/split/tuto3_rw_image-1.cc
create mode 100644 milena/doc/examples/split/tuto3_rw_image-2.cc
create mode 100644 milena/doc/examples/split/tuto3_rw_image-3.cc
create mode 100644 milena/doc/examples/split/tuto3_rw_image-4.cc
create mode 100644 milena/doc/examples/split/tuto3_rw_image-5.cc
create mode 100644 milena/doc/examples/split/tuto3_rw_image-6.cc
create mode 100644 milena/doc/examples/split/tuto3_rw_image-7.cc
create mode 100644 milena/doc/examples/split/tuto3_trace-1.cc
create mode 100644 milena/doc/examples/split/tuto3_trace-2.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-1.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-10.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-11.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-12.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-2.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-3.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-4.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-5.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-6.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-7.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-8.cc
create mode 100644 milena/doc/examples/split/tuto4_genericity_and_algorithms-9.cc
create mode 100644 milena/doc/examples/split/tuto4_point2d-1.cc
create mode 100644 milena/doc/examples/split/tuto4_site_set_create-1.cc
create mode 100644 milena/doc/examples/split/tuto4_site_set_create-2.cc
create mode 100644 milena/doc/examples/split/tuto4_site_set_create-3.cc
create mode 100644 milena/doc/examples/split/tuto4_site_set_create-4.cc
create mode 100644 milena/doc/examples/split/win-create-1-1.cc
create mode 100644 milena/doc/examples/split/win-create-2-1.cc
create mode 100644 milena/doc/outputs/split/graph-iter-1.txt
create mode 100644 milena/doc/outputs/split/graph-iter-2.txt
create mode 100644 milena/doc/outputs/split/graph-iter-3.txt
create mode 100644 milena/doc/outputs/split/graph-iter-4.txt
create mode 100644 milena/doc/outputs/split/tuto3_println-1.txt
create mode 100644 milena/doc/outputs/split/tuto3_println-2.txt
diff --git a/milena/ChangeLog b/milena/ChangeLog
index b9556cb..7049523 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,146 @@
+2009-06-11 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
+ Fix tutorial, white_paper and ref_doc generation.
+
+ * doc/Doxyfile.in: update example path.
+
+ * doc/doc.mk: new variables.
+
+ * doc/doxyfuns.sty: Fix a typo in a directory path.
+
+ * doc/ref_guide/Makefile.am,
+ * doc/tutorial/Makefile.am,
+ * doc/white_paper/Makefile.am,
+ * doc/Makefile.am: improve rules dependencies.
+
+ * doc/examples/Makefile.am:
+ - Compare split files to references.
+ - Add a rule 'data-regen'. Reference data is now generated on demand
+ only.
+
+ * doc/examples/split/accu-right-instanciation-1.cc,
+ * doc/examples/split/borderthickness-1.cc,
+ * doc/examples/split/box2d-bbox-1.cc,
+ * doc/examples/split/domain-display-1.cc,
+ * doc/examples/split/dpoint-1-1.cc,
+ * doc/examples/split/estim-sites-1.cc,
+ * doc/examples/split/extend-1.cc,
+ * doc/examples/split/extend-2.cc,
+ * doc/examples/split/extend-3.cc,
+ * doc/examples/split/extend-4.cc,
+ * doc/examples/split/extend-5.cc,
+ * doc/examples/split/extension-ignore-1.cc,
+ * doc/examples/split/fill-1.cc,
+ * doc/examples/split/fill-2.cc,
+ * doc/examples/split/fill-3.cc,
+ * doc/examples/split/fill-call-1-1.cc,
+ * doc/examples/split/fill-call-1-2.cc,
+ * doc/examples/split/fill-call-1-3.cc,
+ * doc/examples/split/fill-part-image-1.cc,
+ * doc/examples/split/fill-part-image-2.cc,
+ * doc/examples/split/fill-subdomain-1.cc,
+ * doc/examples/split/fill-subdomain-2.cc,
+ * doc/examples/split/fill-subdomain-3.cc,
+ * doc/examples/split/fill-subdomain-4.cc,
+ * doc/examples/split/fill-subdomain-shorter-1.cc,
+ * doc/examples/split/fill-subdomain-shorter-2.cc,
+ * doc/examples/split/fill-subimage-cfun-1.cc,
+ * doc/examples/split/fill-subimage-cfun-2.cc,
+ * doc/examples/split/fill-subimage-cfun-3.cc,
+ * doc/examples/split/forall-piter-1.cc,
+ * doc/examples/split/fun-p2v-1-1.cc,
+ * doc/examples/split/graph-data-1.cc,
+ * doc/examples/split/graph-data-2.cc,
+ * doc/examples/split/graph-data-3.cc,
+ * doc/examples/split/graph-data-4.cc,
+ * doc/examples/split/graph-data-5.cc,
+ * doc/examples/split/graph-data-6.cc,
+ * doc/examples/split/graph-iter-1.cc,
+ * doc/examples/split/graph-iter-2.cc,
+ * doc/examples/split/graph-iter-3.cc,
+ * doc/examples/split/graph-iter-4.cc,
+ * doc/examples/split/ima-has-1.cc,
+ * doc/examples/split/ima-load-1.cc,
+ * doc/examples/split/ima-save-1.cc,
+ * doc/examples/split/ima-size-1.cc,
+ * doc/examples/split/ima2d-1-1.cc,
+ * doc/examples/split/ima2d-2-1.cc,
+ * doc/examples/split/ima2d-3-1.cc,
+ * doc/examples/split/ima2d-4-1.cc,
+ * doc/examples/split/ima2d-5-1.cc,
+ * doc/examples/split/ima2d-6-clone-1.cc,
+ * doc/examples/split/ima2d-7-1.cc,
+ * doc/examples/split/ima2d-rot-1.cc,
+ * doc/examples/split/labeling-compute-1.cc,
+ * doc/examples/split/labeling-compute-2.cc,
+ * doc/examples/split/labeling-compute-3.cc,
+ * doc/examples/split/labeling-compute-4.cc,
+ * doc/examples/split/logical-not-1.cc,
+ * doc/examples/split/logical-not-2.cc,
+ * doc/examples/split/logical-not-3.cc,
+ * doc/examples/split/mln_var-1.cc,
+ * doc/examples/split/mln_var-2.cc,
+ * doc/examples/split/mln_var-3.cc,
+ * doc/examples/split/parray-append-1.cc,
+ * doc/examples/split/parray-bbox-1.cc,
+ * doc/examples/split/paste-1.cc,
+ * doc/examples/split/paste-call-1-1.cc,
+ * doc/examples/split/point-1-1.cc,
+ * doc/examples/split/predicate-1-1.cc,
+ * doc/examples/split/tuto2_first_image-1.cc,
+ * doc/examples/split/tuto2_first_image-2.cc,
+ * doc/examples/split/tuto2_first_image-3.cc,
+ * doc/examples/split/tuto2_first_image-4.cc,
+ * doc/examples/split/tuto3_colorize-1.cc,
+ * doc/examples/split/tuto3_first_routine-1.cc,
+ * doc/examples/split/tuto3_first_routine-2.cc,
+ * doc/examples/split/tuto3_first_routine-3.cc,
+ * doc/examples/split/tuto3_first_routine-4.cc,
+ * doc/examples/split/tuto3_first_routine-5.cc,
+ * doc/examples/split/tuto3_first_routine-6.cc,
+ * doc/examples/split/tuto3_first_routine-7.cc,
+ * doc/examples/split/tuto3_first_routine-8.cc,
+ * doc/examples/split/tuto3_println-1.cc,
+ * doc/examples/split/tuto3_println-2.cc,
+ * doc/examples/split/tuto3_rw_image-1.cc,
+ * doc/examples/split/tuto3_rw_image-2.cc,
+ * doc/examples/split/tuto3_rw_image-3.cc,
+ * doc/examples/split/tuto3_rw_image-4.cc,
+ * doc/examples/split/tuto3_rw_image-5.cc,
+ * doc/examples/split/tuto3_rw_image-6.cc,
+ * doc/examples/split/tuto3_rw_image-7.cc,
+ * doc/examples/split/tuto3_trace-1.cc,
+ * doc/examples/split/tuto3_trace-2.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-1.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-10.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-11.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-12.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-2.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-3.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-4.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-5.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-6.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-7.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-8.cc,
+ * doc/examples/split/tuto4_genericity_and_algorithms-9.cc,
+ * doc/examples/split/tuto4_point2d-1.cc,
+ * doc/examples/split/tuto4_site_set_create-1.cc,
+ * doc/examples/split/tuto4_site_set_create-2.cc,
+ * doc/examples/split/tuto4_site_set_create-3.cc,
+ * doc/examples/split/tuto4_site_set_create-4.cc,
+ * doc/examples/split/win-create-1-1.cc,
+ * doc/examples/split/win-create-2-1.cc,
+ * doc/outputs/split/graph-iter-1.txt,
+ * doc/outputs/split/graph-iter-2.txt,
+ * doc/outputs/split/graph-iter-3.txt,
+ * doc/outputs/split/graph-iter-4.txt,
+ * doc/outputs/split/tuto3_println-1.txt,
+ * doc/outputs/split/tuto3_println-2.txt: new reference files.
+
+ * doc/tools/split_sample.sh: fix a typo.
+
+ * doc/white_paper/white_paper.tex: fix path to figures.
+
2009-06-11 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Minor fixes in tests/accu Makefile.
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index 651a2fc..4bde82f 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -85,20 +85,19 @@ RECURSIVE = YES
EXCLUDE = @top_srcdir@/milena/sandbox \
@top_srcdir@/milena/mln/core/concept/proxy.hxx \
@top_srcdir@/milena/trash \
- @top_srcdir@/milena/doc/examples/trash
+ @top_srcdir@/milena/doc/examples/trash \
+ @top_srcdir@/milena/doc/examples/split
EXCLUDE_SYMLINKS = YES
EXCLUDE_PATTERNS = *spe.hh
EXCLUDE_SYMBOLS =
EXAMPLE_PATH = @top_srcdir@/milena/doc/examples \
- @top_builddir@/milena/doc/examples \
- @top_builddir@/milena/doc/outputs \
- @top_builddir@/milena/doc/outputs/splitted \
- @top_srcdir@/milena/doc/outputs
+ @top_srcdir@/milena/doc/outputs \
+ @top_srcdir@/milena/doc/examples/split \
+ @top_srcdir@/milena/doc/outputs/split
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = @top_srcdir@/milena/doc/img \
- @top_srcdir@/milena/doc/figures \
- @top_builddir@/milena/doc/figures
+ @top_srcdir@/milena/doc/figures
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index bf1d0b1..ec89037 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -1,4 +1,5 @@
-# Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+# Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -30,10 +31,10 @@ DOXYGEN = doxygen
-.PHONY: doc-all doc doc-html doc-dev doc-dev-html ref-doc-dev ref-doc-dev-html\
- ref-doc ref-doc-html tutorial tutorial-html white-paper \
- white-paper-html ref-guide ref-guide-html examples fix-refdata \
- fig-convert
+.PHONY: doc doc-pdf doc-html doc-dev-pdf doc-dev-html ref-doc-dev-pdf \
+ ref-doc-dev-html ref-doc-pdf ref-doc-html tutorial-pdf tutorial-html \
+ white-paper-pdf white-paper-html ref-guide-pdf ref-guide-html examples \
+ data-regen fix-convert
@@ -43,67 +44,71 @@ user/html: ref-doc-html
user/latex/refman.pdf: ref-doc
-doc-all: doc doc-html doc-dev doc-dev-html
+doc: doc-pdf doc-html doc-dev-pdf doc-dev-html
-doc: tutorial white-paper ref-guide ref-doc
+doc-pdf: tutorial-pdf white-paper-pdf ref-guide-pdf ref-doc-pdf
doc-html: tutorial-html white-paper-html ref-guide-html ref-doc-html
-doc-dev: tutorial ref-guide white-paper ref-doc-dev
+doc-dev-pdf: tutorial-pdf ref-guide-pdf white-paper-pdf ref-doc-dev-pdf
doc-dev-html: tutorial-html ref-guide-html white-paper-html ref-doc-dev-html
-ref-doc-dev: Doxyfile examples
+ref-doc-dev: Doxyfile fig-convert
$(DOXYGEN) Doxyfile_complete_pdf
cd complete/latex && make $(AM_MAKEFLAGS)
-ref-doc-dev-html: Doxyfile examples
+ref-doc-dev-html: Doxyfil fig-converte
$(DOXYGEN) Doxyfile_complete
-ref-doc: Doxyfile examples
+ref-doc-pdf: Doxyfile fig-convert
$(DOXYGEN) Doxyfile_user_pdf
- cd user/latex && make $(AM_MAKEFLAGS)
+ cd user/latex && make ref-doc
-ref-doc-html: Doxyfile examples
+ref-doc-html: Doxyfile fig-convert
$(DOXYGEN) Doxyfile_user
-tutorial: examples fig-convert
+tutorial-pdf: fig-convert
cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@
-tutorial-html: examples fig-convert
+tutorial-html: fig-convert
cd tutorial && $(MAKE) $(AM_MAKEFLAGS) $@
-white-paper:
+white-paper-pdf:
cd white_paper && $(MAKE) $(AM_MAKEFLAGS) $@
white-paper-html:
cd white_paper && $(MAKE) $(AM_MAKEFLAGS) $@
-ref-guide: examples
+ref-guide-pdf: fig-convert
cd ref_guide && $(MAKE) $(AM_MAKEFLAGS) $@
-ref-guide-html: examples
+ref-guide-html: fig-convert
cd ref_guide && $(MAKE) $(AM_MAKEFLAGS) $@
-examples:
+data-regen:
cd examples && $(MAKE) $(AM_MAKEFLAGS) $@
fix-refdata:
cd examples && $(MAKE) $(AM_MAKEFLAGS) $@
-fig-convert:
+
+fig-convert: $(FIGURES_BUILDDIR)/*.png
+
+$(FIGURES_BUILDDIR)/*.png:
+ test -d $(FIGURES_BUILDDIR) || mkdir $(FIGURES_BUILDDIR) \
@failcom='exit 1'; \
- list="$(FIGURES_BUILDDIR)/*.p*m"; for img in $$list; do \
+ list="$(FIGURES_SRCDIR)/*.p*m"; for img in $$list; do \
echo "Converting $$img to png"; \
name=`basename $$img` \
ext=`echo $$name | cut -d '.' -f 2`; \
@@ -111,6 +116,7 @@ fig-convert:
|| eval $$failcom; \
done;
+
edit = sed -e "s|@ID@|$$Id|" \
-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
diff --git a/milena/doc/doc.mk b/milena/doc/doc.mk
index 8f2bd33..7fc7584 100644
--- a/milena/doc/doc.mk
+++ b/milena/doc/doc.mk
@@ -7,12 +7,15 @@ AM_CPPFLAGS += -I$(top_srcdir)/milena/doc/tutorial/tools
DOC_SRCDIR = $(top_srcdir)/milena/doc/
OUTPUTS_SRCDIR = $(DOC_SRCDIR)/outputs
+SPLIT_OUTPUTS_SRCDIR = $(OUTPUTS_SRCDIR)/split
FIGURES_SRCDIR = $(DOC_SRCDIR)/figures
EXAMPLES_SRCDIR = $(DOC_SRCDIR)/examples
+SPLIT_EXAMPLES_SRCDIR = $(EXAMPLES_SRCDIR)/split
IMG_SRCDIR = $(DOC_SRCDIR)/img
DOC_BUILDDIR = $(top_builddir)/milena/doc/
OUTPUTS_BUILDDIR = $(DOC_BUILDDIR)/outputs
-SPLITTED_OUTPUTS_BUILDDIR = $(DOC_BUILDDIR)/outputs/splitted
+SPLIT_OUTPUTS_BUILDDIR = $(OUTPUTS_BUILDDIR)/split
FIGURES_BUILDDIR = $(DOC_BUILDDIR)/figures
EXAMPLES_BUILDDIR = $(DOC_BUILDDIR)/examples
+SPLIT_EXAMPLES_BUILDDIR = $(EXAMPLES_BUILDDIR)/split
diff --git a/milena/doc/doxyfuns.sty b/milena/doc/doxyfuns.sty
index c5db8dc..983061b 100644
--- a/milena/doc/doxyfuns.sty
+++ b/milena/doc/doxyfuns.sty
@@ -178,10 +178,10 @@ $$
\renewcommand{\doxysection}[2]{\section{#2}\label{#1}}
\renewcommand{\doxysubsection}[2]{\subsection{#2}\label{#1}}
\renewcommand{\doxysubsubsection}[2]{\subsubsection{#2}\label{#1}}
-\renewcommand{\doxycode}[2][1]{\lstinputlisting[frame=single]{examples/#2-#1.cc}}
+\renewcommand{\doxycode}[2][1]{\lstinputlisting[frame=single]{examples/split/#2-#1.cc}}
\renewcommand{\doxyrawcode}[1]{\lstinputlisting[frame=single]{examples/#1.cc.raw}}
\renewcommand{\doxyoutput}[1]{\lstinputlisting[frame=single]{outputs/#1.txt}}
-\renewcommand{\doxymoutput}[2][1]{\lstinputlisting[frame=single]{outputs/splitted/#2-#1.txt}}
+\renewcommand{\doxymoutput}[2][1]{\lstinputlisting[frame=single]{outputs/split/#2-#1.txt}}
\renewcommand{\doxyfigure}[3][1]{%
\pgfimage[width=#3]{figures/#2-#1}%
\label{#1}%
diff --git a/milena/doc/examples/Makefile.am b/milena/doc/examples/Makefile.am
index 8ce38ac..8092243 100644
--- a/milena/doc/examples/Makefile.am
+++ b/milena/doc/examples/Makefile.am
@@ -134,12 +134,16 @@ tuto3_trace_SOURCES = tuto3/trace.cc
tuto4_site_set_create_SOURCES = tuto4/site_set_create.cc
tuto4_point2d_SOURCES = tuto4/point2d.cc
-all: clean-figures
+.PHONY : run-examples examples diff-data fix-refdata split-examples \
+ split-outputs
+
+
+all:
mkdir -p $(OUTPUTS_BUILDDIR)
mkdir -p $(FIGURES_BUILDDIR)
-run-samples: all
+run-examples: all
@failcom='exit 1'; \
list='$(noinst_PROGRAMS)'; for bin in $$list; do \
echo "Running $$bin"; \
@@ -147,10 +151,10 @@ run-samples: all
done
-examples: run-samples diff-data split-samples split-outputs
+data-regen: run-examples split-examples split-outputs diff-data
-diff-data:
+diff-data: run-examples split-examples
@failcom='exit 1'; \
has_txt_diff=""; \
txtlist="$(OUTPUTS_BUILDDIR)/*.txt"; for txt in $$txtlist; do \
@@ -159,12 +163,25 @@ diff-data:
|| has_txt_diff+=" `basename $$txt`"; \
done; \
has_fig_diff=""; \
- figlist="$(FIGURES_BUILDDIR)/*"; for fig in $$figlist; do \
+ figlist="$(FIGURES_BUILDDIR)/*.p*m"; for fig in $$figlist; do \
echo "Diff `basename $$fig`"; \
diff $$fig $(FIGURES_SRCDIR)/`basename $$fig` >/dev/null 2>&1 \
|| has_fig_diff+=" `basename $$fig`"; \
done; \
- (test -z "$$has_txt_diff" && test -z "$$has_fig_diff") \
+ has_split_out_diff=""; \
+ split_outlist="$(SPLIT_OUTPUTS_BUILDDIR)/*"; for split_out in
$$split_outlist; do \
+ echo "Diff `basename $$split_out`"; \
+ diff $$split_out $(SPLIT_OUTPUTS_SRCDIR)/`basename $$split_out` >/dev/null
2>&1 \
+ || has_split_out_diff+=" `basename $$split_out`"; \
+ done; \
+ has_split_ex_diff=""; \
+ split_exlist="$(SPLIT_EXAMPLES_BUILDDIR)/*"; for split_ex in $$split_exlist;
do \
+ echo "Diff `basename $$split_ex`"; \
+ diff $$split_ex $(SPLIT_EXAMPLES_SRCDIR)/`basename $$split_ex` >/dev/null
2>&1 \
+ || has_split_ex_diff+=" `basename $$split_ex`"; \
+ done; \
+ (test -z "$$has_txt_diff" && test -z "$$has_fig_diff"
&& \
+ test -z "$$has_split_out_diff" && test -z
"$$has_split_ex_diff")\
|| (echo "--------"; \
echo "ERROR: please check if the tutorial needs an update.";\
echo " The following files differ from their \
@@ -180,11 +197,23 @@ reference or their reference file does not exist:"; \
echo "$$has_fig_diff"; \
echo ""; \
echo "--------"; \
+ echo "* Split outputs:"; \
+ echo ""; \
+ echo "$$has_split_out_diff"; \
+ echo ""; \
+ echo "--------"; \
+ echo "* Split examples:"; \
+ echo ""; \
+ echo "$$has_split_ex_diff"; \
+ echo ""; \
+ echo "--------"; \
echo "* Please update manually the reference files located \
in:"; \
echo ""; \
echo " $(OUTPUTS_SRCDIR)"; \
echo " $(FIGURES_SRCDIR)"; \
+ echo " $(SPLIT_EXAMPLES_SRCDIR)"; \
+ echo " $(SPLIT_OUTPUTS_SRCDIR)"; \
echo ""; \
echo "* Reference files can updated automatically with \
'make fix-refdata'"; \
@@ -204,26 +233,35 @@ fix-refdata:
diff $$fig $(FIGURES_SRCDIR)/`basename $$fig` >/dev/null 2>&1 \
|| echo "Updating reference file for $$fig"; \
cp $$fig $(FIGURES_SRCDIR); \
+ done; \
+ split_outlist="$(SPLIT_OUTPUTS_BUILDDIR)/*.txt"; for split_out in
$$split_outlist; do \
+ diff $$split_out $(SPLIT_OUTPUTS_SRCDIR)/`basename $$split_out` >/dev/null
2>&1 \
+ || echo "Updating reference file for $$split_out"; \
+ cp $$split_out $(SPLIT_OUTPUTS_SRCDIR); \
+ done; \
+ split_exlist="$(SPLIT_EXAMPLES_BUILDDIR)/*.cc"; for split_ex in
$$split_exlist; do \
+ diff $$split_ex $(SPLIT_EXAMPLES_SRCDIR)/`basename $$split_ex` >/dev/null
2>&1 \
+ || echo "Updating reference file for $$split_ex"; \
+ cp $$split_ex $(SPLIT_EXAMPLES_SRCDIR); \
done;
-split-samples:
- mkdir -p $(EXAMPLES_BUILDDIR)
+split-examples:
+ test -d $(SPLIT_EXAMPLES_BUILDDIR) || mkdir $(SPLIT_EXAMPLES_BUILDDIR)
@failcom='exit 1'; \
list=`find $(EXAMPLES_SRCDIR) -type f -name '*.cc'`; for file in $$list; do \
- $(DOC_SRCDIR)/tools/split_sample.sh $$file cc $(EXAMPLES_BUILDDIR)\
+ $(DOC_SRCDIR)/tools/split_sample.sh $$file cc $(SPLIT_EXAMPLES_BUILDDIR)\
|| eval $$failcom; \
done
split-outputs:
- mkdir -p $(SPLITTED_OUTPUTS_BUILDDIR)
+ test -d $(SPLIT_OUTPUTS_BUILDDIR) || mkdir $(SPLIT_OUTPUTS_BUILDDIR)
@failcom='exit 1'; \
list='$(OUTPUTS_BUILDDIR)/*.txt'; for file in $$list; do \
- $(DOC_SRCDIR)/tools/split_sample.sh $$file txt $(SPLITTED_OUTPUTS_BUILDDIR)\
+ $(DOC_SRCDIR)/tools/split_sample.sh $$file txt $(SPLIT_OUTPUTS_BUILDDIR)\
|| eval $$failcom; \
done
-
clean-local: clean-figures
rm -Rf $(OUTPUTS_BUILDDIR)
rm -f $(EXAMPLES_BUILDDIR)/*.cc
diff --git a/milena/doc/examples/split/accu-right-instanciation-1.cc
b/milena/doc/examples/split/accu-right-instanciation-1.cc
new file mode 100644
index 0000000..565ca8f
--- /dev/null
+++ b/milena/doc/examples/split/accu-right-instanciation-1.cc
@@ -0,0 +1 @@
+ data::compute(accu::meta::stat::max(), ima);
diff --git a/milena/doc/examples/split/borderthickness-1.cc
b/milena/doc/examples/split/borderthickness-1.cc
new file mode 100644
index 0000000..2bb0406
--- /dev/null
+++ b/milena/doc/examples/split/borderthickness-1.cc
@@ -0,0 +1,13 @@
+ bool vals[3][3] = { { 0, 1, 1 },
+ { 1, 0, 0 },
+ { 1, 1, 0 } };
+
+ image2d<bool> ima_def = make::image(vals);
+ border::fill(ima_def, false);
+ debug::println_with_border(ima_def);
+
+ std::cout << "===========" << std::endl << std::endl;
+
+ border::thickness = 0;
+ image2d<bool> ima_bt0 = make::image(vals);
+ debug::println_with_border(ima_bt0);
diff --git a/milena/doc/examples/split/box2d-bbox-1.cc
b/milena/doc/examples/split/box2d-bbox-1.cc
new file mode 100644
index 0000000..e6b3e0c
--- /dev/null
+++ b/milena/doc/examples/split/box2d-bbox-1.cc
@@ -0,0 +1,7 @@
+ box2d b(2,3);
+
+ // The bbox can be retrived in constant time.
+ std::cout << b.bbox() << std::endl;
+
+ // nsites can be retrieved in constant time.
+ std::cout << "nsites = " << b.nsites() << std::endl;
diff --git a/milena/doc/examples/split/domain-display-1.cc
b/milena/doc/examples/split/domain-display-1.cc
new file mode 100644
index 0000000..f1d4ed6
--- /dev/null
+++ b/milena/doc/examples/split/domain-display-1.cc
@@ -0,0 +1,7 @@
+ image2d<int> ima1(5, 5);
+ image2d<int> ima2(10, 10);
+
+ std::cout << "ima1.domain() = " << ima1.domain()
+ << std::endl;
+ std::cout << "ima2.domain() = " << ima2.domain()
+ << std::endl;
diff --git a/milena/doc/examples/split/dpoint-1-1.cc
b/milena/doc/examples/split/dpoint-1-1.cc
new file mode 100644
index 0000000..c0a56b7
--- /dev/null
+++ b/milena/doc/examples/split/dpoint-1-1.cc
@@ -0,0 +1,4 @@
+ dpoint2d dp(-1,0);
+ point2d p(1,1);
+
+ std::cout << p + dp << std::endl;
diff --git a/milena/doc/examples/split/estim-sites-1.cc
b/milena/doc/examples/split/estim-sites-1.cc
new file mode 100644
index 0000000..d0e1f00
--- /dev/null
+++ b/milena/doc/examples/split/estim-sites-1.cc
@@ -0,0 +1 @@
+ unsigned nsites = geom::nsites(ima);
diff --git a/milena/doc/examples/split/extend-1.cc
b/milena/doc/examples/split/extend-1.cc
new file mode 100644
index 0000000..4ef1a43
--- /dev/null
+++ b/milena/doc/examples/split/extend-1.cc
@@ -0,0 +1,18 @@
+namespace mln
+{
+
+ struct my_ext : public Function_v2v<my_ext>
+ {
+
+ typedef value::rgb8 result;
+
+ value::rgb8 operator()(const point2d& p) const
+ {
+ if ((p.row() + p.col()) % 20)
+ return literal::black;
+ return literal::white;
+ }
+
+ };
+
+} // end of namespace mln
diff --git a/milena/doc/examples/split/extend-2.cc
b/milena/doc/examples/split/extend-2.cc
new file mode 100644
index 0000000..3708242
--- /dev/null
+++ b/milena/doc/examples/split/extend-2.cc
@@ -0,0 +1,5 @@
+ image2d<rgb8> lena;
+ io::ppm::load(lena, MLN_IMG_DIR "/small.ppm");
+ box2d bbox_enlarged = lena.domain();
+ bbox_enlarged.enlarge(border::thickness);
+ mln_VAR(ima_roi, lena | fun::p2b::big_chess<box2d>(lena.domain(), 10));
diff --git a/milena/doc/examples/split/extend-3.cc
b/milena/doc/examples/split/extend-3.cc
new file mode 100644
index 0000000..3b66921
--- /dev/null
+++ b/milena/doc/examples/split/extend-3.cc
@@ -0,0 +1 @@
+ mln_VAR(ext_with_val, extended_to(extend(ima_roi, literal::blue), bbox_enlarged));
diff --git a/milena/doc/examples/split/extend-4.cc
b/milena/doc/examples/split/extend-4.cc
new file mode 100644
index 0000000..c27ed3d
--- /dev/null
+++ b/milena/doc/examples/split/extend-4.cc
@@ -0,0 +1 @@
+ mln_VAR(ext_with_fun, extended_to(extend(ima_roi, my_ext()), bbox_enlarged));
diff --git a/milena/doc/examples/split/extend-5.cc
b/milena/doc/examples/split/extend-5.cc
new file mode 100644
index 0000000..1eb2c8c
--- /dev/null
+++ b/milena/doc/examples/split/extend-5.cc
@@ -0,0 +1 @@
+ mln_VAR(ext_with_ima, extend(ima_roi, lena));
diff --git a/milena/doc/examples/split/extension-ignore-1.cc
b/milena/doc/examples/split/extension-ignore-1.cc
new file mode 100644
index 0000000..0f6ea89
--- /dev/null
+++ b/milena/doc/examples/split/extension-ignore-1.cc
@@ -0,0 +1 @@
+ my_routine(ima | ima.domain());
diff --git a/milena/doc/examples/split/fill-1.cc b/milena/doc/examples/split/fill-1.cc
new file mode 100644
index 0000000..ec9c43d
--- /dev/null
+++ b/milena/doc/examples/split/fill-1.cc
@@ -0,0 +1,7 @@
+template <typename I>
+void fill(I& ima, mln_value(I) v)
+{
+ mln_piter(I) p(ima.domain());
+ for_all(p)
+ ima(p) = v;
+}
diff --git a/milena/doc/examples/split/fill-2.cc b/milena/doc/examples/split/fill-2.cc
new file mode 100644
index 0000000..05ae851
--- /dev/null
+++ b/milena/doc/examples/split/fill-2.cc
@@ -0,0 +1,2 @@
+ box2d b(20,20);
+ fill((ima | b).rw(), literal::green);
diff --git a/milena/doc/examples/split/fill-3.cc b/milena/doc/examples/split/fill-3.cc
new file mode 100644
index 0000000..5556f68
--- /dev/null
+++ b/milena/doc/examples/split/fill-3.cc
@@ -0,0 +1 @@
+ fill(ima, literal::green);
diff --git a/milena/doc/examples/split/fill-call-1-1.cc
b/milena/doc/examples/split/fill-call-1-1.cc
new file mode 100644
index 0000000..9726d12
--- /dev/null
+++ b/milena/doc/examples/split/fill-call-1-1.cc
@@ -0,0 +1 @@
+ image2d<char> imga(5, 5);
diff --git a/milena/doc/examples/split/fill-call-1-2.cc
b/milena/doc/examples/split/fill-call-1-2.cc
new file mode 100644
index 0000000..d845592
--- /dev/null
+++ b/milena/doc/examples/split/fill-call-1-2.cc
@@ -0,0 +1 @@
+ data::fill(imga, 'a');
diff --git a/milena/doc/examples/split/fill-call-1-3.cc
b/milena/doc/examples/split/fill-call-1-3.cc
new file mode 100644
index 0000000..9592c1c
--- /dev/null
+++ b/milena/doc/examples/split/fill-call-1-3.cc
@@ -0,0 +1 @@
+ data::fill((imga | box2d(1,2)).rw(), 'a');
diff --git a/milena/doc/examples/split/fill-part-image-1.cc
b/milena/doc/examples/split/fill-part-image-1.cc
new file mode 100644
index 0000000..6d904e7
--- /dev/null
+++ b/milena/doc/examples/split/fill-part-image-1.cc
@@ -0,0 +1,9 @@
+ bool vals[6][5] = {
+ {0, 1, 1, 0, 0},
+ {0, 1, 1, 0, 0},
+ {0, 0, 0, 0, 0},
+ {1, 1, 0, 1, 0},
+ {1, 0, 1, 1, 1},
+ {1, 0, 0, 0, 0}
+ };
+ image2d<bool> ima = make::image(vals);
diff --git a/milena/doc/examples/split/fill-part-image-2.cc
b/milena/doc/examples/split/fill-part-image-2.cc
new file mode 100644
index 0000000..d9486ec
--- /dev/null
+++ b/milena/doc/examples/split/fill-part-image-2.cc
@@ -0,0 +1,17 @@
+ p_array<point2d> arr;
+
+ // We add two points in the array.
+ arr.append(point2d(0, 1));
+ arr.append(point2d(4, 0));
+
+ // We restrict the image to the sites
+ // contained in arr and fill these ones
+ // with 0.
+ // We must call "rw()" here.
+ data::fill((ima | arr).rw(), 0);
+
+ debug::println((ima | arr));
+
+ mln_VAR(ima2, ima | arr);
+ // We do not need to call "rw()" here.
+ data::fill(ima2, 0);
diff --git a/milena/doc/examples/split/fill-subdomain-1.cc
b/milena/doc/examples/split/fill-subdomain-1.cc
new file mode 100644
index 0000000..6d904e7
--- /dev/null
+++ b/milena/doc/examples/split/fill-subdomain-1.cc
@@ -0,0 +1,9 @@
+ bool vals[6][5] = {
+ {0, 1, 1, 0, 0},
+ {0, 1, 1, 0, 0},
+ {0, 0, 0, 0, 0},
+ {1, 1, 0, 1, 0},
+ {1, 0, 1, 1, 1},
+ {1, 0, 0, 0, 0}
+ };
+ image2d<bool> ima = make::image(vals);
diff --git a/milena/doc/examples/split/fill-subdomain-2.cc
b/milena/doc/examples/split/fill-subdomain-2.cc
new file mode 100644
index 0000000..defe5f7
--- /dev/null
+++ b/milena/doc/examples/split/fill-subdomain-2.cc
@@ -0,0 +1,2 @@
+ label_8 nlabels;
+ image2d<label_8> lbl = labeling::blobs(ima, c4(), nlabels);
diff --git a/milena/doc/examples/split/fill-subdomain-3.cc
b/milena/doc/examples/split/fill-subdomain-3.cc
new file mode 100644
index 0000000..6aa40fb
--- /dev/null
+++ b/milena/doc/examples/split/fill-subdomain-3.cc
@@ -0,0 +1 @@
+ mln_VAR(lbl_2, lbl | (pw::value(lbl) == pw::cst(2u)));
diff --git a/milena/doc/examples/split/fill-subdomain-4.cc
b/milena/doc/examples/split/fill-subdomain-4.cc
new file mode 100644
index 0000000..81120f7
--- /dev/null
+++ b/milena/doc/examples/split/fill-subdomain-4.cc
@@ -0,0 +1,5 @@
+ image2d<rgb8> ima2;
+ initialize(ima2, ima);
+ data::fill(ima2, literal::black);
+
+ data::fill((ima2 | lbl_2.domain()).rw(), literal::red);
diff --git a/milena/doc/examples/split/fill-subdomain-shorter-1.cc
b/milena/doc/examples/split/fill-subdomain-shorter-1.cc
new file mode 100644
index 0000000..6d904e7
--- /dev/null
+++ b/milena/doc/examples/split/fill-subdomain-shorter-1.cc
@@ -0,0 +1,9 @@
+ bool vals[6][5] = {
+ {0, 1, 1, 0, 0},
+ {0, 1, 1, 0, 0},
+ {0, 0, 0, 0, 0},
+ {1, 1, 0, 1, 0},
+ {1, 0, 1, 1, 1},
+ {1, 0, 0, 0, 0}
+ };
+ image2d<bool> ima = make::image(vals);
diff --git a/milena/doc/examples/split/fill-subdomain-shorter-2.cc
b/milena/doc/examples/split/fill-subdomain-shorter-2.cc
new file mode 100644
index 0000000..eabd3ea
--- /dev/null
+++ b/milena/doc/examples/split/fill-subdomain-shorter-2.cc
@@ -0,0 +1,8 @@
+ label_8 nlabels;
+ image2d<label_8> lab = labeling::blobs(ima, c4(), nlabels);
+
+ image2d<rgb8> ima2;
+ initialize(ima2, ima);
+ data::fill(ima2, literal::black);
+
+ data::fill((ima2 | (pw::value(lab) == pw::cst(2u))).rw(), literal::red);
diff --git a/milena/doc/examples/split/fill-subimage-cfun-1.cc
b/milena/doc/examples/split/fill-subimage-cfun-1.cc
new file mode 100644
index 0000000..0354bcb
--- /dev/null
+++ b/milena/doc/examples/split/fill-subimage-cfun-1.cc
@@ -0,0 +1,4 @@
+bool row_oddity(mln::point2d p)
+{
+ return p.row() % 2;
+}
diff --git a/milena/doc/examples/split/fill-subimage-cfun-2.cc
b/milena/doc/examples/split/fill-subimage-cfun-2.cc
new file mode 100644
index 0000000..6d904e7
--- /dev/null
+++ b/milena/doc/examples/split/fill-subimage-cfun-2.cc
@@ -0,0 +1,9 @@
+ bool vals[6][5] = {
+ {0, 1, 1, 0, 0},
+ {0, 1, 1, 0, 0},
+ {0, 0, 0, 0, 0},
+ {1, 1, 0, 1, 0},
+ {1, 0, 1, 1, 1},
+ {1, 0, 0, 0, 0}
+ };
+ image2d<bool> ima = make::image(vals);
diff --git a/milena/doc/examples/split/fill-subimage-cfun-3.cc
b/milena/doc/examples/split/fill-subimage-cfun-3.cc
new file mode 100644
index 0000000..3c0991a
--- /dev/null
+++ b/milena/doc/examples/split/fill-subimage-cfun-3.cc
@@ -0,0 +1,5 @@
+ image2d<rgb8> ima2;
+ initialize(ima2, ima);
+ data::fill(ima2, literal::black);
+
+ data::fill((ima2 | row_oddity).rw(), literal::red);
diff --git a/milena/doc/examples/split/forall-piter-1.cc
b/milena/doc/examples/split/forall-piter-1.cc
new file mode 100644
index 0000000..41360da
--- /dev/null
+++ b/milena/doc/examples/split/forall-piter-1.cc
@@ -0,0 +1,5 @@
+ box2d b(3, 2);
+ mln_piter_(box2d) p(b);
+
+ for_all(p)
+ std::cout << p; //prints every site coordinates.
diff --git a/milena/doc/examples/split/fun-p2v-1-1.cc
b/milena/doc/examples/split/fun-p2v-1-1.cc
new file mode 100644
index 0000000..f7aea71
--- /dev/null
+++ b/milena/doc/examples/split/fun-p2v-1-1.cc
@@ -0,0 +1,6 @@
+unsigned my_values(const mln::point2d& p)
+{
+ if (p.row() == 0)
+ return 8;
+ return 9;
+}
diff --git a/milena/doc/examples/split/graph-data-1.cc
b/milena/doc/examples/split/graph-data-1.cc
new file mode 100644
index 0000000..9a2ffe0
--- /dev/null
+++ b/milena/doc/examples/split/graph-data-1.cc
@@ -0,0 +1,21 @@
+template <typename S>
+struct viota_t : public mln::Function_v2v< viota_t<S> >
+{
+ typedef unsigned result;
+
+ viota_t(unsigned size)
+ {
+ v_.resize(size);
+ for(unsigned i = 0; i < size; ++i)
+ v_[i] = 10 + i;
+ }
+
+ unsigned
+ operator()(const mln_psite(S)& p) const
+ {
+ return v_[p.v().id()];
+ }
+
+ protected:
+ std::vector<result> v_;
+};
diff --git a/milena/doc/examples/split/graph-data-2.cc
b/milena/doc/examples/split/graph-data-2.cc
new file mode 100644
index 0000000..c73300e
--- /dev/null
+++ b/milena/doc/examples/split/graph-data-2.cc
@@ -0,0 +1,4 @@
+ util::graph g;
+
+ for (unsigned i = 0; i < 5; ++i)
+ g.add_vertex(); // Add vertex 'i';
diff --git a/milena/doc/examples/split/graph-data-3.cc
b/milena/doc/examples/split/graph-data-3.cc
new file mode 100644
index 0000000..0a2382f
--- /dev/null
+++ b/milena/doc/examples/split/graph-data-3.cc
@@ -0,0 +1,5 @@
+ g.add_edge(0, 1); // Associated to edge 0.
+ g.add_edge(1, 2); // Associated to edge 1.
+ g.add_edge(1, 3); // Associated to edge 2.
+ g.add_edge(3, 4); // Associated to edge 3.
+ g.add_edge(4, 2); // Associated to edge 4.
diff --git a/milena/doc/examples/split/graph-data-4.cc
b/milena/doc/examples/split/graph-data-4.cc
new file mode 100644
index 0000000..77949ae
--- /dev/null
+++ b/milena/doc/examples/split/graph-data-4.cc
@@ -0,0 +1,7 @@
+ typedef fun::i2v::array<point2d> F;
+ F f(5); // We need to map 5 vertices.
+ f(0) = point2d(0, 0);
+ f(1) = point2d(2, 2);
+ f(2) = point2d(0, 4);
+ f(3) = point2d(4, 3);
+ f(4) = point2d(4, 4);
diff --git a/milena/doc/examples/split/graph-data-5.cc
b/milena/doc/examples/split/graph-data-5.cc
new file mode 100644
index 0000000..493061a
--- /dev/null
+++ b/milena/doc/examples/split/graph-data-5.cc
@@ -0,0 +1,2 @@
+ typedef p_vertices<util::graph, F> pv_t;
+ pv_t pv(g, f);
diff --git a/milena/doc/examples/split/graph-data-6.cc
b/milena/doc/examples/split/graph-data-6.cc
new file mode 100644
index 0000000..b66db5d
--- /dev/null
+++ b/milena/doc/examples/split/graph-data-6.cc
@@ -0,0 +1,11 @@
+
+ // Constructs an image
+ viota_t<pv_t> viota(pv.nsites());
+ mln_VAR(graph_vertices_ima, viota | pv);
+
+ //Prints each vertex and its associated data.
+ mln_piter_(graph_vertices_ima_t) p(graph_vertices_ima.domain());
+ for_all(p)
+ std::cout << "graph_vertices_ima(" << p << ") =
"
+ << graph_vertices_ima(p) << std::endl;
+
diff --git a/milena/doc/examples/split/graph-iter-1.cc
b/milena/doc/examples/split/graph-iter-1.cc
new file mode 100644
index 0000000..5156adf
--- /dev/null
+++ b/milena/doc/examples/split/graph-iter-1.cc
@@ -0,0 +1,9 @@
+ // Function which maps sites to data.
+ viota_t viota(g.v_nmax());
+
+ // Iterator on vertices.
+ mln_vertex_iter_(util::graph) v(g);
+
+ // Prints each vertex and its associated value.
+ for_all(v)
+ std::cout << v << " : " << viota(v) << std::endl;
diff --git a/milena/doc/examples/split/graph-iter-2.cc
b/milena/doc/examples/split/graph-iter-2.cc
new file mode 100644
index 0000000..67e7adc
--- /dev/null
+++ b/milena/doc/examples/split/graph-iter-2.cc
@@ -0,0 +1,15 @@
+ // Iterator on vertices.
+ mln_vertex_iter_(util::graph) v(g);
+
+ // Iterator on v's edges.
+ mln_vertex_nbh_edge_iter_(util::graph) e(v);
+
+ // Prints the graph
+ // List all edges for each vertex.
+ for_all(v)
+ {
+ std::cout << v << " : ";
+ for_all(e)
+ std::cout << e << " ";
+ std::cout << std::endl;
+ }
diff --git a/milena/doc/examples/split/graph-iter-3.cc
b/milena/doc/examples/split/graph-iter-3.cc
new file mode 100644
index 0000000..cf519c6
--- /dev/null
+++ b/milena/doc/examples/split/graph-iter-3.cc
@@ -0,0 +1,15 @@
+ // Iterator on edges.
+ mln_edge_iter_(util::graph) e(g);
+
+ // Iterator on edges adjacent to e.
+ mln_edge_nbh_edge_iter_(util::graph) ne(e);
+
+ // Prints the graph
+ // List all adjacent edges for each edge.
+ for_all(e)
+ {
+ std::cout << e << " : ";
+ for_all(ne)
+ std::cout << ne << " ";
+ std::cout << std::endl;
+ }
diff --git a/milena/doc/examples/split/graph-iter-4.cc
b/milena/doc/examples/split/graph-iter-4.cc
new file mode 100644
index 0000000..c9271f1
--- /dev/null
+++ b/milena/doc/examples/split/graph-iter-4.cc
@@ -0,0 +1,15 @@
+ // Iterator on vertices.
+ mln_vertex_iter_(util::graph) v(g);
+
+ // Iterator on vertices adjacent to v.
+ mln_vertex_nbh_vertex_iter_(util::graph) nv(v);
+
+ // Prints the graph
+ // List all adjacent edges for each edge.
+ for_all(v)
+ {
+ std::cout << v << " : ";
+ for_all(nv)
+ std::cout << nv << " ";
+ std::cout << std::endl;
+ }
diff --git a/milena/doc/examples/split/ima-has-1.cc
b/milena/doc/examples/split/ima-has-1.cc
new file mode 100644
index 0000000..8bcf33c
--- /dev/null
+++ b/milena/doc/examples/split/ima-has-1.cc
@@ -0,0 +1,32 @@
+ // Default border size is set to 0.
+
+ // Image defined on a box2d from
+ // (0, 0) to (2, 2)
+ image2d<int> ima1(2, 3);
+
+ std::cout << "ima1.has(0, 0) : "
+ << ima1.has(point2d(0, 0)) << std::endl;
+
+ std::cout << "ima1.has(-3, 0) : "
+ << ima1.has(point2d(-3, 0)) << std::endl;
+
+ std::cout << "ima1.has(2, 5) : "
+ << ima1.has(point2d(2, 5)) << std::endl;
+
+ std::cout << "=========" << std::endl;
+
+ // Set default border size to 0.
+ border::thickness = 0;
+
+ // Image defined on a box2d from
+ // (0, 0) to (2, 2)
+ image2d<int> ima2(2, 3);
+
+ std::cout << "ima2.has(0, 0) : "
+ << ima2.has(point2d(0, 0)) << std::endl;
+
+ std::cout << "ima2.has(-3, 0) : "
+ << ima2.has(point2d(-3, 0)) << std::endl;
+
+ std::cout << "ima2.has(2, 5) : "
+ << ima2.has(point2d(2, 5)) << std::endl;
diff --git a/milena/doc/examples/split/ima-load-1.cc
b/milena/doc/examples/split/ima-load-1.cc
new file mode 100644
index 0000000..3f0f30f
--- /dev/null
+++ b/milena/doc/examples/split/ima-load-1.cc
@@ -0,0 +1,2 @@
+ image2d<bool> ima;
+ io::pbm::load(ima, "my_image.pbm");
diff --git a/milena/doc/examples/split/ima-save-1.cc
b/milena/doc/examples/split/ima-save-1.cc
new file mode 100644
index 0000000..331f954
--- /dev/null
+++ b/milena/doc/examples/split/ima-save-1.cc
@@ -0,0 +1 @@
+ io::pbm::save(ima, "../figures/ima_save.pbm");
diff --git a/milena/doc/examples/split/ima-size-1.cc
b/milena/doc/examples/split/ima-size-1.cc
new file mode 100644
index 0000000..d3e28cb
--- /dev/null
+++ b/milena/doc/examples/split/ima-size-1.cc
@@ -0,0 +1,6 @@
+ image2d<int> ima(make::box2d(0,0, 10,12));
+
+ std::cout << "nrows = " << ima.nrows()
+ << " - "
+ << "ncols = " << ima.ncols()
+ << std::endl;
diff --git a/milena/doc/examples/split/ima2d-1-1.cc
b/milena/doc/examples/split/ima2d-1-1.cc
new file mode 100644
index 0000000..8a77d3d
--- /dev/null
+++ b/milena/doc/examples/split/ima2d-1-1.cc
@@ -0,0 +1,7 @@
+ // Define a box2d from (-2,-3) to (3,5).
+ box2d b = make::box2d(-2,-3, 3,5);
+ // Initialize an image with b as domain.
+ image2d<int> ima(b);
+
+ std::cout << "b = " << b << std::endl;
+ std::cout << "domain = " << ima.domain() << std::endl;
diff --git a/milena/doc/examples/split/ima2d-2-1.cc
b/milena/doc/examples/split/ima2d-2-1.cc
new file mode 100644
index 0000000..69d97bb
--- /dev/null
+++ b/milena/doc/examples/split/ima2d-2-1.cc
@@ -0,0 +1,7 @@
+ // Build an empty image;
+ image2d<value::int_u8> img1a;
+
+ // Build an image with 2 rows
+ // and 3 columns sites
+ image2d<value::int_u8> img1b(box2d(2, 3));
+ image2d<value::int_u8> img1c(2, 3);
diff --git a/milena/doc/examples/split/ima2d-3-1.cc
b/milena/doc/examples/split/ima2d-3-1.cc
new file mode 100644
index 0000000..c88d86d
--- /dev/null
+++ b/milena/doc/examples/split/ima2d-3-1.cc
@@ -0,0 +1,23 @@
+ box2d b(2,3);
+ image2d<value::int_u8> ima(b);
+
+ // On image2d, Site <=> point2d
+ point2d p(1, 2);
+
+ // Associate '9' as value for the site/point2d (1,2).
+ // The value is returned by reference and can be changed.
+ opt::at(ima, 1,2) = 9;
+ std::cout << "opt::at(ima, 1,2) = " << opt::at(ima, 1,2)
+ << std::endl;
+ std::cout << "ima(p) = " << ima(p) << std::endl;
+
+ std::cout << "---" << std::endl;
+
+
+ // Associate '2' as value for the site/point2d (1,2).
+ // The value is returned by reference
+ // and can be changed as well.
+ ima(p) = 2;
+ std::cout << "opt::at(ima, 1,2) = " << opt::at(ima, 1,2)
+ << std::endl;
+ std::cout << "ima(p) = " << ima(p) << std::endl;
diff --git a/milena/doc/examples/split/ima2d-4-1.cc
b/milena/doc/examples/split/ima2d-4-1.cc
new file mode 100644
index 0000000..d27faa2
--- /dev/null
+++ b/milena/doc/examples/split/ima2d-4-1.cc
@@ -0,0 +1,8 @@
+ point2d p(9,9);
+
+ // At (9, 9), both values change.
+ ima1(p) = 'M';
+ ima2(p) = 'W';
+
+ bool b = (ima1(p) == ima2(p));
+ std::cout << (b ? "True" : "False") << std::endl;
diff --git a/milena/doc/examples/split/ima2d-5-1.cc
b/milena/doc/examples/split/ima2d-5-1.cc
new file mode 100644
index 0000000..efe7bad
--- /dev/null
+++ b/milena/doc/examples/split/ima2d-5-1.cc
@@ -0,0 +1,13 @@
+ image2d<int> ima1(box2d(2, 3));
+ image2d<int> ima2;
+ point2d p(1,2);
+
+ ima2 = ima1; // ima1.id() == ima2.id()
+ // and both point to the same memory area.
+
+ ima2(p) = 2; // ima1 is modified as well.
+
+ // prints "2 - 2"
+ std::cout << ima2(p) << " - " << ima1(p) <<
std::endl;
+ // prints "true"
+ std::cout << (ima2.id_() == ima1.id_()) << std::endl;
diff --git a/milena/doc/examples/split/ima2d-6-clone-1.cc
b/milena/doc/examples/split/ima2d-6-clone-1.cc
new file mode 100644
index 0000000..b8d23b5
--- /dev/null
+++ b/milena/doc/examples/split/ima2d-6-clone-1.cc
@@ -0,0 +1,8 @@
+ image2d<int> ima1(5, 5);
+ image2d<int> ima3 = duplicate(ima1); // Makes a deep copy.
+
+ point2d p(2, 2);
+ ima3(p) = 3;
+
+ std::cout << ima3(p) << " - " << ima1(p) <<
std::endl;
+ std::cout << (ima3.id_() == ima1.id_()) << std::endl;
diff --git a/milena/doc/examples/split/ima2d-7-1.cc
b/milena/doc/examples/split/ima2d-7-1.cc
new file mode 100644
index 0000000..2dc5d89
--- /dev/null
+++ b/milena/doc/examples/split/ima2d-7-1.cc
@@ -0,0 +1,5 @@
+ image2d<value::int_u8> img2a(2, 3);
+ image2d<value::int_u8> img2b;
+
+ initialize(img2b, img2a);
+ data::fill(img2b, img2a);
diff --git a/milena/doc/examples/split/ima2d-rot-1.cc
b/milena/doc/examples/split/ima2d-rot-1.cc
new file mode 100644
index 0000000..74125b2
--- /dev/null
+++ b/milena/doc/examples/split/ima2d-rot-1.cc
@@ -0,0 +1,34 @@
+ border::thickness = 30;
+
+ // Declare the image to be rotated.
+ image2d<value::rgb8> ima1_(220, 220);
+ data::fill(ima1_, literal::cyan);
+ border::fill(ima1_, literal::yellow);
+ // Set an infinite extension.
+ mln_VAR(ima1, extend(ima1_, pw::cst(literal::yellow)));
+
+ // Declare the output image.
+ image2d<value::rgb8> ima2(220, 220);
+ data::fill(ima2, literal::cyan);
+ border::fill(ima2, literal::yellow);
+
+ box2d extended_domain= ima1.domain();
+ extended_domain.enlarge(border::thickness);
+
+ // Draw the domain bounding box
+ draw::box(ima1, geom::bbox(ima1_), literal::red);
+ // Save the image, including its border.
+ doc::ppmsave(ima1 | extended_domain, IMA1_PPM);
+
+ // Define and apply a point-wise rotation
+ fun::x2x::rotation<2,float> rot1(0.5, literal::zero);
+ image2d<value::rgb8>::fwd_piter p(ima1.domain());
+ for_all(p)
+ {
+ algebra::vec<2,float> pv = p.to_site().to_vec();
+ algebra::vec<2,float> v = rot1.inv()(pv);
+ ima2(p) = ima1(v);
+ }
+
+ draw::box(ima2, ima2.bbox(), literal::red);
+ doc::ppmsave(extended_to(ima2, extended_domain), IMA2_PPM);
diff --git a/milena/doc/examples/split/labeling-compute-1.cc
b/milena/doc/examples/split/labeling-compute-1.cc
new file mode 100644
index 0000000..6d904e7
--- /dev/null
+++ b/milena/doc/examples/split/labeling-compute-1.cc
@@ -0,0 +1,9 @@
+ bool vals[6][5] = {
+ {0, 1, 1, 0, 0},
+ {0, 1, 1, 0, 0},
+ {0, 0, 0, 0, 0},
+ {1, 1, 0, 1, 0},
+ {1, 0, 1, 1, 1},
+ {1, 0, 0, 0, 0}
+ };
+ image2d<bool> ima = make::image(vals);
diff --git a/milena/doc/examples/split/labeling-compute-2.cc
b/milena/doc/examples/split/labeling-compute-2.cc
new file mode 100644
index 0000000..defe5f7
--- /dev/null
+++ b/milena/doc/examples/split/labeling-compute-2.cc
@@ -0,0 +1,2 @@
+ label_8 nlabels;
+ image2d<label_8> lbl = labeling::blobs(ima, c4(), nlabels);
diff --git a/milena/doc/examples/split/labeling-compute-3.cc
b/milena/doc/examples/split/labeling-compute-3.cc
new file mode 100644
index 0000000..93347d9
--- /dev/null
+++ b/milena/doc/examples/split/labeling-compute-3.cc
@@ -0,0 +1,4 @@
+ util::array<box2d> boxes =
+ labeling::compute(accu::meta::bbox(),
+ lbl,
+ nlabels);
diff --git a/milena/doc/examples/split/labeling-compute-4.cc
b/milena/doc/examples/split/labeling-compute-4.cc
new file mode 100644
index 0000000..6a8e133
--- /dev/null
+++ b/milena/doc/examples/split/labeling-compute-4.cc
@@ -0,0 +1,2 @@
+ for (unsigned i = 1; i <= nlabels; ++i)
+ std::cout << boxes[i] << std::endl;
diff --git a/milena/doc/examples/split/logical-not-1.cc
b/milena/doc/examples/split/logical-not-1.cc
new file mode 100644
index 0000000..8d63e86
--- /dev/null
+++ b/milena/doc/examples/split/logical-not-1.cc
@@ -0,0 +1,8 @@
+ bool vals[5][5] = {
+ {1, 0, 1, 0, 0},
+ {0, 1, 0, 1, 0},
+ {1, 0, 1, 0, 0},
+ {0, 1, 0, 1, 0},
+ {0, 1, 0, 1, 0}
+ };
+ image2d<bool> ima = make::image(vals);
diff --git a/milena/doc/examples/split/logical-not-2.cc
b/milena/doc/examples/split/logical-not-2.cc
new file mode 100644
index 0000000..4c493d4
--- /dev/null
+++ b/milena/doc/examples/split/logical-not-2.cc
@@ -0,0 +1 @@
+ image2d<bool> ima_neg = logical::not_(ima);
diff --git a/milena/doc/examples/split/logical-not-3.cc
b/milena/doc/examples/split/logical-not-3.cc
new file mode 100644
index 0000000..77a11f9
--- /dev/null
+++ b/milena/doc/examples/split/logical-not-3.cc
@@ -0,0 +1 @@
+ logical::not_inplace(ima);
diff --git a/milena/doc/examples/split/mln_var-1.cc
b/milena/doc/examples/split/mln_var-1.cc
new file mode 100644
index 0000000..04ca688
--- /dev/null
+++ b/milena/doc/examples/split/mln_var-1.cc
@@ -0,0 +1 @@
+ mln_VAR(ima, my_values | arr);
diff --git a/milena/doc/examples/split/mln_var-2.cc
b/milena/doc/examples/split/mln_var-2.cc
new file mode 100644
index 0000000..edfbd6d
--- /dev/null
+++ b/milena/doc/examples/split/mln_var-2.cc
@@ -0,0 +1 @@
+ mln_VAR(imab1, ima | (pw::value(ima) == pw::cst(1u)));
diff --git a/milena/doc/examples/split/mln_var-3.cc
b/milena/doc/examples/split/mln_var-3.cc
new file mode 100644
index 0000000..4075081
--- /dev/null
+++ b/milena/doc/examples/split/mln_var-3.cc
@@ -0,0 +1,5 @@
+ box2d b2(1, 2);
+//FIXME: enable these lines.
+// mln_VAR(imad, imab1 / b2);
+
+// debug::println(imad);
diff --git a/milena/doc/examples/split/parray-append-1.cc
b/milena/doc/examples/split/parray-append-1.cc
new file mode 100644
index 0000000..2608700
--- /dev/null
+++ b/milena/doc/examples/split/parray-append-1.cc
@@ -0,0 +1,6 @@
+ p_array<point2d> arr;
+ arr.append(point2d(3, 6));
+ arr.append(point2d(3, 7));
+ arr.append(point2d(3, 8));
+ arr.append(point2d(4, 8));
+ arr.append(point2d(4, 9));
diff --git a/milena/doc/examples/split/parray-bbox-1.cc
b/milena/doc/examples/split/parray-bbox-1.cc
new file mode 100644
index 0000000..c6d43f5
--- /dev/null
+++ b/milena/doc/examples/split/parray-bbox-1.cc
@@ -0,0 +1,11 @@
+ p_array<point2d> arr;
+ arr.insert(point2d(1,0));
+ arr.insert(point2d(1,1));
+
+ // The bbox is computed thanks to bbox() algorithm.
+ box2d box = geom::bbox(arr);
+ std::cout << box << std::endl;
+
+ // p_array provides nsites(),
+ // it can be retrieved in constant time.
+ std::cout << "nsites = " << arr.nsites() << std::endl;
diff --git a/milena/doc/examples/split/paste-1.cc b/milena/doc/examples/split/paste-1.cc
new file mode 100644
index 0000000..327b226
--- /dev/null
+++ b/milena/doc/examples/split/paste-1.cc
@@ -0,0 +1,7 @@
+template <typename I, typename J>
+void paste(const I& data, J& dest)
+{
+ mln_piter(I) p(data.domain());
+ for_all(p)
+ dest(p) = data(p);
+}
diff --git a/milena/doc/examples/split/paste-call-1-1.cc
b/milena/doc/examples/split/paste-call-1-1.cc
new file mode 100644
index 0000000..a6703c7
--- /dev/null
+++ b/milena/doc/examples/split/paste-call-1-1.cc
@@ -0,0 +1,11 @@
+ image2d<unsigned char> imgb(make::box2d(5,5, 7,8));
+ // Initialize imga with the same domain as imgb.
+ image2d<unsigned char> imga(imgb.domain());
+
+ // Initialize the image values.
+ data::fill(imgb, 'b');
+
+ // Paste the content of imgb in imga.
+ data::paste(imgb, imga);
+
+ debug::println(imga);
diff --git a/milena/doc/examples/split/point-1-1.cc
b/milena/doc/examples/split/point-1-1.cc
new file mode 100644
index 0000000..e7fa428
--- /dev/null
+++ b/milena/doc/examples/split/point-1-1.cc
@@ -0,0 +1,14 @@
+ // Create an image on a 2D box
+ // with 10 columns and 10 rows.
+ image2d<bool> ima(make::box2d(10, 10));
+
+ mln_site_(image2d<bool>) p1(20, 20);
+ mln_site_(image2d<bool>) p2(3, 3);
+
+ std::cout << "has(p1)? "
+ << (ima.has(p1) ? "true" : "false")
+ << std::endl;
+
+ std::cout << "has(p2)? "
+ << (ima.has(p2) ? "true" : "false")
+ << std::endl;
diff --git a/milena/doc/examples/split/predicate-1-1.cc
b/milena/doc/examples/split/predicate-1-1.cc
new file mode 100644
index 0000000..6f466d7
--- /dev/null
+++ b/milena/doc/examples/split/predicate-1-1.cc
@@ -0,0 +1,7 @@
+//function_p2b
+bool my_function_p2b(mln::point2d p);
+
+//function_p2v
+//V is the value type used in the image.
+template <typename V>
+V my_function_p2v(mln::point2d p);
diff --git a/milena/doc/examples/split/tuto2_first_image-1.cc
b/milena/doc/examples/split/tuto2_first_image-1.cc
new file mode 100644
index 0000000..31b4c86
--- /dev/null
+++ b/milena/doc/examples/split/tuto2_first_image-1.cc
@@ -0,0 +1,15 @@
+ bool vals[13][21] = {
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ {0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0},
+ {0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0},
+ {0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0},
+ {0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0},
+ {0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ {0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0},
+ {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0},
+ {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0},
+ {0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0},
+ {0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0},
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+ };
diff --git a/milena/doc/examples/split/tuto2_first_image-2.cc
b/milena/doc/examples/split/tuto2_first_image-2.cc
new file mode 100644
index 0000000..d1288f0
--- /dev/null
+++ b/milena/doc/examples/split/tuto2_first_image-2.cc
@@ -0,0 +1 @@
+ image2d<bool> ima = make::image(vals);
diff --git a/milena/doc/examples/split/tuto2_first_image-3.cc
b/milena/doc/examples/split/tuto2_first_image-3.cc
new file mode 100644
index 0000000..2f2cc40
--- /dev/null
+++ b/milena/doc/examples/split/tuto2_first_image-3.cc
@@ -0,0 +1 @@
+ debug::println(ima);
diff --git a/milena/doc/examples/split/tuto2_first_image-4.cc
b/milena/doc/examples/split/tuto2_first_image-4.cc
new file mode 100644
index 0000000..70210b2
--- /dev/null
+++ b/milena/doc/examples/split/tuto2_first_image-4.cc
@@ -0,0 +1 @@
+ doc::pbmsave(ima, "tuto2_first_image");
diff --git a/milena/doc/examples/split/tuto3_colorize-1.cc
b/milena/doc/examples/split/tuto3_colorize-1.cc
new file mode 100644
index 0000000..d79e248
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_colorize-1.cc
@@ -0,0 +1,8 @@
+ int_u8 vals[25] = { 100, 100, 200, 200, 230,
+ 100, 100, 200, 230, 230,
+ 140, 140, 140, 0, 0,
+ 65, 186, 65, 127, 127,
+ 65, 65, 65, 127, 127 };
+
+ image2d<int_u8> ima = make::image2d(vals);
+ image2d<rgb8> ima_color = labeling::colorize(rgb8(), ima, 230);
diff --git a/milena/doc/examples/split/tuto3_first_routine-1.cc
b/milena/doc/examples/split/tuto3_first_routine-1.cc
new file mode 100644
index 0000000..c9fd1ab
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_first_routine-1.cc
@@ -0,0 +1,34 @@
+namespace mln
+{
+
+ template <typename I, typename N>
+ mln_concrete(I)
+ my_algorithm(const Image<I>& ima_,
+ const Neighborhood<N>& nbh_)
+ {
+ trace::entering("my_algorithm");
+
+ const I& ima = exact(ima_);
+ const N& nbh = exact(nbh_);
+ mln_precondition(ima.is_valid());
+ mln_precondition(nbh.is_valid());
+
+ typedef value::label_8 V;
+ V nlabels;
+ mln_ch_value(I,V) lbl = labeling::blobs(ima, nbh, nlabels);
+ util::array<unsigned>
+ count = labeling::compute(accu::meta::count(), lbl, nlabels);
+
+ mln_concrete(I) output;
+ initialize(output, ima);
+ data::fill(output, literal::one);
+
+ for (unsigned i = 1; i <= nlabels; ++i)
+ if (count[i] < 10u)
+ data::fill((output | (pw::value(lbl) == pw::cst(i))).rw(), literal::zero);
+
+ trace::exiting("my_algorithm");
+ return output;
+ }
+
+} // end of namespace mln
diff --git a/milena/doc/examples/split/tuto3_first_routine-2.cc
b/milena/doc/examples/split/tuto3_first_routine-2.cc
new file mode 100644
index 0000000..15f5217
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_first_routine-2.cc
@@ -0,0 +1,4 @@
+ template <typename I, typename N>
+ mln_concrete(I)
+ my_algorithm(const Image<I>& ima_,
+ const Neighborhood<N>& nbh_)
diff --git a/milena/doc/examples/split/tuto3_first_routine-3.cc
b/milena/doc/examples/split/tuto3_first_routine-3.cc
new file mode 100644
index 0000000..35421e3
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_first_routine-3.cc
@@ -0,0 +1 @@
+ trace::entering("my_algorithm");
diff --git a/milena/doc/examples/split/tuto3_first_routine-4.cc
b/milena/doc/examples/split/tuto3_first_routine-4.cc
new file mode 100644
index 0000000..ab1f3a9
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_first_routine-4.cc
@@ -0,0 +1,4 @@
+ const I& ima = exact(ima_);
+ const N& nbh = exact(nbh_);
+ mln_precondition(ima.is_valid());
+ mln_precondition(nbh.is_valid());
diff --git a/milena/doc/examples/split/tuto3_first_routine-5.cc
b/milena/doc/examples/split/tuto3_first_routine-5.cc
new file mode 100644
index 0000000..998dc2d
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_first_routine-5.cc
@@ -0,0 +1,5 @@
+ typedef value::label_8 V;
+ V nlabels;
+ mln_ch_value(I,V) lbl = labeling::blobs(ima, nbh, nlabels);
+ util::array<unsigned>
+ count = labeling::compute(accu::meta::count(), lbl, nlabels);
diff --git a/milena/doc/examples/split/tuto3_first_routine-6.cc
b/milena/doc/examples/split/tuto3_first_routine-6.cc
new file mode 100644
index 0000000..283c2e2
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_first_routine-6.cc
@@ -0,0 +1,3 @@
+ mln_concrete(I) output;
+ initialize(output, ima);
+ data::fill(output, literal::one);
diff --git a/milena/doc/examples/split/tuto3_first_routine-7.cc
b/milena/doc/examples/split/tuto3_first_routine-7.cc
new file mode 100644
index 0000000..7a9c927
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_first_routine-7.cc
@@ -0,0 +1,3 @@
+ for (unsigned i = 1; i <= nlabels; ++i)
+ if (count[i] < 10u)
+ data::fill((output | (pw::value(lbl) == pw::cst(i))).rw(), literal::zero);
diff --git a/milena/doc/examples/split/tuto3_first_routine-8.cc
b/milena/doc/examples/split/tuto3_first_routine-8.cc
new file mode 100644
index 0000000..a0b2a75
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_first_routine-8.cc
@@ -0,0 +1,2 @@
+ trace::exiting("my_algorithm");
+ return output;
diff --git a/milena/doc/examples/split/tuto3_println-1.cc
b/milena/doc/examples/split/tuto3_println-1.cc
new file mode 100644
index 0000000..18dfc2a
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_println-1.cc
@@ -0,0 +1,3 @@
+ image2d<int_u8> ima(5,5);
+ data::fill(ima, 2);
+ debug::println(ima);
diff --git a/milena/doc/examples/split/tuto3_println-2.cc
b/milena/doc/examples/split/tuto3_println-2.cc
new file mode 100644
index 0000000..bae2dce
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_println-2.cc
@@ -0,0 +1,4 @@
+ image2d<int_u8> ima(5,5);
+ data::fill(ima, 2);
+ border::fill(ima, 7);
+ debug::println_with_border(ima);
diff --git a/milena/doc/examples/split/tuto3_rw_image-1.cc
b/milena/doc/examples/split/tuto3_rw_image-1.cc
new file mode 100644
index 0000000..621ff28
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_rw_image-1.cc
@@ -0,0 +1 @@
+ image2d<value::rgb8> ima(40, 40);
diff --git a/milena/doc/examples/split/tuto3_rw_image-2.cc
b/milena/doc/examples/split/tuto3_rw_image-2.cc
new file mode 100644
index 0000000..7ee6c8a
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_rw_image-2.cc
@@ -0,0 +1 @@
+ data::fill(ima, literal::red);
diff --git a/milena/doc/examples/split/tuto3_rw_image-3.cc
b/milena/doc/examples/split/tuto3_rw_image-3.cc
new file mode 100644
index 0000000..f25ab40
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_rw_image-3.cc
@@ -0,0 +1,3 @@
+ for (def::coord row = 20; row < 30; ++row)
+ for (def::coord col = 20; col < 30; ++col)
+ ima(point2d(row, col)) = literal::blue;
diff --git a/milena/doc/examples/split/tuto3_rw_image-4.cc
b/milena/doc/examples/split/tuto3_rw_image-4.cc
new file mode 100644
index 0000000..06559c5
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_rw_image-4.cc
@@ -0,0 +1,3 @@
+ for (def::coord row = 20; row < 30; ++row)
+ for (def::coord col = 20; col < 30; ++col)
+ opt::at(ima, row, col) = literal::blue;
diff --git a/milena/doc/examples/split/tuto3_rw_image-5.cc
b/milena/doc/examples/split/tuto3_rw_image-5.cc
new file mode 100644
index 0000000..d98037c
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_rw_image-5.cc
@@ -0,0 +1,2 @@
+ image2d<value::rgb8> lena;
+ io::ppm::load(lena, MLN_IMG_DIR "/small.ppm");
diff --git a/milena/doc/examples/split/tuto3_rw_image-6.cc
b/milena/doc/examples/split/tuto3_rw_image-6.cc
new file mode 100644
index 0000000..10eb29f
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_rw_image-6.cc
@@ -0,0 +1 @@
+ data::fill(ima, lena);
diff --git a/milena/doc/examples/split/tuto3_rw_image-7.cc
b/milena/doc/examples/split/tuto3_rw_image-7.cc
new file mode 100644
index 0000000..d362105
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_rw_image-7.cc
@@ -0,0 +1 @@
+ data::paste(ima, lena);
diff --git a/milena/doc/examples/split/tuto3_trace-1.cc
b/milena/doc/examples/split/tuto3_trace-1.cc
new file mode 100644
index 0000000..39a1013
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_trace-1.cc
@@ -0,0 +1,2 @@
+ // ...
+ trace::quiet = false;
diff --git a/milena/doc/examples/split/tuto3_trace-2.cc
b/milena/doc/examples/split/tuto3_trace-2.cc
new file mode 100644
index 0000000..a1e0739
--- /dev/null
+++ b/milena/doc/examples/split/tuto3_trace-2.cc
@@ -0,0 +1,6 @@
+ labeling::blobs(ima, c4(), nlabels);
+
+ trace::quiet = true;
+
+ geom::bbox(ima);
+ // ...
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-1.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-1.cc
new file mode 100644
index 0000000..d98037c
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-1.cc
@@ -0,0 +1,2 @@
+ image2d<value::rgb8> lena;
+ io::ppm::load(lena, MLN_IMG_DIR "/small.ppm");
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-10.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-10.cc
new file mode 100644
index 0000000..80225a9
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-10.cc
@@ -0,0 +1 @@
+ data::fill((lena | (pw::value(label) == pw::cst(0u))).rw(), literal::blue);
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-11.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-11.cc
new file mode 100644
index 0000000..6eb4e9b
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-11.cc
@@ -0,0 +1 @@
+ data::fill(extract::green(lena).rw(), literal::max);
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-12.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-12.cc
new file mode 100644
index 0000000..9091157
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-12.cc
@@ -0,0 +1,2 @@
+ mln_VAR(object, pw::value(label) == pw::cst(0u));
+ data::fill((extract::green(lena).rw() | object).rw(), literal::max);
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-2.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-2.cc
new file mode 100644
index 0000000..edae3e8
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-2.cc
@@ -0,0 +1 @@
+ box2d roi = make::box2d(20, 20, 40, 40);
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-3.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-3.cc
new file mode 100644
index 0000000..aaa7567
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-3.cc
@@ -0,0 +1 @@
+ data::fill((lena | roi).rw(), literal::green);
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-4.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-4.cc
new file mode 100644
index 0000000..888c001
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-4.cc
@@ -0,0 +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)
+ if (((row + col) % 2) == 0)
+ arr.append(point2d(row, col));
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-5.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-5.cc
new file mode 100644
index 0000000..6a17639
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-5.cc
@@ -0,0 +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)
+ if (((row + col) % 2) == 0)
+ opt::at(lena, row, col) = literal::green;
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-6.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-6.cc
new file mode 100644
index 0000000..2b72dd1
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-6.cc
@@ -0,0 +1 @@
+ data::fill((lena | fun::p2b::chess()).rw(), literal::green);
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-7.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-7.cc
new file mode 100644
index 0000000..e16190c
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-7.cc
@@ -0,0 +1,6 @@
+ image2d<bool> mask;
+ initialize(mask, lena);
+ data::fill(mask, false);
+ data::fill((mask | make::box2d(10, 10, 14, 14)).rw(), true);
+ data::fill((mask | make::box2d(25, 15, 29, 18)).rw(), true);
+ data::fill((mask | make::box2d(50, 50, 54, 54)).rw(), true);
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-8.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-8.cc
new file mode 100644
index 0000000..dd314f0
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-8.cc
@@ -0,0 +1 @@
+ data::fill((lena | pw::value(mask)).rw(), literal::green);
diff --git a/milena/doc/examples/split/tuto4_genericity_and_algorithms-9.cc
b/milena/doc/examples/split/tuto4_genericity_and_algorithms-9.cc
new file mode 100644
index 0000000..1fa2000
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_genericity_and_algorithms-9.cc
@@ -0,0 +1,3 @@
+ image2d<bool> lena_bw = binarization::binarization(lena,
keep_specific_colors());
+ value::label_8 nlabels;
+ image2d<value::label_8> label = labeling::blobs(lena_bw, c8(), nlabels);
diff --git a/milena/doc/examples/split/tuto4_point2d-1.cc
b/milena/doc/examples/split/tuto4_point2d-1.cc
new file mode 100644
index 0000000..70b9e9b
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_point2d-1.cc
@@ -0,0 +1,2 @@
+ point2d p(3,3);
+ std::cout << p << std::endl;
diff --git a/milena/doc/examples/split/tuto4_site_set_create-1.cc
b/milena/doc/examples/split/tuto4_site_set_create-1.cc
new file mode 100644
index 0000000..f0f498e
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_site_set_create-1.cc
@@ -0,0 +1 @@
+ box2d b(4,4);
diff --git a/milena/doc/examples/split/tuto4_site_set_create-2.cc
b/milena/doc/examples/split/tuto4_site_set_create-2.cc
new file mode 100644
index 0000000..06a04e3
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_site_set_create-2.cc
@@ -0,0 +1,3 @@
+ p_array<point2d> arr;
+ arr.append(point2d(2,2));
+ arr.append(point2d(1,2));
diff --git a/milena/doc/examples/split/tuto4_site_set_create-3.cc
b/milena/doc/examples/split/tuto4_site_set_create-3.cc
new file mode 100644
index 0000000..63ceee5
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_site_set_create-3.cc
@@ -0,0 +1,4 @@
+ mln_piter_(box2d) p(b);
+ for_all(p)
+ std::cout << p << ", ";
+ std::cout << std::endl;
diff --git a/milena/doc/examples/split/tuto4_site_set_create-4.cc
b/milena/doc/examples/split/tuto4_site_set_create-4.cc
new file mode 100644
index 0000000..1bbf4c0
--- /dev/null
+++ b/milena/doc/examples/split/tuto4_site_set_create-4.cc
@@ -0,0 +1 @@
+ box2d b = make::box2d(-2,-2, 2, 2);
diff --git a/milena/doc/examples/split/win-create-1-1.cc
b/milena/doc/examples/split/win-create-1-1.cc
new file mode 100644
index 0000000..cf1a894
--- /dev/null
+++ b/milena/doc/examples/split/win-create-1-1.cc
@@ -0,0 +1,4 @@
+ window2d win;
+ win.insert(-1, -1);
+ win.insert(-1, 0);
+ win.insert(-1, 1);
diff --git a/milena/doc/examples/split/win-create-2-1.cc
b/milena/doc/examples/split/win-create-2-1.cc
new file mode 100644
index 0000000..3bfcfc0
--- /dev/null
+++ b/milena/doc/examples/split/win-create-2-1.cc
@@ -0,0 +1,10 @@
+ bool b[9] = { 1, 0, 0,
+ 1, 0, 0,
+ 1, 0, 0 };
+
+ bool b2[3][3] = { { 1, 0, 0 },
+ { 1, 0, 0 },
+ { 1, 0, 0 } };
+
+ window2d win = convert::to<window2d>(b);
+ window2d win2 = convert::to<window2d>(b2);
diff --git a/milena/doc/outputs/split/graph-iter-1.txt
b/milena/doc/outputs/split/graph-iter-1.txt
new file mode 100644
index 0000000..4a0f8b8
--- /dev/null
+++ b/milena/doc/outputs/split/graph-iter-1.txt
@@ -0,0 +1,5 @@
+0 : 10
+1 : 11
+2 : 12
+3 : 13
+4 : 14
diff --git a/milena/doc/outputs/split/graph-iter-2.txt
b/milena/doc/outputs/split/graph-iter-2.txt
new file mode 100644
index 0000000..8cfdc82
--- /dev/null
+++ b/milena/doc/outputs/split/graph-iter-2.txt
@@ -0,0 +1,5 @@
+0 : (0,1)
+1 : (0,1) (1,2) (1,3)
+2 : (1,2) (2,4)
+3 : (1,3) (3,4)
+4 : (3,4) (2,4)
diff --git a/milena/doc/outputs/split/graph-iter-3.txt
b/milena/doc/outputs/split/graph-iter-3.txt
new file mode 100644
index 0000000..7a9fcff
--- /dev/null
+++ b/milena/doc/outputs/split/graph-iter-3.txt
@@ -0,0 +1,5 @@
+(0,1) : (1,2) (1,3)
+(1,2) : (0,1) (1,3) (2,4)
+(1,3) : (0,1) (1,2) (3,4)
+(3,4) : (1,3) (2,4)
+(2,4) : (1,2) (3,4)
diff --git a/milena/doc/outputs/split/graph-iter-4.txt
b/milena/doc/outputs/split/graph-iter-4.txt
new file mode 100644
index 0000000..b9c401f
--- /dev/null
+++ b/milena/doc/outputs/split/graph-iter-4.txt
@@ -0,0 +1,5 @@
+0 : 1
+1 : 0 2 3
+2 : 1 4
+3 : 1 4
+4 : 3 2
diff --git a/milena/doc/outputs/split/tuto3_println-1.txt
b/milena/doc/outputs/split/tuto3_println-1.txt
new file mode 100644
index 0000000..7ef416e
--- /dev/null
+++ b/milena/doc/outputs/split/tuto3_println-1.txt
@@ -0,0 +1,6 @@
+2 2 2 2 2
+2 2 2 2 2
+2 2 2 2 2
+2 2 2 2 2
+2 2 2 2 2
+
diff --git a/milena/doc/outputs/split/tuto3_println-2.txt
b/milena/doc/outputs/split/tuto3_println-2.txt
new file mode 100644
index 0000000..4d76ec4
--- /dev/null
+++ b/milena/doc/outputs/split/tuto3_println-2.txt
@@ -0,0 +1,12 @@
+7 7 7 7 7 7 7 7 7 7 7
+7 7 7 7 7 7 7 7 7 7 7
+7 7 7 7 7 7 7 7 7 7 7
+7 7 7 2 2 2 2 2 7 7 7
+7 7 7 2 2 2 2 2 7 7 7
+7 7 7 2 2 2 2 2 7 7 7
+7 7 7 2 2 2 2 2 7 7 7
+7 7 7 2 2 2 2 2 7 7 7
+7 7 7 7 7 7 7 7 7 7 7
+7 7 7 7 7 7 7 7 7 7 7
+7 7 7 7 7 7 7 7 7 7 7
+
diff --git a/milena/doc/ref_guide/Makefile.am b/milena/doc/ref_guide/Makefile.am
index 3849b1c..d77d1b2 100644
--- a/milena/doc/ref_guide/Makefile.am
+++ b/milena/doc/ref_guide/Makefile.am
@@ -18,18 +18,22 @@
.PHONY: ref-guide ref-guide-html
include $(top_srcdir)/milena/doc/doc.mk
-TEXINPUTS = $(DOC_SRCDIR):$(DOC_BUILDDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR):
+TEXINPUTS ="$(DOC_SRCDIR):$(DOC_BUILDDIR):$(OUTPUTS_SRCDIR):\
+$(SPLIT_OUTPUTS_SRCDIR):$(IMG_SRCDIR):$(SPLIT_EXAMPLES_SRCDIR):"
-ref-guide:
+ref-guide: $(FIGURES_SRCDIR)/* $(OUTPUTS_SRCDIR)/* ref-guide-pdf ref-guide-html
+
+
+ref-guide-pdf: ref_guide.pdf
+
+
+ref_guide.pdf:
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/ref_guide.tex
-ref_guide.pdf: ref-guide
-
-
ref-guide-html:
chmod u+x $(DOC_SRCDIR)/tools/todoxygen.sh
$(DOC_SRCDIR)/tools/todoxygen.sh $(srcdir)/ref_guide.tex $(DOC_BUILDDIR)/ref_guide
$(DOC_SRCDIR)
diff --git a/milena/doc/tools/split_sample.sh b/milena/doc/tools/split_sample.sh
index 20cfc82..9712f40 100755
--- a/milena/doc/tools/split_sample.sh
+++ b/milena/doc/tools/split_sample.sh
@@ -23,5 +23,5 @@ for begin in $begins; do
done
if [ $split ] && [ $i -gt 1 ]; then
- echo "* $1 has been splitted in $i files."
+ echo "* $1 has been split in $i files."
fi
diff --git a/milena/doc/tutorial/Makefile.am b/milena/doc/tutorial/Makefile.am
index 4aa44f0..eac50e9 100644
--- a/milena/doc/tutorial/Makefile.am
+++ b/milena/doc/tutorial/Makefile.am
@@ -21,25 +21,29 @@ include $(top_srcdir)/milena/doc/doc.mk
TEXINPUTS = $(DOC_SRCDIR):$(DOC_BUILDDIR):$(OUTPUTS_SRCDIR):$(IMG_SRCDIR):
-tutorial:
- TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex
- TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex
- TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex
+tutorial: $(FIGURES_SRCDIR)/* $(OUTPUTS_SRCDIR)/* tutorial-html tutorial-pdf
-tutorial.pdf: tutorial
+tutorial-pdf: tutorial.pdf
tutorial-html:
chmod u+x $(DOC_SRCDIR)/tools/todoxygen.sh
$(DOC_SRCDIR)/tools/todoxygen.sh $(srcdir)/tutorial.tex $(DOC_BUILDDIR)/tutorial
$(DOC_SRCDIR)
+tutorial.pdf:
+ TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex
+ TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex
+ TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/tutorial.tex
+
+
clean-local:
rm -f tutorial.aux tutorial.toc tutorial.log tutorial.bbl tutorial.out
rm -f *~ *blg *.lot
rm -f tutorial.pdf
rm -f *.haux *.hh *.html *.htoc
+ rm -f tutorial.haux tutorial.hh tutorial.html
EXTRA_DIST = \
diff --git a/milena/doc/white_paper/Makefile.am b/milena/doc/white_paper/Makefile.am
index 9e36a18..2dcf5bd 100644
--- a/milena/doc/white_paper/Makefile.am
+++ b/milena/doc/white_paper/Makefile.am
@@ -16,7 +16,7 @@
#
include $(top_srcdir)/milena/doc/doc.mk
-TEXINPUTS = $(DOC_SRCDIR):$(srcdir)/figures:
+TEXINPUTS=$(DOC_SRCDIR):$(srcdir):
PNGS = \
figures/house.png \
@@ -24,30 +24,37 @@ PNGS = \
figures/house_wshed.png \
figures/house_wshed_mean_colors.png
+#FIXME: we want to check if 'figures' exists only once!
.png.eps:
+ test -d figures || mkdir figures
convert $< $@
-.PHONY: white-paper white-paper-html
-white-paper:
- TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex
- TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex
- TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex
+.PHONY: white-paper white-paper-html white-paper-pdf
+
+white-paper: white-paper-pdf white-paper-html
+
-white-paper.pdf: white-paper
+white-paper-pdf: white_paper.pdf
white-paper-html: $(PNGS:png=eps)
- mkdir -p white_paper_html
- TEXINPUTS=$(TEXINPUTS) hevea -O -fix -I $(srcdir)/figures $(srcdir)/white_paper.tex -o
white_paper_html/index.html
+ test -d white_paper_html || mkdir white_paper_html
+ TEXINPUTS=$(TEXINPUTS) hevea -O -fix $(srcdir)/white_paper.tex -o
white_paper_html/index.html
chmod +x $(top_srcdir)/milena/doc/tools/clearbanner.sh
$(top_srcdir)/milena/doc/tools/clearbanner.sh white_paper_html/index.html
+
+white_paper.pdf:
+ TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex
+ TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex
+ TEXINPUTS=$(TEXINPUTS) pdflatex $(srcdir)/white_paper.tex
+
clean-local:
rm -Rf white_paper_html
- rm -f *.eps
rm -f white_paper_image.*
rm -f white_paper.pdf
rm -f *.log *.idx *.out *.aux
+ rm -Rf figures
EXTRA_DIST = \
white_paper.tex \
diff --git a/milena/doc/white_paper/white_paper.tex
b/milena/doc/white_paper/white_paper.tex
index 02467ca..fb230ae 100644
--- a/milena/doc/white_paper/white_paper.tex
+++ b/milena/doc/white_paper/white_paper.tex
@@ -114,10 +114,10 @@ images, that can be used as
\end{itemize}
\begin{center}
- \includegraphics[width=2.5cm]{house}%
- \includegraphics[width=2.5cm]{house_wshed}%
- \includegraphics[width=2.5cm]{house_wshed_mean_colors}%
- \includegraphics[width=2.5cm]{house_rag}%
+ \includegraphics[width=2.5cm]{figures/house}%
+ \includegraphics[width=2.5cm]{figures/house_wshed}%
+ \includegraphics[width=2.5cm]{figures/house_wshed_mean_colors}%
+ \includegraphics[width=2.5cm]{figures/house_rag}%
\end{center}
%=================================================================
--
1.5.6.5