block_index {lintools}R Documentation

Find independent blocks of equations.

Description

Find independent blocks of equations.

Usage

block_index(A, eps = 1e-08)

Arguments

A

[numeric] Matrix

eps

[numeric] Coefficients with absolute value < eps are treated as zero.

Value

A list containing numeric vectors, each vector indexing an independent block of rows in the system Ax <= b.

Examples


 A <- matrix(c(
   1,0,2,0,0,
   3,0,4,0,0,
   0,5,0,6,7,
   0,8,0,0,9
 ),byrow=TRUE,nrow=4)
 b <- rep(0,4)
 bi <- block_index(A)
 lapply(bi,function(ii) compact(A[ii,,drop=FALSE],b=b[ii])$A)



[Package lintools version 0.1.7 Index]