Computes transpose matrix-matrix or transpose matrix-vector product.
Matrix containing the product of AT and B. (Output)
A — Left 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.
B — Right 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.
If
A has rank three, B must have rank three.
If B has rank three, A must have
rank three.
Computes the product of the transpose of matrix A and matrix or vector 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) .tx. B(:,:,i)
end do
.tx. can be used with either dense or sparse matrices. It is MPI capable for dense matrices only.
Dense Matrix Example (operator_ex05.f90)
! This is the equivalent of Example 1 for LIN_SOL_SELF using
operators
! and functions.
integer, parameter :: m=64, n=32
real(kind(1e0)) :: one=1.0e0, err
real(kind(1e0)) A(n,n), b(n,n), C(m,n), d(m,n), x(n,n)
! Generate two rectangular random matrices.
! Form the normal equations for the rectangular system.
! Compute the solution for Ax = b, A is symmetric.
err = norm(b - (A .x. x))/(norm(A)+norm(b))
if (err <= sqrt(epsilon(one))) then
write (*,*) 'Example 1 for LIN_SOL_SELF (operators) is correct.'
real (kind(1.e0)) x(N,N), y(N,N), B(N,N)
if (err <= sqrt(epsilon(one))) then
write (*,*) 'Sparse example for .tx. operator is correct.'
Sparse example for .tx. operator is correct.
! This is the equivalent of Parallel Example 5 using box data
types,
! operators and functions.
integer, parameter :: m=64, n=32, nr=4
real(kind(1e0)) :: one=1e0, err(nr)
real(kind(1e0)), dimension(n,n,nr) :: A, b, x
real(kind(1e0)), dimension(m,n,nr) :: C, d
! Generate two rectangular random matrices, only
! Form the normal equations for the rectangular system.
! Compute the solution for Ax = b.
err = norm(b - (A .x. x))/(norm(A)+norm(b))
if (ALL(err <= sqrt(epsilon(one))) .AND. MP_RANK == 0) &
write (*,*) 'Parallel Example 5 is correct.'
! See to any error messages and quit MPI.
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |