From c0b2aa0acef071385f085ad2a011cc748a8d5541 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Wed, 13 Jan 2010 17:51:09 +0100 Subject: [PATCH] Added some minor comments. Adapted some of the doc/snippets. --- Eigen/src/Core/DenseStorageBase.h | 8 +++++++- Eigen/src/Core/Matrix.h | 9 +++++++-- doc/snippets/Tutorial_solve_triangular.cpp | 2 +- doc/snippets/Tutorial_solve_triangular_inplace.cpp | 2 +- doc/snippets/class_FullPivLU.cpp | 4 ++-- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Eigen/src/Core/DenseStorageBase.h b/Eigen/src/Core/DenseStorageBase.h index 57be94d62..a2e9780c6 100644 --- a/Eigen/src/Core/DenseStorageBase.h +++ b/Eigen/src/Core/DenseStorageBase.h @@ -35,6 +35,9 @@ template (Derived::IsVectorAtCompileTime)> struct ei_conservative_resize_like_impl; template struct ei_matrix_swap_impl; +/** +* \brief Dense storage base class for matrices and arrays. +**/ template class _Base, int _Options> class DenseStorageBase : public _Base { @@ -450,7 +453,8 @@ class DenseStorageBase : public _Base resizeLike(other); } - /** \internal Copies the value of the expression \a other into \c *this with automatic resizing. + /** + * \brief Copies the value of the expression \a other into \c *this with automatic resizing. * * *this might be resized to match the dimensions of \a other. If *this was a null matrix (not already initialized), * it will be initialized. @@ -460,6 +464,8 @@ class DenseStorageBase : public _Base * remain row-vectors and vectors remain vectors. * * \sa operator=(const MatrixBase&), _set_noalias() + * + * \internal */ template EIGEN_STRONG_INLINE Derived& _set(const DenseBase& other) diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index f5d0de74b..8c951326c 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -152,8 +152,13 @@ class Matrix using Base::coeff; using Base::coeffRef; - /** This is a special case of the templated operator=. Its purpose is to - * prevent a default operator= from hiding the templated operator=. + /** + * \brief Assigns matrices to each other. + * + * \note This is a special case of the templated operator=. Its purpose is + * to prevent a default operator= from hiding the templated operator=. + * + * \callgraph */ EIGEN_STRONG_INLINE Matrix& operator=(const Matrix& other) { diff --git a/doc/snippets/Tutorial_solve_triangular.cpp b/doc/snippets/Tutorial_solve_triangular.cpp index ff876f687..9d13f22ec 100644 --- a/doc/snippets/Tutorial_solve_triangular.cpp +++ b/doc/snippets/Tutorial_solve_triangular.cpp @@ -4,5 +4,5 @@ A << 1,2,3, 0,5,6, 0,0,10; b << 3, 3, 4; cout << "Here is the matrix A:" << endl << A << endl; cout << "Here is the vector b:" << endl << b << endl; -Vector3f x = A.triangularView().solve(b); +Vector3f x = A.triangularView().solve(b); cout << "The solution is:" << endl << x << endl; diff --git a/doc/snippets/Tutorial_solve_triangular_inplace.cpp b/doc/snippets/Tutorial_solve_triangular_inplace.cpp index 64ae4eea1..16ae633a3 100644 --- a/doc/snippets/Tutorial_solve_triangular_inplace.cpp +++ b/doc/snippets/Tutorial_solve_triangular_inplace.cpp @@ -2,5 +2,5 @@ Matrix3f A; Vector3f b; A << 1,2,3, 0,5,6, 0,0,10; b << 3, 3, 4; -A.triangularView().solveInPlace(b); +A.triangularView().solveInPlace(b); cout << "The solution is:" << endl << b << endl; diff --git a/doc/snippets/class_FullPivLU.cpp b/doc/snippets/class_FullPivLU.cpp index 855782d15..d44d8b5f0 100644 --- a/doc/snippets/class_FullPivLU.cpp +++ b/doc/snippets/class_FullPivLU.cpp @@ -7,10 +7,10 @@ cout << "Here is, up to permutations, its LU decomposition matrix:" << endl << lu.matrixLU() << endl; cout << "Here is the L part:" << endl; Matrix5x5 l = Matrix5x5::Identity(); -l.block<5,3>(0,0).part() = lu.matrixLU(); +l.block<5,3>(0,0).part() = lu.matrixLU(); cout << l << endl; cout << "Here is the U part:" << endl; -Matrix5x3 u = lu.matrixLU().part(); +Matrix5x3 u = lu.matrixLU().part(); cout << u << endl; cout << "Let us now reconstruct the original matrix m:" << endl; cout << lu.permutationP().inverse() * l * u * lu.permutationQ().inverse() << endl;