subroutine mfsd
purpose
factor a given symmetric positive definite matrix
usage
call mfsd(a,n,eps,ier)
description of parameters
a - upper triangular part of the given symmetric
positive definite n by n coefficient matrix.
on return a contains the resultant upper
triangular matrix.
n - the number of rows (columns) in given matrix.
eps - an input constant which is used as relative
tolerance for test on loss of significance.
ier - resulting error parameter coded as follows
ier=0 - no error
ier=-1 - no result because of wrong input parame-
ter n or because some radicand is non-
positive (matrix a is not positive
definite, possibly due to loss of signi-
ficance)
ier=k - warning which indicates loss of signifi-
cance. the radicand formed at factoriza-
tion step k+1 was still positive but no
longer greater than abs(eps*a(k+1,k+1)).
remarks
the upper triangular part of given matrix is assumed to be
stored columnwise in n*(n+1)/2 successive storage locations.
in the same storage locations the resulting upper triangu-
lar matrix is stored columnwise too.
the procedure gives results if n is greater than 0 and all
calculated radicands are positive.
the product of returned diagonal terms is equal to the
square-root of the determinant of the given matrix.
subroutines and function subprograms required
none
method
solution is done using the square-root method of cholesky.
the given matrix is represented as product of two triangular
matrices, where the left hand factor is the transpose of
the returned right hand factor. |