Author(s): W. Hart | Library: KERNLIB |
Submitter: | Submitted: 01.01.1975 |
Language: Fortran | Revised: 12.12.1986 |
At CERN, matrices are often stored row-wise (TC-convention); furthermore, symmetric matrices are stored packed as the lower left triangular part only, i.e., the Ith diagonal element is found in position I(I+1)/2. The TR-package performs many of the frequently required operations associated with such matrices without resorting to expanding into the unpacked square form. In all the following routines an symmetric matrix is taken to be stored in the packed form with M(M+1)/2 elements.
Some of these operations produce and require the manipulation of lower triangular matrices which have all elements zero above the leading diagonal. These are also stored in the packed form with all the zeros dropped; therefore, care has to be taken in the interpretation of a packed matrix as to whether it represents a symmetric or lower triangular array. To facilitate this distinction in the Write-up, the following nomenclature has been adopted:
Structure:
SUBROUTINE subprograms
User Entry Names:
TRCHUL, | TRCHLU, | TRSMUL, | TRSMLU, | TRINV, | TRSINV, | TRLA, | TRLTA, |
TRAL, | TRALT, | TRSA, | TRAS, | TRSAT, | TRATS, | TRAAT, | TRATA, |
TRASAT, | TRATSA, | TRQSQ, | TRPCK, | TRUPCK |
Usage:
Choleski Decomposition
CALL TRCHUL(S,W,M) | |||
CALL TRCHLU(S,V,M) |
Symmetric Multiplication of Lower Triangular Matrices
CALL TRSMUL(W,S,M) | S | ||||
CALL TRSMLU(W,R,M) | R |
Lower Triangular Matrix Inversion
CALL TRINV(W,V,M) | V |
Symmetric Matrix Inversion
CALL TRSINV(S,R,M) | R |
Triangular - Rectangular Multiplication
CALL TRLA (W,A,B,M,N) | B | ||||
CALL TRLTA(W,A,B,M,N) | B | ||||
CALL TRAL (A,V,B,M,N) | AV | B | |||
CALL TRALT(A,V,B,M,N) | B |
Symmetric - Rectangular Multiplication
CALL TRSA (S,A,C,M,N) | SA | C | |||
CALL TRAS (A,R,C,M,N) | AR | C | |||
CALL TRSAT(S,B,C,M,N) | C | ||||
CALL TRATS(B,R,C,M,N) | C |
Symmetric Multiplication of Rectangular Matrices
CALL TRAAT(A,S,M,N) | S | ||||
CALL TRATA(B,R,M,N) | R |
Transformation of Symmetric Matrix
CALL TRASAT(A,S,R,M,N) | R | ||||
CALL TRATSA(B,S,R,M,N) | R | ||||
CALL TRQSQ (Q,T,R,M) | QTQ | R |
Packing and Unpacking a Symmetric Matrix
CALL TRPCK (A,S,M) | A | S | |||
CALL TRUPCK(S,A,M) | S | A |