Solve and Inverse for Hermitian Matrices

DESCRIPTION:
Either solves a system of linear equations with a real symmetric or complex Hermitian coefficient matrix or else finds the inverse of a real symmetric or complex Hermitian matrix.

USAGE:
solve.Hermitian(a, b, tol=0, lower=T, tune, workspace)

REQUIRED ARGUMENTS:
a:
A real symmetric or complex Hermitian Matrix, inheriting from class "Hermitian".

OPTIONAL ARGUMENTS:
b:
A real or complex matrix or vector. The number of rows in b must equal the dimension of a.
tol:
Tolerance for reciprocal condition estimation. If tol is negative, no condition estimation is done. Otherwise, the reciprocal one/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.
lower:
A logical variable telling whether the lower or upper triangle of the matrix is to be used for the computations. The default is to select the lower triangle.
tune:
a integer vector or list of named tuning parameters that may affect computational efficiency. The relevant parameters are the blocksize parameters NB, NBMIN, and NX as described in .laenv.
workspace:
workspace provided to the underlying software. The default is to use the optimum value relative to the tuning parameters. The optimal workspace for the problem (with the given tuning parameters) is included as part of the output attributes.

VALUE:
An object of class "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, an indicator telling which triangle of the matrix was accessed for the computations, the optimal workspace for the underlying software, and the one/infinity norm reciprocal condition estimate if tol is nonnegative.

DETAILS:
Based on the functions dsycon, dsytrf, dsytri, zhecon, zhetrf, zhetri from LAPACK (Anderson et al. 1994).

REFERENCES:
Anderson, E., et al. (1994). LAPACK User's Guide, 2nd edition, SIAM, Philadelphia.

SEE ALSO:
rcond.Hermitian , solve , solve.lu.Hermitian , solve.eigen.Hermitian , solve.Matrix .

EXAMPLES:
 n <- 5
 a <- Matrix( rnorm(n*n), nrow = n, ncol = n)
 a[row(a) > col(a)] <- t(a)[row(a) > col(a)]  # construct symmetric matrix
 class(a) <- Matrix.class(x)
 b <- rnorm(n)
 a %*% solve(a,b) - b                         # residual
(solve(a) %*% b) - solve(a,b)