https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Ugo Jardonnet <ugo.jardonnet(a)lrde.epita.fr>
Fix auto name substitution for vec and metal::math.
* tests/metal_pow.cc,
* tests/all.cc,
* mln/trait/value_.hh,
* mln/metal/math/pow.hh,
* mln/metal/math/max.hh,
* mln/metal/math/all.hh,
* mln/metal/math/sqrt.hh,
* mln/metal/all.hh,
* mln/value/graylevel.hh,
* mln/value/graylevel_f.hh,
* mln/value/float01_.hh,
* mln/value/int_s.hh,
* mln/value/internal/gray_.hh,
* mln/value/internal/gray_f.hh,
* mln/value/int_u.hh,
* mln/value/int_u_sat.hh,
* mln/value/label.hh: metal/math had been wrongly substitute by algebra/math.
* mln/trait/ch_value.hh,
* mln/core/h_vec.hh: wrong namespace for vec.
mln/core/h_vec.hh | 4 ++--
mln/metal/all.hh | 2 +-
mln/metal/math/all.hh | 10 +++++-----
mln/metal/math/max.hh | 8 ++++----
mln/metal/math/pow.hh | 8 ++++----
mln/metal/math/sqrt.hh | 6 +++---
mln/trait/ch_value.hh | 2 +-
mln/trait/value_.hh | 4 ++--
mln/value/float01_.hh | 2 +-
mln/value/graylevel.hh | 10 +++++-----
mln/value/graylevel_f.hh | 2 +-
mln/value/int_s.hh | 6 +++---
mln/value/int_u.hh | 2 +-
mln/value/int_u_sat.hh | 4 ++--
mln/value/internal/gray_.hh | 6 +++---
mln/value/internal/gray_f.hh | 6 +++---
mln/value/label.hh | 2 +-
tests/all.cc | 2 +-
tests/metal_pow.cc | 8 ++++----
19 files changed, 47 insertions(+), 47 deletions(-)
Index: tests/metal_pow.cc
--- tests/metal_pow.cc (revision 1786)
+++ tests/metal_pow.cc (working copy)
@@ -27,12 +27,12 @@
/*! \file tests/metal_pow.cc
*
- * \brief Test on mln::algebra::math.
+ * \brief Test on mln::metal::math.
*/
#include <iostream>
#include <mln/core/contract.hh>
-#include <mln/algebra/math/pow.hh>
+#include <mln/metal/math/pow.hh>
int main()
@@ -40,8 +40,8 @@
using namespace mln;
using namespace mln::metal;
- int res = algebra::math::pow_int<2,3>::value;
+ int res = metal::math::pow_int<2,3>::value;
mln_assertion(res == 8);
- std::cout << algebra::math::pow< int_<2>, int_<3>
>::ret().name() << std::endl;
+ std::cout << metal::math::pow< int_<2>, int_<3> >::ret().name()
<< std::endl;
}
Index: tests/all.cc
--- tests/all.cc (revision 1786)
+++ tests/all.cc (working copy)
@@ -48,7 +48,7 @@
#include <mln/math/all.hh>
//#include <mln/set/all.hh>
#include <mln/draw/all.hh>
-#include <mln/algebra/math/all.hh>
+#include <mln/metal/math/all.hh>
#include <mln/metal/all.hh>
#include <mln/morpho/all.hh>
#include <mln/io/pfm/all.hh>
Index: mln/trait/ch_value.hh
--- mln/trait/ch_value.hh (revision 1786)
+++ mln/trait/ch_value.hh (working copy)
@@ -45,7 +45,7 @@
{
// Fwd decl.
- namespace metal { template <unsigned n, typename T> class vec; }
+ namespace algebra { template <unsigned n, typename T> class vec; }
Index: mln/trait/value_.hh
--- mln/trait/value_.hh (revision 1786)
+++ mln/trait/value_.hh (working copy)
@@ -37,11 +37,11 @@
# include <string>
# include <mln/metal/int.hh>
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/pow.hh>
# include <mln/metal/if.hh>
# include <mln/trait/value/all.hh>
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/pow.hh>
# define mln_trait_value_nature(V) typename mln::trait::value_< V >::nature
Index: mln/core/h_vec.hh
--- mln/core/h_vec.hh (revision 1786)
+++ mln/core/h_vec.hh (working copy)
@@ -134,7 +134,7 @@
return *this;
}
- namespace metal
+ namespace algebra
{
// Immersion of a vector in its homogeneous space.
@@ -149,7 +149,7 @@
return tmp;
}
- } // end of namespace mln::metal
+ } // end of namespace mln::algebra
template <unsigned d, typename C>
Index: mln/metal/math/pow.hh
--- mln/metal/math/pow.hh (revision 1786)
+++ mln/metal/math/pow.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_METAL_MATH_POW_HH
# define MLN_METAL_MATH_POW_HH
-/*! \file mln/algebra/math/pow.hh
+/*! \file mln/metal/math/pow.hh
*
* \brief Definition of the 'power' static function.
*/
@@ -37,8 +37,8 @@
# include <mln/metal/int.hh>
-# define mlc_pow(X, N) typename mln::algebra::math::pow< X, N >::ret
-# define mlc_pow_int(x, n) mln::algebra::math::pow_int< x, n >::value
+# define mlc_pow(X, N) typename mln::metal::math::pow< X, N >::ret
+# define mlc_pow_int(x, n) mln::metal::math::pow_int< x, n >::value
@@ -105,7 +105,7 @@
};
- } // end of namespace mln::algebra::math
+ } // end of namespace mln::metal::math
} // end of namespace mln::metal
Index: mln/metal/math/max.hh
--- mln/metal/math/max.hh (revision 1786)
+++ mln/metal/math/max.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_METAL_MATH_MAX_HH
# define MLN_METAL_MATH_MAX_HH
-/*! \file mln/algebra/math/max.hh
+/*! \file mln/metal/math/max.hh
*
* \brief Definition of the 'max' static function.
*/
@@ -36,8 +36,8 @@
# include <mln/metal/bool.hh>
# include <mln/metal/int.hh>
-# define mlc_max(X, Y) typename mln::algebra::math::max< X, Y >::ret
-# define mlc_max_int(x, y) mln::algebra::math::max_int< x, y >::value
+# define mlc_max(X, Y) typename mln::metal::math::max< X, Y >::ret
+# define mlc_max_int(x, y) mln::metal::math::max_int< x, y >::value
namespace mln
{
@@ -69,7 +69,7 @@
};
- } // end of namespace mln::algebra::math
+ } // end of namespace mln::metal::math
} // end of namespace mln::metal
Index: mln/metal/math/all.hh
--- mln/metal/math/all.hh (revision 1786)
+++ mln/metal/math/all.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_METAL_MATH_ALL_HH
# define MLN_METAL_MATH_ALL_HH
-/*! \file mln/algebra/math/all.hh
+/*! \file mln/metal/math/all.hh
*
* \brief Include all static mathematical functions.
*/
@@ -43,7 +43,7 @@
/// Namespace of static mathematical functions.
namespace math
{
- /// \internal Implementation namespace of algebra::math namespace.
+ /// \internal Implementation namespace of metal::math namespace.
namespace impl {}
}
@@ -53,9 +53,9 @@
-# include <mln/algebra/math/pow.hh>
-# include <mln/algebra/math/sqrt.hh>
-# include <mln/algebra/math/max.hh>
+# include <mln/metal/math/pow.hh>
+# include <mln/metal/math/sqrt.hh>
+# include <mln/metal/math/max.hh>
// ...
Index: mln/metal/math/sqrt.hh
--- mln/metal/math/sqrt.hh (revision 1786)
+++ mln/metal/math/sqrt.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_METAL_MATH_SQRT_HH
# define MLN_METAL_MATH_SQRT_HH
-/*! \file mln/algebra/math/sqrt.hh
+/*! \file mln/metal/math/sqrt.hh
*
* \brief Definition of the 'sqrt' static function.
*/
@@ -82,7 +82,7 @@
{
};
- } // end of namespace mln::algebra::math::impl
+ } // end of namespace mln::metal::math::impl
template <int n>
struct sqrt_int : impl::sqrt_int_if_< n, (n >= 0) >
@@ -102,7 +102,7 @@
};
- } // end of namespace mln::algebra::math
+ } // end of namespace mln::metal::math
} // end of namespace mln::metal
Index: mln/metal/all.hh
--- mln/metal/all.hh (revision 1786)
+++ mln/metal/all.hh (working copy)
@@ -77,7 +77,7 @@
# include <mln/algebra/vec.hh>
# include <mln/algebra/mat.hh>
-# include <mln/algebra/math/all.hh>
+# include <mln/metal/math/all.hh>
// FIXME: Remove the following includes below!
# include <mln/metal/same_coord.hh>
Index: mln/value/graylevel.hh
--- mln/value/graylevel.hh (revision 1786)
+++ mln/value/graylevel.hh (working copy)
@@ -38,8 +38,8 @@
# include <mln/value/ops.hh>
# include <mln/core/contract.hh>
-# include <mln/algebra/math/pow.hh>
-# include <mln/algebra/math/max.hh>
+# include <mln/metal/math/pow.hh>
+# include <mln/metal/math/max.hh>
# include <mln/metal/bexpr.hh>
# include <mln/literal/ops.hh>
@@ -513,7 +513,7 @@
inline
graylevel<n>::graylevel(const literal::medium_gray_t&)
{
- this->v_ = algebra::math::pow_int<2, n - 1>::value;
+ this->v_ = metal::math::pow_int<2, n - 1>::value;
}
template <unsigned n>
@@ -521,7 +521,7 @@
graylevel<n>&
graylevel<n>::operator=(const literal::medium_gray_t&)
{
- this->v_ = algebra::math::pow_int<2, n - 1>::value;
+ this->v_ = metal::math::pow_int<2, n - 1>::value;
return *this;
}
@@ -555,7 +555,7 @@
float
graylevel<n>::to_float() const
{
- static const float denom = float(algebra::math::pow_int<2, n>::value) - 1.f;
+ static const float denom = float(metal::math::pow_int<2, n>::value) - 1.f;
return float(this->v_) / denom;
}
Index: mln/value/graylevel_f.hh
--- mln/value/graylevel_f.hh (revision 1786)
+++ mln/value/graylevel_f.hh (working copy)
@@ -38,7 +38,7 @@
# include <mln/value/ops.hh>
# include <mln/core/contract.hh>
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/pow.hh>
# include <mln/metal/bexpr.hh>
# include <mln/literal/ops.hh>
Index: mln/value/float01_.hh
--- mln/value/float01_.hh (revision 1786)
+++ mln/value/float01_.hh (working copy)
@@ -35,7 +35,7 @@
# include <iostream>
# include <mln/core/contract.hh>
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/pow.hh>
# include <mln/metal/bexpr.hh>
# include <mln/value/int_u.hh>
Index: mln/value/int_s.hh
--- mln/value/int_s.hh (revision 1786)
+++ mln/value/int_s.hh (working copy)
@@ -35,7 +35,7 @@
# include <mln/value/ops.hh>
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/pow.hh>
# include <mln/value/internal/value_like.hh>
# include <mln/value/concept/integer.hh>
# include <mln/value/internal/encoding.hh>
@@ -180,7 +180,7 @@
inline
int_s<n>::int_s(int i)
{
- static const int max = algebra::math::pow_int<2, n-1>::value - 1;
+ static const int max = metal::math::pow_int<2, n-1>::value - 1;
static const int min = - max;
mln_precondition(i >= min);
mln_precondition(i <= max);
@@ -192,7 +192,7 @@
int_s<n>&
int_s<n>::operator=(int i)
{
- static const int max = algebra::math::pow_int<2, n-1>::value - 1;
+ static const int max = metal::math::pow_int<2, n-1>::value - 1;
static const int min = - max;
mln_precondition(i >= min);
mln_precondition(i <= max);
Index: mln/value/internal/gray_.hh
--- mln/value/internal/gray_.hh (revision 1786)
+++ mln/value/internal/gray_.hh (working copy)
@@ -37,8 +37,8 @@
# include <iostream>
# include <cmath>
-# include <mln/algebra/math/max.hh>
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/max.hh>
+# include <mln/metal/math/pow.hh>
# include <mln/value/concept/integer.hh>
@@ -312,7 +312,7 @@
inline
gray_<n>::operator graylevel_f() const
{
- static const float denom = float(algebra::math::pow_int<2, n>::value) - 1.f;
+ static const float denom = float(metal::math::pow_int<2, n>::value) - 1.f;
return graylevel_f(float(this->v_) / denom);
}
Index: mln/value/internal/gray_f.hh
--- mln/value/internal/gray_f.hh (revision 1786)
+++ mln/value/internal/gray_f.hh (working copy)
@@ -38,7 +38,7 @@
# include <mln/value/ops.hh>
# include <mln/core/contract.hh>
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/pow.hh>
# include <mln/metal/bexpr.hh>
# include <mln/literal/ops.hh>
@@ -225,7 +225,7 @@
template <unsigned n>
gray_f::gray_f(const gray_<n>& rhs)
{
- static const float denom = float(algebra::math::pow_int<2, n>::value) - 1.f;
+ static const float denom = float(metal::math::pow_int<2, n>::value) - 1.f;
this->v_ = float(rhs.value()) / denom;
}
@@ -233,7 +233,7 @@
gray_f&
gray_f::operator=(const gray_<n>& rhs)
{
- static const float denom = float(algebra::math::pow_int<2, n>::value) - 1.f;
+ static const float denom = float(metal::math::pow_int<2, n>::value) - 1.f;
this->v_ = float(rhs.value()) / denom;
return *this;
}
Index: mln/value/int_u.hh
--- mln/value/int_u.hh (revision 1786)
+++ mln/value/int_u.hh (working copy)
@@ -35,7 +35,7 @@
# include <mln/value/ops.hh>
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/pow.hh>
# include <mln/value/internal/value_like.hh>
# include <mln/value/internal/encoding.hh>
# include <mln/value/concept/integer.hh>
Index: mln/value/int_u_sat.hh
--- mln/value/int_u_sat.hh (revision 1786)
+++ mln/value/int_u_sat.hh (working copy)
@@ -34,7 +34,7 @@
* behavior.
*/
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/pow.hh>
# include <mln/value/internal/value_like.hh>
# include <mln/value/concept/integer.hh>
# include <mln/value/internal/encoding.hh>
@@ -59,7 +59,7 @@
struct value_< mln::value::int_u_sat<n> >
{
// FIXME: Overhaul these traits (see other value traits).
- static const std::size_t card = algebra::math::pow_int<2, n>::value;
+ static const std::size_t card = metal::math::pow_int<2, n>::value;
static const mln::value::int_u_sat<n> min() { return 0; }
static const mln::value::int_u_sat<n> max() { return card - 1; }
static const unsigned nbits = n;
Index: mln/value/label.hh
--- mln/value/label.hh (revision 1786)
+++ mln/value/label.hh (working copy)
@@ -33,7 +33,7 @@
* \brief Define a generic class for labels.
*/
-# include <mln/algebra/math/pow.hh>
+# include <mln/metal/math/pow.hh>
# include <mln/value/concept/symbolic.hh>
# include <mln/value/internal/value_like.hh>
# include <mln/value/internal/convert.hh>