Computes matrix- transpose matrix product.
Matrix containing the product of A and BT. (Output)
A — Left operand
matrix or vector. This is an array of rank 1, 2, or 3. It may be real, double,
complex, double complex, or one of the computational sparse matrix derived
types, ?_hbc_sparse. (Input)
Note
that A and B cannot both be ?_hbc_sparse.
B — Right operand
matrix. This is an array of rank 2, or 3. It may be real, double, complex,
double complex, or one of the computational sparse matrix derived types, ?_hbc_sparse. (Input)
Note
that A and B cannot both be ?_hbc_sparse.
If
A has rank three, B must have rank three.
If B has rank three, A must have
rank three.
Computes the product of matrix or vector A and the transpose of matrix B. The results are in a precision and data type that ascends to the most accurate or complex operand.
Rank three operation is defined as follows:
do i = 1, min(size(A,3),
size(B,3))
X(:,:,i) = A(:,:,i)
.xt. B(:,:,i)
end do
.xt. can be used with either dense or sparse matrices. It is MPI capable for dense matrices only.
Dense Matrix Example (operator_ex14.f90)
real(kind(1d0)) :: one=1d0, zero=0d0
real(kind(1d0)) A(n,n), P(n,n), Q(n,n), &
! Compute the singular value decomposition.
! Compute the (left) orthogonal factor.
! Compute the (right) self-adjoint factor.
Q = V_D .x. diag(S_D) .xt. V_D
if (norm( EYE(n) - (P .xt. P)) &
if (norm(A - (P .x. Q))/norm(A) &
write (*,*) 'Example 2 for LIN_SOL_SVD (operators) is correct.'
real (kind(1.e0)) x(N,N), y(N,N), a(N,N)
if (err <= sqrt(epsilon(one))) then
write (*,*) 'Sparse example for .xt. operator is correct.'
Sparse example for .xt. operator is correct.
A “Polar Decomposition” of several matrices are computed. The box data type and the SVD() function are used. Orthogonality and small residuals are checked to verify that the results are correct.
! This is the equivalent of Parallel Example 15 using operators and,
! functions for a polar decomposition.
integer, parameter :: n=33, nr=3
real(kind(1d0)) :: one=1d0, zero=0d0
real(kind(1d0)),dimension(n,n,nr) :: A, P, Q, &
real(kind(1d0)) TEMP1(nr), TEMP2(nr)
! Compute the singular value decomposition.
! Compute the (left) orthogonal factor.
! Compute the (right) self-adjoint factor.
Q = V_D .x. diag(S_D) .xt. V_D
! Check the results for orthogonality and
TEMP1 = NORM(spread(EYE(n),3,nr) - (p .xt. p))
TEMP2 = NORM(A -(P .X. Q)) / NORM(A)
if (ALL(TEMP1 <= sqrt(epsilon(one))) .and. &
ALL(TEMP2 <= sqrt(epsilon(one)))) then
write (*,*) 'Parallel Example 15 is correct.'
! See to any error messages and exit MPI.
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |