mat2coo | R Documentation |
Converts a matrix to COO format using the SparseM
function, presumably this is faster than using a
for-loop.
mat2coo(tmpmat)
tmpmat |
A square matrix |
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)
tmpmat_in_REXPOKIT_coo_fmt A cbind
of ia
,
ja
, and a
Nicholas J. Matzke nickmatzke.ncse@gmail.com
mat2coo_forloop
# Example use:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.