lazyInv: Inverse of lazy matrix

View source: R/lazyMatrices.R

lazyInvR Documentation

Inverse of lazy matrix

Description

Compute the inverse of a lazy matrix.

Usage

lazyInv(M)

Arguments

M

a lazyMatrix object corresponding to a square matrix

Value

A lazyMatrix object.

Note

This function does not check the invertibility. If the matrix is not invertible, you will get some NaN in the result (after calling as.double).

Examples

library(lazyNumbers)
set.seed(666L)
M <- lazymat(matrix(rpois(9L, lambda = 4), nrow = 3L, ncol = 3L))
invM <- lazyInv(M)
I3 <- M %*% invM
as.double(I3) == diag(3)

lazyNumbers documentation built on Nov. 22, 2022, 1:05 a.m.