|
| 1 | +/* |
| 2 | +* @license Apache-2.0 |
| 3 | +* |
| 4 | +* Copyright (c) 2026 The Stdlib Authors. |
| 5 | +* |
| 6 | +* Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +* you may not use this file except in compliance with the License. |
| 8 | +* You may obtain a copy of the License at |
| 9 | +* |
| 10 | +* http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +* |
| 12 | +* Unless required by applicable law or agreed to in writing, software |
| 13 | +* distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +* See the License for the specific language governing permissions and |
| 16 | +* limitations under the License. |
| 17 | +*/ |
| 18 | + |
| 19 | +// TypeScript Version: 4.1 |
| 20 | + |
| 21 | +/// <reference types="@stdlib/types"/> |
| 22 | + |
| 23 | +import { Complex128Array } from '@stdlib/types/array'; |
| 24 | +import { Layout, MatrixTriangle } from '@stdlib/types/blas'; |
| 25 | +import { Complex128 } from '@stdlib/types/complex'; |
| 26 | + |
| 27 | +/** |
| 28 | +* Interface describing `zhemv`. |
| 29 | +*/ |
| 30 | +interface Routine { |
| 31 | + /** |
| 32 | + * Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` Hermitian matrix. |
| 33 | + * |
| 34 | + * @param order - storage layout |
| 35 | + * @param uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. |
| 36 | + * @param N - number of elements along each dimension of `A` |
| 37 | + * @param alpha - scalar constant |
| 38 | + * @param A - input matrix |
| 39 | + * @param LDA - stride of the first dimension of `A` |
| 40 | + * @param x - first input vector |
| 41 | + * @param strideX - `x` stride length |
| 42 | + * @param beta - scalar constant |
| 43 | + * @param y - second input vector |
| 44 | + * @param strideY - `y` stride length |
| 45 | + * @returns `y` |
| 46 | + * |
| 47 | + * @example |
| 48 | + * var Complex128Array = require( '@stdlib/array/complex128' ); |
| 49 | + * var Complex128 = require( '@stdlib/complex/float64/ctor' ); |
| 50 | + * |
| 51 | + * var A = new Complex128Array( [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 3.0, -3.0, 5.0, -5.0, 6.0, 0.0 ] ); |
| 52 | + * var x = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); |
| 53 | + * var y = new Complex128Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); |
| 54 | + * var alpha = new Complex128( 0.5, 0.5 ); |
| 55 | + * var beta = new Complex128( 0.5, -0.5 ); |
| 56 | + * |
| 57 | + * zhemv( 'row-major', 'lower', 3, alpha, A, 3, x, 1, beta, y, 1 ); |
| 58 | + * // y => <Complex128Array>[ -10.0, 14.0, -11.0, 25.0, 14.0, 31.0 ] |
| 59 | + */ |
| 60 | + ( order: Layout, uplo: MatrixTriangle, N: number, alpha: Complex128, A: Complex128Array, LDA: number, x: Complex128Array, strideX: number, beta: Complex128, y: Complex128Array, strideY: number ): Complex128Array; |
| 61 | + |
| 62 | + /** |
| 63 | + * Performs the matrix-vector operation `y = α*A*x + β*y`, using alternative indexing semantics and where `α` and `β` are scalars, `x` and `y` are `N` element vectors, and `A` is an `N` by `N` Hermitian matrix. |
| 64 | + * |
| 65 | + * |
| 66 | + * @param uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. |
| 67 | + * @param N - number of elements along each dimension of `A` |
| 68 | + * @param alpha - scalar constant |
| 69 | + * @param A - input matrix |
| 70 | + * @param strideA1 - stride of the first dimension of `A` |
| 71 | + * @param strideA2 - stride of the second dimension of `A` |
| 72 | + * @param offsetA - starting index for `A` |
| 73 | + * @param x - first input vector |
| 74 | + * @param strideX - `x` stride length |
| 75 | + * @param offsetX - starting index for `x` |
| 76 | + * @param beta - scalar constant |
| 77 | + * @param y - second input vector |
| 78 | + * @param strideY - `y` stride length |
| 79 | + * @param offsetY - starting index for `y` |
| 80 | + * @returns `y` |
| 81 | + * |
| 82 | + * @example |
| 83 | + * var Complex128Array = require( '@stdlib/array/complex128' ); |
| 84 | + * var Complex128 = require( '@stdlib/complex/float64/ctor' ); |
| 85 | + * |
| 86 | + * var A = new Complex128Array( [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 3.0, -3.0, 5.0, -5.0, 6.0, 0.0 ] ); |
| 87 | + * var x = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); |
| 88 | + * var y = new Complex128Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); |
| 89 | + * var alpha = new Complex128( 0.5, 0.5 ); |
| 90 | + * var beta = new Complex128( 0.5, -0.5 ); |
| 91 | + * |
| 92 | + * zhemv.ndarray( 'lower', 3, alpha, A, 3, 1, 0, x, 1, 0, beta, y, 1, 0 ); |
| 93 | + * // y => <Complex128Array>[ -10.0, 14.0, -11.0, 25.0, 14.0, 31.0 ] |
| 94 | + */ |
| 95 | + ndarray( uplo: MatrixTriangle, N: number, alpha: Complex128, A: Complex128Array, strideA1: number, strideA2: number, offsetA: number, x: Complex128Array, strideX: number, offsetX: number, beta: Complex128, y: Complex128Array, strideY: number, offsetY: number ): Complex128Array; |
| 96 | +} |
| 97 | + |
| 98 | +/** |
| 99 | +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are scalars, `x` and `y` are N element vectors, and `A` is an `N` by `N` Hermitian matrix. |
| 100 | +* |
| 101 | +* @param order - storage layout |
| 102 | +* @param uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. |
| 103 | +* @param N - number of elements along each dimension of `A` |
| 104 | +* @param alpha - scalar constant |
| 105 | +* @param A - input matrix |
| 106 | +* @param LDA - stride of the first dimension of `A` |
| 107 | +* @param x - first input vector |
| 108 | +* @param strideX - `x` stride length |
| 109 | +* @param beta - scalar constant |
| 110 | +* @param y - second input vector |
| 111 | +* @param strideY - `y` stride length |
| 112 | +* @returns `y` |
| 113 | +* |
| 114 | +* @example |
| 115 | +* var Complex128Array = require( '@stdlib/array/complex128' ); |
| 116 | +* var Complex128 = require( '@stdlib/complex/float64/ctor' ); |
| 117 | +* |
| 118 | +* var A = new Complex128Array( [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 3.0, -3.0, 5.0, -5.0, 6.0, 0.0 ] ); |
| 119 | +* var x = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); |
| 120 | +* var y = new Complex128Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); |
| 121 | +* var alpha = new Complex128( 0.5, 0.5 ); |
| 122 | +* var beta = new Complex128( 0.5, -0.5 ); |
| 123 | +* |
| 124 | +* zhemv( 'row-major', 'lower', 3, alpha, A, 3, x, 1, beta, y, 1 ); |
| 125 | +* // y => <Complex128Array>[ -10.0, 14.0, -11.0, 25.0, 14.0, 31.0 ] |
| 126 | +* |
| 127 | +* @example |
| 128 | +* var Complex128Array = require( '@stdlib/array/complex128' ); |
| 129 | +* var Complex128 = require( '@stdlib/complex/float64/ctor' ); |
| 130 | +* |
| 131 | +* var A = new Complex128Array( [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 3.0, -3.0, 5.0, -5.0, 6.0, 0.0 ] ); |
| 132 | +* var x = new Complex128Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); |
| 133 | +* var y = new Complex128Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); |
| 134 | +* var alpha = new Complex128( 0.5, 0.5 ); |
| 135 | +* var beta = new Complex128( 0.5, -0.5 ); |
| 136 | +* |
| 137 | +* zhemv.ndarray( 'lower', 3, alpha, A, 3, 1, 0, x, 1, 0, beta, y, 1, 0 ); |
| 138 | +* // y => <Complex128Array>[ -10.0, 14.0, -11.0, 25.0, 14.0, 31.0 ] |
| 139 | +*/ |
| 140 | +declare var zhemv: Routine; |
| 141 | + |
| 142 | + |
| 143 | +// EXPORTS // |
| 144 | + |
| 145 | +export = zhemv; |
0 commit comments