URL: https://svn.lrde.epita.fr/svn/oln/trunk
ChangeLog:
2008-02-07 Maxime van Noppen <yabo(a)lrde.epita.fr>
Fix typo.
* milena/mln/core/internal/force_exact.hh: Here.
force_exact.hh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: trunk/milena/mln/core/internal/force_exact.hh
===================================================================
--- trunk/milena/mln/core/internal/force_exact.hh (revision 1708)
+++ trunk/milena/mln/core/internal/force_exact.hh (revision 1709)
@@ -44,7 +44,7 @@
/*! \internal Violent cast.
* This cast is an alternative to the mln::exact cast.
- * It is used for objects than do not derive from
+ * It is used for objects that do not derive from
* mln::Object.
* Warning Do not to use this cast!
* see mln::exact
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)
#7: Miscellaneous tasks related to the Olena 1.0ß release process
-----------------------+----------------------------------------------------
Reporter: levill_r | Owner: levill_r
Type: task | Status: new
Priority: trivial | Milestone: Olena 1.0ß
Component: other | Version: 1.0
Resolution: | Keywords: release NEWS dates copyright headers
-----------------------+----------------------------------------------------
Old description:
> To do before the release
> * update `NEWS` (see the similar task for Olena 0.10a/0.11: #8);
> * update `AUTHORS`;
> * ensure all copyright headers are sound (using Benoît Sigoure's
> `gplize.sh` script, or a variant of it).
>
> Split this ticket in several parts if the tasks are either too big or too
> numerous.
New description:
To do before the release
* update `NEWS` (see the similar task for Olena 0.10a/0.11: #8);
* update `AUTHORS`;
* ensure all copyright headers are sound (using Benoît Sigoure's
`gplize.sh` script, or a variant of it);
* use Vaucanson' `reheader` script to fix broken headers.
Split this ticket in several parts if the tasks are either too big or too
numerous.
Comment (by levill_r):
The use of `reheader` was suggested by Akim.
--
Ticket URL: <https://trac.lrde.org/olena/ticket/7#comment:6>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Add functors max and min.
* mln/core/concept/function.hh (mln::Function_vv2v): New.
* mln/fun/vv2v/max.hh, mln/fun/vv2v/min.hh: New.
* tests/fun/vv2v/max.cc, tests/fun/vv2v/min.cc: New tests.
* tests/fun/vv2v/Makefile.am: New.
* tests/fun/Makefile.am (SUBDIRS): Add i2v, p2b, p2v and vv2v.
* tests/norm/common.hh: Adjust coding style.
mln/core/concept/function.hh | 77 +++++++++++++++++++++++++++++++++++--------
mln/fun/vv2v/max.hh | 77 +++++++++++++++++++++++++++++++++++++++++++
mln/fun/vv2v/min.hh | 77 +++++++++++++++++++++++++++++++++++++++++++
tests/fun/Makefile.am | 2 -
tests/fun/vv2v/Makefile.am | 12 ++++++
tests/fun/vv2v/max.cc | 53 +++++++++++++++++++++++++++++
tests/fun/vv2v/min.cc | 53 +++++++++++++++++++++++++++++
tests/norm/common.hh | 0
8 files changed, 336 insertions(+), 15 deletions(-)
Index: mln/core/concept/function.hh
--- mln/core/concept/function.hh (revision 1707)
+++ mln/core/concept/function.hh (working copy)
@@ -39,9 +39,7 @@
namespace mln
{
- /// \{
- /// Fwd decls.
-
+ // Fwd decls.
template <typename E> struct Function;
template <typename E> struct Function_v2v;
template <typename E> struct Function_i2v;
@@ -50,11 +48,11 @@
template <typename E> struct Function_p2b;
template <typename E> struct Function_p2p;
template <typename E> struct Function_x2x;
- /// \}
+ template <typename E> struct Function_vv2v;
- // Function category flag type.
+ /// Function category flag type.
template <>
struct Function<void>
{
@@ -81,7 +79,9 @@
};
- // Value -> Value.
+ /*-----------------.
+ | Value -> Value. |
+ `-----------------*/
template <>
struct Function_v2v<void> { typedef Function<void> super; };
@@ -102,12 +102,13 @@
};
- // Index -> Value.
+ /*-----------------.
+ | Index -> Value. |
+ `-----------------*/
template <>
struct Function_i2v<void> { typedef Function_v2v<void> super; };
-
/*!
* \brief Base class for implementation of function-objects from
* index to value.
@@ -124,7 +125,9 @@
};
- // Point -> Value.
+ /*-----------------.
+ | Point -> Value. |
+ `-----------------*/
template <>
struct Function_p2v<void> { typedef Function_v2v<void> super; };
@@ -145,7 +148,9 @@
};
- // Value -> bool.
+ /*----------------.
+ | Value -> bool. |
+ `----------------*/
template <>
struct Function_v2b<void> { typedef Function_v2v<void> super; };
@@ -167,7 +172,9 @@
};
- // Point -> bool.
+ /*----------------.
+ | Point -> bool. |
+ `----------------*/
template <>
struct Function_p2b<void> { typedef Function_p2v<void> super; }; // FIXME
@@ -190,7 +197,9 @@
};
- // Point -> Point.
+ /*-----------------.
+ | Point -> Point. |
+ `-----------------*/
template <>
struct Function_p2p<void> { typedef Function_p2v<void> super; }; // FIXME
@@ -211,7 +220,9 @@
};
- // Vector -> Vector.
+ /*-------------------.
+ | Vector -> Vector. |
+ `-------------------*/
template <>
struct Function_x2x<void> { typedef Function_v2v<void> super; }; // FIXME
@@ -231,7 +242,10 @@
Function_x2x(const Function_x2x&);
};
- // Vector <-> Vector.
+
+ /*--------------------.
+ | Vector <-> Vector. |
+ `--------------------*/
/*!
* \brief Base class for implementation of bijective function-objects from
@@ -251,6 +265,28 @@
};
+ /*------------------------.
+ | Value, Value -> Value. |
+ `------------------------*/
+
+ template <>
+ struct Function_vv2v<void> { typedef Function<void> super; };
+
+ /*!
+ * \brief Base class for implementation of function-objects from
+ * a couple of values to a value.
+ *
+ * The parameter \a E is the exact type.
+ */
+ template <typename E>
+ struct Function_vv2v : public Function<E>
+ {
+ typedef Function_vv2v<void> category;
+ protected:
+ Function_vv2v();
+ Function_vv2v(const Function_vv2v&);
+ };
+
# ifndef MLN_INCLUDE_ONLY
@@ -370,6 +406,19 @@
m = 0;
}
+ template <typename E>
+ inline
+ Function_vv2v<E>::Function_vv2v()
+ {
+ }
+
+ template <typename E>
+ inline
+ Function_vv2v<E>::Function_vv2v(const Function_vv2v<E>& rhs)
+ : Function<E>(rhs)
+ {
+ }
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln
Index: mln/fun/vv2v/min.hh
--- mln/fun/vv2v/min.hh (revision 0)
+++ mln/fun/vv2v/min.hh (revision 0)
@@ -0,0 +1,77 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library 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_VV2V_MIN_HH
+# define MLN_FUN_VV2V_MIN_HH
+
+/// \file mln/fun/vv2v/min.hh
+/// \brief computing the minimum of two values using a functor.
+
+# include <mln/core/concept/function.hh>
+# include <mln/math/min.hh>
+
+
+namespace mln
+{
+
+ namespace fun
+ {
+
+ namespace vv2v
+ {
+
+ // FIXME: Doc.
+
+ /// \brief A functor computing the minimum of two values.
+ template <typename V>
+ struct min : public Function_vv2v< min<V> >
+ {
+ typedef V result;
+ V operator()(const V& v1, const V& v2) const;
+ };
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename V>
+ inline
+ V
+ min<V>::operator()(const V& v1, const V& v2) const
+ {
+ return mln::math::min(v1, v2);
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::fun::vv2v
+
+ } // end of namespace mln::fun
+
+} // end of namespace mln
+
+
+#endif // ! MLN_FUN_VV2V_MIN_HH
Index: mln/fun/vv2v/max.hh
--- mln/fun/vv2v/max.hh (revision 0)
+++ mln/fun/vv2v/max.hh (revision 0)
@@ -0,0 +1,77 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library 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_VV2V_MAX_HH
+# define MLN_FUN_VV2V_MAX_HH
+
+/// \file mln/fun/vv2v/max.hh
+/// \brief Computing the maximum of two values using a functor.
+
+# include <mln/core/concept/function.hh>
+# include <mln/math/max.hh>
+
+
+namespace mln
+{
+
+ namespace fun
+ {
+
+ namespace vv2v
+ {
+
+ // FIXME: Doc.
+
+ /// \brief A functor computing the maximum of two values.
+ template <typename V>
+ struct max : public Function_vv2v< max<V> >
+ {
+ typedef V result;
+ V operator()(const V& v1, const V& v2) const;
+ };
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename V>
+ inline
+ V
+ max<V>::operator()(const V& v1, const V& v2) const
+ {
+ return mln::math::max(v1, v2);
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::fun::vv2v
+
+ } // end of namespace mln::fun
+
+} // end of namespace mln
+
+
+#endif // ! MLN_FUN_VV2V_MAX_HH
Index: tests/fun/vv2v/min.cc
--- tests/fun/vv2v/min.cc (revision 0)
+++ tests/fun/vv2v/min.cc (revision 0)
@@ -0,0 +1,53 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library 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 tests/fun/vv2v/min.cc
+/// \brief Test the min functor.
+
+#include <cassert>
+
+#include <mln/metal/vec.hh>
+#include <mln/fun/vv2v/min.hh>
+
+int main()
+{
+ // Scalars.
+ mln::fun::vv2v::min<int> min_int;
+ assert (min_int(42, 51) == 42);
+
+ // FIXME: We don't have vectors-with-an-order (yet), so this won't
+ // work.
+#if 0
+ // Vectors.
+ typedef mln::metal::vec<3, int> vec_t;
+ mln::fun::vv2v::min<vec_t> min_vec_t;
+ vec_t t, u;
+ t.set (1, -2, 3);
+ u.set (5, 1, 0);
+ assert (min_vec_t(t, u) == t);
+#endif
+}
Index: tests/fun/vv2v/max.cc
--- tests/fun/vv2v/max.cc (revision 0)
+++ tests/fun/vv2v/max.cc (revision 0)
@@ -0,0 +1,53 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library 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 this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library 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 tests/fun/vv2v/max.cc
+/// \brief Test the max functor.
+
+#include <cassert>
+
+#include <mln/metal/vec.hh>
+#include <mln/fun/vv2v/max.hh>
+
+int main()
+{
+ // Scalars.
+ mln::fun::vv2v::max<int> max_int;
+ assert (max_int(42, 51) == 51);
+
+ // FIXME: We don't have vectors-with-an-order (yet), so this won't
+ // work.
+#if 0
+ // Vectors.
+ typedef mln::metal::vec<3, int> vec_t;
+ mln::fun::vv2v::max<vec_t> max_vec_t;
+ vec_t t, u;
+ t.set (1, -2, 3);
+ u.set (5, 1, 0);
+ assert (max_vec_t(t, u) == u);
+#endif
+}
Index: tests/fun/vv2v/Makefile.am
--- tests/fun/vv2v/Makefile.am (revision 0)
+++ tests/fun/vv2v/Makefile.am (revision 0)
@@ -0,0 +1,12 @@
+## Process this file through Automake to create Makefile.in -*- Makefile -*-
+
+include $(top_srcdir)/milena/tests/tests.mk
+
+check_PROGRAMS = \
+ max \
+ min
+
+max_SOURCES = max.cc
+min_SOURCES = min.cc
+
+TESTS = $(check_PROGRAMS)
Index: tests/fun/Makefile.am
--- tests/fun/Makefile.am (revision 1707)
+++ tests/fun/Makefile.am (working copy)
@@ -2,4 +2,4 @@
include $(top_srcdir)/milena/tests/tests.mk
-SUBDIRS = v2v x2x
+SUBDIRS = i2v p2b p2v v2v vv2v x2x
Index: tests/norm/common.hh
https://svn.lrde.epita.fr/svn/oln/trunk/milena
This is just a fix. There's still some work to do there (see
https://trac.lrde.org/olena/ticket/134).
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Have the documentation compile again with parallel builds.
* doc/Makefile.am (html-local, html_user): Fix paths.
(Doxyfile): Likewise.
Use information from Milena's ChangeLog, not from the top-most
ChangeLog.
Makefile.am | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
Index: doc/Makefile.am
--- doc/Makefile.am (revision 1701)
+++ doc/Makefile.am (working copy)
@@ -1,3 +1,5 @@
+# FIXME: To be overhauled! (See ticket #134).
+
DOXYGEN = doxygen
.PHONY: doc user-doc internal-doc html html_user
@@ -10,10 +12,10 @@
html-local: Doxyfile
- $(DOXYGEN) $(srcdir)/Doxyfile_internal
+ $(DOXYGEN) Doxyfile_internal
-html_user:: Doxyfile
- $(DOXYGEN) $(srcdir)/Doxyfile_user
+html_user: Doxyfile
+ $(DOXYGEN) Doxyfile_user
edit = sed -e "s|@ID@|$$Id|" \
@@ -22,6 +24,10 @@
-e 's,@top_builddir\@,$(top_builddir),g' \
-e 's,@top_srcdir\@,$(top_srcdir),g'
+# FIXME: This is not good. We should set these parameters for both
+# documentation (internal and user) using @VARIABLES@. Don't generate
+# Doxyfile_user from Doxyfile_internal! Both should be a product
+# derived from a single source, Doxyfile.in.
edit_user = sed -e 's,OUTPUT_DIRECTORY = ./internal/,OUTPUT_DIRECTORY = ./user/,g' \
-e 's,EXTRACT_ALL = YES,EXTRACT_ALL = NO,g' \
-e 's,EXTRACT_PRIVATE = YES,EXTRACT_PRIVATE = NO,g' \
@@ -44,10 +50,10 @@
# configure, because the former is way faster than the latter.
# Moreover, this file is updated whenever ChangeLog is touched: using
# sed instead of configure saves us a lot of time.
-Doxyfile: $(top_srcdir)/ChangeLog $(srcdir)/Doxyfile.in
- Id=`grep '^\$$Id' $(top_srcdir)/ChangeLog`; \
- $(edit) $(srcdir)/Doxyfile.in >Doxyfile_internal; \
- $(edit_user) $(srcdir)/Doxyfile_internal >Doxyfile_user
+Doxyfile: $(top_srcdir)/milena/ChangeLog $(srcdir)/Doxyfile.in
+ Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`; \
+ $(edit) $(srcdir)/Doxyfile.in >Doxyfile_internal && \
+ $(edit_user) Doxyfile_internal >Doxyfile_user
clean-local:
rm -rf internal user