facmul.lu.Hermitian(x, factor, y, transpose = F, left = T)
"lu.Hermitian"
.
left = T
) or
number of columns (
left = F
) in the matrix underlying
x
, so that either
the factor itself (
transpose = F
) or its transpose
(
transpose = T
) are returned when
y
is missing.
y
or on the right. The default is multiplication on the left.
The triangular and block-diagonal factors for a symmetric indefinite decomposition from Lapack (Anderson et al., 1992) are stored in a single array the size of the underlying matrix. This functions allows these, as well as the row permutation of the original matrix that was used to form the factorization, to be applied separately without their explicit formation.
Anderson, E., et al. (1994). LAPACK User's Guide, 2nd edition, SIAM, Philadelphia.
x <- Matrix( rnorm(81), nrow = 9, ncol = 9) x[row(x) > col(x)] <- t(x)[row(x) > col(x)] # form symmetric matrix class(x) <- Matrix.class(x) z <- lu(x) # symmetric-indefinite factorization of x prod1 <- facmul(z,"T",facmul(z,"B", facmul(z,"T",transpose = T))) prod2 <- facmul(z,"P",facmul(z,"P",x,transpose = T,left=F)) max(abs(prod1 - prod2)) # test product T B t(T) == P x t(P)