Function

# cblas_zhpr2(_:_:_:_:_:_:_:_:_:)

Multiplies a vector times the conjugate transpose of a second vector and vice-versa, sums the results, and adds a matrix.

## Parameters

`Order`

Specifies row-major (C) or column-major (Fortran) data ordering.

`Uplo`

Specifies whether to use the upper or lower triangle from the matrix. Valid values are `'U'` or `'L'`.

`N`

Order of matrix `A` and the number of elements in vectors `x` and `y`.

`alpha`

Scaling factor that vector `x` is multiplied by.

`X`

Vector `x`.

`incX`

Stride within `X`. For example, if `incX` is 7, every 7th element is used.

`Y`

Vector `y`.

`incY`

Stride within `Y`. For example, if `incY` is 7, every 7th element is used.

`Ap`

Matrix `A` in packed storage format. Overwritten by the results on return.

## Discussion

Calcuates `alpha*x*conjg(y') + conjg(alpha)*y*conjg(x') + A`, and stores the result in `A`.

## See Also

### Double-Precision Complex Matrix Functions

`func cblas_dzasum(Int32, UnsafeRawPointer!, Int32) -> Double`

Computes the sum of the absolute values of real and imaginary parts of elements in a vector (single-precision complex).

`func cblas_dznrm2(Int32, UnsafeRawPointer!, Int32) -> Double`

Computes the unitary norm of a vector (double-precision complex).

`func cblas_zdscal(Int32, Double, UnsafeMutableRawPointer!, Int32)`

Multiplies each element of a vector by a constant (double-precision complex).

`func cblas_zher(CBLAS_ORDER, CBLAS_UPLO, Int32, Double, UnsafeRawPointer!, Int32, UnsafeMutableRawPointer!, Int32)`

Adds the product of a scaling factor, vector `X`, and the conjugate transpose of `X` to matrix `A`.

`func cblas_zher2(CBLAS_ORDER, CBLAS_UPLO, Int32, UnsafeRawPointer!, UnsafeRawPointer!, Int32, UnsafeRawPointer!, Int32, UnsafeMutableRawPointer!, Int32)`

Hermitian rank 2 update: adds the product of a scaling factor, vector `X`, and the conjugate transpose of vector `Y` to the product of the conjugate of the scaling factor, vector `Y`, and the conjugate transpose of vector `X`, and adds the result to matrix `A`.

`func cblas_zhpr(CBLAS_ORDER, CBLAS_UPLO, Int32, Double, UnsafeRawPointer!, Int32, UnsafeMutableRawPointer!)`

Scales and multiplies a vector times its conjugate transpose, then adds a matrix.

`func cblas_zscal(Int32, UnsafeRawPointer!, UnsafeMutableRawPointer!, Int32)`

Multiplies each element of a vector by a constant (double-precision complex).