Skip to content

Commit 65a5fc8

Browse files
committed
docs: add types and tests
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 9b77988 commit 65a5fc8

2 files changed

Lines changed: 495 additions & 0 deletions

File tree

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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 `ctrsv`.
28+
*/
29+
interface Routine {
30+
/**
31+
* Solves one of the systems of equations `A*x = b` or `A^T*x = b` or `A^H*x = b` where `b` and `x` are `N` element complex vectors and `A` is an `N` by `N` unit, or non-unit, upper or lower triangular complex matrix.
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 A - input matrix
39+
* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
40+
* @param x - input vector
41+
* @param strideX - `x` stride length
42+
* @returns `x`
43+
*
44+
* @example
45+
* var Complex64Array = require( '@stdlib/array/complex64' );
46+
*
47+
* var A = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 4.0, 4.0, 0.0, 0.0, 3.0, 3.0, 5.0, 5.0, 6.0, 6.0 ] );
48+
* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] );
49+
*
50+
* ctrsv( 'row-major', 'lower', 'no-transpose', 'non-unit', 3, A, 3, x, 1 );
51+
* // x => <Complex64Array>[ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
52+
*/
53+
( order: Layout, uplo: MatrixTriangle, trans: TransposeOperation, diag: DiagonalType, N: number, A: Complex64Array, LDA: number, x: Complex64Array, strideX: number ): Complex64Array;
54+
55+
/**
56+
* Solves one of the systems of equations `A*x = b` or `A^T*x = b` or `A^H*x = b` using alternative indexing semantics and where `b` and `x` are `N` element complex vectors and `A` is an `N` by `N` unit, or non-unit, upper or lower triangular complex matrix.
57+
*
58+
* @param uplo - specifies whether `A` is an upper or lower triangular matrix
59+
* @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed
60+
* @param diag - specifies whether `A` has a unit diagonal
61+
* @param N - number of elements along each dimension in the matrix `A`
62+
* @param A - input matrix
63+
* @param strideA1 - stride of the first dimension of `A`
64+
* @param strideA2 - stride of the first dimension of `A`
65+
* @param offsetA - starting index for `A`
66+
* @param x - input vector
67+
* @param strideX - `x` stride length
68+
* @param offsetX - starting index for `x`
69+
* @returns `x`
70+
*
71+
* @example
72+
* var Complex64Array = require( '@stdlib/array/complex64' );
73+
*
74+
* var A = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 4.0, 4.0, 0.0, 0.0, 3.0, 3.0, 5.0, 5.0, 6.0, 6.0 ] );
75+
* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] );
76+
*
77+
* ctrsv.ndarray( 'lower', 'no-transpose', 'non-unit', 3, A, 3, 1, 0, x, 1, 0 );
78+
* // x => <Complex64Array>[ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
79+
*/
80+
ndarray( uplo: MatrixTriangle, trans: TransposeOperation, diag: DiagonalType, N: number, A: Complex64Array, strideA1: number, strideA2: number, offsetA: number, x: Complex64Array, strideX: number, offsetX: number ): Complex64Array;
81+
}
82+
83+
/**
84+
* Solves one of the systems of equations `A*x = b` or `A^T*x = b` or `A^H*x = b` where `b` and `x` are `N` element complex vectors and `A` is an `N` by `N` unit, or non-unit, upper or lower triangular complex matrix.
85+
*
86+
* @param order - storage layout
87+
* @param uplo - specifies whether `A` is an upper or lower triangular matrix
88+
* @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed
89+
* @param diag - specifies whether `A` has a unit diagonal
90+
* @param N - number of elements along each dimension in the matrix `A`
91+
* @param A - input matrix
92+
* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
93+
* @param x - input vector
94+
* @param strideX - `x` stride length
95+
* @returns `x`
96+
*
97+
* @example
98+
* var Complex64Array = require( '@stdlib/array/complex64' );
99+
*
100+
* var A = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 4.0, 4.0, 0.0, 0.0, 3.0, 3.0, 5.0, 5.0, 6.0, 6.0 ] );
101+
* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] );
102+
*
103+
* ctrsv( 'row-major', 'lower', 'no-transpose', 'non-unit', 3, A, 3, x, 1 );
104+
* // x => <Complex64Array>[ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
105+
*
106+
* @example
107+
* var Complex64Array = require( '@stdlib/array/complex64' );
108+
*
109+
* var A = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 4.0, 4.0, 0.0, 0.0, 3.0, 3.0, 5.0, 5.0, 6.0, 6.0 ] );
110+
* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] );
111+
*
112+
* ctrsv.ndarray( 'lower', 'no-transpose', 'non-unit', 3, A, 3, 1, 0, x, 1, 0 );
113+
* // x => <Complex64Array>[ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
114+
*/
115+
declare var ctrsv: Routine;
116+
117+
118+
// EXPORTS //
119+
120+
export = ctrsv;

0 commit comments

Comments
 (0)