Skip to content

Commit f072be6

Browse files
committed
docs: add missing jsdoc example
--- 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 90c0491 commit f072be6

File tree

2 files changed

+128
-0
lines changed

2 files changed

+128
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,30 @@ var multpl = 4.0;
9999
* @returns {void}
100100
*
101101
* @example
102+
* var Float64Array = require( '@stdlib/array/float64' );
103+
*
104+
* var A = new Float64Array( [ 4.0 ] );
105+
* var B = new Float64Array( [ -5.0 ] );
106+
* var C = new Float64Array( [ 2.0 ] );
107+
* var D = new Float64Array( [ -3.0 ] );
108+
* var RT1R = new Float64Array( 1 );
109+
* var RT1I = new Float64Array( 1 );
110+
* var RT2R = new Float64Array( 1 );
111+
* var RT2I = new Float64Array( 1 );
112+
* var CS = new Float64Array( 1 );
113+
* var SN = new Float64Array( 1 );
114+
*
115+
* dlanv2( A, 0, B, 0, C, 0, D, 0, RT1R, 0, RT1I, 0, RT2R, 0, RT2I, 0, CS, 0, SN, 0 );
116+
* // A => <Float64Array>[ 2.0 ]
117+
* // B => <Float64Array>[ -7.0 ]
118+
* // C => <Float64Array>[ 0.0 ]
119+
* // D => <Float64Array>[ -1.0 ]
120+
* // RT1R => <Float64Array>[ 2.0 ]
121+
* // RT1I => <Float64Array>[ 0.0 ]
122+
* // RT2R => <Float64Array>[ -1.0 ]
123+
* // RT2I => <Float64Array>[ 0.0 ]
124+
* // CS => <Float64Array>[ ~0.93 ]
125+
* // SN => <Float64Array>[ ~0.34 ]
102126
*/
103127
function dlanv2( A, offsetA, B, offsetB, C, offsetC, D, offsetD, RT1R, offsetRT1R, RT1I, offsetRT1I, RT2R, offsetRT2R, RT2I, offsetRT2I, CS, offsetCS, SN, offsetSN ) {
104128
var bcmax;
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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+
'use strict';
20+
21+
// MODULES //
22+
23+
var base = require( './base.js' );
24+
25+
26+
// MAIN //
27+
28+
/**
29+
* Computes the Schur factorization of a real 2-by-2 nonsymmetric matrix `A` in standard form.
30+
*
31+
* Given a real 2×2 matrix:
32+
*
33+
* ```tex
34+
* \begin{bmatrix}
35+
* A & B \\
36+
* C & D
37+
* \end{bmatrix}
38+
* ```
39+
*
40+
* this routine computes an orthogonal matrix:
41+
*
42+
* ```tex
43+
* \begin{bmatrix}
44+
* \text{CS} & \text{SN} \\
45+
* -\text{SN} & \text{CS}
46+
* \end{bmatrix}
47+
* ```
48+
*
49+
* such that the matrix is reduced to Schur (quasi-triangular) form:
50+
*
51+
* ```tex
52+
* \begin{bmatrix}
53+
* \text{AA} & \text{BB} \\
54+
* 0 & \text{DD}
55+
* \end{bmatrix}
56+
* ```
57+
*
58+
* @private
59+
* @param {Float64Array} A - array containing the element A(1,1)
60+
* @param {Float64Array} B - array containing the element A(1,2)
61+
* @param {Float64Array} C - array containing the element A(2,1)
62+
* @param {Float64Array} D - array containing the element A(2,2)
63+
* @param {Float64Array} RT1R - output array for the real part of the first eigenvalue
64+
* @param {Float64Array} RT1I - output array for the imaginary part of the first eigenvalue
65+
* @param {Float64Array} RT2R - output array for the real part of the second eigenvalue
66+
* @param {Float64Array} RT2I - output array for the imaginary part of the second eigenvalue
67+
* @param {Float64Array} CS - output array for cosine of the rotation
68+
* @param {Float64Array} SN - output array for sine of the rotation
69+
* @returns {void}
70+
*
71+
* @example
72+
* var Float64Array = require( '@stdlib/array/float64' );
73+
*
74+
* var A = new Float64Array( [ 4.0 ] );
75+
* var B = new Float64Array( [ -5.0 ] );
76+
* var C = new Float64Array( [ 2.0 ] );
77+
* var D = new Float64Array( [ -3.0 ] );
78+
* var RT1R = new Float64Array( 1 );
79+
* var RT1I = new Float64Array( 1 );
80+
* var RT2R = new Float64Array( 1 );
81+
* var RT2I = new Float64Array( 1 );
82+
* var CS = new Float64Array( 1 );
83+
* var SN = new Float64Array( 1 );
84+
*
85+
* dlanv2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN );
86+
* // A => <Float64Array>[ 2.0 ]
87+
* // B => <Float64Array>[ -7.0 ]
88+
* // C => <Float64Array>[ 0.0 ]
89+
* // D => <Float64Array>[ -1.0 ]
90+
* // RT1R => <Float64Array>[ 2.0 ]
91+
* // RT1I => <Float64Array>[ 0.0 ]
92+
* // RT2R => <Float64Array>[ -1.0 ]
93+
* // RT2I => <Float64Array>[ 0.0 ]
94+
* // CS => <Float64Array>[ ~0.93 ]
95+
* // SN => <Float64Array>[ ~0.34 ]
96+
*/
97+
function dlanv2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN ) {
98+
return base( A, 0, B, 0, C, 0, D, 0, RT1R, 0, RT1I, 0, RT2R, 0, RT2I, 0, CS, 0, SN, 0 ); // eslint-disable-line max-len
99+
}
100+
101+
102+
// EXPORTS //
103+
104+
module.exports = dlanv2;

0 commit comments

Comments
 (0)