Skip to content

Commit e833bc4

Browse files
committed
feat: complete 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 c305bbc commit e833bc4

File tree

6 files changed

+245
-2
lines changed

6 files changed

+245
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2024 The Stdlib Authors.
4+
* Copyright (c) 2025 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.

lib/node_modules/@stdlib/lapack/base/dlarfg/lib/dlapy2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2024 The Stdlib Authors.
4+
* Copyright (c) 2025 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
* Generates a real elementary reflector `H` of order `n` such that applying `H` to a vector `[alpha; x]` zeros out `x`.
30+
*
31+
* ## Notes
32+
*
33+
* - `H` is a Householder matrix with the form `H = I - tau * [1; v] * [1, v^T]`, where `tau` is a scalar and `v` is a vector.
34+
* - the input vector is `[alpha; x]`, where `alpha` is a scalar and `x` is a real `(n-1)`-element vector.
35+
* - the result of applying `H` to `[alpha; x]` is `[beta; 0]`, with `beta` being a scalar and the rest of the vector zeroed.
36+
* - if all elements of `x` are zero, then `tau = 0` and `H` is the identity matrix.
37+
* - otherwise, `1 <= tau <= 2` and `H` is orthogonal, i.e., `H^T * H = I`.
38+
*
39+
* @private
40+
* @param {NonNegativeInteger} N - order of matrix `A`
41+
* @param {Float64Array} X - overwritten by the vector `V` on exit
42+
* @param {integer} incx - stride length for `X`
43+
* @param {Float64Array} out - array to store `alpha` and `tau`, first indexed element stores `alpha` and the second indexed element stores `tau`
44+
* @returns {void} overwrites the array `X` and `out` in place
45+
*
46+
* @example
47+
* var Float64Array = require( '@stdlib/array/float64' );
48+
*
49+
* var X = new Float64Array( [ 2.0, 3.0, 4.0 ] );
50+
* var out = new Float64Array( [ 4.0, 0.0 ] );
51+
*
52+
* dlarfg( 4, X, 1, out );
53+
* // X => <Float64Array>[ ~0.19, ~0.28, ~0.37 ]
54+
* // out => <Float64Array>[ ~6.7, ~1.6 ]
55+
*/
56+
function dlarfg( N, X, incx, out ) {
57+
base( N, X, incx, 0, out, 1, 0 );
58+
}
59+
60+
61+
// EXPORTS //
62+
63+
module.exports = dlarfg;
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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 generate a real elementary reflector `H` of order `n` such that applying `H` to a vector `[alpha; x]` zeros out `x`.
23+
*
24+
* ## Notes
25+
*
26+
* - `H` is a Householder matrix with the form `H = I - tau * [1; v] * [1, v^T]`, where `tau` is a scalar and `v` is a vector.
27+
* - the input vector is `[alpha; x]`, where `alpha` is a scalar and `x` is a real `(n-1)`-element vector.
28+
* - the result of applying `H` to `[alpha; x]` is `[beta; 0]`, with `beta` being a scalar and the rest of the vector zeroed.
29+
* - if all elements of `x` are zero, then `tau = 0` and `H` is the identity matrix.
30+
* - otherwise, `1 <= tau <= 2` and `H` is orthogonal, i.e., `H^T * H = I`.
31+
*
32+
* @module @stdlib/lapack/base/dlarfg
33+
*
34+
* @example
35+
* var Float64Array = require( '@stdlib/array/float64' );
36+
* var dlarfg = require( '@stdlib/lapack/base/dlarfg' );
37+
*
38+
* var X = new Float64Array( [ 2.0, 3.0, 4.0 ] );
39+
* var out = new Float64Array( [ 4.0, 0.0 ] );
40+
*
41+
* dlarfg( 4, X, 1, out );
42+
* // X => <Float64Array>[ ~0.19, ~0.28, ~0.37 ]
43+
* // out => <Float64Array>[ ~6.7, ~1.6 ]
44+
*
45+
* @example
46+
* var Float64Array = require( '@stdlib/array/float64' );
47+
* var dlarfg = require( '@stdlib/lapack/base/dlarfg' );
48+
49+
*
50+
* var X = new Float64Array( [ 2.0, 3.0, 4.0 ] );
51+
* var out = new Float64Array( [ 4.0, 0.0 ] );
52+
*
53+
* dlarfg.ndarray( 4, X, 1, 0, out, 1, 0 );
54+
* // X => <Float64Array>[ ~0.19, ~0.28, ~0.37 ]
55+
* // out => <Float64Array>[ ~6.7, ~1.6 ]
56+
*/
57+
58+
// MODULES //
59+
60+
var join = require( 'path' ).join;
61+
var tryRequire = require( '@stdlib/utils/try-require' );
62+
var isError = require( '@stdlib/assert/is-error' );
63+
var main = require( './main.js' );
64+
65+
66+
// MAIN //
67+
68+
var dlarfg;
69+
var tmp = tryRequire( join( __dirname, './native.js' ) );
70+
if ( isError( tmp ) ) {
71+
dlarfg = main;
72+
} else {
73+
dlarfg = tmp;
74+
}
75+
76+
77+
// EXPORTS //
78+
79+
module.exports = dlarfg;
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 dlarfg = require( './dlarfg.js' );
25+
var ndarray = require( './ndarray.js' );
26+
27+
28+
// MAIN //
29+
30+
setReadOnly( dlarfg, 'ndarray', ndarray );
31+
32+
33+
// EXPORTS //
34+
35+
module.exports = dlarfg;
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
* Generates a real elementary reflector `H` of order `n` such that applying `H` to a vector `[alpha; x]` zeros out `x`.
30+
*
31+
* ## Notes
32+
*
33+
* - `H` is a Householder matrix with the form `H = I - tau * [1; v] * [1, v^T]`, where `tau` is a scalar and `v` is a vector.
34+
* - the input vector is `[alpha; x]`, where `alpha` is a scalar and `x` is a real `(n-1)`-element vector.
35+
* - the result of applying `H` to `[alpha; x]` is `[beta; 0]`, with `beta` being a scalar and the rest of the vector zeroed.
36+
* - if all elements of `x` are zero, then `tau = 0` and `H` is the identity matrix.
37+
* - otherwise, `1 <= tau <= 2` and `H` is orthogonal, i.e., `H^T * H = I`.
38+
*
39+
* @private
40+
* @param {NonNegativeInteger} N - order of matrix `A`
41+
* @param {Float64Array} X - overwritten by the vector `V` on exit
42+
* @param {integer} strideX - stride length for `X`
43+
* @param {NonNegativeInteger} offsetX - starting index of `X`
44+
* @param {Float64Array} out - array to store `alpha` and `tau`, first indexed element stores `alpha` and the second indexed element stores `tau`
45+
* @param {integer} strideOut - stride length for `out`
46+
* @param {NonNegativeInteger} offsetOut - starting index of `out`
47+
* @returns {void} overwrites the array `X` and `out` in place
48+
*
49+
* @example
50+
* var Float64Array = require( '@stdlib/array/float64' );
51+
*
52+
* var X = new Float64Array( [ 2.0, 3.0, 4.0 ] );
53+
* var out = new Float64Array( [ 4.0, 0.0 ] );
54+
*
55+
* dlarfg( 4, X, 1, 0, out, 1, 0 );
56+
* // X => <Float64Array>[ ~0.19, ~0.28, ~0.37 ]
57+
* // out => <Float64Array>[ ~6.7, ~1.6 ]
58+
*/
59+
function dlarfg( N, X, strideX, offsetX, out, strideOut, offsetOut ) {
60+
base( N, X, strideX, offsetX, out, strideOut, offsetOut );
61+
}
62+
63+
64+
// EXPORTS //
65+
66+
module.exports = dlarfg;

0 commit comments

Comments
 (0)