Skip to content

Commit d58f9f2

Browse files
committed
docs: add index.d.ts
--- 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: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent ecaad2a commit d58f9f2

File tree

2 files changed

+273
-1
lines changed

2 files changed

+273
-1
lines changed
Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2024 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+
/**
22+
* Interface describing `dlanv2`.
23+
*/
24+
interface Routine {
25+
/**
26+
* Computes the Schur factorization of a real 2-by-2 nonsymmetric matrix `A` in standard form.
27+
*
28+
* Given a real 2×2 matrix:
29+
*
30+
* ```tex
31+
* \begin{bmatrix}
32+
* A & B \\
33+
* C & D
34+
* \end{bmatrix}
35+
* ```
36+
*
37+
* this routine computes an orthogonal matrix:
38+
*
39+
* ```tex
40+
* \begin{bmatrix}
41+
* \text{CS} & \text{SN} \\
42+
* -\text{SN} & \text{CS}
43+
* \end{bmatrix}
44+
* ```
45+
*
46+
* such that the matrix is reduced to Schur (quasi-triangular) form:
47+
*
48+
* ```tex
49+
* \begin{bmatrix}
50+
* \text{AA} & \text{BB} \\
51+
* 0 & \text{DD}
52+
* \end{bmatrix}
53+
* ```
54+
*
55+
* @param A - array containing the element A(1,1)
56+
* @param B - array containing the element A(1,2)
57+
* @param C - array containing the element A(2,1)
58+
* @param D - array containing the element A(2,2)
59+
* @param RT1R - output array for the real part of the first eigenvalue
60+
* @param RT1I - output array for the imaginary part of the first eigenvalue
61+
* @param RT2R - output array for the real part of the second eigenvalue
62+
* @param RT2I - output array for the imaginary part of the second eigenvalue
63+
* @param CS - output array for cosine of the rotation
64+
* @param SN - output array for sine of the rotation
65+
*
66+
* @example
67+
* var Float64Array = require( '@stdlib/array/float64' );
68+
*
69+
* var A = new Float64Array( [ 4.0 ] );
70+
* var B = new Float64Array( [ -5.0 ] );
71+
* var C = new Float64Array( [ 2.0 ] );
72+
* var D = new Float64Array( [ -3.0 ] );
73+
* var RT1R = new Float64Array( 1 );
74+
* var RT1I = new Float64Array( 1 );
75+
* var RT2R = new Float64Array( 1 );
76+
* var RT2I = new Float64Array( 1 );
77+
* var CS = new Float64Array( 1 );
78+
* var SN = new Float64Array( 1 );
79+
*
80+
* dlanv2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN );
81+
* // A => <Float64Array>[ 2.0 ]
82+
* // B => <Float64Array>[ -7.0 ]
83+
* // C => <Float64Array>[ 0.0 ]
84+
* // D => <Float64Array>[ -1.0 ]
85+
* // RT1R => <Float64Array>[ 2.0 ]
86+
* // RT1I => <Float64Array>[ 0.0 ]
87+
* // RT2R => <Float64Array>[ -1.0 ]
88+
* // RT2I => <Float64Array>[ 0.0 ]
89+
* // CS => <Float64Array>[ ~0.93 ]
90+
* // SN => <Float64Array>[ ~0.34 ]`
91+
*/
92+
( A: Float64Array, B: Float64Array, C: Float64Array, D: Float64Array, RT1R: Float64Array, RT1I: Float64Array, RT2R: Float64Array, RT2I: Float64Array, CS: Float64Array, SN: Float64Array ): void;
93+
94+
/**
95+
* Computes the Schur factorization of a real 2-by-2 nonsymmetric matrix `A` in standard form using alternative indexing semantics.
96+
*
97+
* Given a real 2×2 matrix:
98+
*
99+
* ```tex
100+
* \begin{bmatrix}
101+
* A & B \\
102+
* C & D
103+
* \end{bmatrix}
104+
* ```
105+
*
106+
* this routine computes an orthogonal matrix:
107+
*
108+
* ```tex
109+
* \begin{bmatrix}
110+
* \text{CS} & \text{SN} \\
111+
* -\text{SN} & \text{CS}
112+
* \end{bmatrix}
113+
* ```
114+
*
115+
* such that the matrix is reduced to Schur (quasi-triangular) form:
116+
*
117+
* ```tex
118+
* \begin{bmatrix}
119+
* \text{AA} & \text{BB} \\
120+
* 0 & \text{DD}
121+
* \end{bmatrix}
122+
* ```
123+
*
124+
* @param A - array containing the element A(1,1)
125+
* @param offsetA - index in `A` of the element A(1,1)
126+
* @param B - array containing the element A(1,2)
127+
* @param offsetB - index in `B` of the element A(1,2)
128+
* @param C - array containing the element A(2,1)
129+
* @param offsetC - index in `C` of the element A(2,1)
130+
* @param D - array containing the element A(2,2)
131+
* @param offsetD - index in `D` of the element A(2,2)
132+
* @param RT1R - output array for the real part of the first eigenvalue
133+
* @param offsetRT1R - index in `RT1R` at which to store the value
134+
* @param RT1I - output array for the imaginary part of the first eigenvalue
135+
* @param offsetRT1I - index in `RT1I` at which to store the value
136+
* @param RT2R - output array for the real part of the second eigenvalue
137+
* @param offsetRT2R - index in `RT2R` at which to store the value
138+
* @param RT2I - output array for the imaginary part of the second eigenvalue
139+
* @param offsetRT2I - index in `RT2I` at which to store the value
140+
* @param CS - output array for cosine of the rotation
141+
* @param offsetCS - index in `CS` at which to store the value
142+
* @param SN - output array for sine of the rotation
143+
* @param offsetSN - index in `SN` at which to store the value
144+
*
145+
* @example
146+
* var Float64Array = require( '@stdlib/array/float64' );
147+
*
148+
* var A = new Float64Array( [ 4.0 ] );
149+
* var B = new Float64Array( [ -5.0 ] );
150+
* var C = new Float64Array( [ 2.0 ] );
151+
* var D = new Float64Array( [ -3.0 ] );
152+
* var RT1R = new Float64Array( 1 );
153+
* var RT1I = new Float64Array( 1 );
154+
* var RT2R = new Float64Array( 1 );
155+
* var RT2I = new Float64Array( 1 );
156+
* var CS = new Float64Array( 1 );
157+
* var SN = new Float64Array( 1 );
158+
*
159+
* dlanv2( A, 0, B, 0, C, 0, D, 0, RT1R, 0, RT1I, 0, RT2R, 0, RT2I, 0, CS, 0, SN, 0 );
160+
* // A => <Float64Array>[ 2.0 ]
161+
* // B => <Float64Array>[ -7.0 ]
162+
* // C => <Float64Array>[ 0.0 ]
163+
* // D => <Float64Array>[ -1.0 ]
164+
* // RT1R => <Float64Array>[ 2.0 ]
165+
* // RT1I => <Float64Array>[ 0.0 ]
166+
* // RT2R => <Float64Array>[ -1.0 ]
167+
* // RT2I => <Float64Array>[ 0.0 ]
168+
* // CS => <Float64Array>[ ~0.93 ]
169+
* // SN => <Float64Array>[ ~0.34 ]
170+
*/
171+
ndarray( A: Float64Array, offsetA: number, B: Float64Array, offsetB: number, C: Float64Array, offsetC: number, D: Float64Array, offsetD: number, RT1R: Float64Array, offsetRT1R: number, RT1I: Float64Array, offsetRT1I: number, RT2R: Float64Array, offsetRT2R: number, RT2I: Float64Array, offsetRT2I: number, CS: Float64Array, offsetCS: number, SN: Float64Array, offsetSN: number ): void;
172+
}
173+
174+
/**
175+
* Computes the Schur factorization of a real 2-by-2 nonsymmetric matrix `A` in standard form using alternative indexing semantics.
176+
*
177+
* Given a real 2×2 matrix:
178+
*
179+
* ```tex
180+
* \begin{bmatrix}
181+
* A & B \\
182+
* C & D
183+
* \end{bmatrix}
184+
* ```
185+
*
186+
* this routine computes an orthogonal matrix:
187+
*
188+
* ```tex
189+
* \begin{bmatrix}
190+
* \text{CS} & \text{SN} \\
191+
* -\text{SN} & \text{CS}
192+
* \end{bmatrix}
193+
* ```
194+
*
195+
* such that the matrix is reduced to Schur (quasi-triangular) form:
196+
*
197+
* ```tex
198+
* \begin{bmatrix}
199+
* \text{AA} & \text{BB} \\
200+
* 0 & \text{DD}
201+
* \end{bmatrix}
202+
* ```
203+
*
204+
* @param A - array containing the element A(1,1)
205+
* @param B - array containing the element A(1,2)
206+
* @param C - array containing the element A(2,1)
207+
* @param D - array containing the element A(2,2)
208+
* @param RT1R - output array for the real part of the first eigenvalue
209+
* @param RT1I - output array for the imaginary part of the first eigenvalue
210+
* @param RT2R - output array for the real part of the second eigenvalue
211+
* @param RT2I - output array for the imaginary part of the second eigenvalue
212+
* @param CS - output array for cosine of the rotation
213+
* @param SN - output array for sine of the rotation
214+
*
215+
* @example
216+
* var Float64Array = require( '@stdlib/array/float64' );
217+
*
218+
* var A = new Float64Array( [ 4.0 ] );
219+
* var B = new Float64Array( [ -5.0 ] );
220+
* var C = new Float64Array( [ 2.0 ] );
221+
* var D = new Float64Array( [ -3.0 ] );
222+
* var RT1R = new Float64Array( 1 );
223+
* var RT1I = new Float64Array( 1 );
224+
* var RT2R = new Float64Array( 1 );
225+
* var RT2I = new Float64Array( 1 );
226+
* var CS = new Float64Array( 1 );
227+
* var SN = new Float64Array( 1 );
228+
*
229+
* dlanv2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN );
230+
* // A => <Float64Array>[ 2.0 ]
231+
* // B => <Float64Array>[ -7.0 ]
232+
* // C => <Float64Array>[ 0.0 ]
233+
* // D => <Float64Array>[ -1.0 ]
234+
* // RT1R => <Float64Array>[ 2.0 ]
235+
* // RT1I => <Float64Array>[ 0.0 ]
236+
* // RT2R => <Float64Array>[ -1.0 ]
237+
* // RT2I => <Float64Array>[ 0.0 ]
238+
* // CS => <Float64Array>[ ~0.93 ]
239+
* // SN => <Float64Array>[ ~0.34 ]
240+
*
241+
* @example
242+
* var Float64Array = require( '@stdlib/array/float64' );
243+
*
244+
* var A = new Float64Array( [ 4.0 ] );
245+
* var B = new Float64Array( [ -5.0 ] );
246+
* var C = new Float64Array( [ 2.0 ] );
247+
* var D = new Float64Array( [ -3.0 ] );
248+
* var RT1R = new Float64Array( 1 );
249+
* var RT1I = new Float64Array( 1 );
250+
* var RT2R = new Float64Array( 1 );
251+
* var RT2I = new Float64Array( 1 );
252+
* var CS = new Float64Array( 1 );
253+
* var SN = new Float64Array( 1 );
254+
*
255+
* dlanv2( A, 0, B, 0, C, 0, D, 0, RT1R, 0, RT1I, 0, RT2R, 0, RT2I, 0, CS, 0, SN, 0 );
256+
* // A => <Float64Array>[ 2.0 ]
257+
* // B => <Float64Array>[ -7.0 ]
258+
* // C => <Float64Array>[ 0.0 ]
259+
* // D => <Float64Array>[ -1.0 ]
260+
* // RT1R => <Float64Array>[ 2.0 ]
261+
* // RT1I => <Float64Array>[ 0.0 ]
262+
* // RT2R => <Float64Array>[ -1.0 ]
263+
* // RT2I => <Float64Array>[ 0.0 ]
264+
* // CS => <Float64Array>[ ~0.93 ]
265+
* // SN => <Float64Array>[ ~0.34 ]
266+
*/
267+
declare var dlanv2: Routine;
268+
269+
270+
// EXPORTS //
271+
272+
export = dlanv2;

lib/node_modules/@stdlib/lapack/base/dlanv2/lib/ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var base = require( './base.js' );
2626
// MAIN //
2727

2828
/**
29-
* Computes the Schur factorization of a real 2-by-2 nonsymmetric matrix `A` in standard form.
29+
* Computes the Schur factorization of a real 2-by-2 nonsymmetric matrix `A` in standard form using alternative indexing semantics.
3030
*
3131
* Given a real 2×2 matrix:
3232
*

0 commit comments

Comments
 (0)