Using Operators and Generic Functions

For users who are primarily interested in easy-to-use software for numerical linear algebra, see Chapter 10, “Linear Algebra Operators and Generic Functions. This compact notation for writing Fortran 90 programs, when it applies, results in code that is easier to read and maintain than traditional subprogram usage.

Users may begin their code development using operators and generic functions. If a more efficient executable code is required, a user may need to switch to equivalent subroutine calls using IMSL Fortran Numerical Library routines.

Table B contain lists of the defined operators and some of their generic functions.

Defined Array Operation

Matrix Operation

A .x. B

.i. A

.t. A, .h. A

A .ix. B

B .xi. A

A .tx. B, or (.t. A) .x. B

A .hx. B, or (.h. A) .x. B

B .xt. A, or B .x. (.t. A)

B .xh. A, or B .x. (.h. A)

S=SVD(A [,U=U, V=V])

E=EIG(A [[,B=B, D=D], V=V, W=W])

(AV = VE), AVD = BVE, (AW = WE), AWD = BWE

R=CHOL(A)

Q=ORTH(A [,R=R])

U=UNIT(A)

F=DET(A)

det(A) = determinant

K=RANK(A)

rank(A) = rank

P=NORM(A[,[type=]i])

C=COND(A)

Z=EYE(N)

A=DIAG(X)

X=DIAGONALS(A)

W=FFT(Z); Z=IFFT(W)

Discrete Fourier Transform, Inverse

A=RAND(A)

random numbers, 0 < A < 1

L=isNaN(A)

test for NaN, if (l) then¼

Table B.1 – Defined Operators and Generic Functions for Dense Arrays

Defined Operation

Matrix Operation

Data Management

Define entries of sparse matrices

A .x. B

.t. A, .h. A

A .ix. B

B .xi. A

A .tx. B, or (.t. A) .x. B

A .hx. B, or (.h. A) .x. B

B .xt. A, or B .x. (.t. A)

B .xh. A, or B .x. (.h. A)

A+B

Sum of two sparse matrices

C=COND(A)

Table B.2 – Defined Operators and Generic Functions for Harwell-Boeing Sparse Matrices


Visual Numerics, Inc.
Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260