matrix.csc-class.RdA class for sparse matrices stored in compressed sparse column ('csc') format.
Objects can be created by calls of the form new("matrix.csc", ...).
ra:Object of class numeric, a real array of nnz elements containing the non-zero
elements of A, stored in column order. Thus, if i<j, all elements
of column i precede elements from column j. The order of elements
within the column is immaterial.
ja:Object of class integer, an integer array of nnz elements containing the row
indices of the elements stored in `ra'.
ia:Object of class integer, an integer array of n+1 elements containing pointers to
the beginning of each column in the arrays `ra' and `ja'. Thus
`ia[i]' indicates the position in the arrays `ra' and `ja'
where the ith column begins. The last, (n+1)st, element of `ia'
indicates where the n+1 column would start, if it existed.
dimension:Object of class integer, dimension of the matrix
signature(x = "matrix.csc"): ...
signature(x = "matrix.csc"): ...
signature(x = "matrix.csc"): ...
signature(x = "matrix.csc"): ...
signature(x = "matrix.csc"): ...
signature(x = "matrix.csc"): ...
signature(x = "matrix.csc"): ...
cscM <- as.matrix.csc(as(diag(4:1), "matrix.csr"))
cscM
#> Sparse matrix of class "matrix.csc" {use 'str(.)' to see the inner structure}:
#> [,1] [,2] [,3] [,4]
#> [1,] 4 . . .
#> [2,] . 3 . .
#> [3,] . . 2 .
#> [4,] . . . 1
str(cscM)
#> Formal class 'matrix.csc' [package "SparseM"] with 4 slots
#> ..@ ra : num [1:4] 4 3 2 1
#> ..@ ja : int [1:4] 1 2 3 4
#> ..@ ia : int [1:5] 1 2 3 4 5
#> ..@ dimension: int [1:2] 4 4
stopifnot(identical(dim(cscM), c(4L, 4L)))