Skip to content

Commit 8fbcb55

Browse files
committed
feat: add main exports
--- 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 f072be6 commit 8fbcb55

File tree

4 files changed

+223
-1
lines changed

4 files changed

+223
-1
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ var base = require( './base.js' );
5555
* \end{bmatrix}
5656
* ```
5757
*
58-
* @private
5958
* @param {Float64Array} A - array containing the element A(1,1)
6059
* @param {Float64Array} B - array containing the element A(1,2)
6160
* @param {Float64Array} C - array containing the element A(2,1)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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+
/**
22+
* LAPACK routine to compute the Schur factorization of a real 2-by-2 nonsymmetric matrix `A` in standard form.
23+
*
24+
* @module @stdlib/lapack/base/dlanv2
25+
*
26+
* @example
27+
* var Float64Array = require( '@stdlib/array/float64' );
28+
* var dlanv2 = require( '@stdlib/lapack/base/dlanv2' );
29+
*
30+
* var A = new Float64Array( [ 4.0 ] );
31+
* var B = new Float64Array( [ -5.0 ] );
32+
* var C = new Float64Array( [ 2.0 ] );
33+
* var D = new Float64Array( [ -3.0 ] );
34+
* var RT1R = new Float64Array( 1 );
35+
* var RT1I = new Float64Array( 1 );
36+
* var RT2R = new Float64Array( 1 );
37+
* var RT2I = new Float64Array( 1 );
38+
* var CS = new Float64Array( 1 );
39+
* var SN = new Float64Array( 1 );
40+
*
41+
* dlanv2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN );
42+
* // A => <Float64Array>[ 2.0 ]
43+
* // B => <Float64Array>[ -7.0 ]
44+
* // C => <Float64Array>[ 0.0 ]
45+
* // D => <Float64Array>[ -1.0 ]
46+
* // RT1R => <Float64Array>[ 2.0 ]
47+
* // RT1I => <Float64Array>[ 0.0 ]
48+
* // RT2R => <Float64Array>[ -1.0 ]
49+
* // RT2I => <Float64Array>[ 0.0 ]
50+
* // CS => <Float64Array>[ ~0.93 ]
51+
* // SN => <Float64Array>[ ~0.34 ]
52+
*/
53+
54+
// MODULES //
55+
56+
var join = require( 'path' ).join;
57+
var tryRequire = require( '@stdlib/utils/try-require' );
58+
var isError = require( '@stdlib/assert/is-error' );
59+
var main = require( './main.js' );
60+
61+
62+
// MAIN //
63+
64+
var dlanv2;
65+
var tmp = tryRequire( join( __dirname, './native.js' ) );
66+
if ( isError( tmp ) ) {
67+
dlanv2 = main;
68+
} else {
69+
dlanv2 = tmp;
70+
}
71+
72+
73+
// EXPORTS //
74+
75+
module.exports = dlanv2;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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 setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
24+
var dlanv2 = require( './dlanv2.js' );
25+
var ndarray = require( './ndarray.js' );
26+
27+
28+
// MAIN //
29+
30+
setReadOnly( dlanv2, 'ndarray', ndarray );
31+
32+
33+
// EXPORTS //
34+
35+
module.exports = dlanv2;
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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+
* @param {Float64Array} A - array containing the element A(1,1)
59+
* @param {NonNegativeInteger} offsetA - index in `A` of the element A(1,1)
60+
* @param {Float64Array} B - array containing the element A(1,2)
61+
* @param {NonNegativeInteger} offsetB - index in `B` of the element A(1,2)
62+
* @param {Float64Array} C - array containing the element A(2,1)
63+
* @param {NonNegativeInteger} offsetC - index in `C` of the element A(2,1)
64+
* @param {Float64Array} D - array containing the element A(2,2)
65+
* @param {NonNegativeInteger} offsetD - index in `D` of the element A(2,2)
66+
* @param {Float64Array} RT1R - output array for the real part of the first eigenvalue
67+
* @param {NonNegativeInteger} offsetRT1R - index in `RT1R` at which to store the value
68+
* @param {Float64Array} RT1I - output array for the imaginary part of the first eigenvalue
69+
* @param {NonNegativeInteger} offsetRT1I - index in `RT1I` at which to store the value
70+
* @param {Float64Array} RT2R - output array for the real part of the second eigenvalue
71+
* @param {NonNegativeInteger} offsetRT2R - index in `RT2R` at which to store the value
72+
* @param {Float64Array} RT2I - output array for the imaginary part of the second eigenvalue
73+
* @param {NonNegativeInteger} offsetRT2I - index in `RT2I` at which to store the value
74+
* @param {Float64Array} CS - output array for cosine of the rotation
75+
* @param {NonNegativeInteger} offsetCS - index in `CS` at which to store the value
76+
* @param {Float64Array} SN - output array for sine of the rotation
77+
* @param {NonNegativeInteger} offsetSN - index in `SN` at which to store the value
78+
* @returns {void}
79+
*
80+
* @example
81+
* var Float64Array = require( '@stdlib/array/float64' );
82+
*
83+
* var A = new Float64Array( [ 4.0 ] );
84+
* var B = new Float64Array( [ -5.0 ] );
85+
* var C = new Float64Array( [ 2.0 ] );
86+
* var D = new Float64Array( [ -3.0 ] );
87+
* var RT1R = new Float64Array( 1 );
88+
* var RT1I = new Float64Array( 1 );
89+
* var RT2R = new Float64Array( 1 );
90+
* var RT2I = new Float64Array( 1 );
91+
* var CS = new Float64Array( 1 );
92+
* var SN = new Float64Array( 1 );
93+
*
94+
* dlanv2( A, 0, B, 0, C, 0, D, 0, RT1R, 0, RT1I, 0, RT2R, 0, RT2I, 0, CS, 0, SN, 0 );
95+
* // A => <Float64Array>[ 2.0 ]
96+
* // B => <Float64Array>[ -7.0 ]
97+
* // C => <Float64Array>[ 0.0 ]
98+
* // D => <Float64Array>[ -1.0 ]
99+
* // RT1R => <Float64Array>[ 2.0 ]
100+
* // RT1I => <Float64Array>[ 0.0 ]
101+
* // RT2R => <Float64Array>[ -1.0 ]
102+
* // RT2I => <Float64Array>[ 0.0 ]
103+
* // CS => <Float64Array>[ ~0.93 ]
104+
* // SN => <Float64Array>[ ~0.34 ]
105+
*/
106+
function dlanv2( A, offsetA, B, offsetB, C, offsetC, D, offsetD, RT1R, offsetRT1R, RT1I, offsetRT1I, RT2R, offsetRT2R, RT2I, offsetRT2I, CS, offsetCS, SN, offsetSN ) { // eslint-disable-line max-len, max-params
107+
return base( A, offsetA, B, offsetB, C, offsetC, D, offsetD, RT1R, offsetRT1R, RT1I, offsetRT1I, RT2R, offsetRT2R, RT2I, offsetRT2I, CS, offsetCS, SN, offsetSN ); // eslint-disable-line max-len
108+
}
109+
110+
111+
// EXPORTS //
112+
113+
module.exports = dlanv2;

0 commit comments

Comments
 (0)