Inv {lazy.symbolic}R Documentation

Matrix Inversion by Sweep Operator

Description

Matrix Inversion by Sweep Operator

Usage

Inv(
  A,
  loc = 1:nrow(A),
  simplify = 2,
  eps = 1e-08,
  nopermute = 0,
  chkginv = 0,
  history = 0,
  debug = 0
)

Arguments

A

A square matrix

loc

vector of pivot locations

simplify

= 0 not to use Simplify nor remove_paren
= 1 to use Simplify

eps

small value to check if the pivot is 0.

nopermute

=1 to avoid permuting rows/cols when inverting A.

chkginv

= 1 to check if the resulting g-inverse is genuin.

history

= 1 to return the permutation matrix D

debug

= 1 to print intermediate result.

Details

If A is a numeric matrix, matSwp function in lazy.mat package will be used with the following parameters:
A, loc, eps, nopermute, chkginv, history, debug. If A is a character matrix, matSweep function in lazy.symbolic package will be used with the following parameters
A, loc, simplify, debug.

Examples

# numeric A
An=demomat(2,2)
Inv(An)

# character A
A=demomat(2,2, root="a")
Inv(A)

# character A as a partitioned matrix
Ap=demomat(2,2, root="A", fullsymb=1)
Inv(Ap)


[Package lazy.symbolic version 0.1.3 Index]