Using Library Subprograms
Each routine in the IMSL Library has a generic root name that abbreviates
its function. For example, the name rand_gen is the suffix for the
routine that generates a Fortran 90 rank-1 array of random numbers.
The routine name has the prefix of the data type for the routine.
These separate parts of the name are joined with the underscore
character "_." Thus, the full prefix and suffix joined together
form the complete name of the single-precision version of the random
number generator s_rand_gen. A generic name also is supported, in
this case, rand_gen. In most cases, the strings "s_," "d_," "c_"
or "z_" can be deleted. The documentation for the routines omits
the prefix, and the entire suite of routines for that subject is
documented.
Examples that appear in the documentation use the generic name.
To further illustrate this principle, note the lin_sol_gen documentation
page 1 for solving general
systems of linear algebraic equations. A description is provided
for just one data type. There are four documented routines in this
subject area: s_lin_sol_gen, d_lin_sol_gen, c_lin_sol_gen and z_lin_sol_gen.
Generic Name
and Suffix
|
Single-Precision Prefix
|
Double-Precision Prefix
|
Complex Single Prefix
|
Complex Double Prefix
|
|
lin_sol_gen
|
s_
|
d_
|
c_
|
z_
|
|
lin_sol_self
|
s_
|
d_
|
c_
|
z_
|
|
lin_sol_lsq
|
s_
|
d_
|
c_
|
z_
|
|
lin_sol_svd
|
s_
|
d_
|
c_
|
z_
|
|
lin_sol_tri
|
s_
|
d_
|
c_
|
z_
|
|
lin_svd
|
s_
|
d_
|
c_
|
z_
|
|
lin_eig_self
|
s_
|
d_
|
c_
|
z_
|
lin_eig_gen
|
s_
|
d_
|
c_
|
z_
|
|
lin_geig_gen
|
s_
|
d_
|
c_
|
z_
|
|
rand_gen
|
s_
|
d_
|
(None)
|
(None)
|
|
sort_real
|
s_
|
d_
|
(None)
|
(None)
|
|
spline_fitting
|
s_
|
d_
|
(None)
|
(None)
|
|
surface_fitting
|
s_
|
d_
|
(None)
|
(None)
|
fast_dft†
|
(None)
|
(None)
|
c_
|
z_
|
|
fast_2dft†
|
(None)
|
(None)
|
c_
|
z_
|
|
fast_2dft†
|
(None)
|
(None)
|
c_
|
z_
|
|
error_post
|
s_
|
d_
|
(None)
|
(None)
|
†Since fast_dft, fast_2dft and fast_3dft have only optional arguments,
either the complex single or complex double prefix is explicitly
required.
The appropriate routine is identified by the Fortran 90 compiler.
These routines constitute single-precision, double-precision, complex
and complex double-precision versions of the code. When dealing
with a complex matrix, all references to the transpose of a matrix
are replaced by the adjoint matrix, where the overstrike denotes
complex conjugation. IMSL MP Library linear algebra software uses
this convention to conserve the utility of generic documentation
for that code subject. References to orthogonal matrices are replaced
by their complex counterparts, unitary matrices. Thus, an n x
n orthogonal matrix Q satisfies the condition
.
An n x n unitary matrix V satisfies the analogous
condition for complex matrices.