|
| 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 { Layout, MatrixTriangle, TransposeOperation, DiagonalType } from '@stdlib/types/blas'; |
| 24 | +import { Complex64Array } from '@stdlib/types/array'; |
| 25 | + |
| 26 | +/** |
| 27 | +* Interface describing `ctbmv`. |
| 28 | +*/ |
| 29 | +interface Routine { |
| 30 | + /** |
| 31 | + * Performs one of the matrix-vector operations `x = A*x` or `x = A^T*x` or `x = A^H*x` where `x` is an `N` element complex vector and `A` is an `N` by `N` unit, or non-unit, upper or lower triangular band matrix, with (`K` + 1) diagonals. |
| 32 | + * |
| 33 | + * @param order - storage layout |
| 34 | + * @param uplo - specifies whether `A` is an upper or lower triangular matrix |
| 35 | + * @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed |
| 36 | + * @param diag - specifies whether `A` has a unit diagonal |
| 37 | + * @param N - number of elements along each dimension in the matrix `A` |
| 38 | + * @param K - number of super-diagonals or sub-diagonals of the matrix `A` |
| 39 | + * @param A - input matrix |
| 40 | + * @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) |
| 41 | + * @param x - input vector |
| 42 | + * @param strideX - stride length for `x` |
| 43 | + * @returns `x` |
| 44 | + * |
| 45 | + * @example |
| 46 | + * var Complex64Array = require( '@stdlib/array/complex64' ); |
| 47 | + * |
| 48 | + * var A = new Complex64Array( [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ] ); |
| 49 | + * var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); |
| 50 | + * |
| 51 | + * ctbmv( 'row-major', 'lower', 'no-transpose', 'non-unit', 3, 1, A, 2, x, 1 ); |
| 52 | + * // x => <Complex64Array>[ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ] |
| 53 | + */ |
| 54 | + ( order: Layout, uplo: MatrixTriangle, trans: TransposeOperation, diag: DiagonalType, N: number, K: number, A: Complex64Array, LDA: number, x: Complex64Array, strideX: number ): Complex64Array; |
| 55 | + |
| 56 | + /** |
| 57 | + * Performs one of the matrix-vector operations `x = A*x` or `x = A^T*x`, using alternative indexing semantics and where `x` is an `N` element complex vector and `A` is an `N` by `N` unit, or non-unit, upper or lower triangular band matrix, with (`K` + 1) diagonals. |
| 58 | + * |
| 59 | + * @param uplo - specifies whether `A` is an upper or lower triangular matrix |
| 60 | + * @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed |
| 61 | + * @param diag - specifies whether `A` has a unit diagonal |
| 62 | + * @param N - number of elements along each dimension in the matrix `A` |
| 63 | + * @param K - number of super-diagonals or sub-diagonals of the matrix `A` |
| 64 | + * @param A - input matrix |
| 65 | + * @param strideA1 - stride of the first dimension of `A` |
| 66 | + * @param strideA2 - stride of the second dimension of `A` |
| 67 | + * @param offsetA - starting index for `A` |
| 68 | + * @param x - input vector |
| 69 | + * @param strideX - stride length for `x` |
| 70 | + * @param offsetX - starting index for `x` |
| 71 | + * @returns `x` |
| 72 | + * |
| 73 | + * @example |
| 74 | + * var Complex64Array = require( '@stdlib/array/complex64' ); |
| 75 | + * |
| 76 | + * var A = new Complex64Array( [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ] ); |
| 77 | + * var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); |
| 78 | + * |
| 79 | + * ctbmv.ndarray( 'lower', 'no-transpose', 'non-unit', 3, 1, A, 2, 1, 0, x, 1, 0 ); |
| 80 | + * // x => <Complex64Array>[ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ] |
| 81 | + */ |
| 82 | + ndarray( uplo: MatrixTriangle, trans: TransposeOperation, diag: DiagonalType, N: number, K: number, A: Complex64Array, strideA1: number, strideA2: number, offsetA: number, x: Complex64Array, strideX: number, offsetX: number ): Complex64Array; |
| 83 | +} |
| 84 | + |
| 85 | +/** |
| 86 | +* Performs one of the matrix-vector operations `x = A*x` or `x = A^T*x` where `x` is an `N` element vector and `A` is an `N` by `N` unit, or non-unit, upper or lower triangular band matrix, with ( `K` + 1 ) diagonals. |
| 87 | +* |
| 88 | +* @param order - storage layout |
| 89 | +* @param uplo - specifies whether `A` is an upper or lower triangular matrix |
| 90 | +* @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed |
| 91 | +* @param diag - specifies whether `A` has a unit diagonal |
| 92 | +* @param N - number of elements along each dimension in the matrix `A` |
| 93 | +* @param K - number of super-diagonals or sub-diagonals of the matrix `A` |
| 94 | +* @param A - input matrix |
| 95 | +* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) |
| 96 | +* @param x - input vector |
| 97 | +* @param strideX - stride length for `x` |
| 98 | +* @returns `x` |
| 99 | +* |
| 100 | +* @example |
| 101 | +* var Complex64Array = require( '@stdlib/array/complex64' ); |
| 102 | +* |
| 103 | +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ] ); |
| 104 | +* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); |
| 105 | +* |
| 106 | +* ctbmv( 'row-major', 'lower', 'no-transpose', 'non-unit', 3, 1, A, 2, x, 1 ); |
| 107 | +* // x => <Complex64Array>[ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ] |
| 108 | +* |
| 109 | +* @example |
| 110 | +* var Complex64Array = require( '@stdlib/array/complex64' ); |
| 111 | +* |
| 112 | +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ] ); |
| 113 | +* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); |
| 114 | +* |
| 115 | +* ctbmv.ndarray( 'lower', 'no-transpose', 'non-unit', 3, 1, A, 2, 1, 0, x, 1, 0 ); |
| 116 | +* // x => <Complex64Array>[ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ] |
| 117 | +*/ |
| 118 | +declare var ctbmv: Routine; |
| 119 | + |
| 120 | + |
| 121 | +// EXPORTS // |
| 122 | + |
| 123 | +export = ctbmv; |
0 commit comments