diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-12-01 14:45:15 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-12-01 14:45:15 +0100 |
commit | e2f3e4e4aaabb186cf6023d9e30b8b1879e2e60d (patch) | |
tree | 616000782460e51bd7d0fcdf0fe95b6f6bd67974 /Eigen/src/SparseCore/SparseMatrix.h | |
parent | b26e6971825f2e78e2d2435603816d8897cc8930 (diff) |
Document non-const SparseMatrix::diagonal() method.
Diffstat (limited to 'Eigen/src/SparseCore/SparseMatrix.h')
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrix.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index b0bd8638e..4c79c7dc3 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -633,8 +633,13 @@ class SparseMatrix m_data.resize(size); } - /** \returns a const expression of the diagonal coefficients */ + /** \returns a const expression of the diagonal coefficients. */ const ConstDiagonalReturnType diagonal() const { return ConstDiagonalReturnType(*this); } + + /** \returns a read-write expression of the diagonal coefficients. + * \warning If the diagonal entries are written, then all diagonal + * entries \b must already exist, otherwise an assertion will be raised. + */ DiagonalReturnType diagonal() { return DiagonalReturnType(*this); } /** Default constructor yielding an empty \c 0 \c x \c 0 matrix */ |