diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-06-01 10:03:32 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-06-01 10:03:32 +0200 |
commit | 77e652d8ad3eea056e24e7458ad2ba17688723d5 (patch) | |
tree | a60f2580a7e39f76853a1032fb18966f930d3f73 /doc/SparseQuickReference.dox | |
parent | da4970ead2559a69cc2addfce8be953b44531506 (diff) |
Doc: improve documentation of Map<SparseMatrix>
Diffstat (limited to 'doc/SparseQuickReference.dox')
-rw-r--r-- | doc/SparseQuickReference.dox | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/doc/SparseQuickReference.dox b/doc/SparseQuickReference.dox index e0a30edcc..a25622e80 100644 --- a/doc/SparseQuickReference.dox +++ b/doc/SparseQuickReference.dox @@ -206,7 +206,7 @@ See \ref TutorialSparse_SubMatrices and below for read-write sub-matrices. sm1.innerVectors(start, size); // RW sm1.leftCols(size); // RW sm2.rightCols(size); // RO because sm2 is row-major - sm1.middleRows(start, numRows); // RO becasue sm1 is column-major + sm1.middleRows(start, numRows); // RO because sm1 is column-major sm1.middleCols(start, numCols); // RW sm1.col(j); // RW \endcode @@ -253,6 +253,20 @@ If the matrix is not in compressed form, makeCompressed() should be called befor Note that these functions are mostly provided for interoperability purposes with external libraries.\n A better access to the values of the matrix is done by using the InnerIterator class as described in \link TutorialSparse the Tutorial Sparse \endlink section</td> </tr> +<tr class="alt"><td colspan="2">Mapping external buffers</td></tr> +<tr class="alt"> +<td> +\code +int outerIndexPtr[cols+1]; +int innerIndices[nnz]; +double values[nnz]; +Map<SparseMatrix<double> > sm1(rows,cols,nnz,outerIndexPtr, // read-write + innerIndices,values); +Map<const SparseMatrix<double> > sm2(...); // read-only +\endcode +</td> +<td>As for dense matrices, class Map<SparseMatrixType> can be used to see external buffers as an %Eigen's SparseMatrix object. </td> +</tr> </table> */ } |