diff --git a/include/boost/numeric/ublas/matrix_vector.hpp b/include/boost/numeric/ublas/matrix_vector.hpp index b604396d..65191a62 100644 --- a/include/boost/numeric/ublas/matrix_vector.hpp +++ b/include/boost/numeric/ublas/matrix_vector.hpp @@ -19,12 +19,19 @@ namespace boost { namespace numeric { namespace ublas { namespace detail{ -/// \brief Iterator which represents a matrix as a range of row/column-vectors -/// -/// The second argument is the reference to a matrix_row/matrix_column. -/// Whatever type used, it must offer a constructor Reference(sequence,i) -/// which constructs a reference to the i-th proxy-element -/// This iterator is invalidated when the underlying matrix is resized. + +/** \brief Iterator used in the represention of a matrix as a vector of rows or columns + * + * Iterator used in the represention of a matrix as a vector of rows/columns. It refers + * to the i-th element of the matrix, a column or a row depending of Reference type. + * + * The type of Reference should provide a constructor Reference(matrix, i) + * + * This iterator is invalidated when the underlying matrix is resized. + * + * \tparameter Matrix type of matrix that is represented as a vector of row/column + * \tparameter Reference Matrix row or matrix column type. + */ template struct matrix_vector_iterator: public boost::iterator_facade< matrix_vector_iterator, @@ -79,7 +86,14 @@ private: } -///\brief Represents a Matrix as a vector of rows. +/** \brief Represents a \c Matrix as a vector of rows. + * + * Implements an interface to Matrix that the underlaying matrix is represented as a + * vector of rows. + * + * The vector could be resized which causes the resize of the number of rows of + * the underlaying matrix. + */ template class matrix_row_vector { public: @@ -173,21 +187,42 @@ private: }; -///\brief convenience function to create matrix_row_vector. +/** \brief Convenience function to create \c matrix_row_vector. + * + * Function to create \c matrix_row_vector objects. + * \param matrix the \c matrix_expression that generates the matrix that \c matrix_row_vector is referring. + * \return Created \c matrix_row_vector object. + * + * \tparam Matrix the type of matrix that \c matrix_row_vector is referring. + */ template matrix_row_vector make_row_vector(matrix_expression& matrix){ return matrix_row_vector(matrix()); } -///\brief convenience function to create matrix_row_vector. +/** \brief Convenience function to create \c matrix_row_vector. + * + * Function to create \c matrix_row_vector objects. + * \param matrix the \c matrix_expression that generates the matrix that \c matrix_row_vector is referring. + * \return Created \c matrix_row_vector object. + * + * \tparam Matrix the type of matrix that \c matrix_row_vector is referring. + */ template matrix_row_vector make_row_vector(matrix_expression const& matrix){ return matrix_row_vector(matrix()); } -///\brief Represents a Matrix as a vector of rows. +/** \brief Represents a \c Matrix as a vector of columns. + * + * Implements an interface to Matrix that the underlaying matrix is represented as a + * vector of columns. + * + * The vector could be resized which causes the resize of the number of columns of + * the underlaying matrix. + */ template class matrix_column_vector { @@ -281,14 +316,28 @@ private: }; -///\brief convenience function to create matrix_column_vector. +/** \brief Convenience function to create \c matrix_column_vector. + * + * Function to create \c matrix_column_vector objects. + * \param matrix the \c matrix_expression that generates the matrix that \c matrix_column_vector is referring. + * \return Created \c matrix_column_vector object. + * + * \tparam Matrix the type of matrix that \c matrix_column_vector is referring. + */ template matrix_column_vector make_column_vector(matrix_expression& matrix){ return matrix_column_vector(matrix()); } -///\brief convenience function to create matrix_column_vector. +/** \brief Convenience function to create \c matrix_column_vector. + * + * Function to create \c matrix_column_vector objects. + * \param matrix the \c matrix_expression that generates the matrix that \c matrix_column_vector is referring. + * \return Created \c matrix_column_vector object. + * + * \tparam Matrix the type of matrix that \c matrix_column_vector is referring. + */ template matrix_column_vector make_column_vector(matrix_expression const& matrix){ return matrix_column_vector(matrix());