Construct an '>sptensor from a matrix of subscripts for non-zero values,
a vector of non-zero values, and the numeric dimensions of the tensor.
Usage
sptensor(subs, vals, dims)
# S4 method for matrix,ANY,numeric
sptensor(subs, vals, dims)
# S4 method for matrix,missing,numeric
sptensor(subs, vals, dims)
# S4 method for list,ANY,numeric
sptensor(subs, vals, dims)
Arguments
subs
matrix with length(dims) rows and length(vals) cols. Each row
in the matrix corresponds to a different tensor dimension. Each column in the
matrix represents a vector of subscripts pointing to a non-zero value in the
tensor.
vals
values of non-zero entries. The subscripts for the first value
are the first column of the subs matrix, the subscripts for the second value
are in the second column of the subs matrix, etc...