Inv {lazy.symbolic} | R Documentation |
Matrix Inversion
Description
Matrix Inversion by Sweep or Gaussian Elimination
Usage
Inv(A, loc = 1:nrow(A), method = "Sweep", ...)
Arguments
A |
A square matrix |
loc |
vector of pivot locations |
method |
"Sweep" or "GE" |
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. |
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 semi symbolic character matrix, matSweep
function
or invGE
function in lazy.symbolic package will be used
with the following parameters
A, loc, simplify, debug
.
If A
is a semi symbolic character matrix,
if method="Sweep"
, matSweep
will be used. (Sweep Operator)
if method="Ge"
, invGE
will be used. (Gaussian Elimination)
Examples
# numeric A
An=demomat(2,2)
Inv(An)
# character A
A=demomat(2,2, root="a")
Inv(A)
# # by Gaussian Elimination
# Inv(A, method="GE" )
# character A as a partitioned matrix
Ap=demomat(2,2, root="A", fullsymb=1)
Inv(Ap)