Coord.to.Pointers | R Documentation |
Returns indices and pointers that define a sparse Hessian in compressed format. Inputs are the row and column indices.
Coord.to.Pointers( rows, cols, dims, triangle = TRUE, lower = TRUE, symmetric = FALSE, order = c("column", "row", "triplet"), index1 = TRUE )
rows, cols |
row and column indices of non-zero elements |
dims |
2-element vector for number of rows and columns. |
triangle |
Is input intended to be a triangular (TRUE) or full
(FALSE) matrix. See details for how this argument is interpreted
for different values of |
lower |
If |
symmetric |
If TRUE, and matrix is triangular, then the matrix will be treated as symmetric, with only the triangular elements provided. If matrix is neither triangular nor symmetric, then symmetric=TRUE will probably trigger an error. |
order |
Determines the indexing/compression scheme for the output matrix. Use "triplet" to get row and column indices. Defaults to the same class as M. |
index1 |
TRUE if using 1-based indexing. FALSE for 0-based indexing. |
triangle
and order
have the following interpretation:
Input rows
and cols represent lower
or upper triangle of a matrix. If order="symmetric"
, then
the output list will be for a full, symmetric matrix. Otherwise,
the output list will be for only the lower or upper triangle. Any
elements outside of the specified triangle will trigger an error.
Input rows
and cols represent a full
matrix. If that matrix is not symmetric, then
order=="symmetric"
will trigger an error.
If symmetric=FALSE
and order='triplet'
, the output
list should contain the same row and column indices as the input
list.
A list. See Matrix.to.Pointers (no values are included in return list).
Matrix.to.Pointers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.