csr-linalg: Linear Algebra functions for CSR matrices

csr-linalgR Documentation

Linear Algebra functions for CSR matrices

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

## 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 May 29, 2024, 2:53 a.m.