csr-linalg: Linear Algebra functions for CSR matrices

Description Usage Arguments Value

Description

Short wrappers around some linear algebra operators from 'Matrix' that take CSC matrices, adapted to work for CSR matrices without involving any data duplication or deep format conversion, thus saving time and memory.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'RsparseMatrix,character'
norm(x, type = "O", ...)

## S4 method for signature 'RsparseMatrix,missing'
norm(x, type = "O", ...)

## S4 method for signature 'RsparseMatrix'
diag(x)

## S4 replacement method for signature 'RsparseMatrix'
diag(x) <- value

Arguments

x

A sparse matrix in CSR format.

type

Type of the norm to calculate (see norm).

...

Extra arguments to pass to 'norm'

value

Replacement value for the matrix diagonal.

Value

The same value that 'Matrix' would return for CSC matrices.


MatrixExtra documentation built on Sept. 26, 2021, 9:06 a.m.