mat2coo_forloop {rexpokit} | R Documentation |
Convert matrix to COO format using nested for-loops
Description
Converts a matrix to COO format. This version of the
function uses for-loops, which is presumably less
efficient than mat2coo
.
Usage
mat2coo_forloop(tmpmat)
Arguments
tmpmat |
A square matrix |
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:
# Make a Q matrix
tmpmat = matrix(c(-1.218, 0.504, 0.336, 0.378, 0.126, -0.882, 0.252, 0.504, 0.168,
0.504, -1.05, 0.378, 0.126, 0.672, 0.252, -1.05), nrow=4, byrow=TRUE)
# Convert to REXPOKIT coo format
tmpmat_in_REXPOKIT_coo_fmt = mat2coo_forloop(tmpmat)
tmpmat_in_REXPOKIT_coo_fmt
[Package rexpokit version 0.26.6.14 Index]