lu.Matrix(x, norm.comp = T, tune = <see below>)
solve
is going to eventually be applied to the factorization with condition
estimation. The infinity norm is needed for solves involving the underlying
matrix, and the one norm is needed for solves involving its transpose.
NB
as described in
.laenv
.
x
is returned as
an object of class
c("lu.Matrix", "decomp")
.
A copy of the call to
lu.Matrix
is included as an attribute,
as well as the one and/or infinity norms of the matrix if requested
(used for condition estimation).
Based on the functions dgetrf and zgetrf from LAPACK (Anderson et al. 1994).
For any square matrix
X
, there is a row permutation
P
,
a lower triangular matrix
L
whose diagonal elements equal 1, and an
upper triangular matrix
U
, such that
P X
=
L U
.
If
X
is not square, a similar factorization exists, with either
L
or
U
trapezoidal rather than triangular.
This product is called an
LU
decomposition of
X
.
The blocksize parameter (NB) in
tune
may affect performance,
but the optimal settings are both machine and problem dependent.
Users may want to experiment with
tune
(see Anderson et al., p. 72-74)
to obtain improved performance.
Anderson, E., et al. (1994). LAPACK User's Guide, 2nd edition, SIAM, Philadelphia.
x <- Matrix(rnorm(25), nrow = 5, ncol = 5) lu.Matrix(x)