diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-25 14:17:07 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-25 14:17:07 +0100 |
commit | 35f7829af10c61e33dd2e2a7a015058e11a11ea0 (patch) | |
tree | 7135010dcf8fd0a49f3020d52112709bcb883bd6 /eigen/doc/SparseQuickReference.dox | |
parent | 6e8724193e40a932faf9064b664b529e7301c578 (diff) |
update
Diffstat (limited to 'eigen/doc/SparseQuickReference.dox')
-rw-r--r-- | eigen/doc/SparseQuickReference.dox | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/eigen/doc/SparseQuickReference.dox b/eigen/doc/SparseQuickReference.dox index e0a30ed..a25622e 100644 --- a/eigen/doc/SparseQuickReference.dox +++ b/eigen/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> */ } |