* mln/algebra/vec.hh,
* mln/make/vec.hh: Here.
---
milena/ChangeLog | 8 ++++++++
milena/mln/algebra/vec.hh | 15 +++++++++++++++
milena/mln/make/vec.hh | 7 ++++++-
3 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 90c97df..57e00ff 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,13 @@
2013-04-30 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Cross reference algebra::vec and make::vec in their respective
+ documentation.
+
+ * mln/algebra/vec.hh,
+ * mln/make/vec.hh: Here.
+
+2013-04-30 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Document extended and transformed_image morphers.
* doc/examples-outputs.mk,
diff --git a/milena/mln/algebra/vec.hh b/milena/mln/algebra/vec.hh
index d988cf4..1f7079c 100644
--- a/milena/mln/algebra/vec.hh
+++ b/milena/mln/algebra/vec.hh
@@ -33,6 +33,7 @@
# include <iostream>
# include <cmath>
+# include <vector>
# include <mln/core/concept/object.hh>
@@ -179,6 +180,8 @@ namespace mln
/*! \brief N-dimensional vector.
+
+ \sa mln::make::vec
\ingroup mlnalgebratypes
*/
template <unsigned n, typename T>
@@ -214,6 +217,8 @@ namespace mln
template <typename U>
vec(const vec<n, U>& rhs);
+ vec(const std::vector<T>& rhs);
+
template <typename U>
vec& operator=(const vec<n, U>& rhs);
@@ -596,6 +601,16 @@ namespace mln
}
template <unsigned n, typename T>
+ inline
+ vec<n,T>::vec(const std::vector<T>& rhs)
+ : super_()
+ {
+ mln_assertion(rhs.size() == n);
+ for (unsigned i = 0; i < n; ++i)
+ data_[i] = rhs[i];
+ }
+
+ template <unsigned n, typename T>
template <typename U>
inline
vec<n,T>& vec<n,T>::operator=(const vec<n, U>& rhs)
diff --git a/milena/mln/make/vec.hh b/milena/mln/make/vec.hh
index dc4fe28..a253cf6 100644
--- a/milena/mln/make/vec.hh
+++ b/milena/mln/make/vec.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2006, 2007, 2008, 2009 EPITA Research and Development Laboratory
(LRDE)
+// Copyright (C) 2006, 2007, 2008, 2009, 2013 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -46,6 +47,7 @@ namespace mln
* \param[in] v_0 First coordinate.
*
* \return A 1D vector.
+ * \sa mln::algebra::vec
*/
template <typename T>
algebra::vec<1, T> vec(const T& v_0);
@@ -56,6 +58,7 @@ namespace mln
* \param[in] v_1 Second coordinate.
*
* \return A 2D vector.
+ * \sa mln::algebra::vec
*/
template <typename T>
algebra::vec<2, T> vec(const T& v_0, const T& v_1);
@@ -67,6 +70,7 @@ namespace mln
* \param[in] v_2 Third coordinate.
*
* \return A 3D vector.
+ * \sa mln::algebra::vec
*/
template <typename T>
algebra::vec<3, T> vec(const T& v_0, const T& v_1, const T& v_2);
@@ -79,6 +83,7 @@ namespace mln
* \param[in] v_3 Fourth coordinate.
*
* \return A 4D vector.
+ * \sa mln::algebra::vec
*/
template <typename T>
algebra::vec<4, T> vec(const T& v_0, const T& v_1, const T& v_2,
const T& v_3);
--
1.7.2.5