Computes the transpose of a matrix.
Matrix containing the transpose of A. (Output)
A — Matrix for which the transpose is to be computed. This is a real, double, complex, double complex, or one of the computational sparse matrix derived types, ?_hbc_sparse. (Input).
Computes the transpose of matrix A. The operation may be read transpose, and the results are the mathematical objects in a precision and data type that matches the operand. Since this is a unary operation, it has higher Fortran 90 precedence than any other intrinsic unary array operation.
.t. can be used with either dense or sparse matrices.
Dense Matrix Example (operator_ex07.f90)
! This is the equivalent of Example 3 (using operators) for LIN_SOL_SELF.
integer, parameter :: m=8, n=4, k=2
real(kind(1d0)) :: one=1.0d0, err
real(kind(1d0)) a(n,n), b(n,1), c(m,n), x(n,1), &
! Generate a random rectangular matrix.
! Generate a random right hand side for use in the inverse
! Compute the positive definite matrix.
! Obtain just the eigenvalues.
! Use packaged option to reset the value of a small diagonal.
iopti(1) = d_options(d_lin_sol_self_set_small,&
! Use packaged option to save the factorization.
iopti(2) = d_lin_sol_self_save_factors
! Suppress error messages and stopping due to singularity
! of the matrix, which is expected.
iopti(3) = d_lin_sol_self_no_sing_mess
! Compute A-eigenvalue*I as the coefficient matrix.
! When code is re-entered, the already computed factorization
iopti(4) = d_lin_sol_self_solve_A
! Reset right-hand side in the direction of the eigenvector.
err = dot_product(x(1:n,1), b(1:n,1)) - e(k)
! If any result is not accurate, quit with no printing.
if (abs(err) <= sqrt(epsilon(one))*E(1)) then
write (*,*) 'Example 3 for LIN_SOL_SELF (operators) is correct.'
real (kind(1.e0)) X(3,3), XT(3,3)
XT = HT ! dense equivalent of HT
call wrrrn ( 'H Transpose', XT)
if (err <= sqrt(epsilon(one))) then
write (*,*) 'Sparse example for .t. operator is correct.'
Sparse example for .t. operator is correct.
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |