Skip to content

Commit bd80199

Browse files
committed
docs: add ts files
--- 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: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 104d60e commit bd80199

File tree

3 files changed

+490
-1
lines changed

3 files changed

+490
-1
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 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 `dlartg`.
23+
*/
24+
interface Routine {
25+
/**
26+
* Generates a plane rotation of a vector such that the following equation is satisfied.
27+
*
28+
* ```tex
29+
* \(\begin{bmatrix} C & S \\ -S & C \end{bmatrix} \begin{bmatrix} F \\ G \end{bmatrix} = \begin{bmatrix} R \\ 0 \end{bmatrix}\)
30+
* ```
31+
*
32+
* @param F - single element array representing the first component of the vector to be rotated
33+
* @param G - single element array representing the second component of the vector to be rotated
34+
* @param CS - single element array overwritten by the cosine of the rotation
35+
* @param SN - single element array overwritten by the sine of the rotation
36+
* @param R - single element array overwritten by the non-zero component of the rotated vector
37+
* @returns {void}
38+
*
39+
* @example
40+
* var Float64Array = require( '@stdlib/array/float64' );
41+
*
42+
* var F = new Float64Array( [ 3.0 ] );
43+
* var G = new Float64Array( [ 4.0 ] );
44+
* var CS = new Float64Array( 1 );
45+
* var SN = new Float64Array( 1 );
46+
* var R = new Float64Array( 1 );
47+
*
48+
* dlartg( F, G, CS, SN, R );
49+
* // R => <Float64Array>[ 5.0 ]
50+
* // CS => <Float64Array>[ 0.6 ]
51+
* // SN => <Float64Array>[ 0.8 ]
52+
*/
53+
( F: Float64Array, G: Float64Array, CS: Float64Array, SN: Float64Array, R: Float64Array ): void;
54+
55+
/**
56+
* Generates a plane rotation of a vector using alternative indexing semantics such that the following equation is satisfied.
57+
*
58+
* ```tex
59+
* \(\begin{bmatrix} C & S \\ -S & C \end{bmatrix} \begin{bmatrix} F \\ G \end{bmatrix} = \begin{bmatrix} R \\ 0 \end{bmatrix}\)
60+
* ```
61+
*
62+
* @param F - single element array representing the first component of the vector to be rotated
63+
* @param offsetF - starting index for `F`
64+
* @param G - single element array representing the second component of the vector to be rotated
65+
* @param offsetG - starting index for `G`
66+
* @param CS - single element array overwritten by the cosine of the rotation
67+
* @param offsetCS - starting index for `CS`
68+
* @param SN - single element array overwritten by the sine of the rotation
69+
* @param offsetSN - starting index for `SN`
70+
* @param R - single element array overwritten by the non-zero component of the rotated vector
71+
* @param offsetR - starting index for `R`
72+
* @returns {void}
73+
*
74+
* @example
75+
* var Float64Array = require( '@stdlib/array/float64' );
76+
*
77+
* var F = new Float64Array( [ 3.0 ] );
78+
* var G = new Float64Array( [ 4.0 ] );
79+
* var CS = new Float64Array( 1 );
80+
* var SN = new Float64Array( 1 );
81+
* var R = new Float64Array( 1 );
82+
*
83+
* dlartg.ndarray( F, 0, G, 0, CS, 0, SN, 0, R, 0 );
84+
* // R => <Float64Array>[ 5.0 ]
85+
* // CS => <Float64Array>[ 0.6 ]
86+
* // SN => <Float64Array>[ 0.8 ]
87+
*/
88+
ndarray( F: Float64Array, offsetF: number, G: Float64Array, offsetG: number, CS: Float64Array, offsetCS: number, SN: Float64Array, offsetSN: number, R: Float64Array, offsetR: number ): void;
89+
}
90+
91+
/**
92+
* Generates a plane rotation of a vector such that the following equation is satisfied.
93+
*
94+
* ```tex
95+
* \(\begin{bmatrix} C & S \\ -S & C \end{bmatrix} \begin{bmatrix} F \\ G \end{bmatrix} = \begin{bmatrix} R \\ 0 \end{bmatrix}\)
96+
* ```
97+
*
98+
* @param F - single element array representing the first component of the vector to be rotated
99+
* @param G - single element array representing the second component of the vector to be rotated
100+
* @param CS - single element array overwritten by the cosine of the rotation
101+
* @param SN - single element array overwritten by the sine of the rotation
102+
* @param R - single element array overwritten by the non-zero component of the rotated vector
103+
* @returns {void}
104+
*
105+
* @example
106+
* var Float64Array = require( '@stdlib/array/float64' );
107+
*
108+
* var F = new Float64Array( [ 3.0 ] );
109+
* var G = new Float64Array( [ 4.0 ] );
110+
* var CS = new Float64Array( 1 );
111+
* var SN = new Float64Array( 1 );
112+
* var R = new Float64Array( 1 );
113+
*
114+
* dlartg( F, G, CS, SN, R );
115+
* // R => <Float64Array>[ 5.0 ]
116+
* // CS => <Float64Array>[ 0.6 ]
117+
* // SN => <Float64Array>[ 0.8 ]
118+
*
119+
* @example
120+
* var Float64Array = require( '@stdlib/array/float64' );
121+
*
122+
* var F = new Float64Array( [ 3.0 ] );
123+
* var G = new Float64Array( [ 4.0 ] );
124+
* var CS = new Float64Array( 1 );
125+
* var SN = new Float64Array( 1 );
126+
* var R = new Float64Array( 1 );
127+
*
128+
* dlartg.ndarray( F, 0, G, 0, CS, 0, SN, 0, R, 0 );
129+
* // R => <Float64Array>[ 5.0 ]
130+
* // CS => <Float64Array>[ 0.6 ]
131+
* // SN => <Float64Array>[ 0.8 ]
132+
*/
133+
declare var dlartg: Routine;
134+
135+
136+
// EXPORTS //
137+
138+
export = dlartg;

0 commit comments

Comments
 (0)