* doc/mln/fun/fun.dox: Add new documentation groups.
* doc/mln/main.dox: Include a figure of the function hierarchy.
* mln/fun/n2v/white_gaussian.hh,
* mln/fun/v2v/abs.hh,
* mln/fun/v2v/cast.hh,
* mln/fun/v2v/ch_function_value.hh,
* mln/fun/v2v/component.hh,
* mln/fun/v2v/convert.hh,
* mln/fun/v2v/dec.hh,
* mln/fun/v2v/enc.hh,
* mln/fun/v2v/hsl_to_rgb.hh,
* mln/fun/v2v/id.hh,
* mln/fun/v2v/inc.hh,
* mln/fun/v2v/linear.hh,
* 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/round.hh,
* mln/fun/v2v/round_sat.hh,
* mln/fun/v2v/saturate.hh,
* mln/fun/v2v/wrap.hh,
* mln/fun/v2w2v/all.hh,
* mln/fun/v2w2v/cos.hh,
* mln/fun/v2w_w2v/all.hh,
* mln/fun/v2w_w2v/norm.hh,
* mln/fun/vv2b/all.hh,
* mln/fun/vv2b/eq.hh,
* mln/fun/vv2b/ge.hh,
* mln/fun/vv2b/gt.hh,
* mln/fun/vv2b/implies.hh,
* mln/fun/vv2b/le.hh,
* mln/fun/vv2b/lt.hh: Move to their respective function group.
---
milena/ChangeLog | 43 +++++++++++++++++++++++++++++++
milena/doc/mln/fun/fun.dox | 41 +++++++++++++++++++++++++++++
milena/doc/mln/main.dox | 8 ++---
milena/mln/fun/n2v/white_gaussian.hh | 6 +++-
milena/mln/fun/v2v/abs.hh | 10 +++++--
milena/mln/fun/v2v/cast.hh | 19 +++++++++++--
milena/mln/fun/v2v/ch_function_value.hh | 9 +++++-
milena/mln/fun/v2v/component.hh | 10 +++++--
milena/mln/fun/v2v/convert.hh | 2 +-
milena/mln/fun/v2v/dec.hh | 9 ++++--
milena/mln/fun/v2v/enc.hh | 12 ++++++--
milena/mln/fun/v2v/hsl_to_rgb.hh | 4 +--
milena/mln/fun/v2v/id.hh | 7 +++-
milena/mln/fun/v2v/inc.hh | 11 +++++---
milena/mln/fun/v2v/linear.hh | 25 +++++++++++------
milena/mln/fun/v2v/norm.hh | 39 ++++++++++++++++-----------
milena/mln/fun/v2v/projection.hh | 15 ++++++++--
milena/mln/fun/v2v/qt_rgb_to_int_u.hh | 2 +-
milena/mln/fun/v2v/rgb8_to_rgbn.hh | 2 +-
milena/mln/fun/v2v/rgb_to_hsl.hh | 6 ++--
milena/mln/fun/v2v/rgb_to_int_u.hh | 2 +-
milena/mln/fun/v2v/rgb_to_luma.hh | 2 +-
milena/mln/fun/v2v/round.hh | 5 ++-
milena/mln/fun/v2v/round_sat.hh | 3 +-
milena/mln/fun/v2v/saturate.hh | 22 +++++++++++++--
milena/mln/fun/v2v/wrap.hh | 8 +++++-
milena/mln/fun/v2w2v/all.hh | 8 ++---
milena/mln/fun/v2w2v/cos.hh | 12 +++++---
milena/mln/fun/v2w_w2v/all.hh | 8 ++---
milena/mln/fun/v2w_w2v/norm.hh | 40 +++++++++++++++++-----------
milena/mln/fun/vv2b/all.hh | 8 ++---
milena/mln/fun/vv2b/eq.hh | 8 ++++-
milena/mln/fun/vv2b/ge.hh | 10 ++++++-
milena/mln/fun/vv2b/gt.hh | 8 ++++-
milena/mln/fun/vv2b/implies.hh | 8 ++++-
milena/mln/fun/vv2b/le.hh | 10 ++++++-
milena/mln/fun/vv2b/lt.hh | 9 +++++-
37 files changed, 327 insertions(+), 124 deletions(-)
create mode 100644 milena/doc/mln/fun/fun.dox
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 446e65b..50fc4d0 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,48 @@
2013-04-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add function module in Milena documentation.
+
+ * doc/mln/fun/fun.dox: Add new documentation groups.
+
+ * doc/mln/main.dox: Include a figure of the function hierarchy.
+
+ * mln/fun/n2v/white_gaussian.hh,
+ * mln/fun/v2v/abs.hh,
+ * mln/fun/v2v/cast.hh,
+ * mln/fun/v2v/ch_function_value.hh,
+ * mln/fun/v2v/component.hh,
+ * mln/fun/v2v/convert.hh,
+ * mln/fun/v2v/dec.hh,
+ * mln/fun/v2v/enc.hh,
+ * mln/fun/v2v/hsl_to_rgb.hh,
+ * mln/fun/v2v/id.hh,
+ * mln/fun/v2v/inc.hh,
+ * mln/fun/v2v/linear.hh,
+ * 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/round.hh,
+ * mln/fun/v2v/round_sat.hh,
+ * mln/fun/v2v/saturate.hh,
+ * mln/fun/v2v/wrap.hh,
+ * mln/fun/v2w2v/all.hh,
+ * mln/fun/v2w2v/cos.hh,
+ * mln/fun/v2w_w2v/all.hh,
+ * mln/fun/v2w_w2v/norm.hh,
+ * mln/fun/vv2b/all.hh,
+ * mln/fun/vv2b/eq.hh,
+ * mln/fun/vv2b/ge.hh,
+ * mln/fun/vv2b/gt.hh,
+ * mln/fun/vv2b/implies.hh,
+ * mln/fun/vv2b/le.hh,
+ * mln/fun/vv2b/lt.hh: Move to their respective function group.
+
+2013-04-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
* doc/mln/convert.dox: Fix a typo.
2013-04-25 Guillaume Lazzara <z(a)lrde.epita.fr>
diff --git a/milena/doc/mln/fun/fun.dox b/milena/doc/mln/fun/fun.dox
new file mode 100644
index 0000000..b5db682
--- /dev/null
+++ b/milena/doc/mln/fun/fun.dox
@@ -0,0 +1,41 @@
+/*! \defgroup funv2v v2v Functions
+ *
+ * \brief All functions from index to value.
+ *
+ * \ingroup modfun
+ */
+
+/*! \defgroup funn2v n2v Functions
+ *
+ * \brief All functions from nil to value.
+ *
+ * \ingroup modfun
+ */
+
+/*! \defgroup funv2v v2v Functions
+ *
+ * \brief All functions from value to value.
+ *
+ * \ingroup modfun
+ */
+
+/*! \defgroup funv2w2v v2w2v Functions
+ *
+ * \brief All bijective functions.
+ *
+ * \ingroup modfun
+ */
+
+/*! \defgroup funv2w_w2v v2w_w2v Functions
+ *
+ * \brief All bijective functions.
+ *
+ * \ingroup modfun
+ */
+
+/*! \defgroup funvv2b vv2b Functions
+ *
+ * \brief All functions from two values to a logical value.
+ *
+ * \ingroup modfun
+ */
diff --git a/milena/doc/mln/main.dox b/milena/doc/mln/main.dox
index 8ee0e92..c413cac 100644
--- a/milena/doc/mln/main.dox
+++ b/milena/doc/mln/main.dox
@@ -10,14 +10,12 @@
*
*/
-
/*! \defgroup modfun Functions
- *
- * \brief All predefined functions.
- *
- */
+ \brief All predefined functions.
+ \image html function_hierarchy.png "Function inheritance diagram in
Milena."
+*/
/*! \defgroup imagemanip Image Manipulation
*
diff --git a/milena/mln/fun/n2v/white_gaussian.hh b/milena/mln/fun/n2v/white_gaussian.hh
index 55d6cc1..aa6b685 100644
--- a/milena/mln/fun/n2v/white_gaussian.hh
+++ b/milena/mln/fun/n2v/white_gaussian.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -48,9 +49,10 @@ namespace mln
/*! \brief Generate a White Gaussian Noise.
-
Reference:
http://www.dspguru.com/dsp/howtos/how-to-generate-white-gaussian-noise
+
+ \ingroup funn2v
*/
template <typename V>
struct white_gaussian : Function_n2v< white_gaussian<V> >
diff --git a/milena/mln/fun/v2v/abs.hh b/milena/mln/fun/v2v/abs.hh
index d5bc3be..c0d3e84 100644
--- a/milena/mln/fun/v2v/abs.hh
+++ b/milena/mln/fun/v2v/abs.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -28,7 +29,7 @@
/*! \file
*
- * \brief FIXME.
+ * \brief Function returning absolute value.
*/
# include <mln/core/concept/function.hh>
@@ -44,8 +45,11 @@ namespace mln
namespace v2v
{
- // FIXME: Doc!
+ /*!
+ \brief Function returning absolute value.
+ \ingroup funv2v
+ */
template <typename V>
struct abs : public Function_v2v< abs<V> >
{
diff --git a/milena/mln/fun/v2v/cast.hh b/milena/mln/fun/v2v/cast.hh
index a4790f9..68c2856 100644
--- a/milena/mln/fun/v2v/cast.hh
+++ b/milena/mln/fun/v2v/cast.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -28,7 +29,7 @@
/// \file
///
-/// FIXME.
+/// Cast function arguments towards a given type.
///
/// \todo The function is intrisically meta; how to handle that
/// particular case?
@@ -46,13 +47,25 @@ namespace mln
namespace v2v
{
- // FIXME: Doc!
+ /*! \brief Cast function arguments towards type V.
+ \tparam V The value type of destination.
+
+ This function relies on c++ static_cast keyword.
+
+ The type cast is performed only if needed.
+
+ \ingroup funv2v
+ */
template <typename V>
struct cast : public Function_v2v< cast<V> >
{
typedef V result;
+ /*! \brief Cast function arguments towards type V.
+ \tparam W Value type of the function argument.
+ \tparam V The value type of destination.
+ */
template <typename W>
V operator()(const W& w) const;
};
diff --git a/milena/mln/fun/v2v/ch_function_value.hh
b/milena/mln/fun/v2v/ch_function_value.hh
index 8fc6f32..7eb18f3 100644
--- a/milena/mln/fun/v2v/ch_function_value.hh
+++ b/milena/mln/fun/v2v/ch_function_value.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008, 2009, 2012 EPITA Research and Development
+// Copyright (C) 2008, 2009, 2012, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -48,7 +48,12 @@ namespace mln
namespace v2v
{
- /// \brief Wrap a function v2v and convert its result to another type.
+ /*!
+ \brief Wrap a function v2v and convert its result to another
+ type.
+
+ \ingroup funv2v
+ */
template <typename F, typename V>
class ch_function_value : public Function_v2v< ch_function_value<F,V>
>,
public internal::ch_function_value_impl<F, V>
diff --git a/milena/mln/fun/v2v/component.hh b/milena/mln/fun/v2v/component.hh
index 43068f5..d3b7580 100644
--- a/milena/mln/fun/v2v/component.hh
+++ b/milena/mln/fun/v2v/component.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -45,8 +46,11 @@ namespace mln
namespace v2v
{
- /// \brief Functor that accesses the i-th component of a value.
- //
+ /*!
+ \brief Functor that accesses the i-th component of a value.
+
+ \ingroup funv2v
+ */
template <typename T, unsigned i>
struct component : public Function_v2v< component<T,i> >,
private metal::bool_<(i <= trait::value_<T>::dim)>::check_t
diff --git a/milena/mln/fun/v2v/convert.hh b/milena/mln/fun/v2v/convert.hh
index 42c4229..0c645d3 100644
--- a/milena/mln/fun/v2v/convert.hh
+++ b/milena/mln/fun/v2v/convert.hh
@@ -55,7 +55,7 @@ namespace mln
This function relies on convert::from_to().
\sa data::convert.
- \ingroup modfunv2v convert
+ \ingroup funv2v convert
*/
template <typename V>
struct convert : public Function_v2v< convert<V> >
diff --git a/milena/mln/fun/v2v/dec.hh b/milena/mln/fun/v2v/dec.hh
index 3b9085c..6e34826 100644
--- a/milena/mln/fun/v2v/dec.hh
+++ b/milena/mln/fun/v2v/dec.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -42,8 +43,10 @@ namespace mln
namespace v2v
{
- // FIXME: Doc!
-
+ /*!
+ \brief Incrementation function.
+ \ingroup funv2v
+ */
template <typename T>
struct dec
: fun::internal::selector_<T, T, dec<T> >::ret
diff --git a/milena/mln/fun/v2v/enc.hh b/milena/mln/fun/v2v/enc.hh
index 270215c..272d1eb 100644
--- a/milena/mln/fun/v2v/enc.hh
+++ b/milena/mln/fun/v2v/enc.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -28,7 +29,7 @@
/*! \file
*
- * \brief FIXME.
+ * \brief Function returning the encoding value.
*/
# include <mln/core/concept/function.hh>
@@ -43,8 +44,13 @@ namespace mln
namespace v2v
{
- // FIXME: Doc!
+ /*! \brief Function returning the encoding value.
+ \warning This function works only on types providing enc()
+ member.
+
+ \ingroup funv2v
+ */
template <typename V>
struct enc : public Function_v2v< enc<V> >
{
diff --git a/milena/mln/fun/v2v/hsl_to_rgb.hh b/milena/mln/fun/v2v/hsl_to_rgb.hh
index 25f5d10..574b73c 100644
--- a/milena/mln/fun/v2v/hsl_to_rgb.hh
+++ b/milena/mln/fun/v2v/hsl_to_rgb.hh
@@ -30,8 +30,6 @@
/// \file
///
/// \brief Convert HSL values to RGB.
-///
-/// \todo Etienne: Remove the global variables!
# include <cmath>
@@ -57,7 +55,7 @@ namespace mln
/*!
\brief Convert hsl values to rgb.
- \ingroup modfunv2v convert
+ \ingroup funv2v convert
*/
template <typename T_rgb>
struct f_hsl_to_rgb_ : public Function_v2v< f_hsl_to_rgb_<T_rgb> >
diff --git a/milena/mln/fun/v2v/id.hh b/milena/mln/fun/v2v/id.hh
index 21398c7..d1366d1 100644
--- a/milena/mln/fun/v2v/id.hh
+++ b/milena/mln/fun/v2v/id.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,8 +44,10 @@ namespace mln
namespace v2v
{
- // FIXME: Doc!
+ /*! \brief Identity function.
+ \ingroup funv2v
+ */
template <typename T>
struct id
: fun::internal::selector_<T, T, id<T> >::ret
diff --git a/milena/mln/fun/v2v/inc.hh b/milena/mln/fun/v2v/inc.hh
index 811647a..35bc647 100644
--- a/milena/mln/fun/v2v/inc.hh
+++ b/milena/mln/fun/v2v/inc.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -28,7 +29,7 @@
/// \file
///
-/// Incrementation function.
+/// \brief Incrementation function.
# include <mln/fun/internal/selector.hh>
@@ -42,8 +43,10 @@ namespace mln
namespace v2v
{
- // FIXME: Doc!
-
+ /*!
+ \brief Incrementation function.
+ \ingroup funv2v
+ */
template <typename T>
struct inc
: fun::internal::selector_<T, T, inc<T> >::ret
diff --git a/milena/mln/fun/v2v/linear.hh b/milena/mln/fun/v2v/linear.hh
index 3d794db..d0de9fb 100644
--- a/milena/mln/fun/v2v/linear.hh
+++ b/milena/mln/fun/v2v/linear.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -45,12 +46,18 @@ namespace mln
/*!
*\brief Linear function.
- * f(v) = a * v + b.
- * \c V is the type of input values; \c T is the type used to
- * compute the result; \c R is the result type.
- *
- * By defaut, \c T is \c V and \c R is \c T.
- */
+
+ \verbatim
+ f(v) = a * v + b.
+ \endverbatim
+
+ \c V is the type of input values; \c T is the type used to
+ compute the result; \c R is the result type.
+
+ By defaut, \c T is \c V and \c R is \c T.
+
+ \ingroup funv2v
+ */
template <typename V, typename T = V, typename R = T>
struct linear : public Function_v2v< linear<V,T,R> >
{
@@ -58,7 +65,7 @@ namespace mln
R operator()(const V& v) const;
- template <typename U>
+ template <typename U>
R operator()(const U& u) const;
linear(T a, T b);
@@ -73,7 +80,7 @@ namespace mln
R operator()(const V& v) const;
- template <typename U>
+ template <typename U>
R operator()(const U& u) const;
linear_sat(T a, T b);
diff --git a/milena/mln/fun/v2v/norm.hh b/milena/mln/fun/v2v/norm.hh
index 6922217..db8f32b 100644
--- a/milena/mln/fun/v2v/norm.hh
+++ b/milena/mln/fun/v2v/norm.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -48,11 +49,13 @@ namespace mln
namespace v2v
{
- /// L1-norm.
- ///
- /// \c V is the type of input values; \c R is the result type.
- ///
- /// \see mln::norm::l1.
+ /*! \brief L1-norm.
+
+ \c V is the type of input values; \c R is the result type.
+
+ \see mln::norm::l1.
+ \ingroup funv2v
+ */
template <typename V, typename R>
struct l1_norm : public Function_v2v< l1_norm<V, R> >
{
@@ -60,11 +63,13 @@ namespace mln
R operator()(const V& v) const;
};
- /// L2-norm.
- ///
- /// \c V is the type of input values; \c R is the result type.
- ///
- /// \see mln::norm::l2.
+ /*! \brief L2-norm.
+
+ \c V is the type of input values; \c R is the result type.
+
+ \see mln::norm::l2.
+ \ingroup funv2v
+ */
template <typename V, typename R>
struct l2_norm : public Function_v2v< l2_norm<V, R> >
{
@@ -72,11 +77,13 @@ namespace mln
R operator()(const V& v) const;
};
- /// L-infty norm.
- ///
- /// \c V is the type of input values; \c R is the result type.
- ///
- /// \see mln::norm::linfty.
+ /*! \brief L-infty norm.
+
+ \c V is the type of input values; \c R is the result type.
+
+ \see mln::norm::linfty.
+ \ingroup funv2v
+ */
template <typename V, typename R>
struct linfty_norm : public Function_v2v< linfty_norm<V, R> >
{
diff --git a/milena/mln/fun/v2v/projection.hh b/milena/mln/fun/v2v/projection.hh
index b2d92bc..4424b67 100644
--- a/milena/mln/fun/v2v/projection.hh
+++ b/milena/mln/fun/v2v/projection.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -28,7 +29,7 @@
/// \file
///
-/// FIXME.
+/// \brief Project points to one direction.
# include <mln/core/concept/function.hh>
# include <mln/core/point.hh>
@@ -44,6 +45,14 @@ namespace mln
namespace v2v
{
+ /*!
+ \brief Project points to one direction.
+
+ This function takes points as input and return a point of a
+ lower dimension.
+
+ \ingroup funv2v
+ */
template <typename P, unsigned dir>
struct projection : public Function_v2v< projection<P,dir> >
{
@@ -51,7 +60,7 @@ namespace mln
typedef mln_grid(P) G_;
typedef mln_coord(P) C_;
enum { n_ = G_::dim };
-
+
public:
typedef point<mln_regular_grid_from_dim(n_ - 1), C_> result;
diff --git a/milena/mln/fun/v2v/qt_rgb_to_int_u.hh
b/milena/mln/fun/v2v/qt_rgb_to_int_u.hh
index 3a60763..206df02 100644
--- a/milena/mln/fun/v2v/qt_rgb_to_int_u.hh
+++ b/milena/mln/fun/v2v/qt_rgb_to_int_u.hh
@@ -47,7 +47,7 @@ namespace mln
/*!
\brief Convert value::qt::rgb32 values to value::int_u8.
- \ingroup modfunv2v convert
+ \ingroup funv2v convert
*/
template <unsigned n>
struct qt_rgb_to_int_u : Function_v2v< qt_rgb_to_int_u<n> >
diff --git a/milena/mln/fun/v2v/rgb8_to_rgbn.hh b/milena/mln/fun/v2v/rgb8_to_rgbn.hh
index d4cab2e..2e5fb08 100644
--- a/milena/mln/fun/v2v/rgb8_to_rgbn.hh
+++ b/milena/mln/fun/v2v/rgb8_to_rgbn.hh
@@ -51,7 +51,7 @@ namespace mln
\tparam n defines the output quantification used for the transformation.
- \ingroup modfunv2v convert
+ \ingroup funv2v convert
*/
template <unsigned n>
struct rgb8_to_rgbn : Function_v2v< rgb8_to_rgbn<n> >
diff --git a/milena/mln/fun/v2v/rgb_to_hsl.hh b/milena/mln/fun/v2v/rgb_to_hsl.hh
index 177069f..e13c6d2 100644
--- a/milena/mln/fun/v2v/rgb_to_hsl.hh
+++ b/milena/mln/fun/v2v/rgb_to_hsl.hh
@@ -60,7 +60,7 @@ namespace mln
\tparam T_hsl The desired output hsl type.
- \ingroup modfunv2v convert
+ \ingroup funv2v convert
*/
template <typename T_hsl>
struct f_rgb_to_hsl_ : public Function_v2v< f_rgb_to_hsl_<T_hsl> >
@@ -78,7 +78,7 @@ namespace mln
\brief Type of a default conversion function from value::rgb
to value::hsl_f.
- \ingroup modfunv2v convert
+ \ingroup funv2v convert
*/
typedef f_rgb_to_hsl_<value::hsl_f> f_rgb_to_hsl_f_t;
@@ -86,7 +86,7 @@ namespace mln
\brief Predefined conversion functor converting from value::rgb
to value::hsl_f.
- \ingroup modfunv2v convert
+ \ingroup funv2v convert
*/
extern f_rgb_to_hsl_f_t f_rgb_to_hsl_f;
diff --git a/milena/mln/fun/v2v/rgb_to_int_u.hh b/milena/mln/fun/v2v/rgb_to_int_u.hh
index de9972d..282bc3d 100644
--- a/milena/mln/fun/v2v/rgb_to_int_u.hh
+++ b/milena/mln/fun/v2v/rgb_to_int_u.hh
@@ -55,7 +55,7 @@ namespace mln
luma = (red + green + blue) / 3;
\endverbatim
- \ingroup modfunv2v convert
+ \ingroup funv2v convert
*/
template <unsigned n>
struct rgb_to_int_u : Function_v2v< rgb_to_int_u<n> >
diff --git a/milena/mln/fun/v2v/rgb_to_luma.hh b/milena/mln/fun/v2v/rgb_to_luma.hh
index 3b6ddc2..3a634f9 100644
--- a/milena/mln/fun/v2v/rgb_to_luma.hh
+++ b/milena/mln/fun/v2v/rgb_to_luma.hh
@@ -51,7 +51,7 @@ namespace mln
luma = 0.299 * red + 0.587 * green + 0.114 * blue;
\endverbatim
- \ingroup modfunv2v convert
+ \ingroup funv2v convert
*/
template <typename T_luma>
struct rgb_to_luma : public Function_v2v< rgb_to_luma<T_luma> >
diff --git a/milena/mln/fun/v2v/round.hh b/milena/mln/fun/v2v/round.hh
index 37d3451..610b70c 100644
--- a/milena/mln/fun/v2v/round.hh
+++ b/milena/mln/fun/v2v/round.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2012, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +44,7 @@ namespace mln
{
/*! \brief Round the given value.
- \ingroup modfun
+ \ingroup funv2v
*/
template <typename R>
struct round : public Function_v2v< round<R> >
diff --git a/milena/mln/fun/v2v/round_sat.hh b/milena/mln/fun/v2v/round_sat.hh
index d0a0073..9d21028 100644
--- a/milena/mln/fun/v2v/round_sat.hh
+++ b/milena/mln/fun/v2v/round_sat.hh
@@ -46,7 +46,8 @@ namespace mln
/*! \brief Round the given value considering its type as
circular.
- \ingroup modfun
+
+ \ingroup funv2v
*/
template <typename R>
struct round_sat : public Function_v2v< round_sat<R> >
diff --git a/milena/mln/fun/v2v/saturate.hh b/milena/mln/fun/v2v/saturate.hh
index 9a354c6..7759d6f 100644
--- a/milena/mln/fun/v2v/saturate.hh
+++ b/milena/mln/fun/v2v/saturate.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2009, 2010 EPITA Research and Development
+// Copyright (C) 2007, 2009, 2010, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -29,7 +29,7 @@
/*! \file
*
- * \brief FIXME.
+ * \brief
*/
# include <mln/core/concept/function.hh>
@@ -48,8 +48,18 @@ namespace mln
namespace v2v
{
- // FIXME: Doc!
+ /*! \brief Performs a conversion between two value types by
+ saturating upper and lower values.
+ \code
+ if (w < min_V)
+ return min_V;
+ if (w > max_V)
+ return max_V;
+ \endcode
+
+ \ingroup funv2v
+ */
template <typename V>
struct saturate : public Function_v2v< saturate<V> >
{
@@ -58,6 +68,12 @@ namespace mln
typedef V result;
+ /*!\brief Performs a conversion from type W to V by saturating
+ upper and lower values.
+
+ \tparam W Input value type.
+ \tparam V Value type of destination.
+ */
template <typename W>
V operator()(const W& w) const;
diff --git a/milena/mln/fun/v2v/wrap.hh b/milena/mln/fun/v2v/wrap.hh
index bb090f6..021bfb4 100644
--- a/milena/mln/fun/v2v/wrap.hh
+++ b/milena/mln/fun/v2v/wrap.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -47,6 +48,11 @@ namespace mln
namespace v2v
{
+ /*! \brief Function to wrap values such as 0 -> 0 and [1, L_max]
+ maps to [1, Lmax] (using modulus).
+
+ \ingroup funv2v
+ */
template <typename L>
struct wrap : public Function_v2v< wrap<L> >
{
diff --git a/milena/mln/fun/v2w2v/all.hh b/milena/mln/fun/v2w2v/all.hh
index 5cfa417..026733c 100644
--- a/milena/mln/fun/v2w2v/all.hh
+++ b/milena/mln/fun/v2w2v/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -32,14 +33,11 @@ namespace mln
namespace fun
{
- /*! \defgroup modfunv2w2v v2w2v functions
- *
+ /*!
* \brief All bijective functions.
*
* \ingroup modfun
*/
-
- /// Namespace of bijective functions.
namespace v2w2v
{
diff --git a/milena/mln/fun/v2w2v/cos.hh b/milena/mln/fun/v2w2v/cos.hh
index 7616e05..4d627d0 100644
--- a/milena/mln/fun/v2w2v/cos.hh
+++ b/milena/mln/fun/v2w2v/cos.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -50,10 +51,11 @@ namespace mln
{
/*! \brief Cosinus bijective functor.
- *
- * \c V is the type of input values and the result type.
- *
- * \see mln::math::cos.
+
+ \c V is the type of input values and the result type.
+ \see mln::math::cos.
+
+ \ingroup funv2w2v
*/
template <typename V>
struct cos : public Function_v2v< cos<V> >
diff --git a/milena/mln/fun/v2w_w2v/all.hh b/milena/mln/fun/v2w_w2v/all.hh
index 2cc385e..8552a4f 100644
--- a/milena/mln/fun/v2w_w2v/all.hh
+++ b/milena/mln/fun/v2w_w2v/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -36,14 +37,11 @@ namespace mln
namespace fun
{
- /*! \defgroup modfunv2w_w2v v2w_w2v functions
- *
+ /*!
* \brief All bijective function.
*
* \ingroup modfun
*/
-
- /// Namespace of functions from value to value.
namespace v2w_w2v {}
}
diff --git a/milena/mln/fun/v2w_w2v/norm.hh b/milena/mln/fun/v2w_w2v/norm.hh
index 79c7268..d1e3301 100644
--- a/milena/mln/fun/v2w_w2v/norm.hh
+++ b/milena/mln/fun/v2w_w2v/norm.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -47,11 +48,14 @@ namespace mln
namespace v2w_w2v
{
- /// L1-norm.
- ///
- /// \c V is the type of input values; \c R is the result type.
- ///
- /// \see mln::norm::l1.
+ /*! \brief L1-norm.
+
+ \c V is the type of input values; \c R is the result type.
+
+ \see mln::norm::l1.
+
+ \ingroup funv2w_w2v
+ */
template <typename V, typename R>
struct l1_norm : public Function_v2v< l1_norm<V, R> >
{
@@ -60,11 +64,13 @@ namespace mln
V f_1(const V& v, const R& r) const;
};
- /// L2-norm.
- ///
- /// \c V is the type of input values; \c R is the result type.
- ///
- /// \see mln::norm::l2.
+ /*! \brief L2-norm.
+
+ \c V is the type of input values; \c R is the result type.
+
+ \see mln::norm::l2.
+ \ingroup funv2w_w2v
+ */
template <typename V, typename R>
struct l2_norm : public Function_v2v< l2_norm<V, R> >
{
@@ -73,11 +79,13 @@ namespace mln
V f_1(const V& v, const R& r) const;
};
- /// L-infty norm.
- ///
- /// \c V is the type of input values; \c R is the result type.
- ///
- /// \see mln::norm::linfty.
+ /*! \brief L-infty norm.
+
+ \c V is the type of input values; \c R is the result type.
+
+ \see mln::norm::linfty.
+ \ingroup funv2w_w2v
+ */
template <typename V, typename R>
struct linfty_norm : public Function_v2v< linfty_norm<V, R> >
{
diff --git a/milena/mln/fun/vv2b/all.hh b/milena/mln/fun/vv2b/all.hh
index 3322347..0b4f724 100644
--- a/milena/mln/fun/vv2b/all.hh
+++ b/milena/mln/fun/vv2b/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -36,14 +37,11 @@ namespace mln
namespace fun
{
- /*! \defgroup modfunvv2b vv2b functions
- *
+ /*!
* \brief All functions mapping two values to a logical value.
*
* \ingroup modfun
*/
-
- /// Namespace of functions from value to value.
namespace vv2b {}
}
diff --git a/milena/mln/fun/vv2b/eq.hh b/milena/mln/fun/vv2b/eq.hh
index adeab9f..be2966f 100644
--- a/milena/mln/fun/vv2b/eq.hh
+++ b/milena/mln/fun/vv2b/eq.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +44,10 @@ namespace mln
namespace vv2b
{
- /// Functor computing equal between two values.
+ /*!
+ \brief Functor computing equal between two values.
+ \ingroup funvv2b
+ */
template <typename L, typename R = L>
struct eq : public Function_vv2b< eq<L,R> >
{
diff --git a/milena/mln/fun/vv2b/ge.hh b/milena/mln/fun/vv2b/ge.hh
index 3a0a097..cd35b5c 100644
--- a/milena/mln/fun/vv2b/ge.hh
+++ b/milena/mln/fun/vv2b/ge.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +44,12 @@ namespace mln
namespace vv2b
{
- /// Functor computing "greater or equal than" between two values.
+ /*!
+ \brief Functor computing "greater or equal than" between two
+ values.
+
+ \ingroup funvv2b
+ */
template <typename L, typename R = L>
struct ge : public Function_vv2b< ge<L,R> >
{
diff --git a/milena/mln/fun/vv2b/gt.hh b/milena/mln/fun/vv2b/gt.hh
index a500fe5..1d94f1f 100644
--- a/milena/mln/fun/vv2b/gt.hh
+++ b/milena/mln/fun/vv2b/gt.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +44,10 @@ namespace mln
namespace vv2b
{
- /// Functor computing "greater than" between two values.
+ /*!
+ \brief Functor computing "greater than" between two values.
+ \ingroup funvv2b
+ */
template <typename L, typename R = L>
struct gt : public Function_vv2b< gt<L,R> >
{
diff --git a/milena/mln/fun/vv2b/implies.hh b/milena/mln/fun/vv2b/implies.hh
index 4294fa0..8362fcd 100644
--- a/milena/mln/fun/vv2b/implies.hh
+++ b/milena/mln/fun/vv2b/implies.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +44,10 @@ namespace mln
namespace vv2b
{
- /// Functor computing logical-implies between two values.
+ /*!
+ \brief Functor computing logical-implies between two values.
+ \ingroup vv2b
+ */
template <typename L, typename R = L>
struct implies : public Function_vv2b< implies<L,R> >
{
diff --git a/milena/mln/fun/vv2b/le.hh b/milena/mln/fun/vv2b/le.hh
index e893b17..615b82b 100644
--- a/milena/mln/fun/vv2b/le.hh
+++ b/milena/mln/fun/vv2b/le.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +44,12 @@ namespace mln
namespace vv2b
{
- /// Functor computing "lower or equal than" between two values.
+ /*!
+ \brief Functor computing "lower or equal than" between two
+ values.
+
+ \ingroup funvv2b
+ */
template <typename L, typename R = L>
struct le : public Function_vv2b< le<L,R> >
{
diff --git a/milena/mln/fun/vv2b/lt.hh b/milena/mln/fun/vv2b/lt.hh
index 73bedf1..2ab7d29 100644
--- a/milena/mln/fun/vv2b/lt.hh
+++ b/milena/mln/fun/vv2b/lt.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -43,7 +44,11 @@ namespace mln
namespace vv2b
{
- /// Functor computing "lower than" between two values.
+ /*!
+ \brief Functor computing "lower than" between two values.
+
+ \ingroup funvv2b
+ */
template <typename L, typename R = L>
struct lt : public Function_vv2b< lt<L,R> >
{
--
1.7.2.5