inverse_sum_matrices: Calculate the inverse of a sum of matrices

View source: R/RcppExports.R

inverse_sum_matricesR Documentation

Calculate the inverse of a sum of matrices

Description

Calculation of the inverse of a sum of a list of matrices

Usage

inverse_sum_matrices(matrices)

Arguments

matrices

list of matrices (of same dimension)

Value

the inverse of the sum of the matrices

Examples

m1 <- matrix(c(1,2,3,4), nrow = 2, ncol = 2)
m2 <- matrix(c(5,6,7,8), nrow = 2, ncol = 2)
m3 <- matrix(c(9,10,11,12), nrow = 2, ncol = 2)
inverse_sum_matrices(list(m1, m2, m3))
# returns the same as using solve() in R
solve(m1+m2+m3)

rchan26/hierarchicalFusion documentation built on Sept. 11, 2022, 10:30 p.m.