Inv {lazy.symbolic} | R Documentation |
Matrix Inversion by Sweep Operator
Inv(
A,
loc = 1:nrow(A),
simplify = 2,
eps = 1e-08,
nopermute = 0,
chkginv = 0,
history = 0,
debug = 0
)
A |
A square matrix |
loc |
vector of pivot locations |
simplify |
= 0 not to use Simplify nor remove_paren |
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. |
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
.
# 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)