mat2coo {rexpokit} | R Documentation |
Convert matrix to COO format using SparseM function
Description
Converts a matrix to COO format using the SparseM
function, presumably this is faster than using a
for-loop.
Usage
mat2coo(tmpmat)
Arguments
tmpmat |
A square matrix |
Details
EXPOKIT
's dmexp
-type functions deal with
sparse matrices. These have a lot of zeros, and thus can
be compressed into COO (coordinated list) format, which
is described here:
https://en.wikipedia.org/wiki/Sparse_matrix#Coordinate_list_.28COO.29
In EXPOKIT
and its wrapper functions, a
COO-formated matrix is input as 3 vectors (first two
integer, the third double):
ia = row number
ja = column number
a = value of
that cell in the matrix (skipping 0 cells)
Value
tmpmat_in_REXPOKIT_coo_fmt A cbind
of ia
,
ja
, and a
Author(s)
Nicholas J. Matzke nickmatzke.ncse@gmail.com
See Also
Examples
# Example use:
[Package rexpokit version 0.26.6.14 Index]