Matrix.to.Coord: Row and column indices from sparse matrix.
Description
Utility function to extract row and column indices of
the non-zero
elements of a sparse matrix.
Usage
Matrix.to.Coord(M, index1 = TRUE)
Value
A list with two named elements.
rows
Integer vector containing row indices of non-zero elements
cols
Integer vector containing column indices of non-zero elements
Arguments
M
A matrix that is a subclass of sparseMatrix, as defined in
the Matrix package.
index1
TRUE if the index of the first element should be 1,
and FALSE if 0.
Details
A wrapper to Matrix.to.Pointers for order='triplet'
and values=FALSE, for extracting the row and column indices
of a sparsity pattern from a matrix that has that same pattern.