Learn R Programming

Matrix (version 0.999375-42)

CsparseMatrix-class: Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form

Description

The "CsparseMatrix" class is the virtual class of all sparse matrices coded in sorted compressed column-oriented form. Since it is a virtual class, no objects may be created from it. See showClass("CsparseMatrix") for its subclasses.

Arguments

Extends

Class "sparseMatrix", directly. Class "Matrix", by class "sparseMatrix".

See Also

colSums, kronecker, and other such methods with own help pages.

Further, the super class of CsparseMatrix, sparseMatrix, and, e.g., class dgCMatrix for the links to other classes.

Examples

Run this code
getClass("CsparseMatrix")

## The common validity check function (based on C code):
getValidity(getClass("CsparseMatrix"))

## This behavior has been changed
# un-sorted i-slot on input is automatically "sorted" :
#M <- new("dgCMatrix", Dim = 2:3, p = as.integer(c(0,1,1,3)),
#         i = c(1L, 1:0), x= c(2,2,1))
#stopifnot(M@i == c(1L, 0:1), M@x == c(2,1,2))

Run the code above in your browser using DataLab