zzz_mat2coo: Convert matrix to COO format using SparseM function

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Converts a matrix to COO format using the SparseM function, presumably this is faster than using a for-loop.

Usage

1
  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:

http://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 [email protected]

See Also

mat2coo_forloop

Examples

1
# Example use:

Example output



rexpokit documentation built on Aug. 16, 2017, 1:04 a.m.