A class for sparse matrices stored in symmetric sparse row ('ssr') format.

Objects from the Class

Objects can be created by calls of the form new("matrix.ssr", ...).

Slots

ra:

Object of class numeric, a real array of nnz elements containing the non-zero elements of the lower triangular part of A, stored in row order. Thus, if i<j, all elements of row i precede elements from row j. The order of elements within the rows is immaterial.

ja:

Object of class integer, an integer array of nnz elements containing the column 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 row in the arrays `ra' and `ja'. Thus `ia[i]' indicates the position in the arrays `ra' and `ja' where the ith row begins. The last, (n+1)st, element of `ia' indicates where the n+1 row would start, if it existed.

dimension:

Object of class integer, dimension of the matrix

Methods

as.matrix.csc

signature(x = "matrix.ssr"): ...

as.matrix.csr

signature(x = "matrix.ssr"): ...

as.matrix.ssr

signature(x = "matrix.ssr"): ...

as.matrix

signature(x = "matrix.ssr"): ...

dim

signature(x = "matrix.ssr"): ...

See also

Examples

  ssr <- as.matrix.ssr(diag(c(2,3,5,7)))
  ssr
#> Sparse matrix of class "matrix.ssr" {use 'str(.)' to see the inner structure}:
#>      [,1] [,2] [,3] [,4]
#> [1,]    2    .    .    .
#> [2,]    .    3    .    .
#> [3,]    .    .    5    .
#> [4,]    .    .    .    7