XLPack 6.1
Excel VBA Numerical Library Reference Manual
Loading...
Searching...
No Matches

◆ Zher2k()

Sub Zher2k ( Uplo As  String,
Trans As  String,
N As  Long,
K As  Long,
Alpha As  Complex,
A() As  Complex,
B() As  Complex,
Beta As  Double,
C() As  Complex,
Optional Info As  Long 
)

Rank 2k operation: C <- αABH + conjg(α)BAH + βC or C <- αAHB + conjg(α)BHA + βC (Hermitian matrices) (BLAS 3)

Purpose
This routine performs one of the Hermitian rank 2k operations
C <- αAB^H + conjg(α)BA^H + βC or C <- αA^HB + conjg(α)B^HA + βC
where α and β are scalars with β real, C is an n x n Hermitian matrix and A and B are n x k matrices in the first case and k x n matrices in the second case.
Parameters
[in]UploSpecifies whether the upper or lower triangular part of the array C() is to be referenced as follows:
= "U": Only the upper triangular part of C() is to be referenced.
= "L": Only the lower triangular part of C() is to be referenced.
[in]TransSpecifies the operation to be performed as follows:
= "N": C <- αAB^H + conjg(α)BA^H + βC.
= "C": C <- αA^HB + conjg(α)B^HA + βC.
[in]NOrder of the matrix C. (N >= 0) (If N = 0, returns without computation)
[in]KNumber of columns of the matrix A when trans = "N", and number of rows of the matrix A when trans = "C". (K >= 0)
[in]AlphaScalar α.
[in]A()Array A(LA1 - 1, LA2 - 1) (LA1 >= N, LA2 >= K (if Trans="N"), LA1 >= K, LA2 >= N (otherwise))
N x K matrix A when Trans = "N", or K x N matrix A otherwise.
[in]B()Array B(LB1 - 1, LB2 - 1) (LB1 >= N, LB2 >= K (if Trans="N"), LB1 >= K, LB2 >= N (otherwise))
N x K matrix B when Trans = "N", or K x N matrix B otherwise.
[in]BetaScalar β.
[in,out]C()Array C(LC1 - 1, LC2 - 1) (LC1 >= N, LC2 >= N)
[in] N x N Hermitian matrix C. Only the upper or lower triangular part is to be referenced in accordance with Uplo. The imaginary parts of the diagonal elements need not be set and are assumed to be zero.
[out] αAB^H + conjg(α)BA^H + βC (if Trans = "N") or αA^HB + conjg(α)B^HA + βC (otherwise). Only the upper or lower triangular part is overwritten in accordance with Uplo.
[out]Info(Optional)
= 0: Successful exit.
= -1: The argument Uplo had an illegal value. (Uplo <> "U" nor "L")
= -2: The argument Trans had an illegal value. (Trans <> "N" nor "C")
= -3: The argument N had an illegal value. (N < 0)
= -4: The argument K had an illegal value. (K < 0)
= -6: The argument A() is invalid.
= -7: The argument B() is invalid.
= -9: The argument C() is invalid.
Reference
BLAS