solve.LowerTriangular(a, b, tol=0, transpose=F, left=T, scale.b=1) solve.UpperTriangular(a, b, tol=0, transpose=F, left=T, scale.b=1) solve.UnitLowerTriangular(a, b, tol=0, transpose=F, left=T, scale.b=1) solve.UnitUpperTriangular(a, b, tol=0, transpose=F, left=T, scale.b=1)
"Matrix"
and one of
"LowerTriangular"
,
"UpperTriangular"
,
"UnitLowerTriangular"
, or
"UnitUpperTriangular"
.
b
must equal the dimension of
a
.
tol
is negative, no
condition estimation is done. Otherwise, the reciprocal infinity norm condition
estimate is computed and the solve or inverse computation is done only if
the condition estimate is greater than
tol
. By default,
tol = 0
.
a
is to be used in the solve or inverse operation.
The default is to use the untransposed matrix.
a
appears
on the left of the solution in the set of linear equations to be solved.
The default assumes that
a
appears to the left of the solution.
This argument is ignored when
b
is missing.
b
. The default is
scale.b = 1
,
so that
b
is unscaled.
"Matrix"
that is the solution
x
to the system of
equations a %*% x = scale.b * b if
b
is present and otherwise the inverse
of
a
.
Attributes include a copy of the call to
solve
,
and the one norm reciprocal condition estimate if
tol
is nonnegative.
Based on the functions dtrcon, dtrtrf, dtrtri, ztrcon, ztrtrf, and ztrtri from LAPACK (Anderson et al. 1994).
Anderson, E., et al. (1994). LAPACK User's Guide, 2nd edition, SIAM, Philadelphia.
n <- 5 a <- Matrix( rnorm(n*n), n, n) a[row(a) < col(a)] <- 0 # form lower triangular matrix class(a) <- Matrix.class(x) b <- rnorm(n) a %*% solve(a,b) - b # residual solve(a) %*% a # should be identity