From f3d1cc4e3bbe646b275ce67fcf8825b99c1afd29 Mon Sep 17 00:00:00 2001 From: Prajjwal Bajpai Date: Tue, 9 Jun 2026 00:43:30 +0530 Subject: [PATCH 1/2] feat: add `lapack/base/dgelq2` --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: passed - 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: passed - 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: na - task: lint_license_headers status: passed --- --- .../@stdlib/lapack/base/dgelq2/lib/base.js | 102 +++++++++++ .../@stdlib/lapack/base/dgelq2/lib/dgelq2.js | 90 ++++++++++ .../@stdlib/lapack/base/dgelq2/lib/dlarfg.js | 142 +++++++++++++++ .../@stdlib/lapack/base/dgelq2/lib/index.js | 63 +++++++ .../@stdlib/lapack/base/dgelq2/lib/main.js | 35 ++++ .../@stdlib/lapack/base/dgelq2/lib/ndarray.js | 71 ++++++++ .../@stdlib/lapack/base/dgelq2/package.json | 69 ++++++++ .../base/dgelq2/test/fixtures/col_maj.json | 49 ++++++ .../base/dgelq2/test/fixtures/row_maj.json | 49 ++++++ .../lapack/base/dgelq2/test/test.dgelq2.js | 166 ++++++++++++++++++ .../@stdlib/lapack/base/dgelq2/test/test.js | 82 +++++++++ 11 files changed, 918 insertions(+) create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/lib/base.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dgelq2.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dlarfg.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/lib/index.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/lib/main.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/lib/ndarray.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/package.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/test/fixtures/col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/test/fixtures/row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/test/test.dgelq2.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/test/test.js diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/base.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/base.js new file mode 100644 index 000000000000..7c7067b02fd3 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/base.js @@ -0,0 +1,102 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable max-len, max-params, stdlib/jsdoc-doctest-decimal-point */ + +'use strict'; + +// MODULES // + +var dlarf1f = require( '@stdlib/lapack/base/dlarf1f' ).ndarray; +var Float64Array = require( '@stdlib/array/float64' ); +var min = require( '@stdlib/math/base/special/min' ); +var dlarfg = require( './dlarfg.js' ); + + +// MAIN // + +/** +* Computes an LQ factorization of a real M-by-N matrix `A = L * Q`, using Householder reflections (unblocked algorithm). +* +* ## Notes +* +* - On exit, the elements on and below the diagonal of A contain the M-by-min(M,N) lower trapezoidal matrix `L`. +* - The elements above the diagonal, with the array `TAU`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* +* @private +* @param {NonNegativeInteger} M - number of rows in `A` +* @param {NonNegativeInteger} N - number of columns in `A` +* @param {Float64Array} A - input/output matrix +* @param {integer} strideA1 - stride of the first dimension of `A` +* @param {integer} strideA2 - stride of the second dimension of `A` +* @param {NonNegativeInteger} offsetA - starting index for A`` +* @param {Float64Array} TAU - output array of scalar factors (length min(M,N)) +* @param {integer} strideTAU - stride for TAU +* @param {NonNegativeInteger} offsetTAU - starting index for TAU +* @param {Float64Array} WORK - workspace array (length >= M) +* @param {integer} strideWORK - stride for WORK +* @param {NonNegativeInteger} offsetWORK - starting index for WORK +* @returns {integer} status code +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12 ] ); +* var TAU = new Float64Array( 3 ); +* var work = new Float64Array( 3 ); +* +* var out = dgelq2( 3, 4, A, 1, 3, 0, TAU, 1, 0, work, 1, 0 ); +* // returns 0 +* // A => [ ~-5.477, ~-12.78, ~-20.083, ~0.309, ~-3.266, ~-6.532, ~0.463, ~-0.327, ~0, ~0.618, ~-0.789, ~0.618 ] +* // TAU => [ ~1.183, ~1.156, ~1.447 ] +* // work => [ ~6.532, ~24.593, 0 ] +*/ +function dgelq2( M, N, A, strideA1, strideA2, offsetA, TAU, strideTAU, offsetTAU, WORK, strideWORK, offsetWORK ) { + var taui; + var aii; + var out; + var K; + var i; + + K = min( M, N ); + out = new Float64Array( 2 ); + + aii = offsetA; // Index of A(i,i) + taui = offsetTAU; // Index of TAU(i) + + for ( i = 0; i < K; i++ ) { + // Generate elementary reflector H(i) to annihilate A(i, i+1:N-1) + out[ 0 ] = A[ aii ]; + dlarfg( N - i, A, strideA2, aii + ( min( 1, N - 1 - i ) * strideA2 ), out, 1, 0 ); + A[ aii ] = out[ 0 ]; + TAU[ taui ] = out[ 1 ]; + + if ( i < M - 1 ) { + // Apply H(i) to A(i+1:M-1, i:N-1) from the right + dlarf1f( 'right', M - i - 1, N - i, A, strideA2, aii, TAU[ taui ], A, strideA1, strideA2, aii + strideA1, WORK, strideWORK, offsetWORK); + } + aii += strideA1 + strideA2; + taui += strideTAU; + } + return 0; +} + + +// EXPORTS // + +module.exports = dgelq2; diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dgelq2.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dgelq2.js new file mode 100644 index 000000000000..03c84fbf3000 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dgelq2.js @@ -0,0 +1,90 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable stdlib/jsdoc-doctest-decimal-point */ + +'use strict'; + +// MODULES // + +var isLayout = require( '@stdlib/blas/base/assert/is-layout' ); +var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' ); +var max = require( '@stdlib/math/base/special/max' ); +var format = require( '@stdlib/string/format' ); +var base = require( './base.js' ); + + +// MAIN // + +/** +* Computes an LQ factorization of a real M-by-N matrix `A = L * Q`, using Householder reflections (unblocked algorithm). +* +* ## Notes +* +* - On exit, the elements on and below the diagonal of A contain the M-by-min(M,N) lower trapezoidal matrix `L`. +* - The elements above the diagonal, with the array `TAU`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* +* @param {string} order - storage layout +* @param {NonNegativeInteger} M - number of rows in `A` +* @param {NonNegativeInteger} N - number of columns in `A` +* @param {Float64Array} A - input/output matrix +* @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) +* @param {Float64Array} TAU - output array of scalar factors (length min(M,N)) +* @param {Float64Array} WORK - workspace array (length >= M) +* @throws {TypeError} first argument must be a valid order +* @throws {RangeError} fifth argument must be greater than or equal to max(1,`M`) +* @returns {integer} status code +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12 ] ); +* var TAU = new Float64Array( 3 ); +* var work = new Float64Array( 3 ); +* +* dgelq2( 'column-major', 3, 4, A, 3, TAU, work ); +* // A => [ ~-5.477, ~-12.78, ~-20.083, ~0.309, ~-3.266, ~-6.532, ~0.463, ~-0.327, ~0, ~0.618, ~-0.789, ~0.618 ] +* // TAU => [ ~1.183, ~1.156, ~1.447 ] +* // work => [ ~6.532, ~24.593, 0 ] +*/ +function dgelq2( order, M, N, A, LDA, TAU, WORK ) { + var sa1; + var sa2; + + if ( !isLayout( order ) ) { + throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) ); + } + if ( isColumnMajor( order ) ) { + if ( LDA < max( 1, M ) ) { + throw new RangeError( format( 'invalid argument. Fifth argument must be greater than or equal to max(1,`M`). Value: `%d`.', LDA ) ); + } + } + if ( isColumnMajor( order ) ) { + sa1 = 1; + sa2 = LDA; + } else { // order === 'row-major' + sa1 = LDA; + sa2 = 1; + } + return base( M, N, A, sa1, sa2, 0, TAU, 1, 0, WORK, 1, 0 ); +} + + +// EXPORTS // + +module.exports = dgelq2; diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dlarfg.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dlarfg.js new file mode 100644 index 000000000000..04ab125dc7e7 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dlarfg.js @@ -0,0 +1,142 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var dnrm2 = require( '@stdlib/blas/base/dnrm2' ).ndarray; +var sign = require( '@stdlib/math/base/special/copysign' ); +var dlamch = require( '@stdlib/lapack/base/dlamch' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var dscal = require( '@stdlib/blas/base/dscal' ).ndarray; +var dlapy2 = require( '@stdlib/lapack/base/dlapy2' ); + + +// MAIN // + +/** +* Generates a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X`. +* +* `H` is a Householder matrix with the form: +* +* ```tex +* H \cdot \begin{bmatrix} \alpha \\ x \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \end{bmatrix}, \quad \text{and} \quad H^T H = I +* ``` +* +* where: +* +* - `tau` is a scalar +* - `X` is a vector of length `N-1` +* - `beta` is a scalar value +* - `H` is an orthogonal matrix known as a Householder reflector. +* +* The reflector `H` is constructed in the form: +* +* ```tex +* H = I - \tau \begin{bmatrix}1 \\ v \end{bmatrix} \begin{bmatrix}1 & v^T \end{bmatrix} +* ``` +* +* where: +* +* - `tau` is a real scalar +* - `V` is a real vector of length `N-1` that defines the Householder vector +* - The vector `[1; V]` is the Householder direction. +* +* The values of `tau` and `V` are chosen so that applying `H` to the vector `[alpha; X]` results in a new vector `[beta; 0]`, i.e., only the first component remains nonzero. The reflector matrix `H` is symmetric and orthogonal, satisfying `H^T = H` and `H^T H = I` +* +* ## Special cases +* +* - If all elements of `X` are zero, then `tau = 0` and `H = I`, the identity matrix. +* - Otherwise, `tau` satisfies `1 ≤ tau ≤ 2`, ensuring numerical stability in transformations. +* +* ## Notes +* +* - `X` should have `N-1` indexed elements +* - The output array contains the following two elements: `alpha` and `tau` +* +* @private +* @param {NonNegativeInteger} N - number of rows/columns of the elementary reflector `H` +* @param {Float64Array} X - input vector +* @param {integer} strideX - stride length for `X` +* @param {NonNegativeInteger} offsetX - starting index of `X` +* @param {Float64Array} out - output array +* @param {integer} strideOut - stride length for `out` +* @param {NonNegativeInteger} offsetOut - starting index of `out` +* @returns {void} +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var X = new Float64Array( [ 2.0, 3.0, 4.0 ] ); +* var out = new Float64Array( [ 4.0, 0.0 ] ); +* +* dlarfg( 4, X, 1, 0, out, 1, 0 ); +* // X => [ ~0.19, ~0.28, ~0.37 ] +* // out => [ ~-6.7, ~1.6 ] +*/ +function dlarfg( N, X, strideX, offsetX, out, strideOut, offsetOut ) { + var safemin; + var rsafmin; + var xnorm; + var alpha; + var beta; + var tau; + var knt; + var i; + + if ( N <= 1 ) { + out[ offsetOut + strideOut ] = 0.0; + return; + } + + xnorm = dnrm2( N - 1, X, strideX, offsetX ); + alpha = out[ offsetOut ]; + + if ( xnorm === 0.0 ) { + out[ strideOut + offsetOut ] = 0.0; + } else { + beta = -1.0 * sign( dlapy2( alpha, xnorm ), alpha ); + safemin = dlamch( 'safemin' ) / dlamch( 'epsilon' ); + knt = 0; + if ( abs( beta ) < safemin ) { + rsafmin = 1.0 / safemin; + while ( abs( beta ) < safemin && knt < 20 ) { + knt += 1; + dscal( N-1, rsafmin, X, strideX, offsetX ); + beta *= rsafmin; + alpha *= rsafmin; + } + xnorm = dnrm2( N - 1, X, strideX, offsetX ); + beta = -1.0 * sign( dlapy2( alpha, xnorm ), alpha ); + } + tau = ( beta - alpha ) / beta; + dscal( N-1, 1.0 / ( alpha - beta ), X, strideX, offsetX ); + for ( i = 0; i < knt; i++ ) { + beta *= safemin; + } + + out[ offsetOut ] = beta; + out[ strideOut + offsetOut ] = tau; + } +} + + +// EXPORTS // + +module.exports = dlarfg; diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/index.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/index.js new file mode 100644 index 000000000000..c9f8c2fc4b9e --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/index.js @@ -0,0 +1,63 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* LAPACK routine to compute an LQ factorization of a real M-by-N matrix `A = L * Q`, using Householder reflections (unblocked algorithm). +* +* @module @stdlib/lapack/base/dgelq2 +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* var dgelq2 = require( '@stdlib/lapack/base/dgelq2' ); +* +* var A = new Float64Array( [ 1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12 ] ); +* var TAU = new Float64Array( 3 ); +* var work = new Float64Array( 3 ); +* +* var out = dgelq2( 'column-major', 3, 4, A, 3, TAU, work ); +* // ? => [ ~-5.477, ~-12.78, ~-20.083, ~0.309, ~-3.266, ~-6.532, ~0.463, ~-0.327, ~0, ~0.618, ~-0.789, ~0.618 ] +* // TAU => [ ~1.183, ~1.156, ~1.447 ] +* // work => [ ~6.532, ~24.593, 0 ] +*/ + +// MODULES // + +var join = require( 'path' ).join; +var tryRequire = require( '@stdlib/utils/try-require' ); +var isError = require( '@stdlib/assert/is-error' ); +var main = require( './main.js' ); + + +// MAIN // + +var dgelq2; +var tmp = tryRequire( join( __dirname, './native.js' ) ); +if ( isError( tmp ) ) { + dgelq2 = main; +} else { + dgelq2 = tmp; +} + + +// EXPORTS // + +module.exports = dgelq2; + +// exports: { "ndarray": "dgelq2.ndarray" } diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/main.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/main.js new file mode 100644 index 000000000000..645ab73845f2 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/main.js @@ -0,0 +1,35 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var dgelq2 = require( './dgelq2.js' ); +var ndarray = require( './ndarray.js' ); + + +// MAIN // + +setReadOnly( dgelq2, 'ndarray', ndarray ); + + +// EXPORTS // + +module.exports = dgelq2; diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/ndarray.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/ndarray.js new file mode 100644 index 000000000000..2d141cbca905 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/ndarray.js @@ -0,0 +1,71 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable max-len, stdlib/jsdoc-doctest-decimal-point */ + +'use strict'; + +// MODULES // + +var base = require( './base.js' ); + + +// MAIN // + +/** +* Computes an LQ factorization of a real M-by-N matrix `A = L * Q`, using Householder reflections (unblocked algorithm) using alternative indexing semantics. +* +* ## Notes +* +* - On exit, the elements on and below the diagonal of A contain the M-by-min(M,N) lower trapezoidal matrix `L`. +* - The elements above the diagonal, with the array `TAU`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* +* @param {NonNegativeInteger} M - number of rows in `A` +* @param {NonNegativeInteger} N - number of columns in `A` +* @param {Float64Array} A - input/output matrix +* @param {integer} strideA1 - stride of the first dimension of `A` +* @param {integer} strideA2 - stride of the second dimension of `A` +* @param {NonNegativeInteger} offsetA - starting index for A`` +* @param {Float64Array} TAU - output array of scalar factors (length min(M,N)) +* @param {integer} strideTAU - stride for TAU +* @param {NonNegativeInteger} offsetTAU - starting index for TAU +* @param {Float64Array} WORK - workspace array (length >= M) +* @param {integer} strideWORK - stride for WORK +* @param {NonNegativeInteger} offsetWORK - starting index for WORK +* @returns {integer} status code +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12 ] ); +* var TAU = new Float64Array( 3 ); +* var work = new Float64Array( 3 ); +* +* dgelq2( 3, 4, A, 1, 3, 0, TAU, 1, 0, work, 1, 0 ); +* // A => [ ~-5.477, ~-12.78, ~-20.083, ~0.309, ~-3.266, ~-6.532, ~0.463, ~-0.327, ~0, ~0.618, ~-0.789, ~0.618 ] +* // TAU => [ ~1.183, ~1.156, ~1.447 ] +* // work => [ ~6.532, ~24.593, 0 ] +*/ +function dgelq2( M, N, A, strideA1, strideA2, offsetA, TAU, strideTAU, offsetTAU, WORK, strideWORK, offsetWORK ) { // eslint-disable-line max-params + return base( M, N, A, strideA1, strideA2, offsetA, TAU, strideTAU, offsetTAU, WORK, strideWORK, offsetWORK ); +} + + +// EXPORTS // + +module.exports = dgelq2; diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/package.json b/lib/node_modules/@stdlib/lapack/base/dgelq2/package.json new file mode 100644 index 000000000000..84a066e7871e --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/lapack/base/dgelq2", + "version": "0.0.0", + "description": "LAPACK routine to compute an LQ factorization of a real M-by-N matrix `A = L * Q`, using Householder reflections (unblocked algorithm).", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "lapack", + "dgelq2", + "reflector", + "linear", + "algebra", + "subroutines", + "array", + "ndarray", + "matrix", + "float64", + "double", + "float64array" + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/test/fixtures/col_maj.json b/lib/node_modules/@stdlib/lapack/base/dgelq2/test/fixtures/col_maj.json new file mode 100644 index 000000000000..61e9cb319100 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/test/fixtures/col_maj.json @@ -0,0 +1,49 @@ +{ + "order": "column-major", + + "M": 3, + "N": 4, + + "A": [ 1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12 ], + "strideA1": 1, + "strideA2": 3, + "offsetA": 0, + "LDA": 3, + "A_mat": [ + [1, 2, 3, 4], + [5, 6, 7, 8], + [9, 10, 11, 12] + ], + + "TAU": [ 0, 0, 0 ], + "strideTAU": 1, + "offsetTAU": 0, + + "WORK": [ 0, 0, 0 ], + "strideWORK": 1, + "offsetWORK": 0, + + "A_out": [ + -5.477225575051661, + -12.780193008453875, + -20.08316044185609, + 0.3087741775897697, + -3.2659863237109037, + -6.5319726474218065, + 0.4631612663846546, + -0.3270980595940773, + 1.9860273225978185e-15, + 0.6175483551795394, + -0.7892453989841914, + 0.6180339887498948 + ], + "A_out_mat": [ + [ -5.4772255750516612, 0.3087741775897697, 0.4631612663846546, 0.6175483551795394 ], + [ -12.7801930084538746, -3.2659863237109037, -0.3270980595940773, -0.7892453989841914 ], + [ -20.0831604418560907, -6.5319726474218065, 0.0000000000000020, 0.6180339887498948 ] + ], + + "TAU_out": [ 1.1825741858350554, 1.1561352301830456, 1.4472135954999579 ], + + "WORK_out": [ 6.5319726474218065, 24.5930959682833716, 0.0000000000000000 ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/test/fixtures/row_maj.json b/lib/node_modules/@stdlib/lapack/base/dgelq2/test/fixtures/row_maj.json new file mode 100644 index 000000000000..28c59eeb5f47 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/test/fixtures/row_maj.json @@ -0,0 +1,49 @@ +{ + "order": "row-major", + + "M": 3, + "N": 4, + + "A": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ], + "strideA1": 1, + "strideA2": 3, + "offsetA": 0, + "LDA": 4, + "A_mat": [ + [1, 2, 3, 4], + [5, 6, 7, 8], + [9, 10, 11, 12] + ], + + "TAU": [ 0, 0, 0 ], + "strideTAU": 1, + "offsetTAU": 0, + + "WORK": [ 0, 0, 0 ], + "strideWORK": 1, + "offsetWORK": 0, + + "A_out": [ + -5.4772255750516612, + 0.3087741775897697, + 0.4631612663846546, + 0.6175483551795394, + -12.7801930084538746, + -3.2659863237109037, + -0.3270980595940773, + -0.7892453989841914, + -20.0831604418560907, + -6.5319726474218065, + 0.0000000000000020, + 0.6180339887498948 + ], + "A_out_mat": [ + [ -5.4772255750516612, 0.3087741775897697, 0.4631612663846546, 0.6175483551795394 ], + [ -12.7801930084538746, -3.2659863237109037, -0.3270980595940773, -0.7892453989841914 ], + [ -20.0831604418560907, -6.5319726474218065, 0.0000000000000020, 0.6180339887498948 ] + ], + + "TAU_out": [ 1.1825741858350554, 1.1561352301830456, 1.4472135954999579 ], + + "WORK_out": [ 6.5319726474218065, 24.5930959682833716, 0.0000000000000000 ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/test/test.dgelq2.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/test/test.dgelq2.js new file mode 100644 index 000000000000..7e91f7a8b911 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/test/test.dgelq2.js @@ -0,0 +1,166 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Float64Array = require( '@stdlib/array/float64' ); +var isAlmostEqual = require( '@stdlib/assert/is-almost-equal-float64array' ); +var dgelq2 = require( './../lib/dgelq2.js' ); + + +// FIXTURES // + +var COL_MAJ = require( './fixtures/col_maj.json' ); +var ROW_MAJ = require( './fixtures/row_maj.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dgelq2, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 7', function test( t ) { + t.strictEqual( dgelq2.length, 7, 'returns expected value' ); + t.end(); +}); + +tape( 'the function throws an error if provided a first argument which is not a valid order', function test( t ) { + var values; + var work; + var TAU; + var A; + var i; + + A = new Float64Array( [ 1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12 ] ); + TAU = new Float64Array( 3 ); + work = new Float64Array( 3 ); + + values = [ + 'foo', + 'bar', + 'beep', + 'boop', + -5, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dgelq2( value, 3, 4, A, 3, TAU, work ); + }; + } +}); + +tape( 'the function throws an error if provided a fifth argument which is not a valid LDA value', function test( t ) { + var values; + var work; + var TAU; + var A; + var i; + + A = new Float64Array( [ 1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12 ] ); + TAU = new Float64Array( 3 ); + work = new Float64Array( 3 ); + + values = [ + 2, + 1, + 0 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dgelq2( 'column-major', 3, 4, A, value, TAU, work ); + }; + } +}); + +tape( 'the function computes an LQ factorization of a real M-by-N matrix `A = L * Q` (col-major)', function test( t ) { + var expectedWork; + var expectedTau; + var expectedA; + var data; + var work; + var tau; + var A; + + data = COL_MAJ; + + A = new Float64Array( data.A ); + tau = new Float64Array( data.TAU ); + work = new Float64Array( data.WORK ); + + expectedA = new Float64Array( data.A_out ); + expectedTau = new Float64Array( data.TAU_out ); + expectedWork = new Float64Array( data.WORK_out ); + + dgelq2( data.order, data.M, data.N, A, data.LDA, tau, work ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( tau, expectedTau, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( work, expectedWork, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function computes an LQ factorization of a real M-by-N matrix `A = L * Q` (row-major)', function test( t ) { + var expectedWork; + var expectedTau; + var expectedA; + var data; + var work; + var tau; + var A; + + data = ROW_MAJ; + + A = new Float64Array( data.A ); + tau = new Float64Array( data.TAU ); + work = new Float64Array( data.WORK ); + + expectedA = new Float64Array( data.A_out ); + expectedTau = new Float64Array( data.TAU_out ); + expectedWork = new Float64Array( data.WORK_out ); + + dgelq2( data.order, data.M, data.N, A, data.LDA, tau, work ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( tau, expectedTau, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( work, expectedWork, 1 ), true, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/test/test.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/test/test.js new file mode 100644 index 000000000000..2981a734588a --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/test/test.js @@ -0,0 +1,82 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var proxyquire = require( 'proxyquire' ); +var IS_BROWSER = require( '@stdlib/assert/is-browser' ); +var dgelq2 = require( './../lib' ); + + +// VARIABLES // + +var opts = { + 'skip': IS_BROWSER +}; + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dgelq2, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) { + t.strictEqual( typeof dgelq2.ndarray, 'function', 'method is a function' ); + t.end(); +}); + +tape( 'if a native implementation is available, the main export is the native implementation', opts, function test( t ) { + var dgelq2 = proxyquire( './../lib', { + '@stdlib/utils/try-require': tryRequire + }); + + t.strictEqual( dgelq2, mock, 'returns expected value' ); + t.end(); + + function tryRequire() { + return mock; + } + + function mock() { + // Mock... + } +}); + +tape( 'if a native implementation is not available, the main export is a JavaScript implementation', opts, function test( t ) { + var dgelq2; + var main; + + main = require( './../lib/dgelq2.js' ); + + dgelq2 = proxyquire( './../lib', { + '@stdlib/utils/try-require': tryRequire + }); + + t.strictEqual( dgelq2, main, 'returns expected value' ); + t.end(); + + function tryRequire() { + return new Error( 'Cannot find module' ); + } +}); From aec2ab031c1aa52439f63707cf20892d5d2cd0da Mon Sep 17 00:00:00 2001 From: Prajjwal Bajpai Date: Wed, 10 Jun 2026 00:07:47 +0530 Subject: [PATCH 2/2] fix: update implementation doctests and add benchmarks --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - 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: passed - 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: na - task: lint_license_headers status: passed --- --- .../lapack/base/dgelq2/benchmark/benchmark.js | 118 ++++++++++++++++ .../dgelq2/benchmark/benchmark.ndarray.js | 132 ++++++++++++++++++ .../@stdlib/lapack/base/dgelq2/lib/base.js | 11 +- .../@stdlib/lapack/base/dgelq2/lib/dgelq2.js | 4 +- .../@stdlib/lapack/base/dgelq2/lib/ndarray.js | 4 +- 5 files changed, 257 insertions(+), 12 deletions(-) create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgelq2/benchmark/benchmark.ndarray.js diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/benchmark/benchmark.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/benchmark/benchmark.js new file mode 100644 index 000000000000..49be6ab4ab8c --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/benchmark/benchmark.js @@ -0,0 +1,118 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var Float64Array = require( '@stdlib/array/float64' ); +var floor = require( '@stdlib/math/base/special/floor' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var dgelq2 = require( './../lib/dgelq2.js' ); + + +// VARIABLES // + +var LAYOUTS = [ + 'row-major', + 'column-major' +]; +var opts = { + 'dtype': 'float64' +}; + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {string} order - storage layout +* @param {PositiveInteger} N - matrix dimension +* @returns {Function} benchmark function +*/ +function createBenchmark( order, N ) { + var work = new Float64Array( N ); + var TAU = new Float64Array( N ); + var A = discreteUniform( N*N, 1.0, 10.0, opts ); + + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + var z; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = dgelq2( order, N, N, A, N, TAU, work ); + if ( z !== 0 ) { + b.fail( 'should return 0' ); + } + } + b.toc(); + + if ( z !== 0 ) { + b.fail( 'should return 0' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var min; + var max; + var ord; + var N; + var f; + var i; + var k; + + min = 1; // 10^min + max = 6; // 10^max + + for ( k = 0; k < LAYOUTS.length; k++ ) { + ord = LAYOUTS[ k ]; + for ( i = min; i <= max; i++ ) { + N = floor( pow( pow( 10, i ), 1.0/2.0 ) ); + f = createBenchmark( ord, N ); + bench( format( '%s::square_matrix:order=%s,size=%d', pkg, ord, N*N ), f ); + } + } +} + +main(); diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/benchmark/benchmark.ndarray.js new file mode 100644 index 000000000000..5ef9237e07c6 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/benchmark/benchmark.ndarray.js @@ -0,0 +1,132 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' ); +var Float64Array = require( '@stdlib/array/float64' ); +var floor = require( '@stdlib/math/base/special/floor' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var dgelq2 = require( './../lib/ndarray.js' ); + + +// VARIABLES // + +var LAYOUTS = [ + 'row-major', + 'column-major' +]; +var opts = { + 'dtype': 'float64' +}; + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {string} order - storage layout +* @param {PositiveInteger} N - matrix dimension +* @returns {Function} benchmark function +*/ +function createBenchmark( order, N ) { + var work; + var TAU; + var sa1; + var sa2; + var A; + + work = new Float64Array( N ); + TAU = new Float64Array( N ); + A = discreteUniform( N*N, 1.0, 10.0, opts ); + if ( isColumnMajor( order ) ) { + sa1 = 1; + sa2 = N; + } else { // order === 'row-major' + sa1 = N; + sa2 = 1; + } + + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + var z; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = dgelq2( N, N, A, sa1, sa2, 0, TAU, 1, 0, work, 1, 0 ); + if ( z !== 0 ) { + b.fail( 'should return 0' ); + } + } + b.toc(); + + if ( z !== 0 ) { + b.fail( 'should return 0' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var min; + var max; + var ord; + var N; + var f; + var i; + var k; + + min = 1; // 10^min + max = 6; // 10^max + + for ( k = 0; k < LAYOUTS.length; k++ ) { + ord = LAYOUTS[ k ]; + for ( i = min; i <= max; i++ ) { + N = floor( pow( pow( 10, i ), 1.0/2.0 ) ); + f = createBenchmark( ord, N ); + bench( format( '%s::square_matrix:ndarray:order=%s,size=%d', pkg, ord, N*N ), f ); + } + } +} + +main(); diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/base.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/base.js index 7c7067b02fd3..99bc1082b3c7 100644 --- a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/base.js +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/base.js @@ -16,8 +16,6 @@ * limitations under the License. */ -/* eslint-disable max-len, max-params, stdlib/jsdoc-doctest-decimal-point */ - 'use strict'; // MODULES // @@ -44,7 +42,7 @@ var dlarfg = require( './dlarfg.js' ); * @param {Float64Array} A - input/output matrix * @param {integer} strideA1 - stride of the first dimension of `A` * @param {integer} strideA2 - stride of the second dimension of `A` -* @param {NonNegativeInteger} offsetA - starting index for A`` +* @param {NonNegativeInteger} offsetA - starting index for `A` * @param {Float64Array} TAU - output array of scalar factors (length min(M,N)) * @param {integer} strideTAU - stride for TAU * @param {NonNegativeInteger} offsetTAU - starting index for TAU @@ -60,13 +58,12 @@ var dlarfg = require( './dlarfg.js' ); * var TAU = new Float64Array( 3 ); * var work = new Float64Array( 3 ); * -* var out = dgelq2( 3, 4, A, 1, 3, 0, TAU, 1, 0, work, 1, 0 ); -* // returns 0 +* dgelq2( 3, 4, A, 1, 3, 0, TAU, 1, 0, work, 1, 0 ); * // A => [ ~-5.477, ~-12.78, ~-20.083, ~0.309, ~-3.266, ~-6.532, ~0.463, ~-0.327, ~0, ~0.618, ~-0.789, ~0.618 ] * // TAU => [ ~1.183, ~1.156, ~1.447 ] * // work => [ ~6.532, ~24.593, 0 ] */ -function dgelq2( M, N, A, strideA1, strideA2, offsetA, TAU, strideTAU, offsetTAU, WORK, strideWORK, offsetWORK ) { +function dgelq2( M, N, A, strideA1, strideA2, offsetA, TAU, strideTAU, offsetTAU, WORK, strideWORK, offsetWORK ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point, max-len, max-params var taui; var aii; var out; @@ -88,7 +85,7 @@ function dgelq2( M, N, A, strideA1, strideA2, offsetA, TAU, strideTAU, offsetTAU if ( i < M - 1 ) { // Apply H(i) to A(i+1:M-1, i:N-1) from the right - dlarf1f( 'right', M - i - 1, N - i, A, strideA2, aii, TAU[ taui ], A, strideA1, strideA2, aii + strideA1, WORK, strideWORK, offsetWORK); + dlarf1f( 'right', M - i - 1, N - i, A, strideA2, aii, TAU[ taui ], A, strideA1, strideA2, aii + strideA1, WORK, strideWORK, offsetWORK); } aii += strideA1 + strideA2; taui += strideTAU; diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dgelq2.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dgelq2.js index 03c84fbf3000..1e6c789b87b9 100644 --- a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dgelq2.js +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/dgelq2.js @@ -16,8 +16,6 @@ * limitations under the License. */ -/* eslint-disable stdlib/jsdoc-doctest-decimal-point */ - 'use strict'; // MODULES // @@ -62,7 +60,7 @@ var base = require( './base.js' ); * // TAU => [ ~1.183, ~1.156, ~1.447 ] * // work => [ ~6.532, ~24.593, 0 ] */ -function dgelq2( order, M, N, A, LDA, TAU, WORK ) { +function dgelq2( order, M, N, A, LDA, TAU, WORK ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point var sa1; var sa2; diff --git a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/ndarray.js b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/ndarray.js index 2d141cbca905..1e3452bba8d3 100644 --- a/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/ndarray.js +++ b/lib/node_modules/@stdlib/lapack/base/dgelq2/lib/ndarray.js @@ -16,7 +16,7 @@ * limitations under the License. */ -/* eslint-disable max-len, stdlib/jsdoc-doctest-decimal-point */ +/* eslint-disable max-len */ 'use strict'; @@ -61,7 +61,7 @@ var base = require( './base.js' ); * // TAU => [ ~1.183, ~1.156, ~1.447 ] * // work => [ ~6.532, ~24.593, 0 ] */ -function dgelq2( M, N, A, strideA1, strideA2, offsetA, TAU, strideTAU, offsetTAU, WORK, strideWORK, offsetWORK ) { // eslint-disable-line max-params +function dgelq2( M, N, A, strideA1, strideA2, offsetA, TAU, strideTAU, offsetTAU, WORK, strideWORK, offsetWORK ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point, max-params return base( M, N, A, strideA1, strideA2, offsetA, TAU, strideTAU, offsetTAU, WORK, strideWORK, offsetWORK ); }