MUCBV

Multiplies a complex band matrix in band storage mode by a complex vector.

Required Arguments

A — Complex NLCA + NUCA + 1 by N band matrix stored in band mode.   (Input)

NLCA — Number of lower codiagonals in A.   (Input)

NUCA — Number of upper codiagonals in A.   (Input)

X — Complex vector of length NX.   (Input)

Y — Complex vector of length NY containing the product A * X if IPATH is equal to 1 and the product trans(A) * X if IPATH is equal to 2.   (Output)

Optional Arguments

N — Order of the matrix.   (Input)
Default: N = size (A,2).

LDA — Leading dimension of A exactly as specified in the dimension statement of the calling program.   (Input)
Default: LDA = size (A,1).

NX — Length of the vector X.   (Input)
NX must be equal to N.
Default: NX = size (X,1).

IPATH — Integer flag.   (Input)
IPATH = 1 means the product Y = A * X is computed. IPATH = 2 means the product
Y = trans(A) * X is computed, where trans(A) is the transpose of A.
Default: IPATH = 1.

NY — Length of vector Y.   (Input)
NY must be equal to N.
Default: NY = size (Y,1).

FORTRAN 90 Interface

Generic:          CALL MUCBV (A, NLCA, NUCA, X, Y [,…])

Specific:         The specific interface names are S_MUCBV and D_MUCBV.

FORTRAN 77 Interface

Single:            CALL MUCBV (N, A, LDA, NLCA, NUCA, NX, X, IPATH, NY, Y)

Double:          The double precision name is DMUCBV.

Description

If IPATH = 1, MUCBV computes y = Ax, where A is a complex band matrix and x and y are complex vectors. If IPATH = 2, MUCBV computes y = ATx.

Example

Multiply the transpose of a complex band matrix of order 4, with one upper codiagonal and two lower codiagonals stored in band mode, by a complex vector of length 3. The output vector will be a complex vector of length 3.

 

      USE MUCBV_INT

      USE WRCRN_INT

 

      IMPLICIT   NONE

!                                 Declare variables

      INTEGER    LDA, N, NLCA, NUCA, NX, NY

      PARAMETER  (LDA=4, N=4, NLCA=2, NUCA=1, NX=4, NY=4)

!

      INTEGER    IPATH

      COMPLEX    A(LDA,N), X(NX), Y(NY)

!                                   Set values for A (in band mode)

!            A = (  0.0+ 0.0i   1.0+ 2.0i   3.0+ 4.0i   5.0+ 6.0i )

!                ( -1.0- 1.0i  -1.0- 1.0i  -1.0- 1.0i  -1.0- 1.0i )

!                ( -1.0+ 2.0i  -1.0+ 3.0i  -2.0+ 1.0i   0.0+ 0.0i )

!                (  2.0+ 0.0i   0.0+ 2.0i   0.0+ 0.0i   0.0+ 0.0i )

!

!                                  Set values for X

!            X = ( 3.0 + 4.0i  0.0 + 0.0i  1.0 + 2.0i  -2.0 - 1.0i )

!

      DATA A/(0.0,0.0), (-1.0,-1.0), (-1.0,2.0), (2.0,0.0), (1.0,2.0), &

          (-1.0,-1.0), (-1.0,3.0), (0.0,2.0), (3.0,4.0), (-1.0,-1.0), &

          (-2.0,1.0), (0.0,0.0), (5.0,6.0), (-1.0,-1.0), (0.0,0.0), &

          (0.0,0.0)/

      DATA X/(3.0,4.0), (0.0,0.0), (1.0,2.0), (-2.0,-1.0)/

!                                 Compute y = Ax

      IPATH = 2

      CALL MUCBV (A, NLCA, NUCA, X, Y, IPATH=IPATH)

!                                 Print results

      CALL WRCRN ('y = Ax', Y, 1, NY, 1)

      END

Output

 

                             y = Ax
              1                2                3                4
(  3.00, -3.00)  (-10.00,  7.00)  (  6.00, -3.00)  ( -6.00, 19.00)


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