* build-aux/generate_dist_headers.sh: No longer handle the third
argument (list of non-distributed files).
* milena/Makefile.am,
* scribo/Makefile.am
(regen-am, $(srcdir)/headers.mk): Adjust.
(EXTRA_DIST): Remove nodist-headers.
* milena/headers.mk,
* scribo/headers.mk:
Regen.
* milena/nodist-headers,
* scribo/nodist-headers:
Remove.
* milena/mln/accu/math/inf.hh,
* milena/mln/accu/math/sup.hh,
* milena/mln/core/image/vmorph/thru_image.hh,
* milena/mln/core/image/vmorph/thrubin_image.hh,
* milena/mln/data/was.median.hh,
* milena/mln/extract/all.hh,
* milena/mln/extract/blue.hh,
* milena/mln/extract/essential.hh,
* milena/mln/extract/green.hh,
* milena/mln/extract/hue.hh,
* milena/mln/extract/lum.hh,
* milena/mln/extract/red.hh,
* milena/mln/extract/sat.hh,
* milena/mln/fun/access/all.hh,
* milena/mln/fun/access/mean.hh,
* milena/mln/fun/accu_result.hh,
* milena/mln/fun/binary.hh,
* milena/mln/fun/binary_param.hh,
* milena/mln/fun/component/blue.hh,
* milena/mln/fun/component/comp.hh,
* milena/mln/fun/component/comp_count.hh,
* milena/mln/fun/component/green.hh,
* milena/mln/fun/component/ithcomp.hh,
* milena/mln/fun/component/red.hh,
* milena/mln/fun/component/rgb.hh,
* milena/mln/fun/component/scomp.hh,
* milena/mln/fun/compose.hh,
* milena/mln/fun/composition.hh,
* milena/mln/fun/from_accu.hh,
* milena/mln/fun/math/abs.hh,
* milena/mln/fun/math/cos.hh,
* milena/mln/fun/math/inf.hh,
* milena/mln/fun/math/norm.hh,
* milena/mln/fun/math/sup.hh,
* milena/mln/fun/meta/all.hh,
* milena/mln/fun/meta/blue.hh,
* milena/mln/fun/meta/essential.hh,
* milena/mln/fun/meta/first.hh,
* milena/mln/fun/meta/green.hh,
* milena/mln/fun/meta/hue.hh,
* milena/mln/fun/meta/inty.hh,
* milena/mln/fun/meta/lum.hh,
* milena/mln/fun/meta/red.hh,
* milena/mln/fun/meta/sat.hh,
* milena/mln/fun/meta/second.hh,
* milena/mln/fun/meta/to_enc.hh,
* milena/mln/fun/param.hh,
* milena/mln/fun/point/col.hh,
* milena/mln/fun/point/row.hh,
* milena/mln/fun/point/sli.hh,
* milena/mln/fun/spe/binary.hh,
* milena/mln/fun/spe/unary.hh,
* milena/mln/fun/unary.hh,
* milena/mln/fun/unary_param.hh,
* milena/mln/fun/v2v/hsi_to_rgb.hh,
* milena/mln/fun/v2v/rgb_to_hsi.hh,
* milena/mln/linear/gaussian/filter.hh,
* milena/mln/linear/gaussian/impl.hh,
* milena/mln/linear/gaussian/internal/coefficients.hh,
* milena/mln/registration/all.hh,
* milena/mln/registration/essential.hh,
* milena/mln/registration/get_rot.hh,
* milena/mln/registration/get_rtransf.hh,
* milena/mln/registration/icp.hh,
* milena/mln/registration/internal/rms.hh,
* milena/mln/registration/registration.hh,
* milena/mln/subsampling/all.hh,
* milena/mln/subsampling/essential.hh,
* milena/mln/subsampling/gaussian_subsampling.hh,
* milena/mln/subsampling/subsampling.hh,
* milena/mln/trait/functions.hh,
* milena/mln/trait/next/solve.hh,
* milena/mln/trait/next/solve_binary.hh,
* milena/mln/trait/next/solve_proxy.hh,
* milena/mln/trait/next/solve_unary.hh,
* milena/mln/value/hsi.hh,
* milena/mln/value/shell.hh,
* milena/mln/value/stack.hh,
Remove.
* milena/tests/unit_test/unit-tests.mk: Regen.
---
ChangeLog | 97 +++
build-aux/generate_dist_headers.sh | 44 +-
milena/Makefile.am | 11 +-
milena/headers.mk | 94 +---
milena/mln/accu/math/inf.hh | 178 -----
milena/mln/accu/math/sup.hh | 180 -----
milena/mln/core/image/vmorph/thru_image.hh | 319 ---------
milena/mln/core/image/vmorph/thrubin_image.hh | 254 -------
milena/mln/data/was.median.hh | 207 ------
milena/mln/extract/all.hh | 51 --
milena/mln/extract/blue.hh | 63 --
milena/mln/extract/essential.hh | 36 -
milena/mln/extract/green.hh | 63 --
milena/mln/extract/hue.hh | 63 --
milena/mln/extract/lum.hh | 63 --
milena/mln/extract/red.hh | 63 --
milena/mln/extract/sat.hh | 63 --
milena/mln/fun/access/all.hh | 50 --
milena/mln/fun/access/mean.hh | 89 ---
milena/mln/fun/accu_result.hh | 70 --
milena/mln/fun/binary.hh | 92 ---
milena/mln/fun/binary_param.hh | 100 ---
milena/mln/fun/component/blue.hh | 81 ---
milena/mln/fun/component/comp.hh | 108 ---
milena/mln/fun/component/comp_count.hh | 96 ---
milena/mln/fun/component/green.hh | 81 ---
milena/mln/fun/component/ithcomp.hh | 80 ---
milena/mln/fun/component/red.hh | 81 ---
milena/mln/fun/component/rgb.hh | 37 -
milena/mln/fun/component/scomp.hh | 87 ---
milena/mln/fun/compose.hh | 115 ----
milena/mln/fun/composition.hh | 221 ------
milena/mln/fun/from_accu.hh | 136 ----
milena/mln/fun/math/abs.hh | 67 --
milena/mln/fun/math/cos.hh | 89 ---
milena/mln/fun/math/inf.hh | 67 --
milena/mln/fun/math/norm.hh | 117 ----
milena/mln/fun/math/sup.hh | 67 --
milena/mln/fun/meta/all.hh | 51 --
milena/mln/fun/meta/blue.hh | 90 ---
milena/mln/fun/meta/essential.hh | 31 -
milena/mln/fun/meta/first.hh | 90 ---
milena/mln/fun/meta/green.hh | 90 ---
milena/mln/fun/meta/hue.hh | 119 ----
milena/mln/fun/meta/inty.hh | 88 ---
milena/mln/fun/meta/lum.hh | 88 ---
milena/mln/fun/meta/red.hh | 90 ---
milena/mln/fun/meta/sat.hh | 122 ----
milena/mln/fun/meta/second.hh | 90 ---
milena/mln/fun/meta/to_enc.hh | 77 ---
milena/mln/fun/param.hh | 86 ---
milena/mln/fun/point/col.hh | 83 ---
milena/mln/fun/point/row.hh | 81 ---
milena/mln/fun/point/sli.hh | 81 ---
milena/mln/fun/spe/binary.hh | 145 ----
milena/mln/fun/spe/unary.hh | 334 ---------
milena/mln/fun/unary.hh | 175 -----
milena/mln/fun/unary_param.hh | 100 ---
milena/mln/fun/v2v/hsi_to_rgb.hh | 134 ----
milena/mln/fun/v2v/rgb_to_hsi.hh | 124 ----
milena/mln/linear/gaussian/filter.hh | 140 ----
milena/mln/linear/gaussian/impl.hh | 460 -------------
.../mln/linear/gaussian/internal/coefficients.hh | 298 --------
milena/mln/registration/all.hh | 48 --
milena/mln/registration/essential.hh | 36 -
milena/mln/registration/get_rot.hh | 151 ----
milena/mln/registration/get_rtransf.hh | 94 ---
milena/mln/registration/icp.hh | 723 --------------------
milena/mln/registration/internal/rms.hh | 80 ---
milena/mln/registration/registration.hh | 391 -----------
milena/mln/subsampling/all.hh | 47 --
milena/mln/subsampling/essential.hh | 35 -
milena/mln/subsampling/gaussian_subsampling.hh | 90 ---
milena/mln/subsampling/subsampling.hh | 114 ---
milena/mln/trait/functions.hh | 251 -------
milena/mln/trait/next/solve.hh | 146 ----
milena/mln/trait/next/solve_binary.hh | 300 --------
milena/mln/trait/next/solve_proxy.hh | 98 ---
milena/mln/trait/next/solve_unary.hh | 170 -----
milena/mln/value/hsi.hh | 113 ---
milena/mln/value/shell.hh | 164 -----
milena/mln/value/stack.hh | 334 ---------
milena/nodist-headers | 84 ---
milena/tests/unit_test/unit-tests.mk | 156 -----
scribo/Makefile.am | 9 +-
scribo/headers.mk | 4 -
86 files changed, 117 insertions(+), 10568 deletions(-)
delete mode 100644 milena/mln/accu/math/inf.hh
delete mode 100644 milena/mln/accu/math/sup.hh
delete mode 100644 milena/mln/core/image/vmorph/thru_image.hh
delete mode 100644 milena/mln/core/image/vmorph/thrubin_image.hh
delete mode 100644 milena/mln/data/was.median.hh
delete mode 100644 milena/mln/extract/all.hh
delete mode 100644 milena/mln/extract/blue.hh
delete mode 100644 milena/mln/extract/essential.hh
delete mode 100644 milena/mln/extract/green.hh
delete mode 100644 milena/mln/extract/hue.hh
delete mode 100644 milena/mln/extract/lum.hh
delete mode 100644 milena/mln/extract/red.hh
delete mode 100644 milena/mln/extract/sat.hh
delete mode 100644 milena/mln/fun/access/all.hh
delete mode 100644 milena/mln/fun/access/mean.hh
delete mode 100644 milena/mln/fun/accu_result.hh
delete mode 100644 milena/mln/fun/binary.hh
delete mode 100644 milena/mln/fun/binary_param.hh
delete mode 100644 milena/mln/fun/component/blue.hh
delete mode 100644 milena/mln/fun/component/comp.hh
delete mode 100644 milena/mln/fun/component/comp_count.hh
delete mode 100644 milena/mln/fun/component/green.hh
delete mode 100644 milena/mln/fun/component/ithcomp.hh
delete mode 100644 milena/mln/fun/component/red.hh
delete mode 100644 milena/mln/fun/component/rgb.hh
delete mode 100644 milena/mln/fun/component/scomp.hh
delete mode 100644 milena/mln/fun/compose.hh
delete mode 100644 milena/mln/fun/composition.hh
delete mode 100644 milena/mln/fun/from_accu.hh
delete mode 100644 milena/mln/fun/math/abs.hh
delete mode 100644 milena/mln/fun/math/cos.hh
delete mode 100644 milena/mln/fun/math/inf.hh
delete mode 100644 milena/mln/fun/math/norm.hh
delete mode 100644 milena/mln/fun/math/sup.hh
delete mode 100644 milena/mln/fun/meta/all.hh
delete mode 100644 milena/mln/fun/meta/blue.hh
delete mode 100644 milena/mln/fun/meta/essential.hh
delete mode 100644 milena/mln/fun/meta/first.hh
delete mode 100644 milena/mln/fun/meta/green.hh
delete mode 100644 milena/mln/fun/meta/hue.hh
delete mode 100644 milena/mln/fun/meta/inty.hh
delete mode 100644 milena/mln/fun/meta/lum.hh
delete mode 100644 milena/mln/fun/meta/red.hh
delete mode 100644 milena/mln/fun/meta/sat.hh
delete mode 100644 milena/mln/fun/meta/second.hh
delete mode 100644 milena/mln/fun/meta/to_enc.hh
delete mode 100644 milena/mln/fun/param.hh
delete mode 100644 milena/mln/fun/point/col.hh
delete mode 100644 milena/mln/fun/point/row.hh
delete mode 100644 milena/mln/fun/point/sli.hh
delete mode 100644 milena/mln/fun/spe/binary.hh
delete mode 100644 milena/mln/fun/spe/unary.hh
delete mode 100644 milena/mln/fun/unary.hh
delete mode 100644 milena/mln/fun/unary_param.hh
delete mode 100644 milena/mln/fun/v2v/hsi_to_rgb.hh
delete mode 100644 milena/mln/fun/v2v/rgb_to_hsi.hh
delete mode 100644 milena/mln/linear/gaussian/filter.hh
delete mode 100644 milena/mln/linear/gaussian/impl.hh
delete mode 100644 milena/mln/linear/gaussian/internal/coefficients.hh
delete mode 100644 milena/mln/registration/all.hh
delete mode 100644 milena/mln/registration/essential.hh
delete mode 100644 milena/mln/registration/get_rot.hh
delete mode 100644 milena/mln/registration/get_rtransf.hh
delete mode 100644 milena/mln/registration/icp.hh
delete mode 100644 milena/mln/registration/internal/rms.hh
delete mode 100644 milena/mln/registration/registration.hh
delete mode 100644 milena/mln/subsampling/all.hh
delete mode 100644 milena/mln/subsampling/essential.hh
delete mode 100644 milena/mln/subsampling/gaussian_subsampling.hh
delete mode 100644 milena/mln/subsampling/subsampling.hh
delete mode 100644 milena/mln/trait/functions.hh
delete mode 100644 milena/mln/trait/next/solve.hh
delete mode 100644 milena/mln/trait/next/solve_binary.hh
delete mode 100644 milena/mln/trait/next/solve_proxy.hh
delete mode 100644 milena/mln/trait/next/solve_unary.hh
delete mode 100644 milena/mln/value/hsi.hh
delete mode 100644 milena/mln/value/shell.hh
delete mode 100644 milena/mln/value/stack.hh
delete mode 100644 milena/nodist-headers
delete mode 100644 scribo/nodist-headers
diff --git a/ChangeLog b/ChangeLog
index f73582f..9b0ab2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,102 @@
2012-06-11 Roland Levillain <roland(a)lrde.epita.fr>
+ Remove non-distributed headers not required by Milena nor Scribo.
+
+ * build-aux/generate_dist_headers.sh: No longer handle the third
+ argument (list of non-distributed files).
+ * milena/Makefile.am,
+ * scribo/Makefile.am
+ (regen-am, $(srcdir)/headers.mk): Adjust.
+ (EXTRA_DIST): Remove nodist-headers.
+ * milena/headers.mk,
+ * scribo/headers.mk:
+ Regen.
+ * milena/nodist-headers,
+ * scribo/nodist-headers:
+ Remove.
+ * milena/mln/accu/math/inf.hh,
+ * milena/mln/accu/math/sup.hh,
+ * milena/mln/core/image/vmorph/thru_image.hh,
+ * milena/mln/core/image/vmorph/thrubin_image.hh,
+ * milena/mln/data/was.median.hh,
+ * milena/mln/extract/all.hh,
+ * milena/mln/extract/blue.hh,
+ * milena/mln/extract/essential.hh,
+ * milena/mln/extract/green.hh,
+ * milena/mln/extract/hue.hh,
+ * milena/mln/extract/lum.hh,
+ * milena/mln/extract/red.hh,
+ * milena/mln/extract/sat.hh,
+ * milena/mln/fun/access/all.hh,
+ * milena/mln/fun/access/mean.hh,
+ * milena/mln/fun/accu_result.hh,
+ * milena/mln/fun/binary.hh,
+ * milena/mln/fun/binary_param.hh,
+ * milena/mln/fun/component/blue.hh,
+ * milena/mln/fun/component/comp.hh,
+ * milena/mln/fun/component/comp_count.hh,
+ * milena/mln/fun/component/green.hh,
+ * milena/mln/fun/component/ithcomp.hh,
+ * milena/mln/fun/component/red.hh,
+ * milena/mln/fun/component/rgb.hh,
+ * milena/mln/fun/component/scomp.hh,
+ * milena/mln/fun/compose.hh,
+ * milena/mln/fun/composition.hh,
+ * milena/mln/fun/from_accu.hh,
+ * milena/mln/fun/math/abs.hh,
+ * milena/mln/fun/math/cos.hh,
+ * milena/mln/fun/math/inf.hh,
+ * milena/mln/fun/math/norm.hh,
+ * milena/mln/fun/math/sup.hh,
+ * milena/mln/fun/meta/all.hh,
+ * milena/mln/fun/meta/blue.hh,
+ * milena/mln/fun/meta/essential.hh,
+ * milena/mln/fun/meta/first.hh,
+ * milena/mln/fun/meta/green.hh,
+ * milena/mln/fun/meta/hue.hh,
+ * milena/mln/fun/meta/inty.hh,
+ * milena/mln/fun/meta/lum.hh,
+ * milena/mln/fun/meta/red.hh,
+ * milena/mln/fun/meta/sat.hh,
+ * milena/mln/fun/meta/second.hh,
+ * milena/mln/fun/meta/to_enc.hh,
+ * milena/mln/fun/param.hh,
+ * milena/mln/fun/point/col.hh,
+ * milena/mln/fun/point/row.hh,
+ * milena/mln/fun/point/sli.hh,
+ * milena/mln/fun/spe/binary.hh,
+ * milena/mln/fun/spe/unary.hh,
+ * milena/mln/fun/unary.hh,
+ * milena/mln/fun/unary_param.hh,
+ * milena/mln/fun/v2v/hsi_to_rgb.hh,
+ * milena/mln/fun/v2v/rgb_to_hsi.hh,
+ * milena/mln/linear/gaussian/filter.hh,
+ * milena/mln/linear/gaussian/impl.hh,
+ * milena/mln/linear/gaussian/internal/coefficients.hh,
+ * milena/mln/registration/all.hh,
+ * milena/mln/registration/essential.hh,
+ * milena/mln/registration/get_rot.hh,
+ * milena/mln/registration/get_rtransf.hh,
+ * milena/mln/registration/icp.hh,
+ * milena/mln/registration/internal/rms.hh,
+ * milena/mln/registration/registration.hh,
+ * milena/mln/subsampling/all.hh,
+ * milena/mln/subsampling/essential.hh,
+ * milena/mln/subsampling/gaussian_subsampling.hh,
+ * milena/mln/subsampling/subsampling.hh,
+ * milena/mln/trait/functions.hh,
+ * milena/mln/trait/next/solve.hh,
+ * milena/mln/trait/next/solve_binary.hh,
+ * milena/mln/trait/next/solve_proxy.hh,
+ * milena/mln/trait/next/solve_unary.hh,
+ * milena/mln/value/hsi.hh,
+ * milena/mln/value/shell.hh,
+ * milena/mln/value/stack.hh,
+ Remove.
+ * milena/tests/unit_test/unit-tests.mk: Regen.
+
+2012-06-11 Roland Levillain <roland(a)lrde.epita.fr>
+
Strip and remove files to match distributed files.
* configure.ac,
diff --git a/build-aux/generate_dist_headers.sh b/build-aux/generate_dist_headers.sh
index de78882..e257a22 100755
--- a/build-aux/generate_dist_headers.sh
+++ b/build-aux/generate_dist_headers.sh
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2009, 2012 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -25,26 +25,23 @@
# Use the C locale to have a deterministic sort.
export LC_ALL=C
-if [ $# -ne 3 ] && [ $# -ne 5 ]; then
- echo "$0 <scanned_dir> <output> <nodist-headers> [<module
name> <inc_path>]"
+if [ $# -ne 2 ] && [ $# -ne 4 ]; then
+ echo "Usage: $0 <scanned_dir> <output> [<module name>
<inc_path>]"
exit 1
fi
me=`basename $0`
scanned_dir=$1
output=$2
-nodist_headers=$3
-test -f "$nodist_headers" \
- || { echo "$me: Cannot find \`$nodist_headers' in `pwd`."; exit 1; }
echo "Generating $output..." >&2
rm -f "$output"
-if [ $# -eq 5 ]; then
+if [ $# -eq 4 ]; then
cat <<EOF > "$output"
## Generated by \`$me', do not edit by hand.
-$4dir = \$(includedir)/$5
-nobase_$4_HEADERS = \\
+$3dir = \$(includedir)/$4
+nobase_$3_HEADERS = \\
EOF
else
cat <<EOF > "$output"
@@ -57,7 +54,6 @@ fi
find $scanned_dir -type f -a \( -name '*.hh' -o -name '*.hxx' \) \
| sort \
- | comm -23 - "$nodist_headers" \
| sed -e 's/$/ \\/g' >> $output
@@ -65,31 +61,3 @@ last_line=`tail -n 1 $output | sed -e 's/\\\//g'` # remove
'\' in last line
sed '$d' < $output > $output.tmp # remove last line
mv $output.tmp $output
echo $last_line >> $output # put the cleaned last line back.
-
-
-# Add non distributed files to installed headers list.
-#
-# Non distributed headers will be installed if the installation
-# process is launched from the repository copy.
-if [ $# -eq 5 ]; then
- cat <<EOF >> "$output"
-
-#<<lrde
-nobase_$4_HEADERS += \\
-EOF
-else
- cat <<EOF >> "$output"
-
-#<<lrde
-nobase_include_HEADERS += \\
-EOF
-fi
-
-cat $nodist_headers | sed -e 's/$/ \\/g' >> $output
-
-last_line=`tail -n 1 $output | sed -e 's/\\\//g'` # remove '\' in last
line
-sed '$d' < $output > $output.tmp # remove last line
-mv $output.tmp $output
-echo $last_line >> $output # put the cleaned last line back.
-
-echo "#>>" >> $output
\ No newline at end of file
diff --git a/milena/Makefile.am b/milena/Makefile.am
index 99f5268..8c6b58b 100644
--- a/milena/Makefile.am
+++ b/milena/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+# Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
# Laboratory (LRDE).
#
# This file is part of Olena.
@@ -63,17 +63,16 @@ REGEN_SUBDIRS += doc tests
regen-am:
cd $(srcdir) \
&& $(abs_top_srcdir)/build-aux/generate_dist_headers.sh \
- mln headers.mk nodist-headers
+ mln headers.mk
-EXTRA_DIST = nodist-headers
# FIXME: Change generate_dist_headers.sh so that the action looks like this:
#
# $< $@.tmp && mv -f $@.tmp $@ && chmod -w $@
#
-$(srcdir)/headers.mk: $(top_srcdir)/build-aux/generate_dist_headers.sh nodist-headers
+$(srcdir)/headers.mk: $(top_srcdir)/build-aux/generate_dist_headers.sh
cd $(srcdir) \
&& $(abs_top_srcdir)/build-aux/generate_dist_headers.sh \
- mln headers.mk nodist-headers
+ mln headers.mk
include $(srcdir)/headers.mk
@@ -107,7 +106,7 @@ dist_img_DATA = \
img/tiny.ppm \
img/toto.pbm
-EXTRA_DIST += \
+EXTRA_DIST = \
tests/img/test_rgb8.tif \
tests/img/test_bw.tif \
tests/img/test_gl.tif
diff --git a/milena/headers.mk b/milena/headers.mk
index c3d75ab..3d93101 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -554,6 +554,7 @@ mln/fun/v2v/convert.hh \
mln/fun/v2v/dec.hh \
mln/fun/v2v/enc.hh \
mln/fun/v2v/essential.hh \
+mln/fun/v2v/hsl_to_rgb.hh \
mln/fun/v2v/id.hh \
mln/fun/v2v/inc.hh \
mln/fun/v2v/linear.hh \
@@ -561,6 +562,7 @@ mln/fun/v2v/norm.hh \
mln/fun/v2v/projection.hh \
mln/fun/v2v/qt_rgb_to_int_u.hh \
mln/fun/v2v/rgb8_to_rgbn.hh \
+mln/fun/v2v/rgb_to_hsl.hh \
mln/fun/v2v/rgb_to_int_u.hh \
mln/fun/v2v/rgb_to_luma.hh \
mln/fun/v2v/saturate.hh \
@@ -740,6 +742,9 @@ mln/linear/convolve.hh \
mln/linear/convolve_2x1d.hh \
mln/linear/convolve_directional.hh \
mln/linear/essential.hh \
+mln/linear/gaussian.hh \
+mln/linear/gaussian_1d.hh \
+mln/linear/gaussian_directional_2d.hh \
mln/linear/lap.hh \
mln/linear/local/convolve.hh \
mln/linear/log.hh \
@@ -1207,6 +1212,7 @@ mln/value/gl8.hh \
mln/value/glf.hh \
mln/value/graylevel.hh \
mln/value/graylevel_f.hh \
+mln/value/hsl.hh \
mln/value/int_s.hh \
mln/value/int_s16.hh \
mln/value/int_s32.hh \
@@ -1293,91 +1299,3 @@ mln/world/inter_pixel/neighb2d.hh \
mln/world/inter_pixel/separator_to_pixels.hh \
mln/world/rgb/invert.hh \
mln/world/rgb/invert.spe.hh
-
-#<<lrde
-nobase_include_HEADERS += \
-mln/accu/math/inf.hh \
-mln/accu/math/sup.hh \
-mln/core/image/vmorph/thru_image.hh \
-mln/core/image/vmorph/thrubin_image.hh \
-mln/data/was.median.hh \
-mln/extract/all.hh \
-mln/extract/blue.hh \
-mln/extract/essential.hh \
-mln/extract/green.hh \
-mln/extract/hue.hh \
-mln/extract/lum.hh \
-mln/extract/red.hh \
-mln/extract/sat.hh \
-mln/fun/access/all.hh \
-mln/fun/access/mean.hh \
-mln/fun/accu_result.hh \
-mln/fun/binary.hh \
-mln/fun/binary_param.hh \
-mln/fun/component/blue.hh \
-mln/fun/component/comp.hh \
-mln/fun/component/comp_count.hh \
-mln/fun/component/green.hh \
-mln/fun/component/ithcomp.hh \
-mln/fun/component/red.hh \
-mln/fun/component/rgb.hh \
-mln/fun/component/scomp.hh \
-mln/fun/compose.hh \
-mln/fun/composition.hh \
-mln/fun/from_accu.hh \
-mln/fun/math/abs.hh \
-mln/fun/math/cos.hh \
-mln/fun/math/inf.hh \
-mln/fun/math/norm.hh \
-mln/fun/math/sup.hh \
-mln/fun/meta/all.hh \
-mln/fun/meta/blue.hh \
-mln/fun/meta/essential.hh \
-mln/fun/meta/first.hh \
-mln/fun/meta/green.hh \
-mln/fun/meta/hue.hh \
-mln/fun/meta/inty.hh \
-mln/fun/meta/lum.hh \
-mln/fun/meta/red.hh \
-mln/fun/meta/sat.hh \
-mln/fun/meta/second.hh \
-mln/fun/meta/to_enc.hh \
-mln/fun/param.hh \
-mln/fun/point/col.hh \
-mln/fun/point/row.hh \
-mln/fun/point/sli.hh \
-mln/fun/spe/binary.hh \
-mln/fun/spe/unary.hh \
-mln/fun/unary.hh \
-mln/fun/unary_param.hh \
-mln/fun/v2v/hsi_to_rgb.hh \
-mln/fun/v2v/hsl_to_rgb.hh \
-mln/fun/v2v/rgb_to_hsi.hh \
-mln/fun/v2v/rgb_to_hsl.hh \
-mln/linear/gaussian.hh \
-mln/linear/gaussian/filter.hh \
-mln/linear/gaussian/impl.hh \
-mln/linear/gaussian/internal/coefficients.hh \
-mln/linear/gaussian_1d.hh \
-mln/linear/gaussian_directional_2d.hh \
-mln/registration/all.hh \
-mln/registration/essential.hh \
-mln/registration/get_rot.hh \
-mln/registration/get_rtransf.hh \
-mln/registration/icp.hh \
-mln/registration/internal/rms.hh \
-mln/registration/registration.hh \
-mln/subsampling/all.hh \
-mln/subsampling/essential.hh \
-mln/subsampling/gaussian_subsampling.hh \
-mln/subsampling/subsampling.hh \
-mln/trait/functions.hh \
-mln/trait/next/solve.hh \
-mln/trait/next/solve_binary.hh \
-mln/trait/next/solve_proxy.hh \
-mln/trait/next/solve_unary.hh \
-mln/value/hsi.hh \
-mln/value/hsl.hh \
-mln/value/shell.hh \
-mln/value/stack.hh
-#>>
diff --git a/milena/mln/accu/math/inf.hh b/milena/mln/accu/math/inf.hh
deleted file mode 100644
index 17780b9..0000000
--- a/milena/mln/accu/math/inf.hh
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_ACCU_MATH_INF_HH
-# define MLN_ACCU_MATH_INF_HH
-
-/// \file
-///
-/// Define an accumulator that computes a inf.
-
-# include <mln/accu/internal/base.hh>
-# include <mln/core/concept/meta_accumulator.hh>
-# include <mln/trait/value_.hh>
-# include <mln/util/pix.hh>
-# include <mln/fun/math/inf.hh>
-
-namespace mln
-{
-
- namespace accu
- {
-
- namespace math
- {
-
-
- /// \brief Generic inf accumulator class.
- ///
- /// The parameter \c T is the type of values.
- ///
- /// \ingroup modaccuvalues
- //
- template <typename T>
- struct inf : public mln::accu::internal::base< const T&, inf<T> >
- {
- typedef T argument;
-
- inf();
-
- /// Manipulators.
- /// \{
- void init();
- void take_as_init_(const argument& t);
- void take(const argument& t);
- void take(const inf<T>& other);
- /// \}
-
- /// Get the value of the accumulator.
- const T& to_result() const;
-
- /// Check whether this accu is able to return a result.
- /// Always true here.
- bool is_valid() const;
-
- protected:
-
- T t_;
- typename mln::fun::inf::with<T, T>::ret fun_;
- };
-
-
- template <typename I> struct inf< util::pix<I> >;
-
- } // end of mln::accu::math
-
-
- namespace meta
- {
-
- namespace math
- {
-
- /// Meta accumulator for inf.
-
- struct inf : public Meta_Accumulator< inf >
- {
- template <typename T>
- struct with
- {
- typedef accu::math::inf<T> ret;
- };
- };
-
- } // end of namespace mln::accu::meta::math
-
- } // end of namespace mln::accu::meta
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace math
- {
-
- template <typename T>
- inline
- inf<T>::inf()
- {
- init();
- }
-
- template <typename T>
- inline
- void
- inf<T>::init()
- {
- t_ = mln_max(T);
- }
-
- template <typename T>
- inline
- void inf<T>::take_as_init_(const argument& t)
- {
- t_ = t;
- }
-
- template <typename T>
- inline
- void inf<T>::take(const argument& t)
- {
- this->t_ = this->fun_(t_, t);
- }
-
- template <typename T>
- inline
- void
- inf<T>::take(const inf<T>& other)
- {
- this->t_ = this->fun_(t_, other.t_);
- }
-
- template <typename T>
- inline
- const T&
- inf<T>::to_result() const
- {
- return t_;
- }
-
- template <typename T>
- inline
- bool
- inf<T>::is_valid() const
- {
- return true;
- }
-
- } // end of namespace mln::accu::math
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::accu
-
-} // end of namespace mln
-
-
-#endif // ! MLN_ACCU_MATH_INF_HH
diff --git a/milena/mln/accu/math/sup.hh b/milena/mln/accu/math/sup.hh
deleted file mode 100644
index 7ebcff2..0000000
--- a/milena/mln/accu/math/sup.hh
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_ACCU_MATH_SUP_HH
-# define MLN_ACCU_MATH_SUP_HH
-
-/// \file
-///
-/// Define an accumulator that computes a sup.
-
-# include <mln/accu/internal/base.hh>
-# include <mln/core/concept/meta_accumulator.hh>
-# include <mln/trait/value_.hh>
-# include <mln/util/pix.hh>
-# include <mln/fun/math/sup.hh>
-
-namespace mln
-{
-
- namespace accu
- {
-
- namespace math
- {
-
-
- /// \brief Generic sup accumulator class.
- /*!
- * The parameter \c T is the type of values.
- *
- * \ingroup modaccuvalues
- */
- template <typename T>
- struct sup : public mln::accu::internal::base< const T&, sup<T> >
- {
- typedef T argument;
-
- sup();
-
- /// Manipulators.
- /// \{
- void init();
- void take_as_init_(const argument& t);
- void take(const argument& t);
- void take(const sup<T>& other);
- /// \}
-
- /// Get the value of the accumulator.
- const T& to_result() const;
-
- /// Check whether this accu is able to return a result.
- /// Always true here.
- bool is_valid() const;
-
- protected:
-
- T t_;
- typename mln::fun::sup::with<T, T>::ret fun_;
- };
-
-
- template <typename I> struct sup< util::pix<I> >;
-
-
- } // end of mln::accu::math
-
-
- namespace meta
- {
-
- namespace math
- {
-
- /// Meta accumulator for sup.
-
- struct sup : public Meta_Accumulator< sup >
- {
- template <typename T>
- struct with
- {
- typedef accu::math::sup<T> ret;
- };
- };
-
- } // end of namespace mln::accu::meta::math
-
- } // end of namespace mln::accu::meta
-
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace math
- {
-
- template <typename T>
- inline
- sup<T>::sup()
- {
- init();
- }
-
- template <typename T>
- inline
- void
- sup<T>::init()
- {
- t_ = mln_min(T);
- }
-
- template <typename T>
- inline
- void sup<T>::take_as_init_(const argument& t)
- {
- t_ = t;
- }
-
- template <typename T>
- inline
- void sup<T>::take(const argument& t)
- {
- this->t_ = this->fun_(t_, t);
- }
-
- template <typename T>
- inline
- void
- sup<T>::take(const sup<T>& other)
- {
- this->t_ = this->fun_(t_, other.t_);
- }
-
- template <typename T>
- inline
- const T&
- sup<T>::to_result() const
- {
- return t_;
- }
-
- template <typename T>
- inline
- bool
- sup<T>::is_valid() const
- {
- return true;
- }
-
- } // end of namespace mln::accu::math
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::accu
-
-} // end of namespace mln
-
-
-#endif // ! MLN_ACCU_MATH_SUP_HH
diff --git a/milena/mln/core/image/vmorph/thru_image.hh
b/milena/mln/core/image/vmorph/thru_image.hh
deleted file mode 100644
index e829b27..0000000
--- a/milena/mln/core/image/vmorph/thru_image.hh
+++ /dev/null
@@ -1,319 +0,0 @@
-// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_CORE_IMAGE_VMORPH_THRU_IMAGE_HH
-# define MLN_CORE_IMAGE_VMORPH_THRU_IMAGE_HH
-
-/// \file
-///
-/// \brief Definition of a morpher that morph image values through a function.
-///
-/// \todo Debug constness of thru_image
-
-# include <mln/core/internal/image_value_morpher.hh>
-# include <mln/core/concept/meta_function.hh>
-# include <mln/metal/bexpr.hh>
-# include <mln/trait/functions.hh>
-
-
-namespace mln
-{
-
- // Forward declaration.
- template <typename I, typename F> class thru_image;
-
- namespace internal
- {
- template <typename I, typename F> class thru_image_write;
- template <typename I, typename F> class thru_image_read;
-
- /// Find correct implementation
- template <typename I, typename F>
- struct thru_find_impl
- {
- typedef thru_image_write<I, F> write;
- typedef thru_image_read<I, F> read;
- typedef mlc_if(mlc_and(mln_trait_fun_is_assignable(F),
- mlc_and(mlc_not(mlc_is_const(I)),
- mlc_equal(mln_trait_image_pw_io(I),
- trait::image::pw_io::read_write))),
- write, read) ret;
- };
-
- /// Data structure for \c mln::thru_image<I>.
- template <typename I, typename F>
- struct data< thru_image<I, F> >
- {
- data(I& ima, const F& f);
-
- I ima_;
- F f_;
- };
-
- } // end of namespace mln::internal
-
-
- namespace trait
- {
-
- template <typename I, typename F>
- struct image_< thru_image<I, F> > : image_< typename
mln::internal::thru_find_impl<I, F>::ret > // Same as I except...
- {
- // ...these changes.
- typedef trait::image::category::value_morpher category;
- typedef mln_internal_trait_image_speed_from(I) speed; // Un-fastest.
- typedef trait::image::value_access::computed value_access;
- };
-
- template <typename I, typename F>
- struct image_< mln::internal::thru_image_write<I, F> > : image_< I
> // Same as I except...
- {
- typedef trait::image::vw_io::read_write vw_io;
- };
-
- template <typename I, typename F>
- struct image_< mln::internal::thru_image_read<I, F> > : image_< I >
// Same as I except...
- {
- typedef trait::image::vw_io::read vw_io;
- };
-
- } // end of namespace mln::trait
-
-
-
- // FIXME: Doc!
-
- namespace internal
- {
-
- template <typename I, typename F>
- class thru_image_read : public internal::image_value_morpher< I, typename
F::result, thru_image<I,F> >
- {
- public:
-
- /// Skeleton.
- typedef thru_image<tag::image_<I>, F> skeleton;
-
- /// Point_Site associated type.
- typedef mln_psite(I) psite;
-
- /// Value associated type.
- typedef mln_result(F) value;
-
- /// Return type of read-only access.
- typedef value rvalue;
- typedef value lvalue; // Workaround for write operator()
-
- rvalue operator()(const mln_psite(I)& p) const;
- rvalue operator()(const mln_psite(I)& p);
-
- };
-
- // Inheritance from read ?!
- template <typename I, typename F>
- class thru_image_write : public thru_image_read<I,F>
- {
- public:
-
- /// Type returned by the read-write pixel value operator.
-// typedef typename F::template lresult<typename F::argument>::ret lvalue;
- typedef typename F::lresult lvalue;
-
- using thru_image_read<I,F>::operator();
- lvalue operator()(const mln_psite(I)& p);
-
- };
- }
-
- /// Morph image values through a function.
- ///
- /// \ingroup modimagevaluemorpher
- //
- template <typename I, typename F>
- class thru_image : public internal::thru_find_impl<I, F>::ret
- {
- public:
-
- thru_image();
- thru_image(I& ima);
- thru_image(I& ima, const F& f);
-
- void init_(I& ima, const F& f);
-
- /// Const promotion via conversion.
- operator thru_image<const I, F>() const;
- };
-
- template <typename I, typename F>
- thru_image<I, F> thru(const mln::Function<F>& f,
- Image<I>& ima);
-
- template <typename I, typename F>
- const thru_image<const I, F> thru(const mln::Function<F>& f,
- const Image<I>& ima);
-
- template <typename I, typename M>
- thru_image<I, mln_fun_with(M, mln_value(I))>
- thru(const mln::Meta_Function<M>& f, Image<I>& ima);
-
- template <typename I, typename M>
- const thru_image<const I, mln_fun_with(M, mln_value(I))>
- thru(const mln::Meta_Function<M>& f, const Image<I>& ima);
-
-# ifndef MLN_INCLUDE_ONLY
-
- // internal::data< thru_image<I,S> >
-
- namespace internal
- {
-
- template <typename I, typename F>
- inline
- data< thru_image<I, F> >::data(I& ima, const F& f)
- : ima_(ima),
- f_(f)
- {
- }
-
- } // end of namespace mln::internal
-
- // thru_image<I>
-
- template <typename I, typename F>
- inline
- thru_image<I, F>::thru_image()
- {
- }
-
- template <typename I, typename F>
- inline
- thru_image<I, F>::thru_image(I& ima, const F& f)
- {
- mln_precondition(ima.is_valid());
- init_(ima, f);
- }
-
- template <typename I, typename F>
- inline
- thru_image<I, F>::thru_image(I& ima)
- {
- mln_precondition(ima.is_valid());
- init_(ima, F());
- }
-
- template <typename I, typename F>
- inline
- void
- thru_image<I, F>::init_(I& ima, const F& f)
- {
- mln_precondition(! this->is_valid());
- mln_precondition(ima.is_valid());
- this->data_ = new internal::data< thru_image<I, F> >(ima, f);
- }
-
- template <typename I, typename F>
- inline
- thru_image<I, F>::operator thru_image<const I, F>() const
- {
- thru_image<const I, F> tmp(this->data_->ima_, this->data_->f_);
- return tmp;
- }
-
- namespace internal
- {
-
- template <typename I, typename F>
- inline
- typename thru_image_read<I, F>::rvalue
- thru_image_read<I, F>::operator()(const mln_psite(I)& p) const
- {
- mln_precondition(this->is_valid());
- return this->data_->f_(this->data_->ima_(p));
- }
-
- template <typename I, typename F>
- inline
- typename thru_image_read<I, F>::rvalue
- thru_image_read<I, F>::operator()(const mln_psite(I)& p)
- {
- mln_precondition(this->is_valid());
- return this->data_->f_(this->data_->ima_(p));
- }
-
- template <typename I, typename F>
- inline
- typename thru_image_write<I, F>::lvalue
- thru_image_write<I, F>::operator()(const mln_psite(I)& p)
- {
- mln_precondition(this->is_valid());
- return this->data_->f_(this->data_->ima_(p));
- }
-
- }
-
- // thru
- template <typename I, typename F>
- thru_image<I, F> thru(const mln::Function<F>& f,
- Image<I>& ima)
- {
- thru_image<I, F> tmp(exact(ima), exact(f));
- return tmp;
- }
-
- template <typename I, typename F>
- thru_image<const I, F> thru(const mln::Function<F>& f,
- const Image<I>& ima)
- {
- thru_image<const I, F> tmp(exact(ima), exact(f));
- return tmp;
- }
-
- template <typename I, typename M>
- thru_image<I, mln_fun_with(M, mln_value(I))>
- thru(const mln::Meta_Function<M>& f, Image<I>& ima)
- {
- typedef mln_fun_with(M, mln_value(I)) F;
- thru_image<I, F> tmp(exact(ima), F(exact(f).state()));
-
- return tmp;
- }
-
- template <typename I, typename M>
- thru_image<const I, mln_fun_with(M, mln_value(I))>
- thru(const mln::Meta_Function<M>& f, const Image<I>& ima)
- {
- typedef mln_fun_with(M, mln_value(I)) F;
- thru_image<const I, F> tmp(exact(ima), F(exact(f).state()));
-
- return tmp;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-
-#endif // ! MLN_CORE_IMAGE_VMORPH_THRU_IMAGE_HH
diff --git a/milena/mln/core/image/vmorph/thrubin_image.hh
b/milena/mln/core/image/vmorph/thrubin_image.hh
deleted file mode 100644
index 0195d1a..0000000
--- a/milena/mln/core/image/vmorph/thrubin_image.hh
+++ /dev/null
@@ -1,254 +0,0 @@
-// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_CORE_IMAGE_VMORPH_THRUBIN_IMAGE_HH
-# define MLN_CORE_IMAGE_VMORPH_THRUBIN_IMAGE_HH
-
-/// \file
-///
-/// \brief Definition of a morpher that morph values from two images
-/// through a binary function.
-
-# include <mln/core/internal/image_value_morpher.hh>
-# include <mln/core/concept/meta_function.hh>
-# include <mln/metal/bexpr.hh>
-# include <mln/trait/functions.hh>
-
-
-namespace mln
-{
-
- // Forward declaration.
- template <typename I1, typename I2, typename F> class thrubin_image;
-
- namespace internal
- {
- /// Data structure for \c mln::thrubin_image<I>.
- template <typename I1, typename I2, typename F>
- struct data< thrubin_image<I1, I2, F> >
- {
- data(I1& ima1, I2& ima2, const F& f);
-
- I1 ima_;
- I2 ima2_;
- F f_;
- };
-
- } // end of namespace mln::internal
-
-
- namespace trait
- {
-
- template <typename I1, typename I2, typename F>
- struct image_< thrubin_image<I1, I2, F> > : image_< I1 > // Same as
I except...
- {
- // ...these changes.
- typedef trait::image::category::value_morpher category;
- typedef mln_internal_trait_image_speed_from(I1) speed; // Un-fastest.
- typedef trait::image::value_access::computed value_access;
- typedef trait::image::vw_io::read vw_io;
- };
-
- } // end of namespace mln::trait
-
- /// Morphes values from two images through a binary function.
- ///
- /// \ingroup modimagevaluemorpher
- template <typename I1, typename I2, typename F>
- class thrubin_image : public internal::image_value_morpher< I1, typename F::result,
thrubin_image<I1,I2,F> >
- {
- public:
-
- thrubin_image();
- thrubin_image(I1& ima1, I2& ima2);
- thrubin_image(I1& ima1, I2& ima2, const F& f);
-
- /// Skeleton.
- typedef thrubin_image<tag::image_<I1>, tag::image_<I2>, F>
skeleton;
-
- /// Point_Site associated type.
- typedef mln_psite(I1) psite;
-
- /// Value associated type.
- typedef mln_result(F) value;
-
- /// Return type of read-only access.
- typedef value rvalue;
- typedef value lvalue; // Workaround for write operator()
-
- rvalue operator()(const mln_psite(I1)& p) const;
- rvalue operator()(const mln_psite(I1)& p);
-
- void init_(I1& ima1, I2& ima2, const F& f);
-
- /// Const promotion via conversion.
- operator thrubin_image<const I1, const I2, F>() const;
- };
-
- template <typename I1, typename I2, typename F>
- thrubin_image<I1, I2, F>
- thru(const mln::Function<F>& f,
- Image<I1>& ima1, Image<I2>& ima2);
-
- template <typename I1, typename I2, typename F>
- const thrubin_image<const I1, const I2, F>
- thru(const mln::Function<F>& f,
- const Image<I1>& ima1, const Image<I2>& ima2);
-
- template <typename I1, typename I2, typename M>
- thrubin_image<I1, I2, mln_fun_withbin(M, mln_value(I1), mln_value(I2))>
- thru(const mln::Meta_Function<M>& f, Image<I1>& ima1,
Image<I1>& ima2);
-
- template <typename I1, typename I2, typename M>
- const thrubin_image<const I1, const I2, mln_fun_withbin(M, mln_value(I1),
mln_value(I2))>
- thru(const mln::Meta_Function<M>& f, const Image<I1>& ima1, const
Image<I2>& ima2);
-
-# ifndef MLN_INCLUDE_ONLY
-
- // internal::data< thrubin_image<I,S> >
-
- namespace internal
- {
-
- template <typename I1, typename I2, typename F>
- inline
- data< thrubin_image<I1, I2, F> >::data(I1& ima1, I2& ima2, const
F& f)
- : ima_(ima1), ima2_(ima2),
- f_(f)
- {
- }
-
- } // end of namespace mln::internal
-
- // thrubin_image<I>
-
- template <typename I1, typename I2, typename F>
- inline
- thrubin_image<I1, I2, F>::thrubin_image()
- {
- }
-
- template <typename I1, typename I2, typename F>
- inline
- thrubin_image<I1, I2, F>::thrubin_image(I1& ima1, I2& ima2, const F&
f)
- {
- mln_precondition(ima1.is_valid());
- mln_precondition(ima2.is_valid());
- init_(ima1, ima2, f);
- }
-
- template <typename I1, typename I2, typename F>
- inline
- thrubin_image<I1, I2, F>::thrubin_image(I1& ima1, I2& ima2)
- {
- mln_precondition(ima1.is_valid());
- mln_precondition(ima2.is_valid());
- init_(ima1, ima2, F());
- }
-
- template <typename I1, typename I2, typename F>
- inline
- void
- thrubin_image<I1, I2, F>::init_(I1& ima1, I2& ima2, const F& f)
- {
- mln_precondition(! this->is_valid());
- mln_precondition(ima1.is_valid());
- mln_precondition(ima2.is_valid());
- this->data_ = new internal::data< thrubin_image<I1, I2, F> >(ima1,
ima2, f);
- }
-
- template <typename I1, typename I2, typename F>
- inline
- thrubin_image<I1, I2, F>::operator thrubin_image<const I1, const I2, F>()
const
- {
- thrubin_image<const I1, const I2, F> tmp(this->data_->ima_,
this->data_->ima2_, this->data_->f_);
- return tmp;
- }
-
- template <typename I1, typename I2, typename F>
- inline
- typename thrubin_image<I1, I2, F>::rvalue
- thrubin_image<I1, I2, F>::operator()(const mln_psite(I1)& p) const
- {
- mln_precondition(this->is_valid());
- return this->data_->f_(this->data_->ima_(p),
this->data_->ima2_(p));
- }
-
- template <typename I1, typename I2, typename F>
- inline
- typename thrubin_image<I1, I2, F>::rvalue
- thrubin_image<I1, I2, F>::operator()(const mln_psite(I1)& p)
- {
- mln_precondition(this->is_valid());
- return this->data_->f_(this->data_->ima_(p),
this->data_->ima2_(p));
- }
-
- // thrubin
- template <typename I1, typename I2, typename F>
- thrubin_image<I1, I2, F>
- thru(const mln::Function<F>& f,
- Image<I1>& ima1, Image<I2>& ima2)
- {
- thrubin_image<I1, I2, F> tmp(exact(ima1), exact(ima2), exact(f).state());
- return tmp;
- }
-
- template <typename I1, typename I2, typename F>
- const thrubin_image<const I1, const I2, F>
- thru(const mln::Function<F>& f,
- const Image<I1>& ima1, const Image<I2>& ima2)
- {
- thrubin_image<const I1, const I2, F> tmp(exact(ima1), exact(ima2),
exact(f).state());
- return tmp;
- }
-
- template <typename I1, typename I2, typename M>
- thrubin_image<I1, I2, mln_fun_withbin(M, mln_value(I1), mln_value(I2))>
- thru(const mln::Meta_Function<M>& f, Image<I1>& ima1,
Image<I2>& ima2)
- {
- typedef mln_fun_withbin(M, mln_value(I1), mln_value(I2)) F;
- thrubin_image<I1, I2, F> tmp(exact(ima1), exact(ima2), F(exact(f).state()));
-
- return tmp;
- }
-
- template <typename I1, typename I2, typename M>
- const thrubin_image<const I1, const I2, mln_fun_withbin(M, mln_value(I1),
mln_value(I2))>
- thru(const mln::Meta_Function<M>& f, const Image<I1>& ima1, const
Image<I2>& ima2)
- {
- typedef mln_fun_withbin(M, mln_value(I1), mln_value(I2)) F;
- thrubin_image<const I1, const I2, F> tmp(exact(ima1), exact(ima2),
F(exact(f).state()));
-
- return tmp;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-
-#endif // ! MLN_CORE_IMAGE_VMORPH_THRUBIN_IMAGE_HH
diff --git a/milena/mln/data/was.median.hh b/milena/mln/data/was.median.hh
deleted file mode 100644
index 73ee247..0000000
--- a/milena/mln/data/was.median.hh
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_DATA_WAS_MEDIAN_HH
-# define MLN_DATA_WAS_MEDIAN_HH
-
-/*! \file
- *
- * \brief Obsolete routines for median filtering.
- */
-
-# include <mln/win/shift.hh>
-# include <mln/core/alias/window2d.hh>
-
-# include <mln/geom/min_col.hh>
-# include <mln/geom/max_col.hh>
-# include <mln/geom/max_row.hh>
-# include <mln/geom/min_row.hh>
-
-# include <mln/win/diff.hh>
-# include <mln/win/shift.hh>
-
-# include <mln/data/median.hh>
-# include <mln/win/hline2d.hh>
-
-# include <mln/opt/at.hh>
-
-namespace mln
-{
-
- namespace data
- {
-
- namespace impl
- {
-
-
- // prefer using a canvas
-
- template <typename I, typename W, typename O>
- void median_as_procedure(const I& input,
- const W& win,
- O& output)
- {
- mln_precondition(input.is_valid());
- mln_precondition(output.is_valid());
-
- int
- min_row = geom::min_row(input), max_row = geom::max_row(input),
- min_col = geom::min_col(input), max_col = geom::max_col(input);
-
- window2d
- win_fwd_plus = win - win::shift(win, left),
- win_fwd_minus = win::shift(win, left) - win,
- win_bkd_plus = win - win::shift(win, right),
- win_bkd_minus = win::shift(win, right) - win,
- win_bot = win - win::shift(win, up),
- win_top = win::shift(win, up) - win;
-
- point2d p;
- mln_qiter(W)
- q_fp(win_fwd_plus, p), q_fm(win_fwd_minus, p),
- q_bp(win_bkd_plus, p), q_bm(win_bkd_minus, p),
- q_top(win_top, p), q_bot(win_bot, p);
-
- accu::stat::median_h<mln_vset(I)> med(input.values());
-
- // initialization
-
- p = input.bbox().pmin() + up;
- med.init();
- {
- mln_qiter(W) q(win, p);
- for_all(q) if (input.has(q))
- med.take(input(q));
- }
-
- def::coord& row = p.row();
- def::coord& col = p.col();
- bool fwd = true;
-
- mln_assertion(p.col() == min_col);
- mln_assertion(p.row() == min_row - 1);
-
- for (row = min_row; row <= max_row; ++row)
- {
- // "go down"
- for_all(q_top) if (input.has(q_top))
- med.untake(input(q_top));
- for_all(q_bot) if (input.has(q_bot))
- med.take(input(q_bot));
- output(p) = med;
-
- if (fwd)
- // browse line fwd
- while (col < max_col)
- {
- ++col;
- for_all(q_fm) if (input.has(q_fm))
- med.untake(input(q_fm));
- for_all(q_fp) if (input.has(q_fp))
- med.take(input(q_fp));
- output(p) = med;
- }
- else
- // browse line bkd
- while (col > min_col)
- {
- --col;
- for_all(q_bm) if (input.has(q_bm))
- med.untake(input(q_bm));
- for_all(q_bp) if (input.has(q_bp))
- med.take(input(q_bp));
- output(p) = med;
- }
-
- // change browsing
- fwd = ! fwd;
- }
- }
-
-
-
- // horizontal median
-
- template <typename I, typename O>
- void hmedian(const I& input, const win::hline2d& win, O& output)
- {
-
- const int
- min_row = geom::min_row(input), max_row = geom::max_row(input),
- min_col = geom::min_col(input), max_col = geom::max_col(input);
- const unsigned half = win.length() / 2;
-
- point2d p;
- def::coord& row = p.row();
- def::coord& col = p.col();
-
- accu::stat::median_h<mln_vset(I)> med(input.values());
-
- for (row = min_row; row <= max_row; ++row)
- {
- int ct, cu;
-
- // initialization (before first point of the row)
- med.init();
- for (ct = min_col; ct < min_col + half; ++ct)
- med.take(opt::at(input, row, ct));
-
- // left columns (just take new points)
- for (col = min_col; col <= min_col + half; ++col, ++ct)
- {
- med.take(opt::at(input, row, ct));
- output(p) = med;
- }
-
- // middle columns (both take and untake)
- cu = min_col;
- for (; col <= max_col - half; ++cu, ++col, ++ct)
- {
- med.take(opt::at(input, row, ct));
- med.untake(opt::at(input, row, cu));
- output(p) = med;
- }
-
- // right columns (now just untake old points)
- for (; col <= max_col; ++cu, ++col)
- {
- med.untake(opt::at(input, row, cu));
- output(p) = med;
- }
- }
-
- } // end of hmedian
-
-
-
- } // end of namespace mln::data::impl
-
- } // end of namespace mln::data
-
-} // end of namespace mln
-
-
-#endif // ! MLN_DATA_WAS_MEDIAN_HH
diff --git a/milena/mln/extract/all.hh b/milena/mln/extract/all.hh
deleted file mode 100644
index d183d12..0000000
--- a/milena/mln/extract/all.hh
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_EXTRACT_ALL_HH
-# define MLN_EXTRACT_ALL_HH
-
-/// \file
-///
-/// File that includes all sub-data extraction related routines.
-
-
-namespace mln
-{
-
- namespace extract
- {
- } // end of namespace mln::extract
-
-} // end of namespace mln
-
-# include <mln/extract/red.hh>
-# include <mln/extract/green.hh>
-# include <mln/extract/blue.hh>
-# include <mln/extract/hue.hh>
-# include <mln/extract/sat.hh>
-# include <mln/extract/lum.hh>
-
-
-#endif // ! MLN_EXTRACT_ALL_HH
diff --git a/milena/mln/extract/blue.hh b/milena/mln/extract/blue.hh
deleted file mode 100644
index e7214fd..0000000
--- a/milena/mln/extract/blue.hh
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_EXTRACT_BLUE_HH
-# define MLN_EXTRACT_BLUE_HH
-
-/// \file
-///
-/// Extract the blue component of an image.
-
-# include <mln/core/image/vmorph/thru_image.hh>
-# include <mln/fun/meta/blue.hh>
-
-namespace mln
-{
-
- namespace extract
- {
-
- template <typename I>
- thru_image< I, meta::blue<mln_value(I)> >
- blue(Image<I>& ima);
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename I>
- thru_image< I, meta::blue<mln_value(I)> >
- blue(Image<I>& ima)
- {
- typedef meta::blue<mln_value(I)> blue_t;
- thru_image<I, blue_t> result(exact(ima), blue_t());
- return result;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::extract
-
-} // end of namespace mln
-
-#endif // ! MLN_EXTRACT_BLUE_HH
diff --git a/milena/mln/extract/essential.hh b/milena/mln/extract/essential.hh
deleted file mode 100644
index 3a3c8d0..0000000
--- a/milena/mln/extract/essential.hh
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_EXTRACT_ESSENTIAL_HH
-# define MLN_EXTRACT_ESSENTIAL_HH
-
-/// \file
-///
-/// File that includes all sub-data extraction related routines.
-
-# include <mln/extract/all.hh>
-
-
-#endif // ! MLN_EXTRACT_ESSENTIAL_HH
diff --git a/milena/mln/extract/green.hh b/milena/mln/extract/green.hh
deleted file mode 100644
index 59cf2d9..0000000
--- a/milena/mln/extract/green.hh
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_EXTRACT_GREEN_HH
-# define MLN_EXTRACT_GREEN_HH
-
-/// \file
-///
-/// Extract the green component of an image.
-
-# include <mln/core/image/vmorph/thru_image.hh>
-# include <mln/fun/meta/green.hh>
-
-namespace mln
-{
-
- namespace extract
- {
-
- template <typename I>
- thru_image< I, meta::green<mln_value(I)> >
- green(Image<I>& ima);
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename I>
- thru_image< I, meta::green<mln_value(I)> >
- green(Image<I>& ima)
- {
- typedef meta::green<mln_value(I)> green_t;
- thru_image<I, green_t> result(exact(ima), green_t());
- return result;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::extract
-
-} // end of namespace mln
-
-#endif // ! MLN_EXTRACT_GREEN_HH
diff --git a/milena/mln/extract/hue.hh b/milena/mln/extract/hue.hh
deleted file mode 100644
index 66c2cbd..0000000
--- a/milena/mln/extract/hue.hh
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_EXTRACT_HUE_HH
-# define MLN_EXTRACT_HUE_HH
-
-/// \file
-///
-/// Extract the hue component of an image.
-
-# include <mln/core/image/vmorph/thru_image.hh>
-# include <mln/fun/meta/hue.hh>
-
-namespace mln
-{
-
- namespace extract
- {
-
- template <typename I>
- thru_image< I, meta::hue<mln_value(I)> >
- hue(Image<I>& ima);
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename I>
- thru_image< I, meta::hue<mln_value(I)> >
- hue(Image<I>& ima)
- {
- typedef meta::hue<mln_value(I)> hue_t;
- thru_image<I, hue_t> result(exact(ima), hue_t());
- return result;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::extract
-
-} // end of namespace mln
-
-#endif // ! MLN_EXTRACT_HUE_HH
diff --git a/milena/mln/extract/lum.hh b/milena/mln/extract/lum.hh
deleted file mode 100644
index 6299dd7..0000000
--- a/milena/mln/extract/lum.hh
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_EXTRACT_LUM_HH
-# define MLN_EXTRACT_LUM_HH
-
-/// \file
-///
-/// Extract the lum component of an image.
-
-# include <mln/core/image/vmorph/thru_image.hh>
-# include <mln/fun/meta/lum.hh>
-
-namespace mln
-{
-
- namespace extract
- {
-
- template <typename I>
- thru_image< I, meta::lum<mln_value(I)> >
- lum(Image<I>& ima);
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename I>
- thru_image< I, meta::lum<mln_value(I)> >
- lum(Image<I>& ima)
- {
- typedef meta::lum<mln_value(I)> lum_t;
- thru_image<I, lum_t> result(exact(ima), lum_t());
- return result;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::extract
-
-} // end of namespace mln
-
-#endif // ! MLN_EXTRACT_LUM_HH
diff --git a/milena/mln/extract/red.hh b/milena/mln/extract/red.hh
deleted file mode 100644
index 6be28a9..0000000
--- a/milena/mln/extract/red.hh
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_EXTRACT_RED_HH
-# define MLN_EXTRACT_RED_HH
-
-/// \file
-///
-/// Extract the red component of an image.
-
-# include <mln/core/image/vmorph/thru_image.hh>
-# include <mln/fun/meta/red.hh>
-
-namespace mln
-{
-
- namespace extract
- {
-
- template <typename I>
- thru_image< I, meta::red<mln_value(I)> >
- red(Image<I>& ima);
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename I>
- thru_image< I, meta::red<mln_value(I)> >
- red(Image<I>& ima)
- {
- typedef meta::red<mln_value(I)> red_t;
- thru_image<I, red_t> result(exact(ima), red_t());
- return result;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::extract
-
-} // end of namespace mln
-
-#endif // ! MLN_EXTRACT_RED_HH
diff --git a/milena/mln/extract/sat.hh b/milena/mln/extract/sat.hh
deleted file mode 100644
index b45b1b7..0000000
--- a/milena/mln/extract/sat.hh
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_EXTRACT_SAT_HH
-# define MLN_EXTRACT_SAT_HH
-
-/// \file
-///
-/// Extract the sat component of an image.
-
-# include <mln/core/image/vmorph/thru_image.hh>
-# include <mln/fun/meta/sat.hh>
-
-namespace mln
-{
-
- namespace extract
- {
-
- template <typename I>
- thru_image< I, meta::sat<mln_value(I)> >
- sat(Image<I>& ima);
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename I>
- thru_image< I, meta::sat<mln_value(I)> >
- sat(Image<I>& ima)
- {
- typedef meta::sat<mln_value(I)> sat_t;
- thru_image<I, sat_t> result(exact(ima), sat_t());
- return result;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::extract
-
-} // end of namespace mln
-
-#endif // ! MLN_EXTRACT_SAT_HH
diff --git a/milena/mln/fun/access/all.hh b/milena/mln/fun/access/all.hh
deleted file mode 100644
index c87f4e6..0000000
--- a/milena/mln/fun/access/all.hh
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_ACCESS_ALL_HH
-# define MLN_FUN_ACCESS_ALL_HH
-
-/// \file
-///
-/// File that includes all access functions.
-
-
-namespace mln
-{
- namespace fun
- {
-
- /// Namespace for access functions.
- namespace access
- {}
-
- }
-}
-
-
-# include <mln/fun/access/mean.hh>
-
-
-#endif // ! MLN_FUN_ACCESS_ALL_HH
diff --git a/milena/mln/fun/access/mean.hh b/milena/mln/fun/access/mean.hh
deleted file mode 100644
index 2b68522..0000000
--- a/milena/mln/fun/access/mean.hh
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_ACCESS_MEAN_HH
-# define MLN_FUN_ACCESS_MEAN_HH
-
-# include <mln/fun/unary.hh>
-# include <mln/core/concept/accumulator.hh>
-
-
-namespace mln
-{
-
- namespace fun
- {
-
- namespace access
- {
-
- struct mean : unary<mean>
- {
- };
-
- namespace internal
- {
-
- template <typename T>
- struct method_mean
- {
- typedef method_mean ret;
-
- typedef typename T::mean_t result;
- typedef T argument;
-
- static result read(const argument& x)
- {
- return x.mean();
- }
- };
-
- }
-
- } // end of namespace mln::access
-
- } // end of namespace mln
-
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename A>
- struct set_unary_< fun::access::mean,
- Accumulator, A > : fun::access::internal::method_mean<A>
- {
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-
-#endif // ! MLN_FUN_ACCESS_MEAN_HH
diff --git a/milena/mln/fun/accu_result.hh b/milena/mln/fun/accu_result.hh
deleted file mode 100644
index 77bf47a..0000000
--- a/milena/mln/fun/accu_result.hh
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_ACCU_RESULT_HH
-# define MLN_FUN_ACCU_RESULT_HH
-
-# include <mln/fun/unary.hh>
-# include <mln/core/concept/accumulator.hh>
-
-namespace mln
-{
-
- // accu_result: return result of given accumulator.
- namespace fun
- {
-
- struct accu_result : unary<accu_result>
- {
- };
-
- } // end of namespace mln::fun
-
- namespace trait
- {
-
- namespace next
- {
- template <typename E>
- struct set_unary_<fun::accu_result, Accumulator, E>
- {
- typedef set_unary_ ret;
- typedef typename E::result result;
- typedef mln::Accumulator<E> argument;
-
- static result read(const argument& x)
- {
- return exact(x).to_result();
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_ACCU_RESULT_HH
diff --git a/milena/mln/fun/binary.hh b/milena/mln/fun/binary.hh
deleted file mode 100644
index e265681..0000000
--- a/milena/mln/fun/binary.hh
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_BINARY_HH
-# define MLN_FUN_BINARY_HH
-
-# include <mln/core/concept/meta_function.hh>
-# include <mln/fun/spe/binary.hh>
-# include <mln/trait/next/solve.hh>
-# include <mln/trait/functions.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- template <typename F, typename E = F>
- struct binary : mln::Meta_Function_vv2v< E >
- {
- typedef F flag;
- typedef mln_trait_fun_storage(flag) storage;
-
- template <typename T1, typename T2>
- struct with
- {
- typedef spe::binary<F, T1, T2> ret;
- };
-
- template <typename T1, typename T2>
- typename with<T1, T2>::ret::result operator()(const T1& a, const T2&
b) const
- {
- return typename with<T1, T2>::ret(state())(a, b);
- }
-
- template <typename U>
- void init(const U& value)
- {
- state_ = mln::trait::function::internal::introspect::has_storage_t<flag,
void>::compute(value);
- };
-
- binary()
- {
- }
-
- template <typename U>
- binary(const U& param)
- {
- this->init(param);
- }
-
- stored<storage>& state()
- {
- return state_;
- }
-
- const stored<storage>& state() const
- {
- return state_;
- }
-
- protected:
- stored<storage> state_;
- };
-
- } // end of namespace mln::fun
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_BINARY_HH
diff --git a/milena/mln/fun/binary_param.hh b/milena/mln/fun/binary_param.hh
deleted file mode 100644
index 16c99d8..0000000
--- a/milena/mln/fun/binary_param.hh
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#include "unary.hh"
-
-#ifndef MLN_FUN_BINARY_PARAM_HH
-# define MLN_FUN_BINARY_PARAM_HH
-
-# include <mln/fun/binary.hh>
-# include <mln/fun/param.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- template <typename F, typename Param, typename Storage = void, typename E = F>
- struct binary_param: binary<binary_param<F,Param,Storage>, E>
- {
- typedef F flag;
- typedef Param param;
- typedef Storage storage;
-
- binary_param()
- {
- }
-
- template <typename U>
- binary_param(const U& param)
- {
- this->init(param);
- }
-
- };
-
- template <typename F, typename Param, typename E>
- struct parameter< binary_param<F,Param,void,E> >
- {
- typedef Param param;
- typedef void storage;
- };
-
- template <typename F, typename Param, typename Storage, typename E>
- struct parameter< binary_param<F,Param,Storage,E> >
- {
- typedef Param param;
- typedef Storage storage;
-
- template <typename U>
- storage compute(const U& u)
- {
- return F::compute_param(u);
- }
- };
-
- }
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename F, typename Param, typename Storage, typename E, typename T1,
typename T2>
- struct set_precise_binary_<mln::fun::binary_param<F,Param,Storage,E>, T1,
T2>
- {
- typedef mln_trait_nbinary(F, T1, T2) ret;
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_BINARY_PARAM_HH
diff --git a/milena/mln/fun/component/blue.hh b/milena/mln/fun/component/blue.hh
deleted file mode 100644
index 3796be1..0000000
--- a/milena/mln/fun/component/blue.hh
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPONENT_BLUE_HH
-# define MLN_FUN_COMPONENT_BLUE_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the blue component.
-
-# include <mln/fun/unary.hh>
-# include <mln/value/rgb.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- struct blue : unary<blue> {};
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <unsigned n>
- struct set_precise_unary_<mln::fun::blue, mln::value::rgb<n> >
- {
- typedef set_precise_unary_ ret;
- typedef mln::value::rgb<n> argument;
- typedef typename argument::blue_t result;
- typedef argument& lvalue;
-
- static result read(const argument& x)
- {
- return x.blue();
- }
-
- static void write(lvalue l, const result& r)
- {
- l.blue() = r;
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_COMPONENT_BLUE_HH
diff --git a/milena/mln/fun/component/comp.hh b/milena/mln/fun/component/comp.hh
deleted file mode 100644
index 9202007..0000000
--- a/milena/mln/fun/component/comp.hh
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPONENT_COMP_HH
-# define MLN_FUN_COMPONENT_COMP_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify a component.
-
-# include <mln/fun/unary_param.hh>
-# include <mln/value/rgb.hh>
-# include <mln/value/int_u.hh>
-# include <mln/algebra/vec.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- struct comp : unary_param<comp,unsigned>
- {
- comp() : unary_param<comp,unsigned>(0) {};
- comp(unsigned i) : unary_param<comp,unsigned>(i) {};
- };
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <unsigned n>
- struct set_precise_unary_<mln::fun::comp, mln::value::rgb<n> >
- {
- typedef set_precise_unary_ ret;
-
- typedef mln::value::rgb<n> argument;
- typedef mln::value::int_u<n> result;
- typedef argument& lvalue;
-
- static result read(unsigned p_i, const argument& v)
- {
- return v.comp(p_i);
- }
-
- static void write(unsigned p_i, lvalue l, const result& x)
- {
- l.comp(p_i) = x;
- }
- };
-
- template <unsigned n, typename T>
- struct set_precise_unary_<mln::fun::comp, mln::algebra::vec<n,T> >
- {
- typedef set_precise_unary_ ret;
-
- typedef mln::algebra::vec<n,T> argument;
- typedef T result;
- typedef argument& lvalue;
-
- static result read(unsigned p_i, const argument& v)
- {
- return v[p_i];
- }
-
- static void write(unsigned p_i, lvalue l, const result& x)
- {
- l[p_i] = x;
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_COMPONENT_COMP_HH
diff --git a/milena/mln/fun/component/comp_count.hh
b/milena/mln/fun/component/comp_count.hh
deleted file mode 100644
index e7c2942..0000000
--- a/milena/mln/fun/component/comp_count.hh
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPONENT_COMP_COUNT_HH
-# define MLN_FUN_COMPONENT_COMP_COUNT_HH
-
-/// \file
-///
-/// Meta function to retrieve the number of components a vector has.
-
-# include <mln/fun/unary.hh>
-# include <mln/value/rgb.hh>
-# include <mln/value/int_u.hh>
-# include <mln/algebra/vec.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- struct comp_count : unary<comp_count>
- {
- };
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <unsigned n>
- struct set_precise_unary_<mln::fun::comp_count, mln::value::rgb<n> >
- {
- typedef set_precise_unary_ ret;
-
- typedef mln::value::rgb<n> argument;
- typedef unsigned result;
- typedef argument& lvalue;
-
- static result read(const argument&)
- {
- return 3;
- }
- };
-
- template <unsigned n, typename T>
- struct set_precise_unary_<mln::fun::comp_count, mln::algebra::vec<n,T>
>
- {
- typedef set_precise_unary_ ret;
-
- typedef mln::algebra::vec<n,T> argument;
- typedef unsigned result;
- typedef argument& lvalue;
-
- static result read(const argument&)
- {
- return n;
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_COMPONENT_COMP_COUNT_HH
diff --git a/milena/mln/fun/component/green.hh b/milena/mln/fun/component/green.hh
deleted file mode 100644
index 63c5f9e..0000000
--- a/milena/mln/fun/component/green.hh
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPONENT_GREEN_HH
-# define MLN_FUN_COMPONENT_GREEN_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the green component.
-
-# include <mln/fun/unary.hh>
-# include <mln/value/rgb.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- struct green : unary<green> {};
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <unsigned n>
- struct set_precise_unary_<mln::fun::green, mln::value::rgb<n> >
- {
- typedef set_precise_unary_ ret;
- typedef mln::value::rgb<n> argument;
- typedef typename argument::green_t result;
- typedef argument& lvalue;
-
- static result read(const argument& x)
- {
- return x.green();
- }
-
- static void write(lvalue l, const result& r)
- {
- l.green() = r;
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_COMPONENT_GREEN_HH
diff --git a/milena/mln/fun/component/ithcomp.hh b/milena/mln/fun/component/ithcomp.hh
deleted file mode 100644
index 391f4a7..0000000
--- a/milena/mln/fun/component/ithcomp.hh
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPONENT_ITHCOMP_HH
-# define MLN_FUN_COMPONENT_ITHCOMP_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the i'th component with a binary
-/// function f(i, vec).
-
-# include <mln/fun/binary.hh>
-# include <mln/fun/component/comp.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- struct ithcomp : binary<ithcomp>
- {
- };
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename I, typename T>
- struct set_binary_<mln::fun::ithcomp, mln::value::Integer, I, mln::Object,
T>
- {
- typedef set_binary_ ret;
- typedef I argument1;
- typedef T argument2;
- typedef mln_trait_nunary(mln::fun::comp, T) comp_t;
- typedef mln_result(comp_t) result;
-
- static result read(const argument1& i, const argument2& v)
- {
- return comp_t::read(i, v);
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_COMPONENT_ITHCOMP_HH
diff --git a/milena/mln/fun/component/red.hh b/milena/mln/fun/component/red.hh
deleted file mode 100644
index 3b40bc4..0000000
--- a/milena/mln/fun/component/red.hh
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPONENT_RED_HH
-# define MLN_FUN_COMPONENT_RED_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the red component.
-
-# include <mln/fun/unary.hh>
-# include <mln/value/rgb.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- struct red : unary<red> {};
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <unsigned n>
- struct set_precise_unary_<mln::fun::red, mln::value::rgb<n> >
- {
- typedef set_precise_unary_ ret;
- typedef mln::value::rgb<n> argument;
- typedef typename argument::red_t result;
- typedef argument& lvalue;
-
- static result read(const argument& x)
- {
- return x.red();
- }
-
- static void write(lvalue l, const result& r)
- {
- l.red() = r;
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_COMPONENT_RED_HH
diff --git a/milena/mln/fun/component/rgb.hh b/milena/mln/fun/component/rgb.hh
deleted file mode 100644
index 2a365d1..0000000
--- a/milena/mln/fun/component/rgb.hh
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPONENT_RGB_HH
-# define MLN_FUN_COMPONENT_RGB_HH
-
-/// \file
-///
-/// Meta functions to retrieve/modify rgb components.
-
-# include <mln/fun/component/red.hh>
-# include <mln/fun/component/green.hh>
-# include <mln/fun/component/blue.hh>
-
-#endif // ! MLN_FUN_COMPONENT_RGB_HH
diff --git a/milena/mln/fun/component/scomp.hh b/milena/mln/fun/component/scomp.hh
deleted file mode 100644
index 2c50d34..0000000
--- a/milena/mln/fun/component/scomp.hh
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPONENT_SCOMP_HH
-# define MLN_FUN_COMPONENT_SCOMP_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the i'th component, where i is
-/// statically defined.
-
-# include <mln/fun/unary.hh>
-# include <mln/fun/component/comp.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- template <unsigned ith>
- struct scomp : unary< scomp<ith> >
- {
- };
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <unsigned ith, typename T>
- struct set_unary_<fun::scomp<ith>, mln::Object, T>
- {
- typedef set_unary_ ret;
- typedef mln_trait_nunary(fun::comp, T) comp_t;
-
- typedef T argument;
- typedef mln_result(comp_t) result;
- typedef mln_lvalue(comp_t) lvalue;
-
- static result read(const argument& v)
- {
- return comp_t::read(ith, v);
- }
-
- static void write(lvalue l, const result& r)
- {
- comp_t::write(ith, l, r);
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_COMPONENT_SCOMP_HH
diff --git a/milena/mln/fun/compose.hh b/milena/mln/fun/compose.hh
deleted file mode 100644
index e37150c..0000000
--- a/milena/mln/fun/compose.hh
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPOSE_HH
-# define MLN_FUN_COMPOSE_HH
-
-# include <mln/fun/binary.hh>
-# include <mln/fun/composition.hh>
-# include <mln/fun/param.hh>
-
-namespace mln
-{
- // Composition
- namespace fun
- {
- struct compose : binary<compose> {};
-
- namespace internal
- {
-
- template <template <class> class CatF, typename F, template <class>
class CatG, typename G>
- struct compose_helper;
-
- }
-
- template <template <class> class CatF, typename F,
- template <class> class CatG, typename G>
- struct parameter< internal::compose_helper<CatF, F, CatG, G> >
- {
- typedef typename internal::composition<CatF, F, CatG, G>::exact_type result;
- typedef typename result::param param;
- };
-
- namespace internal
- {
-
- template <template <class> class CatF, typename F, template <class>
class CatG, typename G>
- struct compose_helper
- {
- typedef F argument1;
- typedef G argument2;
-
- typedef typename composition<CatF, F, CatG, G>::exact_type result;
- typedef mln_trait_fun_param(result) param;
-
- static result read(const F& f, const G& g)
- {
- return result(param(f, g));
- }
- };
-
- } // end of namespace mln::fun::internal
-
- } // end of namespace mln::fun
-
- namespace trait
- {
-
- namespace next
- {
-
- // All kinds of supported compositions (meta : unary) with (meta or not : unary or
binary)
- template <typename F, typename G>
- struct set_binary_< mln::fun::compose, mln::Meta_Function_v2v, F,
mln::Meta_Function_v2v, G>
- {
- typedef mln::fun::internal::compose_helper<mln::Meta_Function_v2v, F,
mln::Meta_Function_v2v, G> ret;
- };
-
- template <typename F, typename G>
- struct set_binary_< mln::fun::compose, mln::Meta_Function_v2v, F,
mln::Meta_Function_vv2v, G>
- {
- typedef mln::fun::internal::compose_helper<mln::Meta_Function_v2v, F,
mln::Meta_Function_vv2v, G> ret;
- };
-
- template <typename F, typename G>
- struct set_binary_< mln::fun::compose, mln::Meta_Function_v2v, F,
mln::Function_v2v, G>
- {
- typedef mln::fun::internal::compose_helper<mln::Meta_Function_v2v, F,
mln::Function_v2v, G> ret;
- };
-
- template <typename F, typename G>
- struct set_binary_< mln::fun::compose, mln::Meta_Function_v2v, F,
mln::Function_vv2v, G>
- {
- typedef mln::fun::internal::compose_helper<mln::Meta_Function_v2v, F,
mln::Function_vv2v, G> ret;
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_COMPOSE_HH
diff --git a/milena/mln/fun/composition.hh b/milena/mln/fun/composition.hh
deleted file mode 100644
index 0519a31..0000000
--- a/milena/mln/fun/composition.hh
+++ /dev/null
@@ -1,221 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_COMPOSITION_HH
-# define MLN_FUN_COMPOSITION_HH
-
-# include <mln/fun/unary.hh>
-# include <mln/fun/binary.hh>
-# include <mln/fun/param.hh>
-
-namespace mln
-{
- // Composition
- namespace fun
- {
-
- namespace internal
- {
-
- // Compositions may take this has initialization parameter
- template <typename F, typename G>
- struct composition_param
- {
- composition_param(const F& f, const G& g) : f_(f), g_(g) {}
- composition_param() {}
-
- F f_;
- G g_;
- };
-
- // Composition types...
- template <template <class> class CatF, typename F,
- template <class> class CatG, typename G>
- struct composition;
-
- } // end of namespace mln::fun::internal
-
- template <template <class> class CatF, typename F,
- template <class> class CatG, typename G>
- struct parameter< internal::composition<CatF, F, CatG, G> >
- {
- typedef internal::composition_param<F, G> param;
- };
-
- namespace internal
- {
-
- // Meta
- template <typename F, typename G>
- struct composition<mln::Meta_Function_v2v, F, mln::Meta_Function_v2v, G>
- : mln::fun::unary< composition<mln::Meta_Function_v2v, F,
mln::Meta_Function_v2v, G> >
- {
- typedef mln::fun::unary< composition<mln::Meta_Function_v2v, F,
mln::Meta_Function_v2v, G> > super;
-
- composition() {};
- composition(const composition_param<F, G>& p) : super(p) {};
-
- typedef composition exact_type;
- };
-
- template <typename F, typename G>
- struct composition<mln::Meta_Function_v2v, F, mln::Meta_Function_vv2v, G>
- : mln::fun::binary< composition<mln::Meta_Function_v2v, F,
mln::Meta_Function_vv2v, G> >
- {
- typedef mln::fun::binary< composition<mln::Meta_Function_v2v, F,
mln::Meta_Function_vv2v, G> > super;
-
- composition() {};
- composition(const composition_param<F, G>& p) : super(p) {};
-
- typedef composition exact_type;
- };
-
- // Concrete
- template <typename F, typename G>
- struct composition<mln::Meta_Function_v2v, F, mln::Function_v2v, G>
- {
- typedef mln::fun::spe::unary< composition<mln::Meta_Function_v2v, F,
mln::Function_vv2v, G>, typename G::argument> exact_type;
- };
-
- template <typename F, typename G>
- struct composition<mln::Meta_Function_v2v, F, mln::Function_vv2v, G>
- {
- typedef mln::fun::spe::binary< composition<mln::Meta_Function_v2v, F,
mln::Function_vv2v, G>,
- typename G::argument1, typename G::argument2> exact_type;
- };
-
- // Unary compositions implementation inherit from composition_unary_impl...
- template <bool has_lvalue, typename F, typename F_spe, typename G, typename
G_spe>
- struct composition_unary_impl_helper;
-
- template <typename F, typename F_spe, typename G, typename G_spe>
- struct composition_unary_impl_helper<false, F, F_spe, G, G_spe>
- {
- typedef typename G_spe::argument argument;
- typedef typename F_spe::result result;
- typedef composition_param<F, G> param;
-
- static result read(const param& p, const argument& x)
- {
- return p.f_(p.g_(x));
- }
- };
-
- template <typename F, typename F_spe, typename G, typename G_spe>
- struct composition_unary_impl_helper<true, F, F_spe, G, G_spe>
- : composition_unary_impl_helper<false, F, F_spe, G, G_spe>
- {
- typedef composition_unary_impl_helper<false, F, F_spe, G, G_spe> super;
- typedef typename G_spe::lvalue lvalue;
-
- composition_unary_impl_helper() {}
- composition_unary_impl_helper(const typename super::param& p) : super(p) {}
-
- static void write(const typename super::param& p, lvalue l, const typename
super::result& x)
- {
- typename G_spe::result r(p.g_(l));
-
- p.f_.set(r, x);
- p.g_.set(l, r);
- }
- };
-
- template <typename F, typename F_spe, typename G, typename G_spe>
- struct composition_unary_impl
- : composition_unary_impl_helper<mln_trait_fun_is_assignable_(G_spe)::value, F,
F_spe, G, G_spe>
- {
- typedef composition_unary_impl_helper<mln_trait_fun_is_assignable_(G_spe)::value, F,
F_spe, G, G_spe> super;
-
- composition_unary_impl() {}
- composition_unary_impl(const typename super::param& p) : super(p) {}
- };
-
- template <typename F, typename F_spe, typename G, typename G_spe>
- struct composition_binary_impl
- {
- typedef typename G_spe::argument1 argument1;
- typedef typename G_spe::argument2 argument2;
- typedef typename F_spe::result result;
- typedef composition_param<F, G> param;
-
- static result read(const param& p, const argument1& a, const argument2& b)
- {
- return p.f_(p.g_(a, b));
- }
- };
-
- } // end of namespace mln::fun::internal
-
- } // end of namespace mln::fun
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename F, typename G, typename T>
- struct
set_precise_unary_<mln::fun::internal::composition<mln::Meta_Function_v2v, F,
mln::Meta_Function_v2v, G>, T>
- {
- typedef typename G::template with<T>::ret G_fun;
- typedef typename F::template with<typename G_fun::result>::ret F_fun;
-
- typedef mln::fun::internal::composition_unary_impl<F, F_fun, G, G_fun> ret;
- };
-
- template <typename F, typename G, typename T1, typename T2>
- struct
set_precise_binary_<mln::fun::internal::composition<mln::Meta_Function_v2v, F,
mln::Meta_Function_vv2v, G>, T1, T2>
- {
- typedef typename G::template with<T1, T2>::ret G_fun;
- typedef typename F::template with<typename G_fun::result>::ret F_fun;
-
- typedef mln::fun::internal::composition_binary_impl<F, F_fun, G, G_fun> ret;
- };
-
- template <typename F, typename G>
- struct
set_precise_unary_<mln::fun::internal::composition<mln::Meta_Function_v2v, F,
mln::Function_v2v, G>,
- typename G::argument>
- {
- typedef typename F::template with<typename G::result>::ret F_fun;
-
- typedef mln::fun::internal::composition_unary_impl<F, F_fun, G, G> ret;
- };
-
- template <typename F, typename G>
- struct
set_precise_binary_<mln::fun::internal::composition<mln::Meta_Function_v2v, F,
mln::Meta_Function_vv2v, G>,
- typename G::argument1, typename G::argument2>
- {
- typedef typename F::template with<typename G::result>::ret F_fun;
-
- typedef mln::fun::internal::composition_binary_impl<F, F_fun, G, G> ret;
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_COMPOSITION_HH
diff --git a/milena/mln/fun/from_accu.hh b/milena/mln/fun/from_accu.hh
deleted file mode 100644
index f01a93d..0000000
--- a/milena/mln/fun/from_accu.hh
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-/// \file
-///
-/// Wrap an accumulator into a function.
-
-
-#ifndef MLN_FUN_FROM_ACCU_HH
-# define MLN_FUN_FROM_ACCU_HH
-
-# include <mln/fun/unary_param.hh>
-# include <mln/core/concept/accumulator.hh>
-
-
-namespace mln
-{
-
- namespace fun
- {
-
-
- /*! \brief Wrap an accumulator into a function.
- */
- template <typename A>
- struct from_accu : unary_param<from_accu<A>, A*>
- {
- from_accu();
- from_accu(A* a);
- };
-
- } // end of namespace mln::fun
-
- namespace trait
- {
-
- namespace next
- {
- template <typename A, typename T>
- struct set_unary_<mln::fun::from_accu<A>, mln::Object, T>
- {
- typedef set_unary_ ret;
- typedef typename A::result result;
- typedef typename A::argument argument;
- typedef A* param_t;
-
- static result read(const param_t& accu_, const argument& x);
-
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- namespace fun
- {
-
- template <typename A>
- inline
- from_accu<A>::from_accu()
- : unary_param<from_accu<A>, A*>()
- {
-
- }
-
-
- template <typename A>
- inline
- from_accu<A>::from_accu(A* a)
- : unary_param<from_accu<A>, A*>(a)
- {
-
- }
-
- } // end of namespace mln::fun
-
-
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename A, typename T>
- inline
- typename set_unary_<mln::fun::from_accu<A>, mln::Object, T>::result
- set_unary_<mln::fun::from_accu<A>,
- mln::Object, T>::read(const param_t& accu_,
- const argument& x)
- {
- mln_precondition(accu_ != 0);
-
- accu_->take(x);
- return accu_->to_result ();
- }
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_FROM_ACCU_HH
diff --git a/milena/mln/fun/math/abs.hh b/milena/mln/fun/math/abs.hh
deleted file mode 100644
index e4945aa..0000000
--- a/milena/mln/fun/math/abs.hh
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_MATH_ABS_HH
-# define MLN_FUN_MATH_ABS_HH
-
-# include <mln/fun/unary.hh>
-# include <mln/value/concept/scalar.hh>
-# include <mln/math/abs.hh>
-
-namespace mln
-{
-
- // Absolute value, pure
- namespace fun
- {
- struct abs : unary<abs> {};
- }
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename T>
- struct set_unary_<mln::fun::abs, mln::value::Scalar, T>
- {
- typedef set_unary_ ret;
- typedef T result;
- typedef T argument;
-
- static result read(const argument& x)
- {
- return math::abs(x);
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-#endif /* ! MLN_FUN_MATH_ABS_HH */
diff --git a/milena/mln/fun/math/cos.hh b/milena/mln/fun/math/cos.hh
deleted file mode 100644
index 8731c6c..0000000
--- a/milena/mln/fun/math/cos.hh
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_MATH_COS_HH
-# define MLN_FUN_MATH_COS_HH
-
-# include <mln/fun/unary.hh>
-# include <mln/value/builtin/floatings.hh>
-# include <mln/value/builtin/integers.hh>
-# include <mln/math/acos.hh>
-# include <mln/math/cos.hh>
-
-namespace mln
-{
-
- // Cosinus, bijective
- namespace fun
- {
- struct cos : unary<cos> {};
- }
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename T>
- struct set_unary_<mln::fun::cos, mln::value::Floating, T>
- {
- typedef set_unary_ ret;
- typedef T result;
- typedef T argument;
- typedef T& lvalue;
-
- static result read(const argument& x)
- {
- return math::cos(x);
- }
-
- static void write(lvalue l, const result& x)
- {
- l = math::acos(x);
- }
- };
-
- template <typename T>
- struct set_unary_<mln::fun::cos, mln::value::Integer, T>
- {
- typedef set_unary_ ret;
- typedef double result;
- typedef T argument;
-
- static result read(const argument& x)
- {
- return math::cos((result)x);
- }
-
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln
-
-} // end of namespace mln
-
-#endif /* ! MLN_FUN_MATH_COS_HH */
diff --git a/milena/mln/fun/math/inf.hh b/milena/mln/fun/math/inf.hh
deleted file mode 100644
index e1bea9d..0000000
--- a/milena/mln/fun/math/inf.hh
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_MATH_INF_HH
-# define MLN_FUN_MATH_INF_HH
-
-# include <mln/fun/binary.hh>
-# include <mln/math/min.hh>
-
-namespace mln
-{
-
- // Cosinus, bijective
- namespace fun
- {
- struct inf : binary<inf> {};
- }
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename T1, typename T2>
- struct set_binary_<mln::fun::inf, mln::Object, T1, mln::Object, T2>
- {
- typedef set_binary_ ret;
- typedef mln_trait_promote(T1, T2) result;
- typedef T1 argument1;
- typedef T2 argument2;
-
- static result read(const argument1& a, const argument1& b)
- {
- return math::min(a, b);
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_MATH_INF_HH
diff --git a/milena/mln/fun/math/norm.hh b/milena/mln/fun/math/norm.hh
deleted file mode 100644
index 152b422..0000000
--- a/milena/mln/fun/math/norm.hh
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_MATH_NORM_HH
-# define MLN_FUN_MATH_NORM_HH
-
-# include <mln/fun/unary.hh>
-# include <mln/norm/all.hh>
-
-namespace mln
-{
-
- // Common norm functions, reversible
- namespace fun
- {
- namespace norm
- {
- struct l1 : unary<l1> {};
-
- struct l2 : unary<l2> {};
-
- struct linfty : unary<linfty> {};
- }
- }
-
- namespace trait
- {
-
- namespace next
- {
-
- template <unsigned n, typename T>
- struct set_precise_unary_<mln::fun::norm::l1, mln::algebra::vec<n, T>
>
- {
- typedef set_precise_unary_ ret;
- typedef mln::algebra::vec<n, T> argument;
- typedef argument& lvalue;
- typedef mln_sum_product(argument,argument) result;
-
- static result read(const argument& x)
- {
- return mln::norm::l1(x);
- }
-
- static void write(lvalue l, const result& x)
- {
- l = l / read(l) * x;
- }
- };
-
- template <unsigned n, typename T>
- struct set_precise_unary_<mln::fun::norm::l2, mln::algebra::vec<n, T>
>
- {
- typedef set_precise_unary_ ret;
- typedef mln::algebra::vec<n, T> argument;
- typedef argument& lvalue;
- typedef mln_sum_product(argument,argument) result;
-
- static result read(const argument& x)
- {
- return mln::norm::l2(x);
- }
-
- static void write(lvalue l, const result& x)
- {
- l = l / read(l) * x;
- }
- };
-
- template <unsigned n, typename T>
- struct set_precise_unary_<mln::fun::norm::linfty, mln::algebra::vec<n, T>
>
- {
- typedef set_precise_unary_ ret;
- typedef mln::algebra::vec<n, T> argument;
- typedef argument& lvalue;
- typedef mln_sum_product(argument,argument) result;
-
- static result read(const argument& x)
- {
- return mln::norm::linfty(x);
- }
-
- static void write(lvalue l, const result& x)
- {
- l = l / read(l) * x;
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-#endif /* ! NORM_HH */
diff --git a/milena/mln/fun/math/sup.hh b/milena/mln/fun/math/sup.hh
deleted file mode 100644
index 4b03e38..0000000
--- a/milena/mln/fun/math/sup.hh
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_MATH_SUP_HH
-# define MLN_FUN_MATH_SUP_HH
-
-# include <mln/fun/binary.hh>
-# include <mln/math/max.hh>
-
-namespace mln
-{
-
- // Cosinus, bijective
- namespace fun
- {
- struct sup : binary<sup> {};
- }
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename T1, typename T2>
- struct set_binary_<mln::fun::sup, mln::Object, T1, mln::Object, T2>
- {
- typedef set_binary_ ret;
- typedef mln_trait_promote(T1, T2) result;
- typedef T1 argument1;
- typedef T2 argument2;
-
- static result read(const argument1& a, const argument1& b)
- {
- return math::max(a, b);
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_MATH_SUP_HH
diff --git a/milena/mln/fun/meta/all.hh b/milena/mln/fun/meta/all.hh
deleted file mode 100644
index ca24e96..0000000
--- a/milena/mln/fun/meta/all.hh
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_ALL_HH
-# define MLN_FUN_META_ALL_HH
-
-namespace mln
-{
-
- namespace meta
- {
-
- } // end of namespace mln::meta
-
-} // end of namespace mln
-
-
-# include <mln/fun/meta/blue.hh>
-# include <mln/fun/meta/first.hh>
-# include <mln/fun/meta/green.hh>
-# include <mln/fun/meta/hue.hh>
-# include <mln/fun/meta/inty.hh>
-# include <mln/fun/meta/lum.hh>
-# include <mln/fun/meta/red.hh>
-# include <mln/fun/meta/sat.hh>
-# include <mln/fun/meta/second.hh>
-# include <mln/fun/meta/to_enc.hh>
-
-#endif // ! MLN_FUN_META_ALL_HH
diff --git a/milena/mln/fun/meta/blue.hh b/milena/mln/fun/meta/blue.hh
deleted file mode 100644
index 81f1676..0000000
--- a/milena/mln/fun/meta/blue.hh
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_BLUE_HH
-# define MLN_FUN_META_BLUE_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the blue component.
-
-# include <mln/fun/meta/impl.hh>
-# include <mln/value/rgb.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class T>
- struct blue : impl< blue<T> >
- {
- typedef T value;
- };
-
- } // end of namespace mln::meta
-
-
- template <unsigned n>
- struct function< meta::blue< value::rgb<n> > >
- : public Function_v2v<function< meta::blue < value::rgb<n> > >
>
- {
- typedef value::rgb<n> value;
-
- typedef typename value::blue_t result;
- result read(const value& c);
-
- typedef result& lresult;
- lresult write(value& c);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <unsigned n>
- inline
- typename function< meta::blue< value::rgb<n> > >::result
- function< meta::blue< value::rgb<n> > >::read(const value& c)
- {
- return c.blue();
- }
-
- template <unsigned n>
- inline
- typename function< meta::blue< value::rgb<n> > >::lresult
- function< meta::blue< value::rgb<n> > >::write(value& c)
- {
- return c.blue();
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_BLUE_HH
diff --git a/milena/mln/fun/meta/essential.hh b/milena/mln/fun/meta/essential.hh
deleted file mode 100644
index 20ecbbf..0000000
--- a/milena/mln/fun/meta/essential.hh
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_ESSENTIAL_HH
-# define MLN_FUN_META_ESSENTIAL_HH
-
-# include <mln/fun/meta/all.hh>
-
-#endif // ! MLN_FUN_META_ESSENTIAL_HH
diff --git a/milena/mln/fun/meta/first.hh b/milena/mln/fun/meta/first.hh
deleted file mode 100644
index e043b5b..0000000
--- a/milena/mln/fun/meta/first.hh
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_FIRST_HH
-# define MLN_FUN_META_FIRST_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the first component.
-
-# include <mln/fun/meta/impl.hh>
-# include <mln/util/couple.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class T>
- struct first : impl< first<T> >
- {
- typedef T value;
- };
-
- } // end of namespace mln::meta
-
-
- template <typename T, typename U>
- struct function< meta::first< util::couple<T,U> > >
- : public Function_v2v<function< meta::first < util::couple<T,U> >
> >
- {
- typedef util::couple<T,U> value;
-
- typedef T result;
- result read(const value& c);
-
- typedef result& lresult;
- lresult write(value& c);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename T, typename U>
- inline
- typename function< meta::first< util::couple<T,U> > >::result
- function< meta::first< util::couple<T,U> > >::read(const value&
c)
- {
- return c.first();
- }
-
- template <typename T, typename U>
- inline
- typename function< meta::first< util::couple<T,U> > >::lresult
- function< meta::first< util::couple<T,U> > >::write(value& c)
- {
- return c.first();
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_FIRST_HH
diff --git a/milena/mln/fun/meta/green.hh b/milena/mln/fun/meta/green.hh
deleted file mode 100644
index bc3dd20..0000000
--- a/milena/mln/fun/meta/green.hh
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_GREEN_HH
-# define MLN_FUN_META_GREEN_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the green component.
-
-# include <mln/fun/meta/impl.hh>
-# include <mln/value/rgb.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class T>
- struct green : impl< green<T> >
- {
- typedef T value;
- };
-
- } // end of namespace mln::meta
-
-
- template <unsigned n>
- struct function< meta::green< value::rgb<n> > >
- : public Function_v2v<function< meta::green < value::rgb<n> > >
>
- {
- typedef value::rgb<n> value;
-
- typedef typename value::green_t result;
- result read(const value& c);
-
- typedef result& lresult;
- lresult write(value& c);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <unsigned n>
- inline
- typename function< meta::green< value::rgb<n> > >::result
- function< meta::green< value::rgb<n> > >::read(const value& c)
- {
- return c.green();
- }
-
- template <unsigned n>
- inline
- typename function< meta::green< value::rgb<n> > >::lresult
- function< meta::green< value::rgb<n> > >::write(value& c)
- {
- return c.green();
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_GREEN_HH
diff --git a/milena/mln/fun/meta/hue.hh b/milena/mln/fun/meta/hue.hh
deleted file mode 100644
index 35e72e3..0000000
--- a/milena/mln/fun/meta/hue.hh
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_HUE_HH
-# define MLN_FUN_META_HUE_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the color hue.
-
-# include <mln/value/hsl.hh>
-# include <mln/value/hsi.hh>
-# include <mln/fun/meta/impl.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class H>
- struct hue : impl< hue<H> >
- {
- typedef H value;
- };
-
- } // end of namespace mln::meta
-
- template <class H, class S, class I>
- struct function< meta::hue< value::hsi_<H, S, I> > >
- : public Function_v2v<function< meta::hue < value::hsi_<H, S, I> >
> >
- {
- typedef value::hsi_<H, S, I> value;
-
- typedef H result;
- H read(const value& h);
-
- typedef H& lresult;
- H& write(value& h);
- };
-
- template <class H, class S, class L>
- struct function< meta::hue< value::hsl_<H, S, L> > >
- : public Function_v2v<function< meta::hue < value::hsl_<H, S, L> >
> >
- {
- typedef value::hsl_<H, S, L> value;
-
- typedef H result;
- H read(const value& h);
-
- typedef H& lresult;
- H& write(value& h);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <class H, class S, class I>
- inline
- H
- function< meta::hue< value::hsi_<H, S, I> > >::read(const value&
h)
- {
- return h.hue();
- }
-
- template <class H, class S, class I>
- inline
- H&
- function< meta::hue< value::hsi_<H, S, I> > >::write(value& h)
- {
- return h.hue();
- }
-
-
- template <class H, class S, class L>
- inline
- H
- function< meta::hue< value::hsl_<H, S, L> > >::read(const value&
h)
- {
- return h.hue();
- }
-
- template <class H, class S, class L>
- inline
- H&
- function< meta::hue< value::hsl_<H, S, L> > >::write(value& h)
- {
- return h.hue();
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_HUE_HH
diff --git a/milena/mln/fun/meta/inty.hh b/milena/mln/fun/meta/inty.hh
deleted file mode 100644
index be929d5..0000000
--- a/milena/mln/fun/meta/inty.hh
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_INTY_HH
-# define MLN_FUN_META_INTY_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the color intensity.
-
-# include <mln/value/hsi.hh>
-# include <mln/fun/meta/impl.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class H>
- struct inty : impl< inty<H> >
- {
- typedef H value;
- };
-
- } // end of namespace mln::meta
-
-
- template <class H, class S, class I>
- struct function< meta::inty< value::hsi_<H, S, I> > >
- : public Function_v2v<function< meta::inty < value::hsi_<H, S, I> >
> >
- {
- typedef value::hsi_<H, S, I> value;
-
- typedef H result;
- H read(const value& h);
-
- typedef H& lresult;
- H& write(value& h);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <class H, class S, class I>
- inline
- H
- function< meta::inty< value::hsi_<H, S, I> > >::read(const value&
h)
- {
- return h.inty();
- }
-
- template <class H, class S, class I>
- inline
- H&
- function< meta::inty< value::hsi_<H, S, I> > >::write(value& h)
- {
- return h.inty();
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_INTY_HH
diff --git a/milena/mln/fun/meta/lum.hh b/milena/mln/fun/meta/lum.hh
deleted file mode 100644
index 0a64784..0000000
--- a/milena/mln/fun/meta/lum.hh
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_LUM_HH
-# define MLN_FUN_META_LUM_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the color luminosity.
-
-# include <mln/value/hsl.hh>
-# include <mln/fun/meta/impl.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class H>
- struct lum : impl< lum<H> >
- {
- typedef H value;
- };
-
- } // end of namespace mln::meta
-
-
- template <class H, class S, class I>
- struct function< meta::lum< value::hsl_<H, S, I> > >
- : public Function_v2v<function< meta::lum < value::hsl_<H, S, I> >
> >
- {
- typedef value::hsl_<H, S, I> value;
-
- typedef H result;
- H read(const value& h);
-
- typedef H& lresult;
- H& write(value& h);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <class H, class S, class I>
- inline
- H
- function< meta::lum< value::hsl_<H, S, I> > >::read(const value&
h)
- {
- return h.lum();
- }
-
- template <class H, class S, class I>
- inline
- H&
- function< meta::lum< value::hsl_<H, S, I> > >::write(value& h)
- {
- return h.lum();
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_LUM_HH
diff --git a/milena/mln/fun/meta/red.hh b/milena/mln/fun/meta/red.hh
deleted file mode 100644
index 218c074..0000000
--- a/milena/mln/fun/meta/red.hh
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_RED_HH
-# define MLN_FUN_META_RED_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the red component.
-
-# include <mln/fun/meta/impl.hh>
-# include <mln/value/rgb.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class T>
- struct red : impl< red<T> >
- {
- typedef T value;
- };
-
- } // end of namespace mln::meta
-
-
- template <unsigned n>
- struct function< meta::red< value::rgb<n> > >
- : public Function_v2v<function< meta::red < value::rgb<n> > >
>
- {
- typedef value::rgb<n> value;
-
- typedef typename value::red_t result;
- result read(const value& c);
-
- typedef result& lresult;
- lresult write(value& c);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <unsigned n>
- inline
- typename function< meta::red< value::rgb<n> > >::result
- function< meta::red< value::rgb<n> > >::read(const value& c)
- {
- return c.red();
- }
-
- template <unsigned n>
- inline
- typename function< meta::red< value::rgb<n> > >::lresult
- function< meta::red< value::rgb<n> > >::write(value& c)
- {
- return c.red();
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_RED_HH
diff --git a/milena/mln/fun/meta/sat.hh b/milena/mln/fun/meta/sat.hh
deleted file mode 100644
index 72dae2d..0000000
--- a/milena/mln/fun/meta/sat.hh
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_SAT_HH
-# define MLN_FUN_META_SAT_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the color saturation.
-
-# include <mln/value/hsl.hh>
-# include <mln/value/hsi.hh>
-# include <mln/fun/meta/impl.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class H>
- struct sat : impl< sat<H> >
- {
- typedef H value;
- };
-
- } // end of namespace mln::meta
-
-
- template <class H, class S, class I>
- struct function< meta::sat< value::hsi_<H, S, I> > >
- : public Function_v2v<function< meta::sat < value::hsi_<H, S, I> >
> >
- {
- typedef value::hsi_<H, S, I> value;
-
- typedef H result;
- H read(const value& h);
-
- typedef H& lresult;
- H& write(value& h);
- };
-
-
- template <class H, class S, class L>
- struct function< meta::sat< value::hsl_<H, S, L> > >
- : public Function_v2v<function< meta::sat < value::hsl_<H, S, L> >
> >
- {
- typedef value::hsl_<H, S, L> value;
-
- typedef H result;
- H read(const value& h);
-
- typedef H& lresult;
- H& write(value& h);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <class H, class S, class I>
- inline
- H
- function< meta::sat< value::hsi_<H, S, I> > >::read(const value&
h)
- {
- return h.sat();
- }
-
- template <class H, class S, class I>
- inline
- H&
- function< meta::sat< value::hsi_<H, S, I> > >::write(value& h)
- {
- return h.sat();
- }
-
-
-
- template <class H, class S, class L>
- inline
- H
- function< meta::sat< value::hsl_<H, S, L> > >::read(const value&
h)
- {
- return h.sat();
- }
-
- template <class H, class S, class L>
- inline
- H&
- function< meta::sat< value::hsl_<H, S, L> > >::write(value& h)
- {
- return h.sat();
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_SAT_HH
diff --git a/milena/mln/fun/meta/second.hh b/milena/mln/fun/meta/second.hh
deleted file mode 100644
index a38f3b0..0000000
--- a/milena/mln/fun/meta/second.hh
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_SECOND_HH
-# define MLN_FUN_META_SECOND_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the second component.
-
-# include <mln/fun/meta/impl.hh>
-# include <mln/util/couple.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class T>
- struct second : impl< second<T> >
- {
- typedef T value;
- };
-
- } // end of namespace mln::meta
-
-
- template <typename T, typename U>
- struct function< meta::second< util::couple<T,U> > >
- : public Function_v2v<function< meta::second < util::couple<T,U> >
> >
- {
- typedef util::couple<T,U> value;
-
- typedef T result;
- result read(const value& c);
-
- typedef result& lresult;
- lresult write(value& c);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename T, typename U>
- inline
- typename function< meta::second< util::couple<T,U> > >::result
- function< meta::second< util::couple<T,U> > >::read(const value&
c)
- {
- return c.second();
- }
-
- template <typename T, typename U>
- inline
- typename function< meta::second< util::couple<T,U> > >::lresult
- function< meta::second< util::couple<T,U> > >::write(value& c)
- {
- return c.second();
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_SECOND_HH
diff --git a/milena/mln/fun/meta/to_enc.hh b/milena/mln/fun/meta/to_enc.hh
deleted file mode 100644
index 65b30ca..0000000
--- a/milena/mln/fun/meta/to_enc.hh
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_META_TO_ENC_HH
-# define MLN_FUN_META_TO_ENC_HH
-
-/// \file
-///
-/// FIXME: doc
-
-# include <mln/fun/meta/impl.hh>
-
-namespace mln
-{
-
- namespace meta
- {
-
- template <class T>
- struct to_enc : impl< to_enc<T> >
- {
- typedef typename T::enc value;
- };
-
- } // end of namespace mln::meta
-
-
- template <typename T>
- struct function< meta::to_enc<T> >
- : public Function_v2v<function< meta::to_enc<T> > >
- {
- typedef typename T::enc value;
-
- value read(const T& t);
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename T>
- inline
- typename T::enc
- function< meta::to_enc<T> >::read(const T& t)
- {
- return t.to_enc();
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_META_TO_ENC_HH
diff --git a/milena/mln/fun/param.hh b/milena/mln/fun/param.hh
deleted file mode 100644
index edeab7d..0000000
--- a/milena/mln/fun/param.hh
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_PARAM_HH
-# define MLN_FUN_PARAM_HH
-
-namespace mln
-{
-
- namespace fun
- {
-
- template <typename T>
- struct stored
- {
- typedef T value;
-
- const T& to_value() const
- {
- return t_;
- }
-
- T& to_value()
- {
- return t_;
- }
-
- operator const T& () const
- {
- return to_value();
- }
-
- operator T& ()
- {
- return to_value();
- }
-
- stored& operator = (const T& t)
- {
- t_ = t;
- return *this;
- }
-
- protected:
- T t_;
- };
-
- template <>
- struct stored<void>
- {
- };
-
- template <typename F>
- struct parameter
- {
- typedef void param;
- typedef void storage;
- };
-
- } // end of namespace mln::fun
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_PARAM_HH
diff --git a/milena/mln/fun/point/col.hh b/milena/mln/fun/point/col.hh
deleted file mode 100644
index aba181a..0000000
--- a/milena/mln/fun/point/col.hh
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_POINT_COL_HH
-# define MLN_FUN_POINT_COL_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the col coord of a point.
-
-# include <mln/fun/unary.hh>
-# include <mln/core/point.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- struct col : unary<col>
- {
- };
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename G, typename C>
- struct set_precise_unary_<fun::col, point<G, C> >
- {
- typedef set_precise_unary_ ret;
- typedef point<G,C> argument;
- typedef typename argument::coord result;
- typedef argument& lvalue;
-
- static result read(const argument& p)
- {
- return p.col();
- }
-
- static void write(lvalue l, const result& r)
- {
- l.col() = r;
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_POINT_COL_HH
diff --git a/milena/mln/fun/point/row.hh b/milena/mln/fun/point/row.hh
deleted file mode 100644
index 1e97c20..0000000
--- a/milena/mln/fun/point/row.hh
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_POINT_ROW_HH
-# define MLN_FUN_POINT_ROW_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the row coord of a point.
-
-# include <mln/fun/unary.hh>
-# include <mln/core/point.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- struct row : unary<row> {};
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename G, typename C>
- struct set_precise_unary_<fun::row, point<G,C> >
- {
- typedef set_precise_unary_ ret;
- typedef point<G,C> argument;
- typedef typename argument::coord result;
- typedef argument& lvalue;
-
- static result read(const argument& p)
- {
- return p.row();
- }
-
- static void write(lvalue l, const result& r)
- {
- l.row() = r;
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_POINT_ROW_HH
diff --git a/milena/mln/fun/point/sli.hh b/milena/mln/fun/point/sli.hh
deleted file mode 100644
index 54f1d81..0000000
--- a/milena/mln/fun/point/sli.hh
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_POINT_SLI_HH
-# define MLN_FUN_POINT_SLI_HH
-
-/// \file
-///
-/// Meta function to retrieve/modify the sli coord of a point.
-
-# include <mln/fun/unary.hh>
-# include <mln/core/point.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- struct sli : unary<sli> {};
-
- } // end of namespace mln::fun
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename G, typename C>
- struct set_precise_unary_<mln::fun::sli, mln::point<G, C> >
- {
- typedef set_precise_unary_ ret;
- typedef mln::point<G,C> argument;
- typedef typename argument::coord result;
- typedef argument& lvalue;
-
- static result read(const argument& p)
- {
- return p.sli();
- }
-
- static void write(lvalue l, const result& r)
- {
- l.sli() = r;
- }
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_POINT_SLI_HH
diff --git a/milena/mln/fun/spe/binary.hh b/milena/mln/fun/spe/binary.hh
deleted file mode 100644
index cde465d..0000000
--- a/milena/mln/fun/spe/binary.hh
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_SPE_BINARY_HH
-# define MLN_FUN_SPE_BINARY_HH
-
-# include <mln/core/concept/function.hh>
-# include <mln/trait/next/solve.hh>
-# include <mln/trait/functions.hh>
-
-/// \todo Implements parameter support
-
-namespace mln
-{
-
- namespace fun
- {
-
- namespace spe
- {
-
- // Forward declaration
- template <typename Fun, typename T1, typename T2>
- struct binary;
-
- namespace impl
- {
-
- template <bool has_param, typename Fun, typename T1, typename T2>
- struct binary_impl;
-
- template <typename Fun, typename T1, typename T2>
- struct binary_impl<false, Fun, T1, T2>
- : mln::Function_v2v< binary<Fun, T1, T2> >
- {
- typedef Fun flag;
- typedef mln_trait_nbinary(flag, T1, T2) def;
-
- typedef typename def::argument1 argument1;
- typedef typename def::argument2 argument2;
- typedef typename def::result result;
-
- result operator () (const argument1& a, const argument2& b) const
- {
- return def::read(a, b);
- }
-
-
- template <typename U>
- void init(const U& value)
- {
- (void) value;
- }
-
- };
-
- template <typename Fun, typename T1, typename T2>
- struct binary_impl<true, Fun, T1, T2>
- : mln::Function_v2v< binary<Fun, T1, T2> >
- {
- typedef Fun flag;
- typedef mln_trait_nbinary(flag, T1, T2) def;
-
- typedef typename def::argument1 argument1;
- typedef typename def::argument2 argument2;
- typedef typename def::result result;
-
- typedef mln_trait_fun_param(def) param;
- typedef mln_trait_fun_storage(def) storage;
-
- result operator () (const argument1& a, const argument2& b) const
- {
- return def::read(state_, a, b);
- }
-
- template <typename U>
- void init(const U& value)
- {
- state_ = mln::trait::function::internal::introspect::has_storage_t<def,
void>::compute(value);
- }
-
- stored<storage>& state()
- {
- return state_;
- }
-
- const stored<storage>& state() const
- {
- return state_;
- }
-
- protected:
- mln::fun::stored<storage> state_;
- };
-
- } // end of namespace mln::fun::spe::impl
-
- template <typename Fun, typename T1, typename T2>
- struct binary
- : impl::binary_impl<mln_trait_fun_is_parametrable_(Fun)::value, Fun, T1, T2>
- {
- typedef impl::binary_impl<mln_trait_fun_is_parametrable_(Fun)::value, Fun, T1, T2>
super;
-
- binary()
- {
- }
-
- template <typename U>
- binary(const U& param)
- {
- this->super::init(param);
- }
-
- using super::operator();
- };
-
- } // end of namespace mln::fun::spe
-
- } // end of namespace mln::fun
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_SPE_BINARY_HH
diff --git a/milena/mln/fun/spe/unary.hh b/milena/mln/fun/spe/unary.hh
deleted file mode 100644
index 47d7f41..0000000
--- a/milena/mln/fun/spe/unary.hh
+++ /dev/null
@@ -1,334 +0,0 @@
-// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_SPE_UNARY_HH
-# define MLN_FUN_SPE_UNARY_HH
-
-# include <mln/core/concept/function.hh>
-# include <mln/trait/next/solve.hh>
-# include <mln/trait/functions.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- namespace spe
- {
-
- // Wrapper for bijective functions
- template <typename Fun, typename T>
- struct lwrapper
- {
- typedef typename Fun::result result;
- typedef typename Fun::argument argument;
- typedef typename Fun::lvalue lvalue;
- typedef lwrapper lresult;
-
- lwrapper(const Fun& f, T& x)
- : x_(&x), f_(&f)
- {
- }
-
- result to_result() const
- {
- return (*f_)(*const_cast<const T*>(x_));
- };
-
- operator result() const
- {
- return to_result();
- };
-
- const result& operator = (const result& r) const
- {
- argument x(*x_);
- f_->set(x, r);
- *x_ = x;
-
- return r;
- }
-
- private:
- T *x_;
- const Fun *f_;
- };
-
- template <typename Fun>
- struct lwrapper<Fun, typename Fun::argument>
- {
- typedef typename Fun::result result;
- typedef typename Fun::argument argument;
- typedef typename Fun::lvalue lvalue;
- typedef lwrapper lresult;
-
- lwrapper(const Fun& f, argument& x)
- : x_(&x), f_(&f)
- {
- }
-
- result to_result() const
- {
- return (*f_)(*const_cast<const argument*>(x_));
- };
-
- operator result() const
- {
- return to_result();
- };
-
- const result& operator = (const result& r) const
- {
- f_->set(*x_, r);
-
- return r;
- }
-
- private:
- argument *x_;
- const Fun *f_;
- };
-
- template <typename Fun, typename Any, typename T>
- struct lwrapper<Fun, lwrapper<Any, T> >
- {
- typedef typename Fun::result result;
- typedef typename Fun::argument argument;
- typedef typename Fun::lvalue lvalue;
- typedef lwrapper lresult;
-
- lwrapper(const Fun& f, const lwrapper<Any, T>& m)
- : m_(m), f_(&f)
- {
- }
-
- result to_result() const
- {
- return (*f_)(m_.to_result());
- };
-
- operator result() const
- {
- return to_result();
- };
-
- const result& operator = (const result& r) const
- {
- argument m(m_);
- f_->set(m, r);
- m_ = m;
-
- return r;
- }
-
- private:
- const lwrapper<Any, T> m_;
- const Fun *f_;
- };
-
- template <typename Fun, typename T>
- struct unary;
-
- namespace impl
- {
-
- template <bool param, bool set, typename Fun, typename T>
- struct unary_impl;
-
- template <typename Fun, typename T>
- struct unary_impl<false, false, Fun, T> : Function_v2v< unary<Fun, T>
>
- {
- typedef Fun flag;
- typedef mln_trait_nunary(Fun, T) def;
-
- typedef typename def::argument argument;
- typedef typename def::result result;
-
- result operator () (const argument& value) const
- {
- return def::read(value);
- }
-
- template <typename U>
- void init(const U& value)
- {
- (void) value;
- };
-
- };
-
- template <typename Fun, typename T>
- struct unary_impl<false, true, Fun, T> : unary_impl<false, false, Fun, T>
- {
- typedef unary_impl<false, false, Fun, T> super;
- typedef typename super::def::lvalue lvalue;
-
- template <typename U>
- struct lresult_with
- {
- typedef mln::fun::spe::lwrapper< unary<Fun, T>, U> ret;
- };
-
- typedef typename lresult_with<typename super::argument>::ret lresult;
-
- void set(lvalue l, const typename super::result& r) const
- {
- super::def::write(l, r);
- }
-
- using super::operator ();
-
- lresult apply_rw(typename super::argument& value) const
- {
- return lresult(exact(*this), value);
- }
-
- template <typename U>
- typename lresult_with<U>::ret apply_rw(U& value) const
- {
- return typename lresult_with<U>::ret(exact(*this), value);
- }
-
- lresult operator () (typename super::argument& value) const
- {
- return apply_rw(value);
- }
- };
-
- template <typename Fun, typename T>
- struct unary_impl<true, false, Fun, T> : Function_v2v< unary<Fun, T>
>
- {
- typedef Fun flag;
- typedef mln_trait_nunary(Fun, T) def;
-
- typedef typename def::argument argument;
- typedef typename def::result result;
-
- typedef mln_trait_fun_param(unary_impl) param;
- typedef mln_trait_fun_storage(unary_impl) storage;
-
- result operator () (const argument& value) const
- {
- return def::read(this->state_, value);
- }
-
- template <typename U>
- void init(const U& value)
- {
- state_ = mln::trait::function::internal::introspect::has_storage_t<def,
void>::compute(value);
- };
-
- stored<storage>& state()
- {
- return state_;
- }
-
- const stored<storage>& state() const
- {
- return state_;
- }
-
- protected:
- stored<storage> state_;
- };
-
- template <typename Fun, typename T>
- struct unary_impl<true, true, Fun, T> : unary_impl<true, false, Fun, T>
- {
- typedef unary_impl<true, false, Fun, T> super;
- typedef typename super::def::lvalue lvalue;
-
- template <typename U>
- struct lresult_with
- {
- typedef mln::fun::spe::lwrapper< unary<Fun, T>, U> ret;
- };
-
- typedef typename lresult_with<typename super::argument>::ret lresult;
-
- void set(lvalue l, const typename super::result& r) const
- {
- super::def::write(this->state(), l, r);
- }
-
- using super::operator ();
-
- lresult apply_rw(typename super::argument& value) const
- {
- return lresult(exact(*this), value);
- }
-
- template <typename U>
- typename lresult_with<U>::ret apply_rw(U& value) const
- {
- return typename lresult_with<U>::ret(exact(*this), value);
- }
-
- lresult operator () (typename super::argument& value) const
- {
- return apply_rw(value);
- }
- };
-
- } // end of namespace mln::fun::spe::impl
-
- template <typename Fun, typename T>
- struct unary
- : impl::unary_impl<mlc_or(mln_trait_fun_is_parametrable(mln_trait_nunary(Fun,
T)), mln_trait_fun_is_parametrable(Fun))::value,
- mln_trait_fun_is_assignable_(mln_trait_nunary(Fun, T))::value, Fun, T>
- {
- typedef mln_trait_nunary(Fun, T) def;
- typedef impl::unary_impl<mlc_or(mln_trait_fun_is_parametrable(def),
mln_trait_fun_is_parametrable(Fun))::value,
- mln_trait_fun_is_assignable_(def)::value,
- Fun,
- T>
- super;
-
- unary() {}
-
- template <typename U>
- unary(const U& param)
- {
- this->init(param);
- }
-
- using super::operator();
- };
-
- } // end of namespace mln::fun::spe
-
- } // end of namespace mln::fun
-
-} // end of namespace mln
-
-template <typename F, typename T>
-std::ostream& operator << (std::ostream& o, const
mln::fun::spe::lwrapper<F, T>& m)
-{
- return o << m.to_result();
-}
-
-#endif // ! MLN_FUN_SPE_UNARY_HH
diff --git a/milena/mln/fun/unary.hh b/milena/mln/fun/unary.hh
deleted file mode 100644
index 1e1ee2b..0000000
--- a/milena/mln/fun/unary.hh
+++ /dev/null
@@ -1,175 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_UNARY_HH
-# define MLN_FUN_UNARY_HH
-
-# include <mln/core/concept/meta_function.hh>
-# include <mln/fun/spe/unary.hh>
-# include <mln/trait/next/solve.hh>
-
-
-namespace mln
-{
-
- namespace fun
- {
-
- // Forward declarations, for composition with unary::operator()(Fun)
- struct compose;
-
- namespace internal
- {
-
- template <typename U>
- struct unary_with {};
-
- }
-
- template <typename F, typename E = F>
- struct unary: mln::Meta_Function_v2v< E >
- {
- typedef F flag;
- typedef mln_trait_fun_param(flag) param;
- typedef mln_trait_fun_storage(flag) storage;
-
- template <typename T>
- struct with {
- typedef mln_trait_nunary(internal::unary_with<F>, T) def;
- typedef typename def::ret ret;
- };
-
- template <typename T>
- typename with<T>::ret::result operator()(const T& v) const
- {
- return with<T>::def::call(exact(*this), v);
- }
-
- template <typename T>
- typename with<T>::ret::template lresult_with<T>::ret operator()(T&
v) const
- {
- // See the commentary in next method.
- typedef typename with<T>::ret fun_t;
- fun_t f(state());
- return f.apply_rw(v);
- }
-
- template <typename T, typename R>
- void set(T& v, const R& r) const
- {
- // Decomposing "with<T>::ret(state()).set(v, r)" into 3 lines
- // helps g++-3.3!
- typedef typename with<T>::ret fun_t;
- fun_t f(state());
- f.set(v, r);
- }
-
- template <typename U>
- void init(const U& value)
- {
- state_ = mln::trait::function::internal::introspect::has_storage_t<flag,
void>::compute(value);
- };
-
- unary()
- {
- }
-
- template <typename U>
- unary(const U& param)
- {
- this->init(param);
- }
-
- stored<storage>& state()
- {
- return state_;
- }
-
- const stored<storage>& state() const
- {
- return state_;
- }
-
- protected:
- stored<storage> state_;
- };
-
- } // end of namespace mln::fun
-
- namespace trait
- {
-
- namespace next
- {
-
- // Any type
- template <typename F, typename T>
- struct set_unary_< mln::fun::internal::unary_with<F>, mln::Object, T>
- {
- struct ret_t
- {
- typedef mln::fun::spe::unary<F, T> ret;
-
- static typename ret::result call(const F& f, const T& v)
- {
- return ret(f.state())(v);
- }
- };
-
- typedef ret_t ret;
- };
-
- // Meta Function
- template <typename F, typename G>
- struct set_unary_< mln::fun::internal::unary_with<F>, mln::Meta_Function,
G>
- {
- // FIXME: Workaround for cyclic references (unary -> unary_with -> compose ->
unary)
- template <typename T>
- struct identity
- {
- typedef T ret;
- };
-
- struct ret_t
- {
- typedef typename identity<mln::fun::compose>::ret::template with<F,
G>::ret ret;
-
- static typename ret::result call(const F& f, const G& g)
- {
- return ret()(f, g);
- }
-
- };
-
- typedef ret_t ret;
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_UNARY_HH
diff --git a/milena/mln/fun/unary_param.hh b/milena/mln/fun/unary_param.hh
deleted file mode 100644
index 7ee2ceb..0000000
--- a/milena/mln/fun/unary_param.hh
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#include "unary.hh"
-
-#ifndef MLN_FUN_UNARY_PARAM_HH
-# define MLN_FUN_UNARY_PARAM_HH
-
-# include <mln/fun/unary.hh>
-# include <mln/fun/param.hh>
-
-namespace mln
-{
-
- namespace fun
- {
-
- template <typename F, typename Param, typename Storage = void, typename E = F>
- struct unary_param: unary< unary_param<F,Param,Storage,E>, E>
- {
- typedef F flag;
- typedef Param param;
- typedef Storage storage;
-
- unary_param()
- {
- }
-
- template <typename U>
- unary_param(const U& param)
- {
- this->init(param);
- }
-
- };
-
- template <typename F, typename Param, typename E>
- struct parameter< unary_param<F,Param,void,E> >
- {
- typedef Param param;
- typedef void storage;
- };
-
- template <typename F, typename Param, typename Storage, typename E>
- struct parameter< unary_param<F,Param,Storage,E> >
- {
- typedef Param param;
- typedef Storage storage;
-
- template <typename U>
- storage compute(const U& u)
- {
- return F::compute_param(u);
- }
- };
-
- }
-
- namespace trait
- {
-
- namespace next
- {
-
- template <typename F, typename Param, typename Storage, typename E, typename
T>
- struct set_precise_unary_<mln::fun::unary_param<F,Param,Storage,E>, T>
- {
- typedef mln_trait_nunary(F, T) ret;
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_UNARY_PARAM_HH
diff --git a/milena/mln/fun/v2v/hsi_to_rgb.hh b/milena/mln/fun/v2v/hsi_to_rgb.hh
deleted file mode 100644
index 0011e2b..0000000
--- a/milena/mln/fun/v2v/hsi_to_rgb.hh
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_V2V_HSI_TO_RGB_HH
-# define MLN_FUN_V2V_HSI_TO_RGB_HH
-
-/// \file
-///
-/// Convert a rgb value to hsi.
-
-#include <cmath>
-
-#include <mln/value/rgb8.hh>
-#include <mln/math/round.hh>
-
-#include <mln/value/hsi.hh>
-
-
-namespace mln
-{
-
-
- namespace fun
- {
-
- namespace v2v
- {
-
- /// \brief Convert a hsi value to rgb.
- ///
- /// \ingroup modfunv2v
- //
- template <typename T_rgb>
- struct f_hsi_to_rgb_ : public Function_v2v< f_hsi_to_rgb_<T_rgb> >
- {
- typedef T_rgb result;
-
- f_hsi_to_rgb_();
-
- template <typename T_hsi>
- T_rgb operator()(const T_hsi& hsi) const;
-
- };
-
- typedef f_hsi_to_rgb_<value::rgb8> f_hsi_to_rgb_3x8_t;
-
- extern f_hsi_to_rgb_3x8_t f_hsi_to_rgb_3x8;
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-# ifndef MLN_WO_GLOBAL_VARS
-
- /// Global variable.
- /// \{
- f_hsi_to_rgb_3x8_t f_hsi_to_rgb_3x8;
- /// \}
-
-# endif // ! MLN_WO_GLOBAL_VARS
-
- template <typename T_rgb>
- f_hsi_to_rgb_<T_rgb>::f_hsi_to_rgb_()
- {
- }
-
-
- template <typename T_rgb>
- template <typename T_hsi>
- inline
- T_rgb
- f_hsi_to_rgb_<T_rgb>::operator()(const T_hsi& hsi) const
- {
- typedef typename T_rgb::red_t red_t;
- typedef typename T_rgb::green_t green_t;
- typedef typename T_rgb::blue_t blue_t;
-
- static math::round<red_t> to_r;
- static math::round<green_t> to_g;
- static math::round<blue_t> to_b;
-
- static const float
- sqrt3_3 = std::sqrt(3) / 3,
- inv_sqrt6 = 1 / std::sqrt(6),
- inv_sqrt2 = 1 / std::sqrt(2);
-
- float
- h = hsi.hue() / 180.0 * 3.1415,
- alpha = hsi.sat() * std::cos(h),
- beta = hsi.sat() * std::sin(h);
-
-
- red_t r = to_r(sqrt3_3 * hsi.inty() + 2 * inv_sqrt6 * beta);
- green_t g =
- to_g(sqrt3_3 * hsi.inty() + inv_sqrt2 * alpha - inv_sqrt6 * beta);
- blue_t b =
- to_b(sqrt3_3 * hsi.inty() - inv_sqrt2 * alpha - inv_sqrt6 * beta);
-
- T_rgb rgb(r, g, b);
-
- return rgb;
- }
-
-# endif // !MLN_INCLUDE_ONLY
-
- } // end of namespace fun::v2v
-
- } // end of namespace fun
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_V2V_HSI_TO_RGB_HH
diff --git a/milena/mln/fun/v2v/rgb_to_hsi.hh b/milena/mln/fun/v2v/rgb_to_hsi.hh
deleted file mode 100644
index 12e2a9d..0000000
--- a/milena/mln/fun/v2v/rgb_to_hsi.hh
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_FUN_V2V_RGB_TO_HSI_HH
-# define MLN_FUN_V2V_RGB_TO_HSI_HH
-
-#include <cmath>
-
-#include <mln/value/rgb8.hh>
-#include <mln/math/round.hh>
-
-#include <mln/value/hsi.hh>
-
-
-namespace mln
-{
-
-
- namespace fun
- {
-
- namespace v2v
- {
-
- template <typename T_hsi>
- struct f_rgb_to_hsi_ : public Function_v2v< f_rgb_to_hsi_<T_hsi> >
- {
- typedef T_hsi result;
-
- f_rgb_to_hsi_();
-
- template <typename T_rgb>
- T_hsi operator()(const T_rgb& rgb) const;
-
- };
-
- typedef f_rgb_to_hsi_<value::hsi_f> f_rgb_to_hsi_f_t;
-
- extern f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-# ifndef MLN_WO_GLOBAL_VARS
-
- /// Global variables.
- /// \{
- f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
- /// \}
-
-# endif // ! MLN_WO_GLOBAL_VARS
-
-
- template <typename T_hsi>
- f_rgb_to_hsi_<T_hsi>::f_rgb_to_hsi_()
- {
- }
-
- template <typename T_hsi>
- template <typename T_rgb>
- inline
- T_hsi
- f_rgb_to_hsi_<T_hsi>::operator()(const T_rgb& rgb) const
- {
- // Locals.
- static const double sqrt3_3 = std::sqrt(3) / 3;
- static const double inv_sqrt6 = 1 / std::sqrt(6);
- static const double inv_sqrt2 = 1 / std::sqrt(2);
-
- T_hsi hsi;
-
- double alpha = inv_sqrt2 * rgb.green() - inv_sqrt2 * rgb.blue();
- double beta =
- 2 * inv_sqrt6 * rgb.red() -
- inv_sqrt6 * rgb.green() -
- inv_sqrt6 * rgb.blue();
-
-
- hsi.hue() = atan2(beta, alpha) / 3.1415 * 180.0;
- if (hsi.hue() < 0)
- hsi.hue() = hsi.hue() + 360.0;
- mln_invariant(hsi.hue() >= 0);
- hsi.sat() = std::sqrt(alpha * alpha + beta * beta);
- hsi.inty() =
- sqrt3_3 * rgb.red() +
- sqrt3_3 * rgb.green() +
- sqrt3_3 * rgb.blue();
-
- return hsi;
- }
-
-
-# endif // !MLN_INCLUDE_ONLY
-
- } // end of namespace fun::v2v
-
- } // end of namespace fun
-
-} // end of namespace mln
-
-#endif // ! MLN_FUN_V2V_RGB_TO_HSI_HH
diff --git a/milena/mln/linear/gaussian/filter.hh b/milena/mln/linear/gaussian/filter.hh
deleted file mode 100644
index 5327de3..0000000
--- a/milena/mln/linear/gaussian/filter.hh
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009 EPITA Research and Development
Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_LINEAR_GAUSSIAN_FILTER_HH
-# define MLN_LINEAR_GAUSSIAN_FILTER_HH
-
-/// \file
-///
-/// Gaussian filter.
-///
-/// \todo Add a clean reference Rachid Deriche
-/// Recursively implementing the gaussian and its derivatives (1993)
-
-# include <mln/core/concept/image.hh>
-# include <mln/linear/gaussian/impl.hh>
-# include <mln/linear/gaussian/internal/coefficients.hh>
-
-
-namespace mln
-{
-
- namespace linear
- {
-
- namespace gaussian
- {
-
- /// Gaussian filter of an image \p input
- ///
- /// \pre output.domain = input.domain
- ///
- template <typename I>
- mln_concrete(I)
- filter(const Image<I>& input, double sigma);
-
-
- template <typename I>
- mln_concrete(I)
- filter(const Image<I>& input, double sigma, int dir);
-
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- // Facades.
-
- /*! Apply an approximated gaussian filter of \p sigma on \p input.
- * on a specific direction \p dir
- * if \p dir = 0, the filter is applied on the first image dimension.
- * if \p dir = 1, the filter is applied on the second image dimension.
- * And so on...
- *
- * \pre input.is_valid
- * \pre dir < dimension(input)
- */
- template <typename I>
- inline
- mln_concrete(I)
- filter(const Image<I>& input, double sigma, int dir)
- {
- trace::entering("linear::gaussian::filter");
-
- mln_precondition(exact(input).is_valid());
- mln_precondition(dir < I::site::dim);
-
- mln_concrete(I) output;
- initialize(output, input);
-
- internal::coefficients coef = internal::coefficients_not_derivative(sigma);
-
- impl::generic_filter_common_(mln_trait_value_nature(mln_value(I))(),
- input, coef, sigma, output, dir);
-
- trace::exiting("linear::gaussian::filter");
- return output;
- }
-
-
-
-
- /*! Apply an approximated gaussian filter of \p sigma on \p input.
- * This filter is applied in all the input image direction.
- *
- * \pre input.is_valid
- */
- template <typename I>
- inline
- mln_concrete(I)
- filter(const Image<I>& input, double sigma)
- {
- trace::entering("linear::gaussian::filter");
-
- mln_precondition(exact(input).is_valid());
-
- mln_concrete(I) output;
- initialize(output, input);
-
- internal::coefficients coef = internal::coefficients_not_derivative(sigma);
-
- impl::generic_filter_common_(mln_trait_value_nature(mln_value(I))(),
- input, coef, sigma, output);
-
- trace::exiting("linear::gaussian::filter");
- return output;
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::linear::gaussian
-
- } // end of namespace mln::linear
-
-} // end of namespace mln
-
-
-#endif // ! MLN_LINEAR_GAUSSIAN_FILTER_HH
diff --git a/milena/mln/linear/gaussian/impl.hh b/milena/mln/linear/gaussian/impl.hh
deleted file mode 100644
index dfe8d1e..0000000
--- a/milena/mln/linear/gaussian/impl.hh
+++ /dev/null
@@ -1,460 +0,0 @@
-// Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010, 2011 EPITA
-// Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_LINEAR_GAUSSIAN_IMPL_HH
-# define MLN_LINEAR_GAUSSIAN_IMPL_HH
-
-/// \file
-///
-/// \brief Gaussian filter implementation.
-///
-/// \todo Add a clean reference Rachid Deriche
-/// Recursively implementing the gaussian and its derivatives (1993)
-
-# include <vector>
-# include <cmath>
-
-# include <mln/core/concept/image.hh>
-# include <mln/core/alias/point2d.hh>
-# include <mln/core/alias/dpoint1d.hh>
-# include <mln/core/alias/dpoint3d.hh>
-# include <mln/extension/adjust_fill.hh>
-# include <mln/geom/ncols.hh>
-# include <mln/geom/nrows.hh>
-# include <mln/geom/ninds.hh>
-# include <mln/geom/nslis.hh>
-# include <mln/data/paste.hh>
-# include <mln/data/stretch.hh>
-# include <mln/algebra/vec.hh>
-
-# include <mln/linear/gaussian/internal/coefficients.hh>
-
-
-namespace mln
-{
-
- namespace linear
- {
-
- namespace gaussian
- {
-
- namespace impl
- {
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <class WorkType, class I>
- inline
- void
- recursivefilter_(I& ima,
- const internal::coefficients& c,
- const mln_psite(I)& start,
- const mln_psite(I)& finish,
- int len,
- const mln_deduce(I, psite, delta)& d)
- {
- std::vector<WorkType> tmp1(len);
- std::vector<WorkType> tmp2(len);
-
- // The fourth degree approximation implies to have a special
- // look on the four first points we consider that there is
- // no signal before 0 (to be discussed)
-
- // --
- // Causal part
-
- tmp1[0] =
- c.n[0] * ima(start);
-
- tmp1[1] =
- c.n[0] * ima(start + d)
- + c.n[1] * ima(start)
- - c.d[1] * tmp1[0];
-
- tmp1[2] =
- c.n[0] * ima(start + d + d)
- + c.n[1] * ima(start + d)
- + c.n[2] * ima(start)
- - c.d[1] * tmp1[1]
- - c.d[2] * tmp1[0];
-
- tmp1[3] =
- c.n[0] * ima(start + d + d + d)
- + c.n[1] * ima(start + d + d)
- + c.n[2] * ima(start + d)
- + c.n[3] * ima(start)
- - c.d[1] * tmp1[2] - c.d[2] * tmp1[1]
- - c.d[3] * tmp1[0];
-
- mln_psite(I) current(start + d + d + d + d);
- for (mln_deduce(I, site, coord) i = 4; i < len; ++i)
- {
- tmp1[i] =
- c.n[0] * ima(current)
- + c.n[1] * ima(current - d)
- + c.n[2] * ima(current - d - d)
- + c.n[3] * ima(current - d - d - d)
- - c.d[1] * tmp1[i - 1] - c.d[2] * tmp1[i - 2]
- - c.d[3] * tmp1[i - 3] - c.d[4] * tmp1[i - 4];
- current = current + d;
- }
-
- // Non causal part
-
- tmp2[len - 1] = WorkType(); // FIXME : = 0, literal::zero ...?
-
- tmp2[len - 2] =
- c.nm[1] * ima(finish);
-
- tmp2[len - 3] =
- c.nm[1] * ima(finish - d)
- + c.nm[2] * ima(finish)
- - c.dm[1] * tmp2[len - 2];
-
- tmp2[len - 4] =
- c.nm[1] * ima(finish - d - d)
- + c.nm[2] * ima(finish - d)
- + c.nm[3] * ima(finish)
- - c.dm[1] * tmp2[len - 3]
- - c.dm[2] * tmp2[len - 2];
-
- current = finish - d - d - d ;
-
- for (int i = len - 5; i >= 0; --i)
- {
- tmp2[i] =
- c.nm[1] * ima(current)
- + c.nm[2] * ima(current + d)
- + c.nm[3] * ima(current + d + d)
- + c.nm[4] * ima(current + d + d + d)
- - c.dm[1] * tmp2[i + 1] - c.dm[2] * tmp2[i + 2]
- - c.dm[3] * tmp2[i + 3] - c.dm[4] * tmp2[i + 4];
- current = current - d;
- }
-
- // Combine results from causal and non-causal parts.
- current = start;
- for (int i = 0; i < len; ++i)
- {
- ima(current) = tmp1[i] + tmp2[i];
- current = current + d;
- }
- }
-
-
- template <class I, class F>
- inline
- void
- generic_filter_(trait::image::dimension::one_d,
- Image<I>& img_, const F& coef, int dir)
- {
- I& img = exact(img_);
- typedef mln_site(I) S; // Help g++-2.95.
-
- mln_precondition(dir < S::dim);
-
- recursivefilter_<mln_value(I)>(img, coef,
- point1d(static_cast<def::coord>(-img.border())),
- point1d(static_cast<def::coord>(geom::ninds(img) - 1 +
- img.border())),
- geom::ninds(img) + 2 * img.border(),
- dpoint1d(1));
- }
-
- template <class I, class F>
- inline
- void
- generic_filter_(trait::image::dimension::two_d,
- Image<I>& img_, const F& coef, int dir)
- {
- I& img = exact(img_);
- typedef mln_site(I) S; // Help g++-2.95.
-
- mln_precondition(dir < S::dim);
-
- if (dir == 0)
- {
- // Apply on rows.
- for (unsigned j = 0; j < geom::ncols(img); ++j)
- recursivefilter_<mln_value(I)>(img, coef,
- point2d(static_cast<def::coord>(-img.border()),
- static_cast<def::coord>(j)),
- point2d(static_cast<def::coord>(geom::nrows(img) - 1 +
- img.border()),
- static_cast<def::coord>(j)),
- geom::nrows(img) + 2 * img.border(),
- dpoint2d(1, 0));
- }
-
- if (dir == 1)
- {
- // Apply on columns.
- for (unsigned i = 0; i < geom::nrows(img); ++i)
- recursivefilter_<mln_value(I)>(img, coef,
- point2d(static_cast<def::coord>(i),
- static_cast<def::coord>(-img.border())),
- point2d(static_cast<def::coord>(i),
- static_cast<def::coord>(geom::ncols(img) - 1 +
- img.border())),
- geom::ncols(img) + 2 * img.border(),
- dpoint2d(0, 1));
- }
- }
-
- template <class I, class F>
- inline
- void
- generic_filter_(trait::image::dimension::three_d,
- Image<I>& img_, const F& coef, int dir)
- {
- I& img = exact(img_);
- typedef mln_site(I) S; // Help g++-2.95.
-
- mln_precondition(dir < S::dim);
-
- if (dir == 0)
- {
- // Apply on slices.
- for (unsigned j = 0; j < geom::nrows(img); ++j)
- for (unsigned k = 0; k < geom::ncols(img); ++k)
- recursivefilter_<mln_value(I)>(img, coef,
- point3d(static_cast<def::coord>(-img.border()),
- static_cast<def::coord>(j),
- static_cast<def::coord>(k)),
- point3d(static_cast<def::coord>(geom::nslis(img) - 1 +
- img.border()),
- static_cast<def::coord>(j),
- static_cast<def::coord>(k)),
- geom::nslis(img) + 2 *
- img.border(),
- dpoint3d(1, 0, 0));
- }
-
-
- if (dir == 1)
- {
- // Apply on rows.
- for (unsigned i = 0; i < geom::nslis(img); ++i)
- for (unsigned k = 0; k < geom::ncols(img); ++k)
- recursivefilter_<mln_value(I)>(img, coef,
- point3d(static_cast<def::coord>(i),
- static_cast<def::coord>(-img.border()),
- static_cast<def::coord>(k)),
- point3d(static_cast<def::coord>(i),
- static_cast<def::coord>(geom::nrows(img) - 1 +
- img.border()),
- static_cast<def::coord>(k)),
- geom::nrows(img) + 2 *
- img.border(),
- dpoint3d(0, 1, 0));
- }
-
- if (dir == 2)
- {
- // Apply on columns.
- for (unsigned i = 0; i < geom::nslis(img); ++i)
- for (unsigned j = 0; j < geom::nrows(img); ++i)
- recursivefilter_<mln_value(I)>(img, coef,
- point3d(static_cast<def::coord>(i),
- static_cast<def::coord>(j),
- static_cast<def::coord>(-img.border())),
- point3d(static_cast<def::coord>(i),
- static_cast<def::coord>(j),
- static_cast<def::coord>(geom::ncols(img) -
- 1 + img.border())),
- geom::ncols(img) + 2 *
- img.border(),
- dpoint3d(0, 0, 1));
- }
- }
-
-
-
- template <class I, class F, class O>
- inline
- void
- generic_filter_common_(trait::value::nature::floating,
- const Image<I>& in,
- const F& coef,
- double sigma,
- Image<O>& out)
- {
- typedef mln_site(I) S; // Help g++-2.95.
-
- mln_ch_value(O, double) work_img(exact(in).domain());
- data::paste(in, work_img);
- extension::adjust_fill(work_img, 4, 0);
-
- // On tiny sigma, Derich algorithm doesn't work.
- // It is the same thing that to convolve with a Dirac.
- if (sigma > 0.006)
- for (int i = 0; i < S::dim; ++i)
- generic_filter_(mln_trait_image_dimension(I)(),
- work_img, coef, i);
-
- // We don't need to convert work_img
- data::paste(work_img, out);
- }
-
- template <class I, class F, class O>
- inline
- void
- generic_filter_common_(trait::value::nature::floating,
- const Image<I>& in,
- const F& coef,
- double sigma,
- Image<O>& out,
- int dir)
- {
- mln_ch_value(O, double) work_img(exact(in).domain());
- data::paste(in, work_img);
- extension::adjust_fill(work_img, 4, 0);
-
- // On tiny sigma, Derich algorithm doesn't work.
- // It is the same thing that to convolve with a Dirac.
- if (sigma > 0.006)
- generic_filter_(mln_trait_image_dimension(I)(),
- work_img, coef, dir);
-
- // We don't need to convert work_img
- data::paste(work_img, out);
- }
-
-
- template <class I, class F, class O>
- inline
- void
- generic_filter_common_(trait::value::nature::scalar,
- const Image<I>& in,
- const F& coef,
- double sigma,
- Image<O>& out)
- {
- typedef mln_site(I) S; // Help g++-2.95.
-
- mln_ch_value(O, double) work_img(exact(in).domain());
- data::paste(in, work_img);
- extension::adjust_fill(work_img, 4, 0);
-
- // On tiny sigma, Derich algorithm doesn't work.
- // It is the same thing that to convolve with a Dirac.
- if (sigma > 0.006)
- for (int i = 0; i < S::dim; ++i)
- generic_filter_(mln_trait_image_dimension(I)(),
- work_img, coef, i);
-
- // Convert work_img into result type
- data::paste(data::stretch(mln_value(I)(), work_img), out);
- }
-
- template <class I, class F, class O>
- inline
- void
- generic_filter_common_(trait::value::nature::scalar,
- const Image<I>& in,
- const F& coef,
- double sigma,
- Image<O>& out,
- int dir)
- {
- mln_ch_value(O, double) work_img(exact(in).domain());
- data::paste(in, work_img);
- extension::adjust_fill(work_img, 4, 0);
-
- // On tiny sigma, Derich algorithm doesn't work.
- // It is the same thing that to convolve with a Dirac.
- if (sigma > 0.006)
- generic_filter_(mln_trait_image_dimension(I)(),
- work_img, coef, dir);
-
- // Convert work_img into result type
- data::paste(data::stretch(mln_value(I)(), work_img), out);
- }
-
-
-
- template <class I, class F, class O>
- inline
- void
- generic_filter_common_(trait::value::nature::vectorial,
- const Image<I>& in,
- const F& coef,
- double sigma,
- Image<O>& out)
- {
- typedef mln_site(I) S; // Help g++-2.95.
-
- // typedef algebra::vec<3, double> vec3f;
- // mln_ch_value(O, vec3f) work_img(exact(in).domain());
- // FIXME : paste does not work (rgb8 -> vec3f).
- data::paste(in, out);
-
- // On tiny sigma, Derich algorithm doesn't work.
- // It is the same thing that to convolve with a Dirac.
- if (sigma > 0.006)
- for (int i = 0; i < S::dim; ++i)
- generic_filter_(mln_trait_image_dimension(I)(),
- out, coef, i);
- }
-
- template <class I, class F, class O>
- inline
- void
- generic_filter_common_(trait::value::nature::vectorial,
- const Image<I>& in,
- const F& coef,
- double sigma,
- Image<O>& out,
- int dir)
- {
- // typedef algebra::vec<3, double> vec3f;
- // mln_ch_value(O, vec3f) work_img(exact(in).domain());
- // FIXME : paste does not work (rgb8 -> vec3f).
- data::paste(in, out);
-
- // On tiny sigma, Derich algorithm doesn't work.
- // It is the same thing that to convolve with a Dirac.
- if (sigma > 0.006)
- generic_filter_(mln_trait_image_dimension(I)(),
- out, coef, dir);
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
- } // end of namespace mln::linear::gaussian::impl
-
- } // end of namespace mln::linear::gaussian
-
-} // end of namespace mln::linear
-
-} // end of namespace mln
-
-
-#endif // ! MLN_LINEAR_GAUSSIAN_IMPL_HH
diff --git a/milena/mln/linear/gaussian/internal/coefficients.hh
b/milena/mln/linear/gaussian/internal/coefficients.hh
deleted file mode 100644
index 680b2a5..0000000
--- a/milena/mln/linear/gaussian/internal/coefficients.hh
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009 EPITA Research and Development
Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_LINEAR_GAUSSIAN_INTERNAL_COEFFICIENTS_HH
-# define MLN_LINEAR_GAUSSIAN_INTERNAL_COEFFICIENTS_HH
-
-/// \file
-///
-/// Compute coefficients for recursive Gaussian filtering.
-///
-/// \todo Add a clean reference Rachid Deriche
-/// Recursively implementing the gaussian and its derivatives (1993)
-
-# include <vector>
-# include <cmath>
-
-
-
-namespace mln
-{
-
- namespace linear
- {
-
- namespace gaussian
- {
-
- namespace internal
- {
-
-
- typedef double norm_fun(double, double,
- double, double,
- double, double,
- double, double,
- double, double,
- int&);
-
- struct coefficients
- {
- /// Constructor.
- //
- coefficients(double a0, double a1,
- double b0, double b1,
- double c0, double c1,
- double w0, double w1,
- double s, norm_fun norm);
- std::vector<double> n, d, nm, dm;
- };
-
-
- coefficients coefficients_not_derivative(double sigma);
- coefficients coefficients_1st_derivative(double sigma);
- coefficients coefficients_2nd_derivative(double sigma);
-
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- inline
- coefficients::coefficients(double a0, double a1,
- double b0, double b1,
- double c0, double c1,
- double w0, double w1,
- double s, norm_fun norm)
- {
- n.reserve(5);
- d.reserve(5);
- nm.reserve(5);
- dm.reserve(5);
-
- b0 /= s;
- b1 /= s;
- w0 /= s;
- w1 /= s;
-
- double sin0 = std::sin(w0);
- double sin1 = std::sin(w1);
- double cos0 = std::cos(w0);
- double cos1 = std::cos(w1);
-
- int sign = 1;
- double n_ = norm(a0, a1, b0, b1, c0, c1, cos0, sin0, cos1, sin1, sign);
-
- a0 /= n_;
- a1 /= n_;
- c0 /= n_;
- c1 /= n_;
-
- n[3] =
- std::exp(-b1 - 2*b0) * (c1 * sin1 - cos1 * c0) +
- std::exp(-b0 - 2*b1) * (a1 * sin0 - cos0 * a0);
- n[2] =
- 2 * std::exp(-b0 - b1) * ((a0 + c0) * cos1 * cos0 -
- cos1 * a1 * sin0 -
- cos0 * c1 * sin1) +
- c0 * std::exp(-2*b0) + a0 * std::exp(-2*b1);
- n[1] =
- std::exp(-b1) * (c1 * sin1 - (c0 + 2 * a0) * cos1) +
- std::exp(-b0) * (a1 * sin0 - (2 * c0 + a0) * cos0);
- n[0] =
- a0 + c0;
-
- d[4] =
- std::exp(-2 * b0 - 2 * b1);
- d[3] =
- -2 * cos0 * std::exp(-b0 - 2*b1) -
- 2 * cos1 * std::exp(-b1 - 2*b0);
- d[2] =
- 4 * cos1 * cos0 * std::exp(-b0 - b1) +
- std::exp(-2*b1) + std::exp(-2*b0);
- d[1] =
- -2 * std::exp(-b1) * cos1 - 2 * std::exp(-b0) * cos0;
-
- for (unsigned i = 1; i <= 3; ++i)
- {
- dm[i] = d[i];
- nm[i] = double(sign) * (n[i] - d[i] * n[0]);
- }
- dm[4] = d[4];
- nm[4] = double(sign) * (-d[4] * n[0]);
- }
-
-
-
- inline
- double norm_not_derivative(double a0, double a1,
- double b0, double b1,
- double c0, double c1,
- double cos0, double sin0,
- double cos1, double sin1,
- int& sign)
- {
- double expb0 = std::exp(b0);
- double exp2b0 = std::exp(2.f * b0);
-
- double scale0 = 1 + exp2b0 - 2 * cos0 * expb0;
- double scaleA = 2 * a1 * sin0 * expb0 - a0 * (1 - exp2b0);
-
- double expb1 = std::exp(b1);
- double exp2b1 = std::exp(2.f * b1);
-
- double scale1 = 1 + exp2b1 - 2 * cos1 * expb1;
- double scaleC = 2 * c1 * sin1 * expb1 - c0 * (1 - exp2b1);
-
- double sumA = scaleA / scale0;
- double sumC = scaleC / scale1;
-
- sign = 1;
-
- return sumA + sumC;
- }
-
-
- inline
- double norm_1st_derivative(double a0, double a1,
- double b0, double b1,
- double c0, double c1,
- double cos0, double sin0,
- double cos1, double sin1,
- int& sign)
- {
- double expb0 = std::exp(b0);
- double exp2b0 = std::exp(2.f * b0);
-
- double scale0 = 1 + exp2b0 - 2 * cos0 * expb0;
- scale0 *= scale0;
- double scaleA = - 2 * a1 * sin0 * expb0 * (1 - exp2b0) +
- 2 * a0 * expb0 * (2 * expb0 - cos0 * (1 + exp2b0));
-
- double expb1 = std::exp(b1);
- double exp2b1 = std::exp(2.f * b1);
-
- double scale1 = 1 + exp2b1 - 2 * cos1 * expb1;
- scale1 *= scale1;
- double scaleC = - 2 * c1 * sin1 * expb1 * (1 - exp2b1) +
- 2 * c0 * expb1 * (2 * expb1 - cos1 * (1 + exp2b1));
-
- double sumA = scaleA / scale0;
- double sumC = scaleC / scale1;
-
- sign = -1;
-
- return sumA + sumC;
- }
-
-
- inline
- double norm_2nd_derivative(double a0, double a1,
- double b0, double b1,
- double c0, double c1,
- double cos0, double sin0,
- double cos1, double sin1,
- int& sign)
- {
- double expb0 = std::exp(b0);
- double exp2b0 = std::exp(2.f * b0);
-
- double scale0 = 1 + exp2b0 - 2 * cos0 * expb0;
- scale0 *= scale0 * scale0;
-
- double scaleA = a1 * sin0 * expb0 *
- (1 + expb0 * (2 * cos0 * (1 + exp2b0) + exp2b0 - 6)) +
- a0 * expb0 * (2 * expb0 * (2 - cos0 * cos0) *
- (1 - exp2b0) - cos0 * (1 - exp2b0 * exp2b0));
-
- double expb1 = std::exp(b1);
- double exp2b1 = std::exp(2.f * b1);
-
- double scale1 = 1 + exp2b1 - 2 * cos1 * expb1;
- scale1 *= scale1 * scale1;
-
- double scaleC = c1 * sin1 * expb1 *
- (1 + expb1 * (2 * cos1 * (1 + exp2b1) + exp2b1 - 6)) +
- c0 * expb1 * (2 * expb1 * (2 - cos1 * cos1) *
- (1 - exp2b1) - cos1 * (1 - exp2b1 * exp2b1));
-
- double sumA = scaleA / scale0;
- double sumC = scaleC / scale1;
- sign = 1;
-
- return sumA + sumC;
- }
-
-
- inline
- coefficients coefficients_not_derivative(double sigma)
- {
- coefficients tmp(+1.6800, +3.7350,
- +1.7830, +1.7230,
- -0.6803, -0.2598,
- +0.6318, +1.9970,
- sigma,
- norm_not_derivative);
- return tmp;
- }
-
-
- inline
- coefficients coefficients_1st_derivative(double sigma)
- {
- coefficients tmp(-0.6472, -4.5310,
- +1.5270, +1.5160,
- +0.6494, +0.9557,
- +0.6719, +2.0720,
- sigma,
- norm_1st_derivative);
- return tmp;
- }
-
-
- inline
- coefficients coefficients_2nd_derivative(double sigma)
- {
- coefficients tmp(-1.3310, +3.661,
- +1.2400, +1.314,
- +0.3225, -1.738,
- +0.7480, +2.166,
- sigma,
- norm_2nd_derivative);
- return tmp;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::linear::gaussian::internal
-
- } // end of namespace mln::linear::gaussian
-
- } // end of namespace mln::linear
-
-} // end of namespace mln
-
-
-#endif // ! MLN_LINEAR_GAUSSIAN_INTERNAL_COEFFICIENTS_HH
diff --git a/milena/mln/registration/all.hh b/milena/mln/registration/all.hh
deleted file mode 100644
index 0986559..0000000
--- a/milena/mln/registration/all.hh
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_REGISTRATION_ALL_HH
-# define MLN_REGISTRATION_ALL_HH
-
-/// \file
-///
-/// File that includes all "point-wise" expression tools.
-
-
-namespace mln
-{
-
- /// Namespace of "point-wise" expression tools.
- namespace registration {}
-
-} // end of namespace mln
-
-
-# include <mln/registration/get_rot.hh>
-# include <mln/registration/get_rtransf.hh>
-# include <mln/registration/icp.hh>
-# include <mln/registration/registration.hh>
-
-#endif // ! MLN_REGISTRATION_ALL_HH
diff --git a/milena/mln/registration/essential.hh b/milena/mln/registration/essential.hh
deleted file mode 100644
index 3b599f5..0000000
--- a/milena/mln/registration/essential.hh
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_REGISTRATION_ESSENTIAL_HH
-# define MLN_REGISTRATION_ESSENTIAL_HH
-
-/*! \file
- *
- * \brief File that includes all "point-wise" expression tools.
- */
-
-// NOTHING YET.
-
-#endif // ! MLN_REGISTRATION_ESSENTIAL_HH
diff --git a/milena/mln/registration/get_rot.hh b/milena/mln/registration/get_rot.hh
deleted file mode 100644
index 28667cb..0000000
--- a/milena/mln/registration/get_rot.hh
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_REGISTRATION_GET_ROT_HH
-# define MLN_REGISTRATION_GET_ROT_HH
-
-# include <mln/core/site_set/p_array.hh>
-# include <mln/fun/x2x/all.hh>
-# include <mln/algebra/quat.hh>
-# include <mln/algebra/vec.hh>
-# include <mln/math/jacobi.hh>
-
-
-namespace mln
-{
-
- namespace registration
- {
-
- template <typename P, typename M>
- fun::x2x::rotation<P::dim, float>
- get_rot(const p_array<P>& c,
- const algebra::vec<P::dim,float>& mu_c,
- const p_array<P>& ck,
- const M& map,
- const algebra::vec<P::dim,float>& mu_xk);
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename P, typename M>
- fun::x2x::rotation<2u, float>
- get_rot(const p_array<P>& c,
- const algebra::vec<2u,float>& mu_c,
- const p_array<P>& ck,
- const M& map,
- const algebra::vec<2u,float>& mu_xk)
- {
- assert(0 && "TODO");
-
- (void) c;
- (void) mu_c;
- (void) ck;
- (void) map;
- (void) mu_xk;
-
- //////SLOW VERSION
-
- //// V1
- // M1 := c covariance
- // V1 := greatest eigen vector of M1
-
- //// V2
- // M2 := c covariance
- // V2 := greatest eigen vector of M2
-
- //// alpha
- // cos(alpha) = (V1.V2) / (|V1|.|V2|)
-
- //FIXME: Write 2d version of rotation computation between two p_arrays
- return fun::x2x::rotation<2u, float>();
- }
-
- template <typename P, typename M>
- fun::x2x::rotation<3u, float>
- get_rot(const p_array<P>& c,
- const algebra::vec<3u,float>& mu_c,
- const p_array<P>& ck,
- const M& map,
- const algebra::vec<3u,float>& mu_xk)
- {
- //FIXME: Make assertion static
- mln_precondition(3u == 3);
-
- // FIXME: Make use of a cross_covariance accu (maybe not because of map(ck[i]))
- algebra::mat<3u,3u,float> Mk(literal::zero);
- for (unsigned i = 0; i < c.nsites(); ++i)
- {
- algebra::vec<3u,float> ci = convert::to< algebra::vec<3u,float>
>(c[i]);
- algebra::vec<3u,float> xki = convert::to< algebra::vec<3u,float>
>(map(ck[i]));
- Mk += (ci - mu_c) * (xki - mu_xk).t();
- }
- Mk /= c.nsites();
-
- algebra::vec<3u,float> a;
- a[0] = Mk(1,2) - Mk(2,1);
- a[1] = Mk(2,0) - Mk(0,2);
- a[2] = Mk(0,1) - Mk(1,0);
-
- algebra::mat<4u,4u,float> Qk(literal::zero);
- float t = tr(Mk);
-
- Qk(0,0) = t;
- for (int i = 1; i < 4; i++)
- {
- Qk(i,0) = a[i - 1];
- Qk(0,i) = a[i - 1];
- for (int j = 1; j < 4; j++)
- if (i == j)
- Qk(i,j) = 2 * Mk(i - 1,i - 1) - t;
- }
-
- Qk(1,2) = Mk(0,1) + Mk(1,0);
- Qk(2,1) = Mk(0,1) + Mk(1,0);
-
- Qk(1,3) = Mk(0,2) + Mk(2,0);
- Qk(3,1) = Mk(0,2) + Mk(2,0);
-
- Qk(2,3) = Mk(1,2) + Mk(2,1);
- Qk(3,2) = Mk(1,2) + Mk(2,1);
-
- algebra::quat qR(literal::zero);
- qR = math::jacobi(Qk);
-
- std::cout << qR << std::endl;
-
- return fun::x2x::rotation<3u, float>(qR);
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
- } // end of namespace registration
-
-} // end of namespace mln
-
-#endif // ! MLN_REGISTRATION_GET_ROT_HH
diff --git a/milena/mln/registration/get_rtransf.hh
b/milena/mln/registration/get_rtransf.hh
deleted file mode 100644
index 5485d87..0000000
--- a/milena/mln/registration/get_rtransf.hh
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_REGISTRATION_GET_RTRANSF_HH
-# define MLN_REGISTRATION_GET_RTRANSF_HH
-
-# include <mln/core/site_set/p_array.hh>
-# include <mln/fun/x2x/all.hh>
-# include <mln/algebra/quat.hh>
-# include <mln/algebra/vec.hh>
-# include <mln/math/jacobi.hh>
-# include <mln/registration/get_rot.hh>
-
-namespace mln
-{
-
- namespace registration
- {
-
- using namespace fun::x2x;
-
- template <typename P, typename M>
- composed<rotation<P::dim, float>, translation<P::dim, float> >
- get_rtransf(const p_array<P>& C,
- const algebra::vec<P::dim,float>& mu_C,
- const p_array<P>& ck,
- const M& map);
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename P, typename M>
- composed<rotation<P::dim, float>, translation<P::dim, float> >
- get_rtransf(const p_array<P>& c,
- const algebra::vec<P::dim,float>& mu_c,
- const p_array<P>& ck,
- const M& map)
- {
- //mu_xk = center map(Ck)
- algebra::vec<P::dim,float> mu_xk(literal::zero);
-
- std::cout << c.nsites() << std::endl;
- for (unsigned i = 0; i < c.nsites(); ++i)
- {
- if (not map.has(ck[i]))
- {
- std::cout << ck[i] << " " << i <<
std::endl;
- }
- else
- mu_xk += convert::to< algebra::vec<P::dim,float> >
- (map(convert::to< algebra::vec<P::dim,float> >(ck[i])));
-
- }
- mu_xk /= c.nsites();
-
- // qR
- rotation<P::dim, float> tqR = get_rot(c, mu_c, ck, map, mu_xk);
-
- // qT
- const algebra::vec<P::dim,float> qT = mu_xk - tqR(mu_c);
- translation<P::dim, float> tqT(qT);
- return compose(tqR,tqT);
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
- } // end of namespace registration
-
-} // end of namespace mln
-
-#endif // ! MLN_REGISTRATION_GET_RTRANSF_HH
diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh
deleted file mode 100644
index 9448a2f..0000000
--- a/milena/mln/registration/icp.hh
+++ /dev/null
@@ -1,723 +0,0 @@
-// Copyright (C) 2008, 2009, 2010, 2011 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_REGISTRATION_ICP_HH
-# define MLN_REGISTRATION_ICP_HH
-
-/// \file
-///
-/// Register an image over an another using the ICP algorithm.
-///
-/// \todo encode distances on 12 bits.
-
-# include <cmath>
-# include <algorithm>
-
-# include <mln/core/alias/vec3d.hh>
-# include <mln/math/jacobi.hh>
-# include <mln/fun/x2x/all.hh>
-# include <mln/fun/x2v/all.hh>
-# include <mln/convert/to.hh>
-# include <mln/accu/compute.hh>
-# include <mln/accu/center.hh>
-# include <mln/accu/rms.hh>
-# include <mln/trait/image_from_grid.hh>
-# include <mln/set/compute.hh>
-
-//Should be removed when closest_point functors are moved.
-# include <mln/core/image/dmorph/slice_image.hh>
-# include <mln/core/image/imorph/tr_image.hh>
-# include <mln/core/image/dmorph/extension_fun.hh>
-
-# include <mln/core/alias/neighb3d.hh>
-
-# include <mln/transform/distance_and_closest_point_geodesic.hh>
-# include <mln/canvas/distance_geodesic.hh>
-# include <mln/pw/all.hh>
-
-# include <mln/io/ppm/save.hh>
-# include <mln/io/pbm/save.hh>
-
-# include <mln/labeling/colorize.hh>
-# include <mln/debug/histo.hh>
-
-# include <mln/accu/histo.hh>
-# include <mln/accu/math/sum.hh>
-
-# include <mln/value/int_u16.hh>
-
-# include <mln/literal/black.hh>
-# include <mln/literal/white.hh>
-# include <mln/literal/colors.hh>
-
-# include <mln/util/timer.hh>
-
-# include <mln/io/cloud/save.hh>
-
-
-namespace mln
-{
-
- namespace registration
- {
-
- //FIXME: used for debug purpose. Should be removed later.
-
- using namespace fun::x2x;
-
- /*! Register point in \p c using a function of closest points
- * \p closest_point.
- * This overload allows to specify initial transformations.
- *
- * \param[in] P_ The cloud of points.
- * \param[in] X the reference surface.
- * \param[in] closest_point The function of closest points.
- * \param[in] initial_rot An initial rotation.
- * \param[in] initial_translation An initial translation.
- *
- * \return the rigid transformation which may be use later to create
- * a registered image.
- *
- * WARNING: the function \p closest_point *MUST* take float/double
- * vector as arguments. Otherwise the resulting transformation may be
- * wrong due to the truncation of the vector coordinate values.
- *
- * \pre \p P_ and \p X must not be empty.
- *
- * Reference article: "A Method for Registration of 3-D Shapes", Paul J.
- * Besl and Neil D. McKay, IEEE, 2, February 1992.
- *
- */
- template <typename P, typename F>
- std::pair<algebra::quat,mln_vec(P)>
- icp(const p_array<P>& P_,
- const p_array<P>& X,
- const F& closest_point,
- const algebra::quat& initial_rot,
- const mln_vec(P)& initial_translation);
-
-
- /*! Register point in \p c using a function of closest points
- * \p closest_point.
- *
- * \param[in] P_ The cloud of points.
- * \param[in] X the reference surface.
- * \param[in] closest_point The function of closest points.
- *
- * \return the rigid transformation which may be use later to create
- * a registered image.
- */
- template <typename P, typename F>
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- icp(const p_array<P>& P_,
- const p_array<P>& X,
- const F& closest_point);
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- /// Closest point functor based on map distance.
- template <typename P>
- class closest_point_with_map
- {
- typedef mln_image_from_grid(mln_grid(P), P) I;
- typedef mln_ch_value(I, unsigned) cp_ima_t;
- typedef mln_ch_value(I,value::int_u16) dmap_t;
-
- public:
-
- closest_point_with_map(const p_array<P>& X)
- {
- box3d box = geom::bbox(X);
- box.enlarge(0, box.nslis());
- box.enlarge(1, box.nrows());
- box.enlarge(2, box.ncols());
-
- mln_postcondition(box.is_valid());
-
- std::cout << "Map image defined on " << box << std::endl;
-
- X_ = X;
- init(X, box);
- }
-
- closest_point_with_map(const p_array<P>& X, const box<P>& box)
- {
- X_ = X;
- init(X, box);
- }
-
- void init(const p_array<P>& X, const box<P>& box)
- {
- typedef mln_ch_value(I, bool) model_t;
- model_t model(box);
- data::fill(model, false);
- data::fill((model | X).rw(), true);
-
-
- typedef util::couple<mln_ch_value(model_t, value::int_u16),
- mln_ch_value(model_t, unsigned)> couple_t;
- couple_t cpl = transform::distance_and_closest_point_geodesic(X, box,
- c6(),
- mln_max(value::int_u16));
-
- dmap_X_ = cpl.first();
- cp_ima_ = cpl.second();
-
- mln_postcondition(cp_ima_.is_valid());
- mln_postcondition(cp_ima_.domain().is_valid());
- std::cout << "pmin = " << cp_ima_.domain().pmin() <<
std::endl;;
- std::cout << "pmax = " << cp_ima_.domain().pmax() <<
std::endl;;
-
-#ifndef NDEBUG
- mln_ch_value(I, bool) debug2(box);
- data::fill(debug2, false);
- mln_ch_value(I, value::rgb8) debug(box);
- mln_piter(p_array<P>) p(X);
- for_all(p)
- {
- debug(p) = labeling::internal::random_color(value::rgb8());
- debug2(p) = true;
- }
- io::pbm::save(slice(debug2,0), "debug2-a.ppm");
-
- mln_piter(I) pi(cp_ima_.domain());
- for_all(pi)
- {
- debug(pi) = debug(X[cp_ima_(pi)]);
- debug2(pi) = debug2(X[cp_ima_(pi)]);
- }
-
- io::pbm::save(slice(debug2,0), "debug2-b.ppm");
- io::ppm::save(slice(debug,0), "debug.ppm");
- std::cout << "map saved" << std::endl;
-#endif
- }
-
- mln_site(I) operator()(const mln_site(I)& p) const
- {
- return X_[cp_ima_(p)];
- }
-
-
- // Distance map
- dmap_t dmap_X_;
-
- private:
- p_array<P> X_;
- // Closest point image.
- cp_ima_t cp_ima_;
-
- };
-
-
- /// Closest point functor based on map distance.
- template <typename P>
- class closest_point_basic
- {
- typedef mln_image_from_grid(mln_grid(P), P) I;
- typedef p_array<P> X_t;
-
- public:
-
- closest_point_basic(const p_array<P>& X)
- : X_(X)
- {
- }
-
- mln_site(I) operator()(const vec3d_f& v) const
- {
- vec3d_f best_x = X_[0];
-
- float best_d = norm::l2_distance(v, best_x);
- mln_piter(X_t) X_i(X_);
- for_all(X_i)
- {
- vec3d_f X_i_vec = X_i;
- float d = norm::l2_distance(v, X_i_vec);
- if (d < best_d)
- {
- best_d = d;
- best_x = X_i_vec;
- }
- }
- return best_x;
- }
-
- private:
- const p_array<P>& X_;
- };
-
-
- template <typename P>
- void
- draw_last_run(const box3d& box, const p_array<P>& kept,
- const p_array<P>& removed, const p_array<P>& X,
- const algebra::quat& qR, const vec3d_f qT)
- {
- typedef image3d<value::rgb8> result_t;
- result_t result(box);
- typedef extension_fun<result_t,pw::cst_<mln_value(result_t)> >
ext_result_t;
- ext_result_t ext_result(result, pw::cst(value::rgb8(0,0,0)));
-
- data::fill(ext_result, literal::black);
- data::fill((ext_result | X).rw(), literal::white);
-
- mln_piter(p_array<P>) p(kept);
- for_all(p)
- ext_result(qR.rotate(p.to_vec()) + qT) = literal::green;
-
- mln_piter(p_array<P>) p2(removed);
- for_all(p2)
- ext_result(qR.rotate(p2.to_vec()) + qT) = literal::red;
-
- io::ppm::save(slice(ext_result,0), "registered-2.ppm");
- }
-
-
-
- template <typename P, typename F>
- float compute_standard_deviation(const p_array<P>& P_,
- const std::pair<algebra::quat,mln_vec(P)>& pair,
- const F& closest_point)
- {
- accu::rms<vec3d_f,float> e_k_accu;
-
- // Standard Deviation
- float sd;
- mln_piter(p_array<P>) p(P_);
- for_all(p)
- {
- vec3d_f Pk_i = pair.first.rotate(p) + pair.second;
- vec3d_f Yk_i = closest_point(Pk_i).to_vec();
- // yk_i - pk_i
- e_k_accu.take(Yk_i - Pk_i);
- }
-
- float d = e_k_accu.to_result();
- sd = std::sqrt(e_k_accu.hook_value_() / P_.nsites() - d * d);
- return sd;
- }
-
-
- template <typename P, typename F>
- void
- remove_too_far_sites_debug(image3d<value::rgb8>& out, const
p_array<P>& P_,
- const F& closest_point,
- const std::pair<algebra::quat,mln_vec(P)>& pair,
- const p_array<P>& X,
- unsigned r, int d_min, int d_max, unsigned prefix)
- {
- unsigned removed = 0;
- accu::histo<value::int_u8> h;
- mln_piter(p_array<P>) p(P_);
- data::fill(out, literal::black);
- data::fill((out | X).rw(), literal::white);
-
- for_all(p)
- {
- vec3d_f Pk_i = pair.first.rotate(p) + pair.second;
- vec3d_f Yk_i = closest_point(Pk_i);
-
- int d_i = closest_point.dmap_X_(Pk_i);
- if (d_i >= d_min && d_i <= d_max)
- out(Pk_i) = literal::green;
- else
- {
- ++removed;
- out(Pk_i) = literal::red;
- }
- }
-
-#ifndef NDEBUG
- std::ostringstream ss1;
- ss1 << "histo_" << prefix << r <<
".dat";
- std::cout << h << std::endl;
-
- std::ostringstream ss2;
- ss2 << "out_" << prefix << r <<
".ppm";
- io::ppm::save(mln::slice(out,0), ss2.str());
-#endif
- std::cout << "Points removed with the whole set and current d_min/d_max:
" << removed << std::endl;
-
- }
-
-
- template <typename P, typename F>
- void
- compute_distance_criteria(const p_array<P>& P_,
- const F& closest_point,
- const std::pair<algebra::quat,mln_vec(P)>& pair,
- unsigned r, int& d_min, int& d_max)
- {
- mln_piter(p_array<P>) p(P_);
- accu::histo<value::int_u8> h;
-
- float sd;
- {
- accu::math::sum<float> s, s2;
- for_all(p)
- {
- vec3d_f Pk_i = pair.first.rotate(p.to_vec()) + pair.second;
- unsigned d_i = closest_point.dmap_X_(Pk_i);
- h.take(d_i);
- s.take(d_i);
- s2.take(d_i * d_i);
- }
- float mean = s / P_.nsites();
- sd = std::sqrt(s2 / P_.nsites() - mean * mean);
- d_min = int(mean - sd);
- d_max = int(mean + sd);
- }
-
- std::cout << "Standard deviation = " << sd <<
std::endl;
- std::ostringstream ss1;
- ss1 << "histo_" << r << ".dat";
- std::cout << h << std::endl;
- std::cout << "d thresholds = " << d_min << ' '
<< d_max << std::endl;
- }
-
- template <typename P, typename F>
- p_array<P>
- remove_too_far_sites(image3d<value::rgb8>& out, const p_array<P>&
P_,
- const F& closest_point,
- const std::pair<algebra::quat,mln_vec(P)>& pair,
- const p_array<P>& X, p_array<P>& removed_set,
- unsigned r, int d_min, int d_max,
- const std::string& method)
- {
- p_array<P> tmp;
- unsigned removed = 0;
-
-# ifndef NDEBUG
- data::fill(out, literal::black);
- data::fill((out | X).rw(), literal::white);
-# endif // ! NDEBUG
-
- mln_piter(p_array<P>) p(P_);
- for_all(p)
- {
- vec3d_f Pk_i = pair.first.rotate(p.to_vec()) + pair.second;
- vec3d_f Yk_i = closest_point(Pk_i);
-
- int d_i = closest_point.dmap_X_(Pk_i);
- if (d_i >= d_min && d_i <= d_max)
- {
- tmp.append(p);
- out(Pk_i) = literal::green;
- }
- else
- {
- ++removed;
- removed_set.append(p);
- out(Pk_i) = literal::red;
- }
- }
-
- {
- std::ostringstream ss2;
- ss2 << method << "_" << r <<
"_removed_sites" << ".cloud";
- io::cloud::save(removed_set, ss2.str());
- }
- {
- std::ostringstream ss2;
- ss2 << method << "_" << r << "_kept_sites"
<< ".cloud";
- io::cloud::save(tmp, ss2.str());
- }
-
-# ifndef NDEBUG
- std::ostringstream ss2;
- ss2 << method << "_" << r <<
"_removed_sites" << ".ppm";
- io::ppm::save(mln::slice(out,0), ss2.str());
-
- std::cout << "Points removed: " << removed <<
std::endl;
-# endif // ! NDEBUG
- // They are used for debug purpose only.
- // When NDEBUG is set, they are unused.
- (void) X;
- (void) r;
- (void) method;
-
- return tmp;
- }
-
- template <typename P>
- void
- display_sites_used_in_icp(image3d<value::rgb8>& out, const
p_array<P>& P_sub,
- const p_array<P>& P_, const p_array<P>& X,
- unsigned r, const std::string& prefix,
- const std::pair<algebra::quat,mln_vec(P)>& pair,
- const std::string& period, const value::rgb8& c)
- {
- data::fill(out, literal::black);
- data::fill((out | X).rw(), literal::white);
-
- mln_piter(p_array<P>) p1(P_);
- for_all(p1)
- {
- vec3d_f Pk_i = pair.first.rotate(p1.to_vec()) + pair.second;
- out(Pk_i) = literal::red;
- }
-
- mln_piter(p_array<P>) p2(P_sub);
- for_all(p2)
- {
- vec3d_f Pk_i = pair.first.rotate(p2.to_vec()) + pair.second;
- out(Pk_i) = c;
- }
-
- std::ostringstream ss;
- ss << prefix << "_" << r << "_"
<< period << ".ppm";
-
- io::ppm::save(slice(out,0), ss.str());
- }
-
-
- template <typename P, typename F>
- inline
- float
- compute_d_k(const p_array<P>& P_,
- const F& closest_point,
- const algebra::quat& qR,
- const algebra::quat& qR_old,
- const vec3d_f& qT,
- const vec3d_f& qT_old)
- {
- accu::rms<vec3d_f, float> accu;
- mln_piter(p_array<P>) p(P_);
- for_all(p)
- {
- // yk_i - pk+1_i
- vec3d_f P_i = p;
- vec3d_f Pk_i = qR_old.rotate(P_i) + qT_old;
- vec3d_f Pk_1_i = qR.rotate(P_i) + qT;
- accu.take(closest_point(Pk_i).to_vec() - Pk_1_i);
- }
- return accu.to_result();
- }
-
-
- /// FIXME: work only for 3d images.
- template <typename P, typename F>
- algebra::quat
- get_rot(const p_array<P>& P_,
- const vec3d_f& mu_P,
- const vec3d_f& mu_Yk,
- const F& closest_point,
- const algebra::quat& qR,
- const vec3d_f& qT)
- {
- /// Spx: cross-covariance matrix.
- algebra::mat<3u,3u,float> Spx;
- mln_piter(p_array<P>) p(P_);
-
- // FIXME: could we use an accu?
- for_all(p)
- {
- vec3d_f P_i = p;
- vec3d_f Pk_i = qR.rotate(P_i) + qT;
- vec3d_f Yk_i = closest_point(Pk_i);
- Spx += (P_i - mu_P) * (Yk_i - mu_Yk).t();
- }
- Spx /= P_.nsites();
-
- vec3d_f A;
- A[0] = Spx(1,2) - Spx(2,1);
- A[1] = Spx(2,0) - Spx(0,2);
- A[2] = Spx(0,1) - Spx(1,0);
-
- algebra::mat<4u,4u,float> Qk;
- float t = tr(Spx);
-
- Qk(0,0) = t;
- for (int i = 1; i < 4; ++i)
- {
- Qk(i,0) = A[i - 1];
- Qk(0,i) = A[i - 1];
- for (int j = 1; j < 4; ++j)
- if (i == j)
- Qk(i,j) = 2 * Spx(i - 1,i - 1) - t;
- }
-
- Qk(1,2) = Spx(0,1) + Spx(1,0);
- Qk(2,1) = Spx(0,1) + Spx(1,0);
-
- Qk(1,3) = Spx(0,2) + Spx(2,0);
- Qk(3,1) = Spx(0,2) + Spx(2,0);
-
- Qk(2,3) = Spx(1,2) + Spx(2,1);
- Qk(3,2) = Spx(1,2) + Spx(2,1);
-
- return math::jacobi(Qk);
- }
-
-
- // Compute mu_Yk, mass center of Yk.
- template <typename P, typename F>
- inline
- vec3d_f
- get_mu_yk(const p_array<P>& P_,
- const F& closest_point,
- const algebra::quat& qR,
- const vec3d_f& qT,
- float& e_k)
- {
- accu::rms<vec3d_f,float> e_k_accu;
- accu::center<P,vec3d_f> mu_yk;
-
- mln_piter(p_array<P>) p(P_);
- for_all(p)
- {
- // yk_i - pk_i
- vec3d_f Pk_i = qR.rotate(p.to_vec()) + qT;
- vec3d_f Yk_i = closest_point(Pk_i);
- mu_yk.take(Yk_i);
- e_k_accu.take(Yk_i - Pk_i);
- }
-
- e_k = e_k_accu.to_result();
- return mu_yk.to_result();
- }
-
-
-
- /// Base version of the ICP algorithm. It is called in other variants.
- template <typename P, typename F>
- inline
- std::pair<algebra::quat,mln_vec(P)>
- icp(const p_array<P>& P_,
- const p_array<P>& X,
- const F& closest_point,
- const algebra::quat& initial_rot,
- const mln_vec(P)& initial_translation)
- {
- trace::entering("registration::icp");
-
- (void) X;
- mln_precondition(P::dim == 3);
- mln_precondition(!P_.is_empty());
- mln_precondition(!X.is_empty());
- mln_precondition(!initial_rot.is_null());
-
- typedef p_array<P> cloud_t;
-
- vec3d_f mu_P = set::compute(accu::center<P,vec3d_f>(), P_);
-
- vec3d_f qT_old, qT = initial_translation;
- algebra::quat qR_old, qR = initial_rot;
- float e_k, e_k_old = mln_max(float);
- float d_k, d_k_old = mln_max(float);
- unsigned k = 0;
-
-# ifndef NDEBUG
- box3d box = geom::bbox(X);
- //FIXME: too large?
- box.enlarge(1, box.nrows() / 2);
- box.enlarge(2, box.ncols() / 2);
- image3d<value::rgb8> debug(box);
- data::fill(debug, literal::black);
- data::fill((debug | X).rw(), literal::white);
-# endif
-
- do
- {
- qT_old = qT;
- qR_old = qR;
-
- /// Compute transformation
- ///
- // mu_Yk - Pk's mass center.
- // + Compute error ek = d(Pk,Yk)
- vec3d_f mu_Yk = get_mu_yk(P_, closest_point, qR_old, qT_old, e_k);
-
- // quaternion qR - rotation
- qR = get_rot(P_, mu_P, mu_Yk, closest_point, qR_old, qT_old);
- vec3d_f tmp = qR.v();
-
- // vector qT - translation
- qT = mu_Yk - qR.rotate(mu_P);
- ///
- /// End of "compute transformation"
-
- // Distance dk = d(Pk+1, Yk)
- d_k = compute_d_k(P_, closest_point, qR, qR_old, qT, qT_old);
-
-
-#ifndef NDEBUG
- image3d<value::rgb8> tmp_ = duplicate(debug);
- mln_piter(p_array<P>) p_dbg(P_);
- for_all(p_dbg)
- tmp_(qR_old.rotate(p_dbg.to_vec()) + qT_old) = literal::green;
- std::ostringstream ss;
- ss << "tmp_0";
- if (k < 10)
- ss << "0";
- ss << k << ".ppm";
- io::ppm::save(mln::slice(tmp_,0), ss.str());
-#endif
-
- std::cout << "e_" << k << "=" << e_k
<< std::endl;
- std::cout << "d_" << k << "=" << d_k
<< std::endl;
-
- // Check distance and error according to the related paper.
- // Disabled because of the following 'if'
-// mln_assertion(0 <= d_k);
-// mln_assertion(d_k <= e_k);
-
-// mln_assertion(e_k <= d_k_old);
-// mln_assertion(d_k_old <= e_k_old);
-
- // During the first runs, d_k may be higher than e_k.
- // Hence, there we test k > 3.
- if (k > 3 && (d_k > e_k || d_k > d_k_old || e_k > e_k_old))
- {
- qR = qR_old;
- qT = qT_old;
- break;
- }
-
- // Backing up results.
- d_k_old = d_k;
- e_k_old = e_k;
-
- ++k;
-
- } while ((k < 3)
- || norm::l2((qT - qT_old)) + norm::l2((qR - qR_old).to_vec()) > 1e-3);
-
- trace::exiting("registration::icp");
- return std::make_pair(qR, qT);
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::registration
-
-} // end of namespace mln
-
-#endif // ! MLN_REGISTRATION_ICP_HH
diff --git a/milena/mln/registration/internal/rms.hh
b/milena/mln/registration/internal/rms.hh
deleted file mode 100644
index 1836b0d..0000000
--- a/milena/mln/registration/internal/rms.hh
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_REGISTRATION_INTERNAL_RMS_HH
-# define MLN_REGISTRATION_INTERNAL_RMS_HH
-
-# include <mln/norm/l2.hh>
-# include <mln/core/site_set/p_array.hh>
-
-namespace mln
-{
-
- namespace registration
- {
-
- namespace internal
- {
-
- template <typename P, typename M, typename T>
- float rms(const p_array<P>& a1,
- M& map,
- const unsigned length,
- const T& q1,
- const T& q2);
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename P, typename M, typename T>
- float rms(const p_array<P>& a,
- M& map,
- const T& q1,
- const T& q2)
- {
- float f = 0.f;
- for (unsigned i = 0; i < a.nsites(); ++i)
- {
- algebra::vec<P::dim,float> a2f = convert::to<
algebra::vec<P::dim,float> >(a[i]);
- algebra::vec<P::dim,float> a1f =
- convert::to< algebra::vec<P::dim,float> > \
- (map(q1(convert::to< algebra::vec<P::dim,float> >(a[i]))));
-
- f += norm::l2(a1f - q2(a2f));
- }
- return f / a.nsites();
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of nqmespace mln::registration::internal
-
- } // end of namespace mln::registration
-
-} // end of namespace mln
-
-
-#endif // ! MLN_REGISTRATION_INTERNAL_RMS_HH
diff --git a/milena/mln/registration/registration.hh
b/milena/mln/registration/registration.hh
deleted file mode 100644
index dd03d97..0000000
--- a/milena/mln/registration/registration.hh
+++ /dev/null
@@ -1,391 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_REGISTRATION_REGISTRATION_HH
-# define MLN_REGISTRATION_REGISTRATION_HH
-
-/// \file
-///
-/// Image registration
-/// \sa registration::icp
-
-# include <mln/core/image/image3d.hh>
-# include <mln/core/site_set/box.hh>
-# include <mln/registration/icp.hh>
-# include <mln/fun/x2x/all.hh>
-# include <mln/fun/x2p/closest_point.hh>
-# include <mln/convert/to_p_array.hh>
-
-//FIXME: to be removed.
-# include <mln/util/timer.hh>
-
-namespace mln
-{
-
- namespace registration
- {
-
- using namespace mln::fun::x2x;
-
-
- /// Call ICP once and return the resulting transformation.
- template <typename P>
- inline
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- registration1(const box<P>& domain,
- const p_array<P>& P_,
- const p_array<P>& X);
-
- /// Call ICP 10 times.
- /// Do the first call to ICP with all sites then work on a subset of
- /// which size is decreasing.
- /// For each call, a distance criterion is computed on a subset.
- /// Sites part of the subset which are too far or too
- /// close are removed.
- /// Removed sites are *NOT* reused later in the subset.
- template <typename P>
- inline
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- registration2(const box<P>& domain,
- const p_array<P>& P_,
- const p_array<P>& X);
-
- /// Call ICP 10 times.
- /// Do the first call to ICP with all sites then work on a subset.
- /// For each call, a distance criterion is computed on a subset.
- /// A new subset is computed from the whole set of points according
- /// to this distance. It will be used in the next call.
- /// Removed Sites *MAY* be reintegrated.
- template <typename P>
- inline
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- registration3(const box<P>& domain,
- const p_array<P>& P_,
- const p_array<P>& X);
-
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- namespace internal
- {
-
- template <typename P>
- inline
- void
- registration_tests(const p_array<P>& P_, const p_array<P>& X)
- {
- mln_assertion(P_.is_valid());
- mln_assertion(X.is_valid());
- mln_assertion(!X.is_empty());
- mln_assertion(!P_.is_empty());
-
- // FIXME: Work only in 3D for now...
- mln_precondition(P::dim == 3);
- (void) P_;
- (void) X;
- }
-
- } // end of namespace mln::registration::internal
-
-
- namespace impl
- {
-
- template <typename P>
- inline
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- registration1(const box<P>& domain,
- const p_array<P>& P_,
- const p_array<P>& X)
- {
- trace::entering("mln::registration::registration1");
-
-# ifndef NDEBUG
- util::timer t;
- t.start();
-# endif // ! NDEBUG
-
- registration::closest_point_with_map<P> closest_point(X, domain);
-
- std::pair<algebra::quat,mln_vec(P)> pair = icp(P_, X, closest_point,
- algebra::quat(1,0,0,0),
- literal::zero);
-# ifndef NDEBUG
- std::cout << "icp = " << t << std::endl;
-# endif // ! NDEBUG
-
- typedef rotation<3u,float> rot_t;
- rot_t tqR(pair.first);
- typedef translation<3u,float> trans_t;
- trans_t tqT(pair.second);
- composed<trans_t, rot_t> result(tqT, tqR);
-
- trace::exiting("mln::registration::registration1");
-
- return result;
- }
-
-
- template <typename P>
- inline
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- registration2(const box<P>& domain,
- const p_array<P>& P_,
- const p_array<P>& X)
- {
- trace::entering("mln::registration::registration2");
-
- // Used for debug.
- std::string method = "registration2";
-
- registration::closest_point_with_map<P> closest_point(X, domain);
-
-# ifndef NDEBUG
- util::timer t;
- t.start();
-# endif // ! NDEBUG
-
- // P_bak is shuffled.
- p_array<P> P_bak = P_;
-
- unsigned r = 0;
- std::pair<algebra::quat,mln_vec(P)> pair;
- pair.first = algebra::quat(1,0,0,0);
- pair.second = literal::zero;
-
- // Used for debug.
- image3d<value::rgb8> out(domain);
-
- p_array<P> removed_set;
-
- do
- {
-
-# ifndef NDEBUG
- std::cout << std::endl << std::endl << "==== New run - "
<< r << std::endl;
-# endif // ! NDEBUG
-
- pair = icp(P_bak, X, closest_point,
- pair.first,
- pair.second);
-
-# ifndef NDEBUG
- display_sites_used_in_icp(out, P_bak, P_, X, r, method, pair,
- "final", literal::blue);
-# endif // ! NDEBUG
-
- int d_min, d_max;
- compute_distance_criteria(P_bak, closest_point, pair, r, d_min, d_max);
-
- P_bak = remove_too_far_sites(out, P_bak,
- closest_point, pair, X, removed_set,
- r, d_min, d_max, method);
-
-# ifndef NDEBUG
- display_sites_used_in_icp(out, P_bak, P_, X, r, method, pair,
- "schanges", literal::green);
- std::cout << "==== End of run" << std::endl;
-# endif
-
- ++r;
-
- } while (r < 10);
-
-# ifndef NDEBUG
- std::cout << "icp = " << t << std::endl;
- draw_last_run(domain, P_bak, removed_set, X, pair.first, pair.second);
-# endif
-
- typedef rotation<3u,float> rot_t;
- rot_t tqR(pair.first);
- typedef translation<3u,float> trans_t;
- trans_t tqT(pair.second);
- composed<trans_t,rot_t> result(tqT, tqR);
-
- trace::exiting("mln::registration::registration2");
-
- return result;
- }
-
-
- template <typename P>
- inline
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- registration3(const box<P>& domain,
- const p_array<P>& P_,
- const p_array<P>& X)
- {
- trace::entering("mln::registration::registration3");
-
- registration::closest_point_with_map<P> closest_point(X, domain);
-
- // Used for debug.
- std::string method = "registration3";
-
-# ifndef NDEBUG
- util::timer t;
- t.start();
-# endif // ! NDEBUG
-
- // P_bak is shuffled.
- p_array<P> P_bak = P_;
-
- unsigned r = 0;
- std::pair<algebra::quat,mln_vec(P)> pair;
- pair.first = algebra::quat(1,0,0,0);
- pair.second = literal::zero;
-
- // Used for debug.
- image3d<value::rgb8> out(domain);
-
- p_array<P> removed_set;
-
- do
- {
-# ifndef NDEBUG
- std::cout << std::endl << std::endl << "==== New run - "
- << r << std::endl;
-# endif // ! NDEBUG
-
- pair = icp(P_bak, X, closest_point,
- pair.first,
- pair.second);
-
-# ifndef NDEBUG
- display_sites_used_in_icp(out, P_bak, P_, X, r, method, pair,
- "final", literal::blue);
-# endif // ! NDEBUG
-
- int d_min, d_max;
- compute_distance_criteria(P_bak, closest_point, pair, r, d_min, d_max);
-
- P_bak = remove_too_far_sites(out, P_,
- closest_point, pair, X, removed_set,
- r, d_min, d_max, method);
-
-# ifndef NDEBUG
- display_sites_used_in_icp(out, P_bak, P_, X, r, method, pair,
- "schanges", literal::green);
- std::cout << "==== End of run" << std::endl;
-# endif // ! NDEBUG
-
- ++r;
-
- } while (r < 10);
-
-# ifndef NDEBUG
- std::cout << "icp = " << t << std::endl;
- draw_last_run(domain, P_bak, removed_set, X, pair.first, pair.second);
-# endif // ! NDEBUG
-
- typedef rotation<3u,float> rot_t;
- rot_t tqR(pair.first);
- typedef translation<3u,float> trans_t;
- trans_t tqT(pair.second);
- composed<trans_t,rot_t> result(tqT, tqR);
-
- trace::exiting("mln::registration::registration3");
-
- return result;
- }
-
- } // end of namespace mln::registration::impl
-
-
-
- // Facade
-
- template <typename P>
- inline
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- registration1(const box<P>& domain,
- const p_array<P>& cloud,
- const p_array<P>& surface)
- {
- trace::entering("registration::registration1");
-
- internal::registration_tests(cloud, surface);
-
- composed< translation<P::dim,float>, rotation<P::dim,float> >
- qk = impl::registration1(domain, cloud, surface);
-
- trace::exiting("registration::registration1");
-
- return qk;
- }
-
-
- template <typename P>
- inline
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- registration2(const box<P>& domain,
- const p_array<P>& cloud,
- const p_array<P>& surface)
- {
- trace::entering("registration::registration2");
-
- internal::registration_tests(cloud, surface);
-
- composed< translation<P::dim,float>, rotation<P::dim,float> >
- qk = impl::registration2(domain, cloud, surface);
-
- trace::exiting("registration::registration2");
-
- return qk;
- }
-
-
- template <typename P>
- inline
- composed< translation<P::dim,float>,rotation<P::dim,float> >
- registration3(const box<P>& domain,
- const p_array<P>& cloud,
- const p_array<P>& surface)
- {
- trace::entering("registration::registration3");
-
- internal::registration_tests(cloud, surface);
-
- composed< translation<P::dim,float>, rotation<P::dim,float> >
- qk = impl::registration3(domain, cloud, surface);
-
- trace::exiting("registration::registration3");
-
- return qk;
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
- } // end of namespace mln::registration
-
-
-} // end of namespace mln
-
-
-#endif // ! MLN_REGISTRATION_REGISTRATION_HH
diff --git a/milena/mln/subsampling/all.hh b/milena/mln/subsampling/all.hh
deleted file mode 100644
index 2f4e8ba..0000000
--- a/milena/mln/subsampling/all.hh
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_SUBSAMPLING_ALL_HH
-# define MLN_SUBSAMPLING_ALL_HH
-
-/*! \file
- *
- * \brief File that includes all "point-wise" expression tools.
- */
-
-
-namespace mln
-{
-
- /// Namespace of "point-wise" expression tools.
- namespace subsampling {}
-
-} // end of namespace mln
-
-
-# include <mln/subsampling/gaussian_subsampling.hh>
-# include <mln/subsampling/subsampling.hh>
-
-#endif // ! MLN_SUBSAMPLING_ALL_HH
diff --git a/milena/mln/subsampling/essential.hh b/milena/mln/subsampling/essential.hh
deleted file mode 100644
index 70f3bfb..0000000
--- a/milena/mln/subsampling/essential.hh
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_SUBSAMPLING_ESSENTIAL_HH
-# define MLN_SUBSAMPLING_ESSENTIAL_HH
-
-/// \file
-/// \brief File that includes essential "point-wise" expression tools.
-
-
-// NOTHING YET
-
-#endif // ! MLN_SUBSAMPLING_ESSENTIAL_HH
diff --git a/milena/mln/subsampling/gaussian_subsampling.hh
b/milena/mln/subsampling/gaussian_subsampling.hh
deleted file mode 100644
index 8855b9c..0000000
--- a/milena/mln/subsampling/gaussian_subsampling.hh
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_SUBSAMPLING_GAUSSIAN_SUBSAMPLING_HH
-# define MLN_SUBSAMPLING_GAUSSIAN_SUBSAMPLING_HH
-
-/// \file
-///
-/// Produce a subsampled image
-
-# include <mln/geom/ncols.hh>
-# include <mln/geom/nrows.hh>
-
-
-# include <mln/linear/gaussian.hh>
-# include <mln/subsampling/subsampling.hh>
-
-
-
-namespace mln
-{
-
- namespace subsampling
- {
-
- /// Gaussian subsampling FIXME : doxy
- template <typename I>
- inline
- mln_concrete(I)
- gaussian_subsampling(const Image<I>& input, float sigma,
- const mln_dpsite(I)& first_p,
- const mln_deduce(I, site, coord)& gap);
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename I>
- inline
- mln_concrete(I)
- gaussian_subsampling(const Image<I>& input, float sigma,
- const mln_dpsite(I)& first_p,
- const mln_deduce(I, site, coord)& gap)
- {
- trace::entering("subsampling::gaussian_subsampling");
- mln_precondition(exact(input).is_valid());
-
- (void) sigma;
-
- mln_concrete(I) temp(exact(input).domain());
- mln_concrete(I) output(geom::nrows(input) / gap,
- geom::ncols(input) / gap); //FIXME : image2d only
-
- linear::gaussian(input, 0.1, temp);
- output = impl::subsampling_(exact(temp), first_p, gap);
-
- trace::exiting("subsampling::gaussian_subsampling");
- return output;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::subsampling
-
-} // end of namespace mln
-
-
-#endif // ! MLN_SUBSAMPLING_GAUSSIAN_SUBSAMPLING_HH
diff --git a/milena/mln/subsampling/subsampling.hh
b/milena/mln/subsampling/subsampling.hh
deleted file mode 100644
index 60ee3c0..0000000
--- a/milena/mln/subsampling/subsampling.hh
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
-// (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_SUBSAMPLING_SUBSAMPLING_HH
-# define MLN_SUBSAMPLING_SUBSAMPLING_HH
-
-/// \file
-///
-/// Produce a subsampled image
-
-# include <mln/geom/ncols.hh>
-# include <mln/geom/nrows.hh>
-
-
-namespace mln
-{
-
- namespace subsampling
- {
-
- /// Subsampling FIXME : doxy
- template <typename I>
- inline
- mln_concrete(I)
- subsampling(const Image<I>& input,
- const mln_deduce(I, site, delta)& first_p,
- const mln_deduce(I, site, coord)& gap);
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace impl
- {
-
- //FIXME : add version for every image types.
-
- template <typename T>
- inline
- mln_concrete(image2d<T>)
- subsampling_(const image2d<T>& input,
- const mln_deduce(image2d<T>, site, delta)& first_p,
- const mln_deduce(image2d<T>, site, coord)& gap)
- {
- trace::entering("subsampling::impl::subsampling_");
- mln_concrete(image2d<T>) output(geom::nrows(input) / gap,
- geom::ncols(input) / gap);
-
- for (def::coord j = geom::min_col(output);
- j <= geom::max_col(output); ++j)
- for (def::coord i = geom::min_row(output);
- i <= geom::max_row(output); ++i)
- {
- point2d p1(i, j);
- point2d p2(first_p[0] + i * gap, first_p[1] + j * gap);
-
- output(p1) = input(p2);
- }
-
- trace::exiting("subsampling::impl::subsampling_");
- return output;
- }
-
- } // end of namespace mln::subsampling::impl
-
-
- template <typename I>
- inline
- mln_concrete(I)
- subsampling(const Image<I>& input,
- const mln_deduce(I, site, delta)& first_p,
- const mln_deduce(I, site, coord)& gap)
- {
- trace::entering("subsampling::subsampling");
- mln_precondition(exact(input).is_valid());
-
- mln_concrete(I) output(geom::nrows(input) / gap,
- geom::ncols(input) / gap); // FIXME: only 2d here
-
- output = impl::subsampling_(exact(input), first_p, gap);
-
- trace::exiting("subsampling::subsampling");
- return output;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace mln::subsampling
-
-} // end of namespace mln
-
-
-#endif // ! MLN_SUBSAMPLING_SUBSAMPLING_HH
diff --git a/milena/mln/trait/functions.hh b/milena/mln/trait/functions.hh
deleted file mode 100644
index 01b8330..0000000
--- a/milena/mln/trait/functions.hh
+++ /dev/null
@@ -1,251 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_TRAIT_FUNCTIONS_HH
-# define MLN_TRAIT_FUNCTIONS_HH
-
-# include <mln/metal/bexpr.hh>
-# include <mln/metal/if.hh>
-# include <mln/fun/param.hh>
-# include <mln/trait/next/solve.hh>
-
-# define mln_trait_fun_is_assignable(Fun) typename
mln::trait::function::is_assignable< Fun >::ret
-# define mln_trait_fun_is_assignable_(Fun) mln::trait::function::is_assignable< Fun
>::ret
-# define mln_trait_fun_is_assignable__1comma(A, B) typename
mln::trait::function::is_assignable< A, B >::ret
-# define mln_trait_fun_is_assignable__1comma_(A, B)
mln::trait::function::is_assignable< A, B >::ret
-
-# define mln_trait_fun_is_parametrable(Fun) typename
mln::trait::function::is_parametrable< Fun >::ret
-# define mln_trait_fun_is_parametrable_(Fun) mln::trait::function::is_parametrable<
Fun >::ret
-
-# define mln_trait_fun_lvalue(Fun) typename mln::trait::function::get_lvalue< Fun
>::ret
-# define mln_trait_fun_param(Fun) typename mln::trait::function::get_param< Fun
>::ret
-# define mln_trait_fun_storage(Fun) typename mln::trait::function::get_storage< Fun
>::ret
-
-namespace mln
-{
-
- namespace trait
- {
-
- namespace function
- {
-
- namespace internal
- {
-
- namespace introspect
- {
-
- template <typename T>
- struct except_void_t
- {
- typedef void ret;
- };
-
- template <>
- struct except_void_t<void>;
-
- // Lvalue solver
-
- template <typename T, typename V>
- struct has_lvalue_t
- {
- typedef metal::false_ ret;
- typedef void type;
- };
-
- template <typename T>
- struct has_lvalue_t<T, typename except_void_t<typename T::lvalue>::ret>
- {
- typedef metal::true_ ret;
- typedef typename T::lvalue type;
- };
-
- // Parameter solver
- template <typename T, typename V>
- struct param_solver;
-
- template <typename T, typename V>
- struct param_flag_solver
- {
- typedef typename mln::fun::parameter<T> ret;
- };
-
- template <typename T>
- struct param_flag_solver<T, typename except_void_t<typename
mln::fun::parameter<typename T::flag>::param>::ret>
- {
- typedef mln::fun::parameter<typename T::flag> ret;
- };
-
- template <typename T, typename V>
- struct param_def_solver
- {
- typedef typename param_flag_solver<T, V>::ret ret;
- };
-
- template <typename T>
- struct param_def_solver<T, typename except_void_t<typename
mln::fun::parameter<typename T::def>::param>::ret>
- {
- typedef mln::fun::parameter<typename T::def> ret;
- };
-
- template <typename T, typename V>
- struct param_solver : param_def_solver<T, V>
- {
- };
-
- template <typename T>
- struct param_solver<T, typename except_void_t<typename T::param>::ret>
- {
- typedef T ret;
- };
-
- template <typename T, typename V>
- struct has_param_t
- {
- typedef metal::false_ ret;
- typedef void type;
- };
-
- template <typename T>
- struct has_param_t<T, typename except_void_t<typename
param_solver<T,void>::ret::param>::ret>
- {
- typedef metal::true_ ret;
- typedef typename param_solver<T,void>::ret::param type;
- };
-
- template <typename T, typename V>
- struct storage_solver;
-
- template <typename T, typename V>
- struct storage_flag_solver
- {
- typedef typename mln::fun::parameter<T> ret;
- };
-
- template <typename T>
- struct storage_flag_solver<T, typename except_void_t<typename
mln::fun::parameter<typename T::flag>::storage>::ret>
- {
- typedef mln::fun::parameter<typename T::flag> ret;
- };
-
- template <typename T, typename V>
- struct storage_def_solver
- {
- typedef typename storage_flag_solver<T, V>::ret ret;
- };
-
- template <typename T>
- struct storage_def_solver<T, typename except_void_t<typename
mln::fun::parameter<typename T::def>::storage>::ret>
- {
- typedef mln::fun::parameter<typename T::def> ret;
- };
-
- template <typename T, typename V>
- struct storage_solver : storage_def_solver<T, V>
- {
- };
-
- template <typename T>
- struct storage_solver<T, typename except_void_t<typename
T::storage>::ret>
- {
- typedef T ret;
- };
-
- template <typename T, typename V>
- struct has_storage_t
- {
- typedef has_param_t<T, V> has_param;
-
- typedef metal::false_ ret;
- typedef typename has_param::type type;
-
- template <typename U>
- static inline
- const U& compute(const U& t)
- {
- return t;
- }
-
- };
-
- template <typename T>
- struct has_storage_t<T, typename except_void_t<typename
param_solver<T,void>::ret::storage>::ret>
- {
- typedef metal::true_ ret;
- typedef typename param_solver<T,void>::ret def;
-
- typedef typename def::storage type;
-
- template <typename U>
- static inline
- type compute(const U& p)
- {
- return def::compute(p);
- }
-
- };
-
- } // end of namespace mln::trait::fun::internal::introspect
-
- } // end of namespace mln::trait::fun::internal
-
- template <typename F>
- struct is_assignable
- {
- typedef typename internal::introspect::has_lvalue_t<F, void>::ret ret;
- };
-
- template <typename F>
- struct is_parametrable
- {
- typedef typename internal::introspect::has_param_t<F, void>::ret ret;
- };
-
- template <typename F>
- struct get_lvalue
- {
- typedef typename internal::introspect::has_lvalue_t<F, void>::type ret;
- };
-
- template <typename F>
- struct get_param
- {
- typedef typename internal::introspect::has_param_t<F, void>::type ret;
- };
-
- template <typename F>
- struct get_storage
- {
- typedef typename internal::introspect::has_storage_t<F, void>::type ret;
- };
-
- } // end of namespace mln::trait::fun
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-#endif // ! MLN_TRAIT_FUNCTIONS_HH
diff --git a/milena/mln/trait/next/solve.hh b/milena/mln/trait/next/solve.hh
deleted file mode 100644
index 747bdaa..0000000
--- a/milena/mln/trait/next/solve.hh
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (C) 2006, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_TRAIT_NEXT_SOLVE_HH
-# define MLN_TRAIT_NEXT_SOLVE_HH
-
-/// \file
-///
-/// FIXME
-
-# include <mln/core/category.hh>
-# include <mln/metal/equal.hh>
-# include <mln/metal/if.hh>
-# include <mln/metal/ret.hh>
-# include <mln/trait/solve.hh>
-
-
-// FIXME: Just for the record (use it...)
-
-# ifndef MLN_DEBUG_TRAITS
-# endif // ! MLN_DEBUG_TRAITS
-
-
-# define mln_trait_nunary(Name, T) typename mln::trait::next::solve_unary< Name, T
>::ret
-# define mln_trait_nunary_(Name, T) mln::trait::next::solve_unary< Name, T
>::ret
-
-# define mln_trait_nbinary(Name, T1, T2) typename mln::trait::next::solve_binary<
Name, T1, T2 >::ret
-# define mln_trait_nbinary_(Name, T1, T2) mln::trait::next::solve_binary<
Name, T1, T2 >::ret
-
-
-
-namespace mln
-{
-
- namespace trait
- {
-
- namespace next
- {
-
- // Unary case.
-
-
- template < typename Name,
- typename T >
- struct set_precise_unary_
- {
- typedef undefined ret;
- };
-
-
- template < typename Name,
- template <class> class Category_T, typename T >
- struct set_unary_
- {
- typedef undefined ret;
- };
-
- template < typename Name,
- typename T >
- struct set_unary_< Name, Unknown, T > // Blocker; top of inheritance.
- {
- typedef not_found ret;
- };
-
-
-
-
- // Binary case.
-
-
- template < typename Name,
- typename L,
- typename R >
- struct set_precise_binary_
- {
- typedef undefined ret;
- };
-
-
- template < typename Name,
- template <class> class Category_L, typename L,
- template <class> class Category_R, typename R >
- struct set_binary_
- {
- typedef undefined ret;
- };
-
- template < typename Name,
- typename L,
- template <class> class Category_R, typename R >
- struct set_binary_< Name, Unknown, L, Category_R, R > // Left blocker.
- {
- typedef not_found ret;
- };
-
- template < typename Name,
- template <class> class Category_L, typename L,
- typename R >
- struct set_binary_< Name, Category_L, L, Unknown, R > // Right blocker.
- {
- typedef not_found ret;
- };
-
- template < typename Name,
- typename L,
- typename R >
- struct set_binary_< Name, Unknown, L, Unknown, R > // Blocker.
- {
- typedef not_found ret;
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-
-# include <mln/trait/next/solve_unary.hh>
-# include <mln/trait/next/solve_binary.hh>
-# include <mln/trait/next/solve_proxy.hh>
-
-#endif // ! MLN_TRAIT_NEXT_SOLVE_HH
diff --git a/milena/mln/trait/next/solve_binary.hh
b/milena/mln/trait/next/solve_binary.hh
deleted file mode 100644
index 0eccf26..0000000
--- a/milena/mln/trait/next/solve_binary.hh
+++ /dev/null
@@ -1,300 +0,0 @@
-// Copyright (C) 2006, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_TRAIT_NEXT_SOLVE_BINARY_HH
-# define MLN_TRAIT_NEXT_SOLVE_BINARY_HH
-
-/// \file
-///
-/// FIXME
-
-# include <mln/core/category.hh>
-# include <mln/core/routine/exact.hh>
-# include <mln/metal/equal.hh>
-# include <mln/metal/if.hh>
-# include <mln/metal/ret.hh>
-# include <mln/trait/next/solve.hh>
-
-
-// FIXME: Just for the record (use it...)
-
-# ifndef MLN_DEBUG_TRAITS
-# endif // ! MLN_DEBUG_TRAITS
-
-
-
-namespace mln
-{
-
- namespace trait
- {
-
- namespace next
- {
-
- namespace internal
- {
-
-
- template < typename Name,
- typename Category_L, typename L,
- typename Category_R, typename R >
- struct trait_set_binary_;
-
- template < typename Name,
- template <class> class Category_L, typename _l, typename L,
- template <class> class Category_R, typename _r, typename R >
- struct trait_set_binary_< Name,
- Category_L<_l>, L,
- Category_R<_r>, R >
- {
- typedef typename mln::trait::next::set_binary_<Name,
- Category_L, L,
- Category_R, R>::ret ret;
- };
-
-
- // triplet_ret_
-
- template < unsigned i_L_, unsigned i_R_, typename ret_ >
- struct triplet_
- {
- typedef ret_ ret;
- };
-
-
- // merge_triplets_
-
- template < typename L_trp, typename R_trp >
- struct merge_triplets_;
-
- template < unsigned L_i_L, unsigned L_i_R, typename L_ret,
- unsigned R_i_L, unsigned R_i_R, typename R_ret >
- struct merge_triplets_< triplet_<L_i_L, L_i_R, L_ret>,
- triplet_<R_i_L, R_i_R, R_ret> >
- {
- typedef metal::bool_<(L_i_L <= R_i_L && L_i_R <= R_i_R)> take_L;
- typedef metal::bool_<(R_i_L <= L_i_L && R_i_R <= L_i_R)> take_R;
- typedef metal::or_<take_L, take_R> ok;
- typedef typename metal::if_< metal::and_<ok, take_L>,
- triplet_<L_i_L, L_i_R, L_ret>,
- typename metal::if_< metal::and_<ok, take_R>,
- triplet_<R_i_L, R_i_R, R_ret>,
- triplet_<0,0, not_found> >::ret >::ret ret;
- };
-
- template < unsigned i_L, unsigned i_R, typename LR_ret >
- struct merge_triplets_< triplet_<i_L, i_R, LR_ret>,
- triplet_<i_L, i_R, LR_ret> >
- {
- typedef triplet_<i_L, i_R, LR_ret> ret;
- };
-
-
- template < unsigned L_i_L, unsigned L_i_R, unsigned L_i_max,
- unsigned R_i_L, unsigned R_i_R, unsigned R_i_max >
- // L_i_max and R_i_max differ
- struct helper_merge_triplets_same_ret_
- {
- // The winning couple between L_* and R_* is the one which
- // maximum index is the smallest; for instance, with:
- // left branch giving L_i_L = 5 and L_i_R = 1 so L_i_max = 5
- // right branch giving L_i_L = 3 and L_i_R = 4 so R_i_max = 4
- // the right branch wins.
- enum { i_L = (L_i_max < R_i_max ? L_i_L : R_i_L),
- i_R = (L_i_max < R_i_max ? L_i_R : R_i_R) };
- };
-
- template < unsigned L_i_L, unsigned L_i_R, unsigned i_max,
- unsigned R_i_L, unsigned R_i_R >
- // L_i_max is equal to R_i_max
- struct helper_merge_triplets_same_ret_< L_i_L, L_i_R, i_max,
- R_i_L, R_i_R, i_max >
- {
- // The winning couple is the one with the minimum index.
- enum { L_i_min = (L_i_L < L_i_R ? L_i_L : L_i_R),
- R_i_min = (R_i_L < R_i_R ? R_i_L : R_i_R),
- i_L = (L_i_min < R_i_min ? L_i_L : R_i_L),
- i_R = (L_i_min < R_i_min ? L_i_R : R_i_R) };
- };
-
-
- template < unsigned L_i_L, unsigned L_i_R, typename LR_ret,
- unsigned R_i_L, unsigned R_i_R >
- struct merge_triplets_< triplet_<L_i_L, L_i_R, LR_ret>,
- triplet_<R_i_L, R_i_R, LR_ret> >
- {
- typedef helper_merge_triplets_same_ret_< L_i_L, L_i_R, (L_i_L > L_i_R ? L_i_L :
L_i_R),
- R_i_L, R_i_R, (R_i_L > R_i_R ? R_i_L : R_i_R) > helper;
- typedef triplet_<helper::i_L, helper::i_R, LR_ret> ret;
- };
-
- template < unsigned L_i_L, unsigned L_i_R, typename L_ret >
- struct merge_triplets_< triplet_<L_i_L, L_i_R, L_ret>,
- triplet_< 0, 0, not_found> >
- {
- typedef triplet_<L_i_L, L_i_R, L_ret> ret;
- };
-
- template < unsigned R_i_L, unsigned R_i_R, typename R_ret >
- struct merge_triplets_< triplet_< 0, 0, not_found>,
- triplet_<R_i_L, R_i_R, R_ret> >
- {
- typedef triplet_<R_i_L, R_i_R, R_ret> ret;
- };
-
- template <> // To disambiguate.
- struct merge_triplets_< triplet_<0, 0, not_found>,
- triplet_<0, 0, not_found> >
- {
- typedef triplet_<0u,0u, not_found> ret;
- };
-
-
-
- // Fwd decl.
- template < typename Name,
- unsigned i_L, typename Category_L, typename L,
- unsigned i_R, typename Category_R, typename R >
- struct get_binary_;
-
-
- template < typename user_ret, /* != not_found and != undefined */
- typename Name,
- unsigned i_L, typename Category_L, typename L,
- unsigned i_R, typename Category_R, typename R >
- struct helper_get_binary_
- {
- typedef triplet_< i_L, i_R, user_ret > ret; // The user has defined
'ret' so we return it.
- };
-
- template < typename Name,
- unsigned i_L, typename Category_L, typename L,
- unsigned i_R, typename Category_R, typename R >
- struct helper_get_binary_< /* user_ret == */ not_found,
- Name, i_L, Category_L, L, i_R, Category_R, R >
- {
- typedef triplet_< 0, 0, not_found > ret; // End of search due to a blocker;
'ret' is not found.
- };
-
-
- template < typename Name,
- unsigned i_L, typename Category_L, typename L,
- unsigned i_R, typename Category_R, typename R >
- struct helper_get_binary_< /* user_ret == */ undefined,
- Name, i_L,Category_L, L, i_R,Category_R, R >
- {
- // No user definition for 'ret' so treillis construction in a static recursive
way.
-
- // FIXME: We *do* need to handle this search with a priority!
- // FIXME: for a result can be found in both branches...
-
- typedef typename mln::internal::super_category_< Category_L, L >::ret
Super_Category_L;
- typedef typename mln::internal::super_category_< Category_R, R >::ret
Super_Category_R;
-
- typedef get_binary_< Name,
- i_L + 1, Super_Category_L, L,
- i_R, Category_R, R > L_branch;
- typedef mlc_ret(L_branch) L_trp;
-
- typedef get_binary_< Name,
- i_L, Category_L, L,
- i_R + 1, Super_Category_R, R > R_branch;
- typedef mlc_ret(R_branch) R_trp;
-
- typedef typename merge_triplets_< L_trp, R_trp >::ret ret;
- };
-
-
- template < typename Name,
- unsigned i_L, typename Category_L, typename L,
- unsigned i_R, typename Category_R, typename R >
- struct get_binary_
- {
- typedef typename trait_set_binary_<Name, Category_L,L,
- Category_R,R>::ret user_ret; // First get 'user_ret'
- typedef helper_get_binary_<user_ret, Name, i_L,Category_L,L,
- i_R,Category_R,R> helper; // Set the helper to make a decision.
- typedef mlc_ret(helper) ret; // Return
a triplet.
- };
-
-
- template < typename precise_ret,
- typename Name,
- typename Category_L, typename L,
- typename Category_R, typename R >
- struct helper_choose_binary_wrt_ /* precise_ret != undefined */
- {
- typedef precise_ret ret; // -> A
precise ret has been defined so it is it.
- };
-
- template < typename Name,
- typename Category_L, typename L,
- typename Category_R, typename R >
- struct helper_choose_binary_wrt_< /* precise_ret == */ undefined,
- Name, Category_L, L, Category_R, R >
- {
- typedef typename get_binary_< Name,
- 0, Category_L, L,
- 0, Category_R, R >::ret triplet; // Browse upwards the category
inheritance
- typedef mlc_ret(triplet) ret; // to fetch
ret from 'get_binary_'s.
- };
-
-
- template < typename Name,
- typename Category_L, typename L,
- typename Category_R, typename R >
- struct helper_solve_binary_
- {
- typedef typename set_precise_binary_<Name, L, R>::ret precise_ret; /* undefined
or not (?) */
- typedef helper_choose_binary_wrt_<precise_ret, Name, Category_L,L, Category_R,R>
helper;
- typedef mlc_ret(helper) ret;
- };
-
- } // end of namespace mln::trait::internal
-
-
- // FIXME: Postfix solve_binary with a '-'(?)
- template < typename Name,
- typename L_,
- typename R_ >
- struct solve_binary
- {
- typedef mln_exact(L_) L;
- typedef mln_exact(R_) R;
- typedef typename mln::category<L>::ret Category_L;
- typedef typename mln::category<R>::ret Category_R;
- typedef internal::helper_solve_binary_< Name, Category_L, L, Category_R, R >
meta_code;
- typedef typename meta_code::ret ret;
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-
-#endif // ! MLN_TRAIT_NEXT_SOLVE_BINARY_HH
diff --git a/milena/mln/trait/next/solve_proxy.hh b/milena/mln/trait/next/solve_proxy.hh
deleted file mode 100644
index c2e2dc1..0000000
--- a/milena/mln/trait/next/solve_proxy.hh
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_TRAIT_NEXT_SOLVE_PROXY_HH
-# define MLN_TRAIT_NEXT_SOLVE_PROXY_HH
-
-/// \file
-///
-/// Proxy support for "next" trait solver.
-
-
-# include <mln/core/concept/object.hh>
-# include <mln/core/concept/proxy.hh>
-# include <mln/core/concept/proxy.hxx>
-
-# include <mln/trait/next/solve.hh>
-
-namespace mln
-{
-
- namespace trait
- {
-
- namespace next
- {
-
- // Forward declaration
- // Needed by mln_trait_nbinary.
- template < typename Name, typename L_, typename R_ >
- struct solve_binary;
- template < typename Name, typename T_ > struct solve_unary;
-
-
-
- // Unary ops.
-
- template < typename Op, typename P >
- struct set_unary_< Op, mln::Proxy, P >
- {
- typedef mlc_unqualif(mln_q_subject(P)) S;
- typedef mln_trait_nunary(Op, S) ret;
- };
-
- // Binary ops.
-
- template < typename Op, typename L, typename R >
- struct set_binary_< Op, mln::Proxy, L, mln::Proxy, R >
- {
- typedef mln::internal::helper_unprox_binop<L, R> helper;
- typedef mln_trait_nbinary(Op,
- typename helper::L_ret,
- typename helper::R_ret) ret;
- };
-
- template < typename Op, typename P, typename O >
- struct set_binary_< Op, mln::Proxy, P, mln::Object, O >
- {
- typedef mlc_unqualif(mln_q_subject(P)) S;
- typedef mln_trait_nbinary(Op, S, O) ret;
- };
-
- template < typename Op, typename O, typename P >
- struct set_binary_< Op, mln::Object, O, mln::Proxy, P >
- {
- typedef mlc_unqualif(mln_q_subject(P)) S;
- typedef mln_trait_nbinary(Op, O, S) ret;
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-
-#endif // ! MLN_TRAIT_NEXT_SOLVE_PROXY_HH
diff --git a/milena/mln/trait/next/solve_unary.hh b/milena/mln/trait/next/solve_unary.hh
deleted file mode 100644
index 86b1d9a..0000000
--- a/milena/mln/trait/next/solve_unary.hh
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (C) 2006, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_TRAIT_NEXT_SOLVE_UNARY_HH
-# define MLN_TRAIT_NEXT_SOLVE_UNARY_HH
-
-/*!
- * \file
- *
- * \brief FIXME
- *
- *
- */
-
-# include <mln/core/category.hh>
-# include <mln/core/routine/exact.hh>
-# include <mln/metal/equal.hh>
-# include <mln/metal/if.hh>
-# include <mln/metal/ret.hh>
-# include <mln/trait/next/solve.hh>
-
-
-// FIXME: Just for the record (use it...)
-
-# ifndef MLN_DEBUG_TRAITS
-# endif // ! MLN_DEBUG_TRAITS
-
-
-
-namespace mln
-{
-
- namespace trait
- {
-
- namespace next
- {
-
- namespace internal
- {
-
-
- template < typename Name,
- typename Category,
- typename T >
- struct trait_set_unary_;
-
- template < typename Name,
- template <class> class Category, typename _,
- typename T >
- struct trait_set_unary_< Name, Category<_>, T >
- {
- typedef typename mln::trait::next::set_unary_<Name, Category, T>::ret ret;
- };
-
-
- // Fwd decls.
- template < typename Name,
- typename Category, typename T >
- struct get_unary_;
-
-
- template < typename user_ret, /* != not_found and != undefined */
- typename Name,
- typename Category, typename T >
- struct helper_get_unary_
- {
- typedef user_ret ret; // The user has defined 'ret' so we return it.
- };
-
-
- template < typename Name,
- typename Category, typename T >
- struct helper_get_unary_< /* user_ret == */ not_found,
- Name, Category, T >
- {
- typedef not_found ret; // End of search due to a blocker; 'ret' is not
found.
- };
-
-
- template < typename Name,
- typename Category, typename T >
- struct helper_get_unary_< /* user_ret == */ undefined,
- Name, Category, T >
- {
- typedef typename mln::internal::super_category_< Category, T >::ret
Super_Category;
- typedef typename get_unary_<Name, Super_Category, T>::ret ret; // No user ret
definition => Recursion.
- };
-
-
- template < typename Name,
- typename Category, typename T >
- struct get_unary_
- {
- typedef typename trait_set_unary_<Name, Category, T>::ret user_ret; // First
get 'user_ret'
- typedef helper_get_unary_<user_ret, Name, Category, T> helper; // Set the
helper to make a decision.
- typedef mlc_ret(helper) ret; // Return.
- };
-
-
- template < typename precise_ret,
- typename Name,
- typename Category, typename T >
- struct helper_choose_unary_wrt_ /* precise_ret != undefined */
- {
- typedef precise_ret ret; // -> A precise ret has
been defined so it is it.
- };
-
- template < typename Name,
- typename Category, typename T >
- struct helper_choose_unary_wrt_< /* precise_ret == */ undefined,
- Name, Category, T >
- {
- typedef typename get_unary_<Name, Category, T>::ret ret; // -> Go up into the
category inheritance
- // to fetch a ret from 'set_unary_'s.
- };
-
- template < typename Name,
- typename Category, typename T >
- struct helper_solve_unary_
- {
- typedef typename set_precise_unary_<Name, T>::ret precise_ret;
- typedef helper_choose_unary_wrt_< precise_ret, /* undefined or not (?) */
- Name, Category, T> helper;
- typedef mlc_ret(helper) ret;
- };
-
- } // end of namespace mln::trait::next::internal
-
-
- template < typename Name,
- typename T_ >
- struct solve_unary
- {
- typedef mln_exact(T_) T;
- typedef typename mln::category<T>::ret Category;
- typedef internal::helper_solve_unary_< Name, Category, T > meta_code;
- typedef typename meta_code::ret ret;
- };
-
- } // end of namespace mln::trait::next
-
- } // end of namespace mln::trait
-
-} // end of namespace mln
-
-
-#endif // ! MLN_TRAIT_NEXT_SOLVE_UNARY_HH
diff --git a/milena/mln/value/hsi.hh b/milena/mln/value/hsi.hh
deleted file mode 100644
index 4bd7d37..0000000
--- a/milena/mln/value/hsi.hh
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#include <mln/value/ops.hh>
-
-#include <mln/value/concept/vectorial.hh>
-#include <mln/value/int_u.hh>
-#include <mln/algebra/vec.hh>
-
-#include <mln/value/float01_8.hh>
-
-#ifndef MLN_VALUE_HSI_HH
-# define MLN_VALUE_HSI_HH
-
-
-namespace mln
-{
-
- namespace value
- {
-
- template <typename E>
- struct HSI
- {
- };
-
- template <typename H, typename S, typename I>
- class hsi_ : public HSI< hsi_<H,S,I> >
- {
- public:
-
- typedef H h_type;
- typedef S s_type;
- typedef I i_type;
-
- /// Constructor without argument.
- hsi_()
- {
- }
-
- /// Constructor from component values.
- hsi_(const H& hue, const S& sat, const I& inty)
- : hue_(hue),
- sat_(sat),
- int_(inty)
- {
- }
-
- /// Read-only access to the hue component.
- const H& hue() const
- {
- return this->hue_;
- }
- const S& sat() const
- {
- return this->sat_;
- }
- const I& inty() const
- {
- return this->int_;
- }
-
- /// Read-write access to the hue component.
- H& hue()
- {
- return this->hue_;
- }
- S& sat()
- {
- return this->sat_;
- }
- I& inty()
- {
- return this->int_;
- }
-
- private:
- H hue_;
- S sat_;
- I int_;
- };
-
- typedef hsi_<float, float, float> hsi_f;
-
- typedef hsi_<double, double, double> hsi_d;
-
- } // end of namespace mln::value
-
-} // end of namespace mln
-
-#endif // ! MLN_VALUE_HSI_HH
diff --git a/milena/mln/value/shell.hh b/milena/mln/value/shell.hh
deleted file mode 100644
index 19eda23..0000000
--- a/milena/mln/value/shell.hh
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_VALUE_SHELL_HH
-# define MLN_VALUE_SHELL_HH
-
-/// \file
-///
-/// \brief Define a shell type that encloses a value.
-
-# include <mln/core/concept/proxy.hh>
-# include <mln/core/concept/function.hh>
-# include <mln/core/concept/image.hh>
-
-
-namespace mln
-{
-
- // Forward declaration.
- namespace value {
- template <typename F, typename I> struct shell;
- }
-
- namespace value
- {
-
- namespace impl
- {
-
- template <typename F, typename I, class C>
- struct shell_ { };
-
-
- template <typename F, typename I>
- struct shell_<F, I, Function_v2v<void> >
- {
- const mln_value(I)&
- set_(I& ima, const mln_site(I)& s, mln_result(F) v);
- };
-
- } // end of namespace mln::value::impl
-
-
- template <typename F, typename I>
- struct shell
- : public Proxy< shell<F,I> >,
- public mln::internal::proxy_impl< mln_result(F), shell<F,I> >,
- public impl::shell_<F, I, typename F::category>
- {
- typedef mln_result(F) value;
-
- // Ctor
- shell(Image<I> &ima, const mln_site(I) &s);
-
- // Write
- value operator=(value);
-
- // Enc
- typedef void enc; // FIXME
-
- // Equiv
- typedef value equiv;
-
- mln_result(F) subj_();
-
- // <<
- // std::ostream& operator<<(std::ostream& ostr);
-
- // >>
- // std::istream& operator>>(std::istream& istr);
-
-
- protected:
- I& ima_;
- mln_site(I) s_;
- mln_result(F) v_;
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- // Constructor.
- template <typename F, typename I>
- shell<F,I>::shell(Image<I>& ima, const mln_site(I)& s)
- :
- ima_(exact(ima)),
- s_(s),
- v_(F()(exact(ima)(s)))
- {
- }
-
- // Write for everyone
- template <typename F, typename I>
- typename F::result
- shell<F,I>::operator=(mln_result(F) v)
- {
- v_ = F()(set_(ima_, s_, v));
- return v_;
- }
-
- template <typename F, typename I>
- mln_result(F)
- shell<F,I>::subj_()
- {
- return v_;
- }
-
-
- namespace impl
- {
-
-// template <typename F, typename I>
-// const mln_value(I)&
-// shell_<F, I, Function_v2v<void> >::set_(I& ima,
-// const mln_site(I)& s,
-// mln_result(F) v)
-// {
-// ima(s) = F().f_1(v);
-// return ima(s);
-// }
-
- template <typename F, typename I>
- const mln_value(I)&
- shell_<F, I, Function_v2v<void> >::set_(I& ima,
- const mln_site(I)& s,
- mln_result(F) v)
- {
- ima(s) = F().f_1(v, ima(s));
- return ima(s);
- }
-
- } // end of namespace mln::value::impl
-
-
-# endif // MLN_INCLUDE_ONLY
-
-
- } // end of namespace mln::value
-
-} // end of namespace mln
-
-#endif // ! MLN_VALUE_SHELL_HH
diff --git a/milena/mln/value/stack.hh b/milena/mln/value/stack.hh
deleted file mode 100644
index 1782c1c..0000000
--- a/milena/mln/value/stack.hh
+++ /dev/null
@@ -1,334 +0,0 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
-// Laboratory (LRDE)
-//
-// This file is part of Olena.
-//
-// Olena is free software: you can redistribute it and/or modify it under
-// the terms of the GNU General Public License as published by the Free
-// Software Foundation, version 2 of the License.
-//
-// Olena is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Olena. If not, see <http://www.gnu.org/licenses/>.
-//
-// As a special exception, you may use this file as part of a free
-// software project without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to produce
-// an executable, this file does not by itself cause the resulting
-// executable to be covered by the GNU General Public License. This
-// exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-
-#ifndef MLN_VALUE_STACK_HH
-# define MLN_VALUE_STACK_HH
-
-/// \file
-///
-/// Definition of the stack image type.
-
-# include <mln/core/internal/image_value_morpher.hh>
-
-# include <mln/algebra/vec.hh>
-# include <mln/value/set.hh>
-# include <mln/value/proxy.hh>
-
-
-namespace mln
-{
-
- // Forward declaration.
- namespace value { template <unsigned n, typename I> struct stack_image; }
-
- namespace internal
- {
-
-
- /// data structure for stack_image.
- ///
- template <unsigned n, typename I>
- struct data< value::stack_image<n, I> >
- {
- public:
- data(const algebra::vec<n,I>& imas);
- algebra::vec<n,I> imas_;
- I& ima_;
- };
-
- }
-
- namespace value
- {
-
- namespace internal
- {
- template <unsigned n, typename I>
- struct helper_stack_image_lvalue_
- {
- typedef value::proxy< stack_image<n,I> > ret;
- static ret make(stack_image<n,I>& ima, const mln_psite(I)& p)
- {
- ret tmp(ima, p);
- return tmp;
- }
- };
-
- template <unsigned n, typename I>
- struct helper_stack_image_lvalue_< n, const I >
- {
- typedef algebra::vec<n, mln_value(I)> ret;
- static ret make(stack_image<n, const I>& ima, const mln_psite(I)& p)
- {
- return ima.read_(p);
- }
- };
-
-
- } // end of namespace mln::value::internal
-
- } // end of namespace mln::value
-
-
- namespace trait
- {
-
- template <unsigned n, typename I>
- struct image_< mln::value::stack_image<n, I> >
- : default_image_morpher< I,
- algebra::vec<n, mln_value(I)>,
- mln::value::stack_image<n, I> >
- {
- // FIXME: We shall carefully define the missing required traits
- // here.
- typedef trait::image::category::value_morpher category;
-
- typedef trait::image::nature::vectorial nature;
- /* FIXME: Setting the speed trait of a stack_image to `fast' is
- a bad approximation.
-
- The value cannot reasonnably be `fastest', as several images
- in different memory locations are involved in a stack image.
- So we cannot just rely on the speed trait of I.
- Nevertheless, we cannot guarantee that a stack_image will be
- a least `fast': think of a stack_image over a ``slow''
- image_type (e.g., an image whose values are computed). That
- image would retain the `slow' value of the speed trait.
-
- In conclusion, this value of the speed trait should be
- computed too. */
- typedef trait::image::speed::fast speed;
- };
-
- } // end of namespace mln::trait
-
-
- namespace value
- {
- /// Stack image class.
- ///
- /// mln::value::stack_image stores a vector of n images of the same
- /// domain.
- ///
- /// The parameter \c n is the number of images, \c I is the type of
- /// a stack element. Acces a value will compute a vector which
- /// contains n coordinates :
- /// [stack[0](p),
- /// stack[1](p),
- /// ... ,
- /// stack[n](p)]
- ///
- template <unsigned n, typename I>
- struct stack_image
- : public mln::internal::image_value_morpher< I,
- algebra::vec<n, mln_value(I)>,
- stack_image<n,I> >
- {
- /// Point_Site associated type.
- typedef mln_psite(I) psite;
-
- /// Site_Set associated type.
- typedef mln_domain(I) domain_t;
-
- /// Value associated type.
- typedef algebra::vec<n, mln_value(I)> value;
-
- /// Return type of read-only access.
- ///
- /// The rvalue type is not a const reference, since the value
- /// type is built on the fly, and return by value (copy).
- typedef value rvalue;
-
- /// Return type of read-write access.
- typedef typename internal::helper_stack_image_lvalue_<n,I>::ret lvalue;
-
-
- /// Skeleton.
- typedef stack_image< n, tag::image_<I> > skeleton;
-
-
- /// Constructors.
- /// \{
- stack_image(const algebra::vec<n,I>& imas);
- stack_image();
- /// \}
-
- /// Initialize an empty image.
- void init_(const algebra::vec<n,I>& imas);
-
- /// Test if this image has been initialized.
- bool is_valid() const;
-
- /// Read-only access of pixel value at point site \p p.
- rvalue operator()(const psite& p) const;
- rvalue read_(const psite& p) const;
-
- /// Read-write access of pixel value at point site \p p.
- lvalue operator()(const psite&);
- void write_(const psite& p, const value& v);
- };
-
- /// \{ Shortcut to build a stack with two images.
- template <typename I>
- stack_image<2, const I>
- stack(const Image<I>& ima1, const Image<I>& ima2);
-
-
- template <typename I>
- stack_image<2, I>
- stack(Image<I>& ima1, Image<I>& ima2);
- /// \}
-
- } // end of namespace mln::value
-
-# ifndef MLN_INCLUDE_ONLY
-
- namespace internal
- {
- // internal::data< cast_image_<T,I> >
-
- template <unsigned n, typename I>
- inline
- data< value::stack_image<n,I> >::data(const algebra::vec<n,I>&
imas)
- : imas_(imas),
- ima_(imas_[0])
- {
- }
-
- } // end of namespace mln::internal
-
-
- namespace value
- {
- // stack_image<n, I>
-
- template <unsigned n, typename I>
- inline
- stack_image<n,I>::stack_image()
- {
- }
-
- template <unsigned n, typename I>
- inline
- stack_image<n,I>::stack_image(const algebra::vec<n,I>& imas)
- {
- init_(imas);
- }
-
- template <unsigned n, typename I>
- inline
- void
- stack_image<n,I>::init_(const algebra::vec<n,I>& imas)
- {
- this->data_ = new mln::internal::data< stack_image<n, I> >(imas);
- for (unsigned i = 0; i < n; ++i)
- {
- mln_precondition(imas[i].is_valid());
- }
- }
-
- template <unsigned n, typename I>
- inline
- bool stack_image<n,I>::is_valid() const
- {
- for (unsigned i = 0; i < n; ++i)
- mln_invariant(this->data_->imas_[i].is_valid());
- return true;
- }
-
- template <unsigned n, typename I>
- inline
- typename stack_image<n,I>::rvalue
- stack_image<n,I>::read_(const psite& p) const
- {
- mln_precondition(this->has(p));
- algebra::vec<n, mln_value(I)> tmp;
- for (unsigned i = 0; i < n; ++i)
- tmp[i] = this->data_->imas_[i].operator()(p);
- return tmp;
- }
-
- template <unsigned n, typename I>
- inline
- typename stack_image<n,I>::rvalue
- stack_image<n,I>::operator()(const psite& p) const
- {
- return read_(p);
- }
-
- template <unsigned n, typename I>
- inline
- void
- stack_image<n,I>::write_(const psite& p, const value& v)
- {
- mln_precondition(this->has(p));
- // FIXME!!!
- for (unsigned i = 0; i < n; ++i)
- this->data_->imas_[i].operator()(p) = v[i];
- }
-
- template <unsigned n, typename I>
- inline
- typename stack_image<n,I>::lvalue
- stack_image<n,I>::operator()(const psite& p)
- {
- return internal::helper_stack_image_lvalue_<n,I>::make(*this, p);
- }
-
- // stack(..)
-
- template <typename I>
- inline
- stack_image<2, const I>
- stack(const Image<I>& ima1, const Image<I>& ima2)
- {
- mln_precondition(exact(ima1).domain() == exact(ima2).domain());
- algebra::vec<2, const I> imas;
- imas[0] = exact(ima1);
- imas[1] = exact(ima2);
- return imas;
- }
-
- template <typename I>
- inline
- stack_image<2, I>
- stack(Image<I>& ima1, Image<I>& ima2)
- {
- mln_precondition(exact(ima1).domain() == exact(ima2).domain());
- algebra::vec<2, I> imas;
- imas[0] = exact(ima1);
- imas[1] = exact(ima2);
- return imas;
- }
-
- } // end of namespace mln::value
-
-# endif // ! MLN_INCLUDE_ONLY
-
-} // end of namespace mln
-
-
-#endif // ! MLN_VALUE_STACK_HH
diff --git a/milena/nodist-headers b/milena/nodist-headers
deleted file mode 100644
index 985b49f..0000000
--- a/milena/nodist-headers
+++ /dev/null
@@ -1,84 +0,0 @@
-mln/accu/math/inf.hh
-mln/accu/math/sup.hh
-mln/core/image/vmorph/thru_image.hh
-mln/core/image/vmorph/thrubin_image.hh
-mln/data/was.median.hh
-mln/extract/all.hh
-mln/extract/blue.hh
-mln/extract/essential.hh
-mln/extract/green.hh
-mln/extract/hue.hh
-mln/extract/lum.hh
-mln/extract/red.hh
-mln/extract/sat.hh
-mln/fun/access/all.hh
-mln/fun/access/mean.hh
-mln/fun/accu_result.hh
-mln/fun/binary.hh
-mln/fun/binary_param.hh
-mln/fun/component/blue.hh
-mln/fun/component/comp.hh
-mln/fun/component/comp_count.hh
-mln/fun/component/green.hh
-mln/fun/component/ithcomp.hh
-mln/fun/component/red.hh
-mln/fun/component/rgb.hh
-mln/fun/component/scomp.hh
-mln/fun/compose.hh
-mln/fun/composition.hh
-mln/fun/from_accu.hh
-mln/fun/math/abs.hh
-mln/fun/math/cos.hh
-mln/fun/math/inf.hh
-mln/fun/math/norm.hh
-mln/fun/math/sup.hh
-mln/fun/meta/all.hh
-mln/fun/meta/blue.hh
-mln/fun/meta/essential.hh
-mln/fun/meta/first.hh
-mln/fun/meta/green.hh
-mln/fun/meta/hue.hh
-mln/fun/meta/inty.hh
-mln/fun/meta/lum.hh
-mln/fun/meta/red.hh
-mln/fun/meta/sat.hh
-mln/fun/meta/second.hh
-mln/fun/meta/to_enc.hh
-mln/fun/param.hh
-mln/fun/point/col.hh
-mln/fun/point/row.hh
-mln/fun/point/sli.hh
-mln/fun/spe/binary.hh
-mln/fun/spe/unary.hh
-mln/fun/unary.hh
-mln/fun/unary_param.hh
-mln/fun/v2v/hsi_to_rgb.hh
-mln/fun/v2v/hsl_to_rgb.hh
-mln/fun/v2v/rgb_to_hsi.hh
-mln/fun/v2v/rgb_to_hsl.hh
-mln/linear/gaussian.hh
-mln/linear/gaussian/filter.hh
-mln/linear/gaussian/impl.hh
-mln/linear/gaussian/internal/coefficients.hh
-mln/linear/gaussian_1d.hh
-mln/linear/gaussian_directional_2d.hh
-mln/registration/all.hh
-mln/registration/essential.hh
-mln/registration/get_rot.hh
-mln/registration/get_rtransf.hh
-mln/registration/icp.hh
-mln/registration/internal/rms.hh
-mln/registration/registration.hh
-mln/subsampling/all.hh
-mln/subsampling/essential.hh
-mln/subsampling/gaussian_subsampling.hh
-mln/subsampling/subsampling.hh
-mln/trait/functions.hh
-mln/trait/next/solve.hh
-mln/trait/next/solve_binary.hh
-mln/trait/next/solve_proxy.hh
-mln/trait/next/solve_unary.hh
-mln/value/hsi.hh
-mln/value/hsl.hh
-mln/value/shell.hh
-mln/value/stack.hh
diff --git a/milena/tests/unit_test/unit-tests.mk b/milena/tests/unit_test/unit-tests.mk
index 2519bd6..d2dde46 100644
--- a/milena/tests/unit_test/unit-tests.mk
+++ b/milena/tests/unit_test/unit-tests.mk
@@ -123,9 +123,7 @@ mln_accu_maj_h \
mln_accu_math_all \
mln_accu_math_count \
mln_accu_math_essential \
-mln_accu_math_inf \
mln_accu_math_sum \
-mln_accu_math_sup \
mln_accu_max_site \
mln_accu_nil \
mln_accu_p \
@@ -380,8 +378,6 @@ mln_core_image_vertex_image \
mln_core_image_vmorph_all \
mln_core_image_vmorph_cast_image \
mln_core_image_vmorph_fun_image \
-mln_core_image_vmorph_thru_image \
-mln_core_image_vmorph_thrubin_image \
mln_core_image_vmorph_violent_cast_image \
mln_core_internal_box_impl \
mln_core_internal_check_image_all \
@@ -521,7 +517,6 @@ mln_data_to_enc \
mln_data_transform \
mln_data_transform_inplace \
mln_data_update \
-mln_data_was_median \
mln_data_wrap \
mln_debug_all \
mln_debug_draw_graph \
@@ -565,34 +560,10 @@ mln_extension_all \
mln_extension_duplicate \
mln_extension_essential \
mln_extension_fill \
-mln_extract_all \
-mln_extract_blue \
-mln_extract_essential \
-mln_extract_green \
-mln_extract_hue \
-mln_extract_lum \
-mln_extract_red \
-mln_extract_sat \
-mln_fun_access_all \
-mln_fun_access_mean \
-mln_fun_accu_result \
mln_fun_all \
-mln_fun_binary \
-mln_fun_binary_param \
mln_fun_c \
mln_fun_cast \
-mln_fun_component_blue \
-mln_fun_component_comp \
-mln_fun_component_comp_count \
-mln_fun_component_green \
-mln_fun_component_ithcomp \
-mln_fun_component_red \
-mln_fun_component_rgb \
-mln_fun_component_scomp \
-mln_fun_compose \
-mln_fun_composition \
mln_fun_essential \
-mln_fun_from_accu \
mln_fun_i2v_all \
mln_fun_i2v_all_to \
mln_fun_i2v_array \
@@ -602,24 +573,7 @@ mln_fun_internal_ch_function_value_impl \
mln_fun_internal_resolve \
mln_fun_internal_selector \
mln_fun_internal_x2x_linear_impl \
-mln_fun_math_abs \
-mln_fun_math_cos \
-mln_fun_math_inf \
-mln_fun_math_norm \
-mln_fun_math_sup \
-mln_fun_meta_all \
-mln_fun_meta_blue \
-mln_fun_meta_essential \
-mln_fun_meta_first \
-mln_fun_meta_green \
-mln_fun_meta_hue \
mln_fun_meta_impl \
-mln_fun_meta_inty \
-mln_fun_meta_lum \
-mln_fun_meta_red \
-mln_fun_meta_sat \
-mln_fun_meta_second \
-mln_fun_meta_to_enc \
mln_fun_n2v_all \
mln_fun_n2v_white_gaussian \
mln_fun_ops \
@@ -639,16 +593,8 @@ mln_fun_p2v_elifs \
mln_fun_p2v_essential \
mln_fun_p2v_iota \
mln_fun_p2v_ternary \
-mln_fun_param \
-mln_fun_point_col \
-mln_fun_point_row \
-mln_fun_point_sli \
-mln_fun_spe_binary \
-mln_fun_spe_unary \
mln_fun_stat_all \
mln_fun_stat_mahalanobis \
-mln_fun_unary \
-mln_fun_unary_param \
mln_fun_v2b_all \
mln_fun_v2b_essential \
mln_fun_v2b_lnot \
@@ -664,7 +610,6 @@ mln_fun_v2v_convert \
mln_fun_v2v_dec \
mln_fun_v2v_enc \
mln_fun_v2v_essential \
-mln_fun_v2v_hsi_to_rgb \
mln_fun_v2v_hsl_to_rgb \
mln_fun_v2v_id \
mln_fun_v2v_inc \
@@ -673,7 +618,6 @@ mln_fun_v2v_norm \
mln_fun_v2v_projection \
mln_fun_v2v_qt_rgb_to_int_u \
mln_fun_v2v_rgb8_to_rgbn \
-mln_fun_v2v_rgb_to_hsi \
mln_fun_v2v_rgb_to_hsl \
mln_fun_v2v_rgb_to_int_u \
mln_fun_v2v_rgb_to_luma \
@@ -843,9 +787,6 @@ mln_linear_convolve_2x1d \
mln_linear_convolve_directional \
mln_linear_essential \
mln_linear_gaussian \
-mln_linear_gaussian_filter \
-mln_linear_gaussian_impl \
-mln_linear_gaussian_internal_coefficients \
mln_linear_gaussian_1d \
mln_linear_gaussian_directional_2d \
mln_linear_lap \
@@ -1093,13 +1034,6 @@ mln_pw_image \
mln_pw_internal_image_base \
mln_pw_value \
mln_pw_var \
-mln_registration_all \
-mln_registration_essential \
-mln_registration_get_rot \
-mln_registration_get_rtransf \
-mln_registration_icp \
-mln_registration_internal_rms \
-mln_registration_registration \
mln_set_all \
mln_set_card \
mln_set_compute \
@@ -1112,11 +1046,7 @@ mln_set_inter \
mln_set_sym_diff \
mln_set_uni \
mln_set_unique \
-mln_subsampling_all \
mln_subsampling_antialiased \
-mln_subsampling_essential \
-mln_subsampling_gaussian_subsampling \
-mln_subsampling_subsampling \
mln_tag_all \
mln_tag_essential \
mln_tag_init \
@@ -1175,16 +1105,11 @@ mln_trait_ch_function_value \
mln_trait_ch_value \
mln_trait_concrete \
mln_trait_essential \
-mln_trait_functions \
mln_trait_image_print \
mln_trait_image_props \
mln_trait_image_from_grid \
mln_trait_images \
mln_trait_neighborhood \
-mln_trait_next_solve \
-mln_trait_next_solve_binary \
-mln_trait_next_solve_proxy \
-mln_trait_next_solve_unary \
mln_trait_op_all \
mln_trait_op_and \
mln_trait_op_decl \
@@ -1329,7 +1254,6 @@ mln_value_gl8 \
mln_value_glf \
mln_value_graylevel \
mln_value_graylevel_f \
-mln_value_hsi \
mln_value_hsl \
mln_value_int_s \
mln_value_int_s16 \
@@ -1369,9 +1293,7 @@ mln_value_rgb16 \
mln_value_rgb8 \
mln_value_scalar \
mln_value_set \
-mln_value_shell \
mln_value_sign \
-mln_value_stack \
mln_value_super_value \
mln_value_value_array \
mln_value_viter \
@@ -1450,9 +1372,7 @@ mln_accu_maj_h_SOURCES = mln_accu_maj_h.cc
mln_accu_math_all_SOURCES = mln_accu_math_all.cc
mln_accu_math_count_SOURCES = mln_accu_math_count.cc
mln_accu_math_essential_SOURCES = mln_accu_math_essential.cc
-mln_accu_math_inf_SOURCES = mln_accu_math_inf.cc
mln_accu_math_sum_SOURCES = mln_accu_math_sum.cc
-mln_accu_math_sup_SOURCES = mln_accu_math_sup.cc
mln_accu_max_site_SOURCES = mln_accu_max_site.cc
mln_accu_nil_SOURCES = mln_accu_nil.cc
mln_accu_p_SOURCES = mln_accu_p.cc
@@ -1707,8 +1627,6 @@ mln_core_image_vertex_image_SOURCES =
mln_core_image_vertex_image.cc
mln_core_image_vmorph_all_SOURCES = mln_core_image_vmorph_all.cc
mln_core_image_vmorph_cast_image_SOURCES = mln_core_image_vmorph_cast_image.cc
mln_core_image_vmorph_fun_image_SOURCES = mln_core_image_vmorph_fun_image.cc
-mln_core_image_vmorph_thru_image_SOURCES = mln_core_image_vmorph_thru_image.cc
-mln_core_image_vmorph_thrubin_image_SOURCES = mln_core_image_vmorph_thrubin_image.cc
mln_core_image_vmorph_violent_cast_image_SOURCES =
mln_core_image_vmorph_violent_cast_image.cc
mln_core_internal_box_impl_SOURCES = mln_core_internal_box_impl.cc
mln_core_internal_check_image_all_SOURCES = mln_core_internal_check_image_all.cc
@@ -1848,7 +1766,6 @@ mln_data_to_enc_SOURCES = mln_data_to_enc.cc
mln_data_transform_SOURCES = mln_data_transform.cc
mln_data_transform_inplace_SOURCES = mln_data_transform_inplace.cc
mln_data_update_SOURCES = mln_data_update.cc
-mln_data_was_median_SOURCES = mln_data_was_median.cc
mln_data_wrap_SOURCES = mln_data_wrap.cc
mln_debug_all_SOURCES = mln_debug_all.cc
mln_debug_draw_graph_SOURCES = mln_debug_draw_graph.cc
@@ -1892,34 +1809,10 @@ mln_extension_all_SOURCES = mln_extension_all.cc
mln_extension_duplicate_SOURCES = mln_extension_duplicate.cc
mln_extension_essential_SOURCES = mln_extension_essential.cc
mln_extension_fill_SOURCES = mln_extension_fill.cc
-mln_extract_all_SOURCES = mln_extract_all.cc
-mln_extract_blue_SOURCES = mln_extract_blue.cc
-mln_extract_essential_SOURCES = mln_extract_essential.cc
-mln_extract_green_SOURCES = mln_extract_green.cc
-mln_extract_hue_SOURCES = mln_extract_hue.cc
-mln_extract_lum_SOURCES = mln_extract_lum.cc
-mln_extract_red_SOURCES = mln_extract_red.cc
-mln_extract_sat_SOURCES = mln_extract_sat.cc
-mln_fun_access_all_SOURCES = mln_fun_access_all.cc
-mln_fun_access_mean_SOURCES = mln_fun_access_mean.cc
-mln_fun_accu_result_SOURCES = mln_fun_accu_result.cc
mln_fun_all_SOURCES = mln_fun_all.cc
-mln_fun_binary_SOURCES = mln_fun_binary.cc
-mln_fun_binary_param_SOURCES = mln_fun_binary_param.cc
mln_fun_c_SOURCES = mln_fun_c.cc
mln_fun_cast_SOURCES = mln_fun_cast.cc
-mln_fun_component_blue_SOURCES = mln_fun_component_blue.cc
-mln_fun_component_comp_SOURCES = mln_fun_component_comp.cc
-mln_fun_component_comp_count_SOURCES = mln_fun_component_comp_count.cc
-mln_fun_component_green_SOURCES = mln_fun_component_green.cc
-mln_fun_component_ithcomp_SOURCES = mln_fun_component_ithcomp.cc
-mln_fun_component_red_SOURCES = mln_fun_component_red.cc
-mln_fun_component_rgb_SOURCES = mln_fun_component_rgb.cc
-mln_fun_component_scomp_SOURCES = mln_fun_component_scomp.cc
-mln_fun_compose_SOURCES = mln_fun_compose.cc
-mln_fun_composition_SOURCES = mln_fun_composition.cc
mln_fun_essential_SOURCES = mln_fun_essential.cc
-mln_fun_from_accu_SOURCES = mln_fun_from_accu.cc
mln_fun_i2v_all_SOURCES = mln_fun_i2v_all.cc
mln_fun_i2v_all_to_SOURCES = mln_fun_i2v_all_to.cc
mln_fun_i2v_array_SOURCES = mln_fun_i2v_array.cc
@@ -1929,24 +1822,7 @@ mln_fun_internal_ch_function_value_impl_SOURCES =
mln_fun_internal_ch_function_v
mln_fun_internal_resolve_SOURCES = mln_fun_internal_resolve.cc
mln_fun_internal_selector_SOURCES = mln_fun_internal_selector.cc
mln_fun_internal_x2x_linear_impl_SOURCES = mln_fun_internal_x2x_linear_impl.cc
-mln_fun_math_abs_SOURCES = mln_fun_math_abs.cc
-mln_fun_math_cos_SOURCES = mln_fun_math_cos.cc
-mln_fun_math_inf_SOURCES = mln_fun_math_inf.cc
-mln_fun_math_norm_SOURCES = mln_fun_math_norm.cc
-mln_fun_math_sup_SOURCES = mln_fun_math_sup.cc
-mln_fun_meta_all_SOURCES = mln_fun_meta_all.cc
-mln_fun_meta_blue_SOURCES = mln_fun_meta_blue.cc
-mln_fun_meta_essential_SOURCES = mln_fun_meta_essential.cc
-mln_fun_meta_first_SOURCES = mln_fun_meta_first.cc
-mln_fun_meta_green_SOURCES = mln_fun_meta_green.cc
-mln_fun_meta_hue_SOURCES = mln_fun_meta_hue.cc
mln_fun_meta_impl_SOURCES = mln_fun_meta_impl.cc
-mln_fun_meta_inty_SOURCES = mln_fun_meta_inty.cc
-mln_fun_meta_lum_SOURCES = mln_fun_meta_lum.cc
-mln_fun_meta_red_SOURCES = mln_fun_meta_red.cc
-mln_fun_meta_sat_SOURCES = mln_fun_meta_sat.cc
-mln_fun_meta_second_SOURCES = mln_fun_meta_second.cc
-mln_fun_meta_to_enc_SOURCES = mln_fun_meta_to_enc.cc
mln_fun_n2v_all_SOURCES = mln_fun_n2v_all.cc
mln_fun_n2v_white_gaussian_SOURCES = mln_fun_n2v_white_gaussian.cc
mln_fun_ops_SOURCES = mln_fun_ops.cc
@@ -1966,16 +1842,8 @@ mln_fun_p2v_elifs_SOURCES = mln_fun_p2v_elifs.cc
mln_fun_p2v_essential_SOURCES = mln_fun_p2v_essential.cc
mln_fun_p2v_iota_SOURCES = mln_fun_p2v_iota.cc
mln_fun_p2v_ternary_SOURCES = mln_fun_p2v_ternary.cc
-mln_fun_param_SOURCES = mln_fun_param.cc
-mln_fun_point_col_SOURCES = mln_fun_point_col.cc
-mln_fun_point_row_SOURCES = mln_fun_point_row.cc
-mln_fun_point_sli_SOURCES = mln_fun_point_sli.cc
-mln_fun_spe_binary_SOURCES = mln_fun_spe_binary.cc
-mln_fun_spe_unary_SOURCES = mln_fun_spe_unary.cc
mln_fun_stat_all_SOURCES = mln_fun_stat_all.cc
mln_fun_stat_mahalanobis_SOURCES = mln_fun_stat_mahalanobis.cc
-mln_fun_unary_SOURCES = mln_fun_unary.cc
-mln_fun_unary_param_SOURCES = mln_fun_unary_param.cc
mln_fun_v2b_all_SOURCES = mln_fun_v2b_all.cc
mln_fun_v2b_essential_SOURCES = mln_fun_v2b_essential.cc
mln_fun_v2b_lnot_SOURCES = mln_fun_v2b_lnot.cc
@@ -1991,7 +1859,6 @@ mln_fun_v2v_convert_SOURCES = mln_fun_v2v_convert.cc
mln_fun_v2v_dec_SOURCES = mln_fun_v2v_dec.cc
mln_fun_v2v_enc_SOURCES = mln_fun_v2v_enc.cc
mln_fun_v2v_essential_SOURCES = mln_fun_v2v_essential.cc
-mln_fun_v2v_hsi_to_rgb_SOURCES = mln_fun_v2v_hsi_to_rgb.cc
mln_fun_v2v_hsl_to_rgb_SOURCES = mln_fun_v2v_hsl_to_rgb.cc
mln_fun_v2v_id_SOURCES = mln_fun_v2v_id.cc
mln_fun_v2v_inc_SOURCES = mln_fun_v2v_inc.cc
@@ -2000,7 +1867,6 @@ mln_fun_v2v_norm_SOURCES = mln_fun_v2v_norm.cc
mln_fun_v2v_projection_SOURCES = mln_fun_v2v_projection.cc
mln_fun_v2v_qt_rgb_to_int_u_SOURCES = mln_fun_v2v_qt_rgb_to_int_u.cc
mln_fun_v2v_rgb8_to_rgbn_SOURCES = mln_fun_v2v_rgb8_to_rgbn.cc
-mln_fun_v2v_rgb_to_hsi_SOURCES = mln_fun_v2v_rgb_to_hsi.cc
mln_fun_v2v_rgb_to_hsl_SOURCES = mln_fun_v2v_rgb_to_hsl.cc
mln_fun_v2v_rgb_to_int_u_SOURCES = mln_fun_v2v_rgb_to_int_u.cc
mln_fun_v2v_rgb_to_luma_SOURCES = mln_fun_v2v_rgb_to_luma.cc
@@ -2170,9 +2036,6 @@ mln_linear_convolve_2x1d_SOURCES = mln_linear_convolve_2x1d.cc
mln_linear_convolve_directional_SOURCES = mln_linear_convolve_directional.cc
mln_linear_essential_SOURCES = mln_linear_essential.cc
mln_linear_gaussian_SOURCES = mln_linear_gaussian.cc
-mln_linear_gaussian_filter_SOURCES = mln_linear_gaussian_filter.cc
-mln_linear_gaussian_impl_SOURCES = mln_linear_gaussian_impl.cc
-mln_linear_gaussian_internal_coefficients_SOURCES =
mln_linear_gaussian_internal_coefficients.cc
mln_linear_gaussian_1d_SOURCES = mln_linear_gaussian_1d.cc
mln_linear_gaussian_directional_2d_SOURCES = mln_linear_gaussian_directional_2d.cc
mln_linear_lap_SOURCES = mln_linear_lap.cc
@@ -2420,13 +2283,6 @@ mln_pw_image_SOURCES = mln_pw_image.cc
mln_pw_internal_image_base_SOURCES = mln_pw_internal_image_base.cc
mln_pw_value_SOURCES = mln_pw_value.cc
mln_pw_var_SOURCES = mln_pw_var.cc
-mln_registration_all_SOURCES = mln_registration_all.cc
-mln_registration_essential_SOURCES = mln_registration_essential.cc
-mln_registration_get_rot_SOURCES = mln_registration_get_rot.cc
-mln_registration_get_rtransf_SOURCES = mln_registration_get_rtransf.cc
-mln_registration_icp_SOURCES = mln_registration_icp.cc
-mln_registration_internal_rms_SOURCES = mln_registration_internal_rms.cc
-mln_registration_registration_SOURCES = mln_registration_registration.cc
mln_set_all_SOURCES = mln_set_all.cc
mln_set_card_SOURCES = mln_set_card.cc
mln_set_compute_SOURCES = mln_set_compute.cc
@@ -2439,11 +2295,7 @@ mln_set_inter_SOURCES = mln_set_inter.cc
mln_set_sym_diff_SOURCES = mln_set_sym_diff.cc
mln_set_uni_SOURCES = mln_set_uni.cc
mln_set_unique_SOURCES = mln_set_unique.cc
-mln_subsampling_all_SOURCES = mln_subsampling_all.cc
mln_subsampling_antialiased_SOURCES = mln_subsampling_antialiased.cc
-mln_subsampling_essential_SOURCES = mln_subsampling_essential.cc
-mln_subsampling_gaussian_subsampling_SOURCES = mln_subsampling_gaussian_subsampling.cc
-mln_subsampling_subsampling_SOURCES = mln_subsampling_subsampling.cc
mln_tag_all_SOURCES = mln_tag_all.cc
mln_tag_essential_SOURCES = mln_tag_essential.cc
mln_tag_init_SOURCES = mln_tag_init.cc
@@ -2502,16 +2354,11 @@ mln_trait_ch_function_value_SOURCES =
mln_trait_ch_function_value.cc
mln_trait_ch_value_SOURCES = mln_trait_ch_value.cc
mln_trait_concrete_SOURCES = mln_trait_concrete.cc
mln_trait_essential_SOURCES = mln_trait_essential.cc
-mln_trait_functions_SOURCES = mln_trait_functions.cc
mln_trait_image_print_SOURCES = mln_trait_image_print.cc
mln_trait_image_props_SOURCES = mln_trait_image_props.cc
mln_trait_image_from_grid_SOURCES = mln_trait_image_from_grid.cc
mln_trait_images_SOURCES = mln_trait_images.cc
mln_trait_neighborhood_SOURCES = mln_trait_neighborhood.cc
-mln_trait_next_solve_SOURCES = mln_trait_next_solve.cc
-mln_trait_next_solve_binary_SOURCES = mln_trait_next_solve_binary.cc
-mln_trait_next_solve_proxy_SOURCES = mln_trait_next_solve_proxy.cc
-mln_trait_next_solve_unary_SOURCES = mln_trait_next_solve_unary.cc
mln_trait_op_all_SOURCES = mln_trait_op_all.cc
mln_trait_op_and_SOURCES = mln_trait_op_and.cc
mln_trait_op_decl_SOURCES = mln_trait_op_decl.cc
@@ -2656,7 +2503,6 @@ mln_value_gl8_SOURCES = mln_value_gl8.cc
mln_value_glf_SOURCES = mln_value_glf.cc
mln_value_graylevel_SOURCES = mln_value_graylevel.cc
mln_value_graylevel_f_SOURCES = mln_value_graylevel_f.cc
-mln_value_hsi_SOURCES = mln_value_hsi.cc
mln_value_hsl_SOURCES = mln_value_hsl.cc
mln_value_int_s_SOURCES = mln_value_int_s.cc
mln_value_int_s16_SOURCES = mln_value_int_s16.cc
@@ -2696,9 +2542,7 @@ mln_value_rgb16_SOURCES = mln_value_rgb16.cc
mln_value_rgb8_SOURCES = mln_value_rgb8.cc
mln_value_scalar_SOURCES = mln_value_scalar.cc
mln_value_set_SOURCES = mln_value_set.cc
-mln_value_shell_SOURCES = mln_value_shell.cc
mln_value_sign_SOURCES = mln_value_sign.cc
-mln_value_stack_SOURCES = mln_value_stack.cc
mln_value_super_value_SOURCES = mln_value_super_value.cc
mln_value_value_array_SOURCES = mln_value_value_array.cc
mln_value_viter_SOURCES = mln_value_viter.cc
diff --git a/scribo/Makefile.am b/scribo/Makefile.am
index b9a590a..a8ce510 100644
--- a/scribo/Makefile.am
+++ b/scribo/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+# Copyright (C) 2009, 2010, 2011, 2012 EPITA Research and Development
# Laboratory (LRDE).
#
# This file is part of Olena.
@@ -29,7 +29,7 @@ REGEN_SUBDIRS += tests
regen-am:
cd $(srcdir) \
&& $(abs_top_srcdir)/build-aux/generate_dist_headers.sh \
- scribo headers.mk nodist-headers
+ scribo headers.mk
# FIXME: Change generate_dist_headers.sh so that the action looks like this:
#
@@ -38,9 +38,6 @@ regen-am:
$(srcdir)/headers.mk: $(top_srcdir)/build-aux/generate_dist_headers.sh
cd $(srcdir) \
&& $(abs_top_srcdir)/build-aux/generate_dist_headers.sh \
- scribo headers.mk nodist-headers
+ scribo headers.mk
include $(srcdir)/headers.mk
-
-
-EXTRA_DIST = nodist-headers
\ No newline at end of file
diff --git a/scribo/headers.mk b/scribo/headers.mk
index f636d04..260565d 100644
--- a/scribo/headers.mk
+++ b/scribo/headers.mk
@@ -293,7 +293,3 @@ scribo/util/box_is_included.hh \
scribo/util/color_to_hex.hh \
scribo/util/component_precise_outline.hh \
scribo/util/hex_to_color.hh
-
-#<<lrde
-nobase_include_HEADERS +=
-#>>
diff --git a/scribo/nodist-headers b/scribo/nodist-headers
deleted file mode 100644
index e69de29..0000000
--
1.7.2.5