From 97db5a84b7c4db713f86ef824a85702dd1ad7d45 Mon Sep 17 00:00:00 2001 From: Prajjwal Bajpai Date: Sun, 21 Jun 2026 00:38:01 +0530 Subject: [PATCH 1/5] feat: add base implementation --- 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: 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/dlabrd/lib/base.js | 198 ++++++++++++++++++ .../@stdlib/lapack/base/dlabrd/lib/dlarfg.js | 142 +++++++++++++ 2 files changed, 340 insertions(+) create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/lib/base.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/lib/dlarfg.js diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/base.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/base.js new file mode 100644 index 000000000000..803057d1a4f9 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/base.js @@ -0,0 +1,198 @@ +/** +* @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 */ + +'use strict'; + +// MODULES // + +var dgemv = require( '@stdlib/blas/base/dgemv' ).ndarray; +var dscal = require( '@stdlib/blas/base/dscal' ).ndarray; +var min = require( '@stdlib/math/base/special/min' ); +var dlarfg = require( './dlarfg.js' ); + + +// MAIN // + +/** +* Reduces the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P`. +* +* ## Notes +* +* - If `M >= N`, +* +* - `A` is reduced to upper bi-diagonal form. +* - Elements on and below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* - Elements above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. +* +* - If `M < N`, +* +* - `A` is reduced to lower bi-diagonal form. +* - Elements below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* - Elements on and above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. +* +* @private +* @param {NonNegativeInteger} M - number of rows in `A` +* @param {NonNegativeInteger} N - number of columns in `A` +* @param {integer} NB - number of leading rows and columns of `A` to reduce +* @param {Float64Array} A - input 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} D - real diagonal elements (length `NB`) +* @param {integer} strideD - stride length for `D` +* @param {NonNegativeInteger} offsetD - starting index for `D` +* @param {Float64Array} E - real off-diagonal elements (length `NB`) +* @param {integer} strideE - stride length for `E` +* @param {NonNegativeInteger} offsetE - starting index for `E` +* @param {Float64Array} TAUQ - scalars factors of the elementary reflectors that represent the orthogonal matrix `Q` (length `NB`) +* @param {integer} strideTAUQ - stride length for `TAUQ` +* @param {NonNegativeInteger} offsetTAUQ - starting index for `TAUQ` +* @param {Float64Array} TAUP - scalars factors of the elementary reflectors that represent the orthogonal matrix `P` (length `NB`) +* @param {integer} strideTAUP - stride length for `TAUP` +* @param {NonNegativeInteger} offsetTAUP - starting index for `TAUP` +* @param {Float64Array} X - output matrix +* @param {integer} strideX1 - stride of the first dimension of `X` +* @param {integer} strideX2 - stride of the second dimension of `X` +* @param {NonNegativeInteger} offsetX - starting index for `X` +* @param {Float64Array} Y - output matrix +* @param {integer} strideY1 - stride of the first dimension of `Y` +* @param {integer} strideY2 - stride of the second dimension of `Y` +* @param {NonNegativeInteger} offsetY - starting index for `Y` +*/ +function dlabrd( M, N, NB, A, strideA1, strideA2, offsetA, D, strideD, offsetD, E, strideE, offsetE, TAUQ, strideTAUQ, offsetTAUQ, TAUP, strideTAUP, offsetTAUP, X, strideX1, strideX2, offsetX, Y, strideY1, strideY2, offsetY ) { + var i; + + if ( M <= 0 || N <= 0 ) { + return; + } + + if ( M >= N ) { + // Reduce to upper bi-diagonal form + for ( i = 0; i < NB; i++ ) { + // Update A(i:M-1, i) + dgemv( 'no-transpose', M - i, i, -1.0, A, strideA1, strideA2, offsetA + ( i * strideA1 ), Y, strideY2, offsetY + ( i * strideY1 ), 1.0, A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ) ); + + dgemv( 'no-transpose', M - i, i, -1.0, X, strideX1, strideX2, offsetX + ( i * strideX1 ), A, strideA1, offsetA + ( i * strideA2 ), 1.0, A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ) ); + + // Generate elementary reflector H(i) to annihilate A(i+1:M-1, i) + dlarfg( M - i, A, offsetA + ( i * strideA1 ) + ( i * strideA2 ), A, strideA1, offsetA + ( ( i + 1, M - 1 ) * strideA1 ) + ( i * strideA2 ), TAUQ, offsetTAUQ + ( i * strideTAUQ ) ); + A[ offsetD + ( i * strideD ) ] = A[ offsetA + ( i * ( strideA1 + strideA2 ) ) ]; + + if ( i < N - 1 ) { + A[ offsetA + ( i * ( strideA1 + strideA2 ) ) ] = 1.0; + + // Compute Y(i+1:N-1, i) + dgemv( 'transpose', M - i, N - i - 1, 1.0, A, strideA1, strideA2, offsetA + ( i * strideA1 ) + ( ( i + 1 ) * strideA2 ), A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ), 0.0, Y, strideY1, offsetY + ( i * ( strideY1 + strideY2 ) ) + strideY1 ); + + dgemv( 'transpose', M - i, i, 1.0, A, strideA1, strideA2, offsetA + ( i * strideA1 ), A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ), 0.0, Y, strideY1, offsetY + ( i * strideY2 ) ); + + dgemv( 'no-transpose', N - i - 1, i, -1.0, Y, strideY1, strideY2, offsetY + ( ( i + 1 ) * strideY1 ), Y, strideY1, offsetY + ( i * strideY2 ), 1.0, Y, strideY1, offsetY + ( i * ( strideY1 + strideY2 ) ) + strideY1 ); + + dgemv( 'transpose', M - i, i, 1.0, X, strideX1, strideX2, offsetX + ( i * strideX1 ), A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ), 0.0, Y, strideY1, offsetY + ( i * strideY2 ) ); + + dgemv( 'transpose', i, N - i - 1, -1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * strideA2 ), Y, strideY1, offsetY + ( i * strideY2 ), 1.0, Y, strideY1, offsetY + ( i * ( strideY1 + strideY2 ) ) + strideY1 ); + + dscal( N - i - 1, TAUQ[ offsetTAUQ + ( i * strideTAUQ ) ], Y, strideY1, offsetY + ( i * ( strideY1 + strideY2 ) ) + strideY1 ); + + // Update A(i, i+1:N-1) + dgemv( 'no-transpose', N - i - 1, i + 1, -1.0, Y, strideY1, strideY2, offsetY + ( ( i + 1 ) * strideY1 ), A, strideA2, offsetA + ( i * strideA1 ), 1.0, A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2 ); + + dgemv( 'transpose', i, N - i - 1, -1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * strideA2 ), X, strideX2, offsetX + ( i * strideX1 ), 1.0, A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2 ); + + // Generate elementary reflector P(i) to annihilate A(i, i+2:N-1) + dlarfg( N - i - 1, A, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2, A, strideA2, offsetA + ( i * strideA1 ) + ( min( i + 2, N - 1 ) * strideA2 ), TAUP, offsetTAUP + ( i * strideTAUP ) ); + E[ offsetE + ( i * strideE ) ] = A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2 ]; + A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2 ] = 1.0; + + // Compute X(i+1:M-1, i) + + dgemv( 'no-transpose', M - i - 1, N - i - 1, 1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * ( strideA1 + strideA2 ) ), A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2, 0.0, X, strideX1, offsetX + ( i * ( strideX1 + strideX2 ) ) + strideX1 ); + + dgemv( 'transpose', N - i - 1, i + 1, 1.0, Y, strideY1, strideY2, offsetY + ( ( i + 1 ) * strideY1 ), A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2, 0.0, X, strideX1, offsetX + ( i * strideX2 ) ); + + dgemv( 'no-transpose', M - i - 1, i + 1, -1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * strideA1 ), X, strideX1, offsetX + ( i * strideX2 ), 1.0, X, strideX1, offsetX + ( i * ( strideX1 + strideX2 ) ) + strideX1 ); + + dgemv( 'no-transpose', i, N - i - 1, 1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * strideA2 ), A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2, 0.0, X, strideX1, offsetX + ( i * strideX2 ) ); + + dgemv( 'no-transpose', M - i - 1, i, -1.0, X, strideX1, strideX2, offsetX + ( ( i + 1 ) * strideX1 ), X, strideX1, offsetX + ( i * strideX2 ), 1.0, X, strideX1, offsetX + ( i * ( strideX1 + strideX2 ) ) + strideX1 ); + + dscal( M - i - 1, TAUP[ offsetTAUP + ( i * strideTAUP ) ], X, strideX1, offsetX + ( i * ( strideX1 + strideX2 ) ) + strideX1 ); + } + } + } else { + // Reduce to lower bi-diagonal form (M < N) + for ( i = 0; i < NB; i++ ) { + // Update A(i, i:N-1) + dgemv( 'no-transpose', N - i, i, -1.0, Y, strideY1, strideY2, offsetY + ( i * strideY1 ), A, strideA2, offsetA + ( i * strideA1 ), 1.0, A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) ); + + dgemv( 'transpose', i, N - i, -1.0, A, strideA1, strideA2, offsetA + ( i * strideA2 ), X, strideX2, offsetX + ( i * strideX1 ), 1.0, A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) ); + + // Generate elementary reflector P(i) to annihilate A(i, i+1:N-1) + dlarfg( N - i, A, offsetA + ( i * ( strideA1 + strideA2 ) ), A, strideA2, offsetA + ( i * strideA1 ) + ( min( i + 1, N - 1 ) * strideA2 ), TAUP, offsetTAUP + ( i * strideTAUP ) ); + D[ offsetD + ( i * strideD ) ] = A[ offsetA + ( i * ( strideA1 + strideA2 ) ) ]; + + if ( i < M - 1 ) { + // Set A(i,i) = 1 for use as reflector vector + A[ offsetA + ( i * ( strideA1 + strideA2 ) ) ] = 1.0; + + // Compute X(i+1:M-1, i) + dgemv( 'no-transpose', M - i - 1, N - i, 1.0, A, strideA1, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1, A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ), 0.0, X, strideX1, offsetX + ( i * ( strideX1 + strideX2 ) ) + strideX1 ); + + dgemv( 'transpose', N - i, i, 1.0, Y, strideY1, strideY2, offsetY + ( i * strideY1 ), A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ), 0.0, X, strideX1, offsetX + ( i * strideX2 ) ); + + dgemv( 'no-transpose', M - i - 1, i, -1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * strideA1 ), X, strideX1, offsetX + ( i * strideX2 ), 1.0, X, strideX1, offsetX + ( i * ( strideX1 + strideX2 ) ) + strideX1 ); + + dgemv( 'no-transpose', i, N - i, 1.0, A, strideA1, strideA2, offsetA + ( i * strideA2 ), A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ), 0.0, X, strideX1, offsetX + ( i * strideX2 ) ); + + dgemv( 'no-transpose', M - i - 1, i, -1.0, X, strideX1, strideX2, offsetX + ( ( i + 1 ) * strideX1 ), X, strideX1, offsetX + ( i * strideX2 ), 1.0, X, strideX1, offsetX + ( i * ( strideX1 + strideX2 ) ) + strideX1 ); + + dscal( M - i - 1, TAUP[ offsetTAUP + ( i * strideTAUP ) ], X, strideX1, offsetX + ( i * ( strideX1 + strideX2 ) ) + strideX1 ); + + // Update A(i+1:M-1, i) + dgemv( 'no-transpose', M - i - 1, i, -1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * strideA1 ), Y, strideY2, offsetY + ( i * strideY1 ), 1.0, A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1 ); + + dgemv( 'no-transpose', M - i - 1, i + 1, -1.0, X, strideX1, strideX2, offsetX + ( ( i + 1 ) * strideX1 ), A, strideA1, offsetA + ( i * strideA2 ), 1.0, A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1 ); + + dlarfg( M - i - 1, A, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1, A, strideA1, offsetA + ( min( i + 2, M - 1 ) * strideA1 ) + ( i * strideA2 ), TAUQ, offsetTAUQ + ( i * strideTAUQ ) ); + + E[ offsetE + ( i * strideE ) ] = A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1 ]; + A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1 ] = 1.0; + + // Compute Y(i+1:N-1, i) + dgemv( 'transpose', M - i - 1, N - i - 1, 1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * ( strideA1 + strideA2 ) ), A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1, 0.0, Y, strideY1, offsetY + ( i * ( strideY1 + strideY2 ) ) + strideY1 ); + + dgemv( 'transpose', M - i - 1, i, 1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * strideA1 ), A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1, 0.0, Y, strideY1, offsetY + ( i * strideY2 ) ); + + dgemv( 'no-transpose', N - i - 1, i, -1.0, Y, strideY1, strideY2, offsetY + ( ( i + 1 ) * strideY1 ), Y, strideY1, offsetY + ( i * strideY2 ), 1.0, Y, strideY1, offsetY + ( i * ( strideY1 + strideY2 ) ) + strideY1 ); + + dgemv( 'transpose', M - i - 1, i + 1, 1.0, X, strideX1, strideX2, offsetX + ( ( i + 1 ) * strideX1 ), A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1, 0.0, Y, strideY1, offsetY + ( i * strideY2 ) ); + + dgemv( 'transpose', i + 1, N - i - 1, -1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * strideA2 ), Y, strideY1, offsetY + ( i * strideY2 ), 1.0, Y, strideY1, offsetY + ( i * ( strideY1 + strideY2 ) ) + strideY1 ); + + dscal( N - i - 1, TAUQ[ offsetTAUQ + ( i * strideTAUQ ) ], Y, strideY1, offsetY + ( i * ( strideY1 + strideY2 ) ) + strideY1 ); + } + } + } +} + + +// EXPORTS // + +module.exports = dlabrd; diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/dlarfg.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/dlarfg.js new file mode 100644 index 000000000000..04ab125dc7e7 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/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; From a575a999137689698012b8119b8866d1f64d2e6e Mon Sep 17 00:00:00 2001 From: Prajjwal Bajpai Date: Mon, 22 Jun 2026 11:58:07 +0530 Subject: [PATCH 2/5] feat: complete main exports and add tests --- 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/dlabrd/lib/base.js | 63 +- .../@stdlib/lapack/base/dlabrd/lib/dlabrd.js | 138 +++ .../@stdlib/lapack/base/dlabrd/lib/index.js | 71 ++ .../@stdlib/lapack/base/dlabrd/lib/main.js | 35 + .../@stdlib/lapack/base/dlabrd/lib/ndarray.js | 112 ++ .../@stdlib/lapack/base/dlabrd/package.json | 69 ++ .../large_strides/m_gt_n_col_maj.json | 430 +++++++ .../large_strides/m_gt_n_row_maj.json | 430 +++++++ .../large_strides/m_lt_n_col_maj.json | 426 +++++++ .../large_strides/m_lt_n_row_maj.json | 426 +++++++ .../dlabrd/test/fixtures/m_gt_n_col_maj.json | 141 +++ .../dlabrd/test/fixtures/m_gt_n_row_maj.json | 141 +++ .../dlabrd/test/fixtures/m_lt_n_col_maj.json | 139 +++ .../dlabrd/test/fixtures/m_lt_n_row_maj.json | 139 +++ .../mixed_strides/m_gt_n_col_maj.json | 310 +++++ .../mixed_strides/m_gt_n_row_maj.json | 310 +++++ .../mixed_strides/m_lt_n_col_maj.json | 306 +++++ .../mixed_strides/m_lt_n_row_maj.json | 306 +++++ .../negative_strides/m_gt_n_col_maj.json | 310 +++++ .../negative_strides/m_gt_n_row_maj.json | 310 +++++ .../negative_strides/m_lt_n_col_maj.json | 306 +++++ .../negative_strides/m_lt_n_row_maj.json | 306 +++++ .../test/fixtures/offsets/m_gt_n_col_maj.json | 324 +++++ .../test/fixtures/offsets/m_gt_n_row_maj.json | 324 +++++ .../test/fixtures/offsets/m_lt_n_col_maj.json | 320 +++++ .../test/fixtures/offsets/m_lt_n_row_maj.json | 320 +++++ .../lapack/base/dlabrd/test/test.dlabrd.js | 508 ++++++++ .../@stdlib/lapack/base/dlabrd/test/test.js | 82 ++ .../lapack/base/dlabrd/test/test.ndarray.js | 1104 +++++++++++++++++ 29 files changed, 8199 insertions(+), 7 deletions(-) create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/lib/dlabrd.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/lib/index.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/lib/main.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/lib/ndarray.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/package.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_gt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_gt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_lt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_lt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_gt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_gt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_lt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_lt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_gt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_gt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_lt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_lt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_gt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_gt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_lt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_lt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_gt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_gt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_lt_n_col_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_lt_n_row_maj.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.dlabrd.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.ndarray.js diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/base.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/base.js index 803057d1a4f9..d1e80f487078 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/base.js +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/base.js @@ -25,6 +25,7 @@ var dgemv = require( '@stdlib/blas/base/dgemv' ).ndarray; var dscal = require( '@stdlib/blas/base/dscal' ).ndarray; var min = require( '@stdlib/math/base/special/min' ); +var Float64Array = require( '@stdlib/array/float64' ); var dlarfg = require( './dlarfg.js' ); @@ -75,14 +76,38 @@ var dlarfg = require( './dlarfg.js' ); * @param {integer} strideY1 - stride of the first dimension of `Y` * @param {integer} strideY2 - stride of the second dimension of `Y` * @param {NonNegativeInteger} offsetY - starting index for `Y` +* @returns {void} +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var D = new Float64Array( [ 0.0 ] ); +* var E = new Float64Array( [ 0.0 ] ); +* var TAUQ = new Float64Array( [ 0.0 ] ); +* var TAUP = new Float64Array( [ 0.0 ] ); +* var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); +* var Y = new Float64Array( [ 0.0, 0.0 ] ); +* +* dlabrd( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); +* // A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +* // D => [ ~-3.742 ] +* // E => [ ~-8.552 ] +* // TAUQ => [ ~1.267 ] +* // TAUP => [ 0.0 ] +* // X => [ ~12.552, 0.0, 0.0 ] +* // Y => [ 0.0, ~12.552 ] */ function dlabrd( M, N, NB, A, strideA1, strideA2, offsetA, D, strideD, offsetD, E, strideE, offsetE, TAUQ, strideTAUQ, offsetTAUQ, TAUP, strideTAUP, offsetTAUP, X, strideX1, strideX2, offsetX, Y, strideY1, strideY2, offsetY ) { + var out; var i; if ( M <= 0 || N <= 0 ) { return; } + out = new Float64Array( 2 ); + if ( M >= N ) { // Reduce to upper bi-diagonal form for ( i = 0; i < NB; i++ ) { @@ -92,8 +117,14 @@ function dlabrd( M, N, NB, A, strideA1, strideA2, offsetA, D, strideD, offsetD, dgemv( 'no-transpose', M - i, i, -1.0, X, strideX1, strideX2, offsetX + ( i * strideX1 ), A, strideA1, offsetA + ( i * strideA2 ), 1.0, A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ) ); // Generate elementary reflector H(i) to annihilate A(i+1:M-1, i) - dlarfg( M - i, A, offsetA + ( i * strideA1 ) + ( i * strideA2 ), A, strideA1, offsetA + ( ( i + 1, M - 1 ) * strideA1 ) + ( i * strideA2 ), TAUQ, offsetTAUQ + ( i * strideTAUQ ) ); - A[ offsetD + ( i * strideD ) ] = A[ offsetA + ( i * ( strideA1 + strideA2 ) ) ]; + out[ 0 ] = A[ offsetA + ( ( strideA1 + strideA2 ) * i ) ]; + + dlarfg( M - i, A, strideA1, offsetA + ( min( i + 1, M - 1 ) * strideA1 ) + ( i * strideA2 ), out, 1, 0 ); + + A[ offsetA + ( ( strideA1 + strideA2 ) * i ) ] = out[ 0 ]; + TAUQ[ offsetTAUQ + ( strideTAUQ * i ) ] = out[ 1 ]; + + D[ offsetD + ( i * strideD ) ] = A[ offsetA + ( i * ( strideA1 + strideA2 ) ) ]; if ( i < N - 1 ) { A[ offsetA + ( i * ( strideA1 + strideA2 ) ) ] = 1.0; @@ -117,8 +148,14 @@ function dlabrd( M, N, NB, A, strideA1, strideA2, offsetA, D, strideD, offsetD, dgemv( 'transpose', i, N - i - 1, -1.0, A, strideA1, strideA2, offsetA + ( ( i + 1 ) * strideA2 ), X, strideX2, offsetX + ( i * strideX1 ), 1.0, A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2 ); // Generate elementary reflector P(i) to annihilate A(i, i+2:N-1) - dlarfg( N - i - 1, A, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2, A, strideA2, offsetA + ( i * strideA1 ) + ( min( i + 2, N - 1 ) * strideA2 ), TAUP, offsetTAUP + ( i * strideTAUP ) ); - E[ offsetE + ( i * strideE ) ] = A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2 ]; + out[ 0 ] = A[ offsetA + ( ( strideA1 + strideA2 ) * i ) + strideA2 ]; + + dlarfg( N - i - 1, A, strideA2, offsetA + ( i * strideA1 ) + ( min( i + 2, N - 1 ) * strideA2 ), out, 1, 0 ); + + A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2 ] = out[ 0 ]; + TAUP[ offsetTAUP + ( i * strideTAUP ) ] = out[ 1 ]; + + E[ offsetE + ( i * strideE ) ] = out[ 0 ]; A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA2 ] = 1.0; // Compute X(i+1:M-1, i) @@ -145,7 +182,13 @@ function dlabrd( M, N, NB, A, strideA1, strideA2, offsetA, D, strideD, offsetD, dgemv( 'transpose', i, N - i, -1.0, A, strideA1, strideA2, offsetA + ( i * strideA2 ), X, strideX2, offsetX + ( i * strideX1 ), 1.0, A, strideA2, offsetA + ( i * ( strideA1 + strideA2 ) ) ); // Generate elementary reflector P(i) to annihilate A(i, i+1:N-1) - dlarfg( N - i, A, offsetA + ( i * ( strideA1 + strideA2 ) ), A, strideA2, offsetA + ( i * strideA1 ) + ( min( i + 1, N - 1 ) * strideA2 ), TAUP, offsetTAUP + ( i * strideTAUP ) ); + out[ 0 ] = A[ offsetA + ( ( strideA1 + strideA2 ) * i ) ]; + + dlarfg( N - i, A, strideA2, offsetA + ( i * strideA1 ) + ( min( i + 1, N - 1 ) * strideA2 ), out, 1, 0 ); + + A[ offsetA + ( ( strideA1 + strideA2 ) * i ) ] = out[ 0 ]; + TAUP[ offsetTAUP + ( i * strideTAUP ) ] = out[ 1 ]; + D[ offsetD + ( i * strideD ) ] = A[ offsetA + ( i * ( strideA1 + strideA2 ) ) ]; if ( i < M - 1 ) { @@ -170,9 +213,15 @@ function dlabrd( M, N, NB, A, strideA1, strideA2, offsetA, D, strideD, offsetD, dgemv( 'no-transpose', M - i - 1, i + 1, -1.0, X, strideX1, strideX2, offsetX + ( ( i + 1 ) * strideX1 ), A, strideA1, offsetA + ( i * strideA2 ), 1.0, A, strideA1, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1 ); - dlarfg( M - i - 1, A, offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1, A, strideA1, offsetA + ( min( i + 2, M - 1 ) * strideA1 ) + ( i * strideA2 ), TAUQ, offsetTAUQ + ( i * strideTAUQ ) ); + // Generate reflection Q(i) to annihilate A(i+2:M-1, i) + out[ 0 ] = A[ offsetA + ( ( strideA1 + strideA2 ) * i ) + strideA1 ]; + + dlarfg( M - i - 1, A, strideA1, offsetA + ( min( i + 2, M - 1 ) * strideA1 ) + ( i * strideA2 ), out, 1, 0 ); + + A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1 ] = out[ 0 ]; + TAUQ[ offsetTAUQ + ( i * strideTAUQ ) ] = out[ 1 ]; - E[ offsetE + ( i * strideE ) ] = A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1 ]; + E[ offsetE + ( i * strideE ) ] = out[ 0 ]; A[ offsetA + ( i * ( strideA1 + strideA2 ) ) + strideA1 ] = 1.0; // Compute Y(i+1:N-1, i) diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/dlabrd.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/dlabrd.js new file mode 100644 index 000000000000..77bf8d230324 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/dlabrd.js @@ -0,0 +1,138 @@ +/** +* @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 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 // + +/** +* Reduces the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P`. +* +* ## Notes +* +* - If `M >= N`, +* +* - `A` is reduced to upper bi-diagonal form. +* - Elements on and below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* - Elements above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. +* +* - If `M < N`, +* +* - `A` is reduced to lower bi-diagonal form. +* - Elements below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* - Elements on and above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` 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 {integer} NB - number of leading rows and columns of `A` to reduce +* @param {Float64Array} A - input matrix +* @param {integer} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) +* @param {Float64Array} D - real diagonal elements (length `NB`) +* @param {Float64Array} E - real off-diagonal elements (length `NB`) +* @param {Float64Array} TAUQ - scalars factors of the elementary reflectors that represent the orthogonal matrix `Q` (length `NB`) +* @param {Float64Array} TAUP - scalars factors of the elementary reflectors that represent the orthogonal matrix `P` (length `NB`) +* @param {Float64Array} X - output matrix +* @param {integer} LDX - stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`) +* @param {Float64Array} Y - output matrix +* @param {integer} LDY - stride of the first dimension of `Y` (a.k.a., leading dimension of the matrix `Y`) +* @throws {TypeError} first argument must be a valid order +* @throws {RangeError} second argument must be a non-negative integer +* @throws {RangeError} third argument must be a non-negative integer +* @throws {RangeError} sixth argument must be greater than or equal to max(1,N) +* @throws {RangeError} twelfth argument must be greater than or equal to max(1,NB) +* @throws {RangeError} fourteenth argument must be greater than or equal to max(1,NB) +* @returns {void} +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var D = new Float64Array( [ 0.0 ] ); +* var E = new Float64Array( [ 0.0 ] ); +* var TAUQ = new Float64Array( [ 0.0 ] ); +* var TAUP = new Float64Array( [ 0.0 ] ); +* var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); +* var Y = new Float64Array( [ 0.0, 0.0 ] ); +* +* dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); +* // A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +* // D => [ ~-3.742 ] +* // E => [ ~-8.552 ] +* // TAUQ => [ ~1.267 ] +* // TAUP => [ 0.0 ] +* // X => [ ~12.552, 0.0, 0.0 ] +* // Y => [ 0.0, ~12.552 ] +*/ +function dlabrd( order, M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, LDY ) { // eslint-disable-line max-params + var sA1; + var sA2; + var sX1; + var sX2; + var sY1; + var sY2; + + if ( !isLayout( order ) ) { + throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) ); + } + if ( M < 0 ) { + throw new RangeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%d`.', M ) ); + } + if ( N < 0 ) { + throw new RangeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%d`.', N ) ); + } + if ( isColumnMajor( order ) ) { + sA1 = 1; + sA2 = LDA; + sX1 = 1; + sX2 = LDX; + sY1 = 1; + sY2 = LDY; + } else { // order === 'row-major' + if ( LDA < max( 1, N ) ) { + throw new RangeError( format( 'invalid argument. Sixth argument must be greater than or equal to max(1,%d). Value: `%d`.', N, LDA ) ); + } + if ( LDX < max( 1, NB ) ) { + throw new RangeError( format( 'invalid argument. Twelfth argument must be greater than or equal to max(1,%d). Value: `%d`.', NB, LDX ) ); + } + if ( LDY < max( 1, NB ) ) { + throw new RangeError( format( 'invalid argument. Fourteenth argument must be greater than or equal to max(1,%d). Value: `%d`.', NB, LDY ) ); + } + sA1 = LDA; + sA2 = 1; + sX1 = LDX; + sX2 = 1; + sY1 = LDY; + sY2 = 1; + } + return base( M, N, NB, A, sA1, sA2, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, sX1, sX2, 0, Y, sY1, sY2, 0 ); // eslint-disable-line max-len +} + + +// EXPORTS // + +module.exports = dlabrd; diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/index.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/index.js new file mode 100644 index 000000000000..d0c3c97a839c --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/index.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. +*/ + +'use strict'; + +/** +* LAPACK routine to reduce the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P`. +* +* @module @stdlib/lapack/base/dlabrd +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* var dlabrd = require( '@stdlib/lapack/base/dlabrd' ); +* +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var D = new Float64Array( [ 0.0 ] ); +* var E = new Float64Array( [ 0.0 ] ); +* var TAUQ = new Float64Array( [ 0.0 ] ); +* var TAUP = new Float64Array( [ 0.0 ] ); +* var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); +* var Y = new Float64Array( [ 0.0, 0.0 ] ); +* +* dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); +* // A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +* // D => [ ~-3.742 ] +* // E => [ ~-8.552 ] +* // TAUQ => [ ~1.267 ] +* // TAUP => [ 0.0 ] +* // X => [ ~12.552, 0.0, 0.0 ] +* // Y => [ 0.0, ~12.552 ] +*/ + +// 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 dlabrd; +var tmp = tryRequire( join( __dirname, './native.js' ) ); +if ( isError( tmp ) ) { + dlabrd = main; +} else { + dlabrd = tmp; +} + + +// EXPORTS // + +module.exports = dlabrd; + +// exports: { "ndarray": "dlabrd.ndarray" } diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/main.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/main.js new file mode 100644 index 000000000000..d9c8d705bc74 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/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 dlabrd = require( './dlabrd.js' ); +var ndarray = require( './ndarray.js' ); + + +// MAIN // + +setReadOnly( dlabrd, 'ndarray', ndarray ); + + +// EXPORTS // + +module.exports = dlabrd; diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/ndarray.js new file mode 100644 index 000000000000..fcdcb0a55aaa --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/ndarray.js @@ -0,0 +1,112 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 */ + +'use strict'; + +// MODULES // + +var format = require( '@stdlib/string/format' ); +var base = require( './base.js' ); + + +// MAIN // + +/** +* Reduces the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P` using alternative indexing semantics. +* +* ## Notes +* +* - If `M >= N`, +* +* - `A` is reduced to upper bi-diagonal form. +* - Elements on and below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* - Elements above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. +* +* - If `M < N`, +* +* - `A` is reduced to lower bi-diagonal form. +* - Elements below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* - Elements on and above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. +* +* @param {NonNegativeInteger} M - number of rows in `A` +* @param {NonNegativeInteger} N - number of columns in `A` +* @param {integer} NB - number of leading rows and columns of `A` to reduce +* @param {Float64Array} A - input 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} D - real diagonal elements (length `NB`) +* @param {integer} strideD - stride length for `D` +* @param {NonNegativeInteger} offsetD - starting index for `D` +* @param {Float64Array} E - real off-diagonal elements (length `NB`) +* @param {integer} strideE - stride length for `E` +* @param {NonNegativeInteger} offsetE - starting index for `E` +* @param {Float64Array} TAUQ - scalars factors of the elementary reflectors that represent the orthogonal matrix `Q` (length `NB`) +* @param {integer} strideTAUQ - stride length for `TAUQ` +* @param {NonNegativeInteger} offsetTAUQ - starting index for `TAUQ` +* @param {Float64Array} TAUP - scalars factors of the elementary reflectors that represent the orthogonal matrix `P` (length `NB`) +* @param {integer} strideTAUP - stride length for `TAUP` +* @param {NonNegativeInteger} offsetTAUP - starting index for `TAUP` +* @param {Float64Array} X - output matrix +* @param {integer} strideX1 - stride of the first dimension of `X` +* @param {integer} strideX2 - stride of the second dimension of `X` +* @param {NonNegativeInteger} offsetX - starting index for `X` +* @param {Float64Array} Y - output matrix +* @param {integer} strideY1 - stride of the first dimension of `Y` +* @param {integer} strideY2 - stride of the second dimension of `Y` +* @param {NonNegativeInteger} offsetY - starting index for `Y` +* @throws {TypeError} first argument must be a valid order +* @throws {RangeError} second argument must be a non-negative integer +* @returns {void} +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var D = new Float64Array( [ 0.0 ] ); +* var E = new Float64Array( [ 0.0 ] ); +* var TAUQ = new Float64Array( [ 0.0 ] ); +* var TAUP = new Float64Array( [ 0.0 ] ); +* var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); +* var Y = new Float64Array( [ 0.0, 0.0 ] ); +* +* dlabrd( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); +* // A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +* // D => [ ~-3.742 ] +* // E => [ ~-8.552 ] +* // TAUQ => [ ~1.267 ] +* // TAUP => [ 0.0 ] +* // X => [ ~12.552, 0.0, 0.0 ] +* // Y => [ 0.0, ~12.552 ] +*/ +function dlabrd( M, N, NB, A, strideA1, strideA2, offsetA, D, strideD, offsetD, E, strideE, offsetE, TAUQ, strideTAUQ, offsetTAUQ, TAUP, strideTAUP, offsetTAUP, X, strideX1, strideX2, offsetX, Y, strideY1, strideY2, offsetY ) { // eslint-disable-line max-params + if ( M < 0 ) { + throw new RangeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%d`.', M ) ); + } + if ( N < 0 ) { + throw new RangeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%d`.', N ) ); + } + return base( M, N, NB, A, strideA1, strideA2, offsetA, D, strideD, offsetD, E, strideE, offsetE, TAUQ, strideTAUQ, offsetTAUQ, TAUP, strideTAUP, offsetTAUP, X, strideX1, strideX2, offsetX, Y, strideY1, strideY2, offsetY ); +} + + +// EXPORTS // + +module.exports = dlabrd; diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/package.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/package.json new file mode 100644 index 000000000000..bd9aca2a8abf --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/lapack/base/dlabrd", + "version": "0.0.0", + "description": "LAPACK routine to reduce the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P`.", + "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", + "dlabrd", + "reflector", + "linear", + "algebra", + "subroutines", + "array", + "ndarray", + "matrix", + "float64", + "double", + "float64array" + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_gt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_gt_n_col_maj.json new file mode 100644 index 000000000000..9c0760d5651f --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_gt_n_col_maj.json @@ -0,0 +1,430 @@ +{ + "order": "column-major", + "M": 6, + "N": 5, + "NB": 2, + "A": [ + 4, + 9999, + -1, + 9999, + 2.5, + 9999, + 0, + 9999, + 1.5, + 9999, + -3, + 9999, + 7, + 9999, + 8.5, + 9999, + -2, + 9999, + 0.25, + 9999, + 5, + 9999, + 1.2, + 9999, + 3, + 9999, + -4.5, + 9999, + 6.1, + 9999, + -1.1, + 9999, + 2.2, + 9999, + 9, + 9999, + -5, + 9999, + 1, + 9999, + 0.75, + 9999, + 4.4, + 9999, + -6.6, + 9999, + 2.8, + 9999, + 1.1, + 9999, + -2.2, + 9999, + 3.3, + 9999, + -4.4, + 9999, + 5.5, + 9999, + -6.6, + 9999 + ], + "strideA1": 2, + "strideA2": 12, + "offsetA": 0, + "LDA": 6, + "A_mat": [ + [ + 4, + 7, + 3, + -5, + 1.1 + ], + [ + -1, + 8.5, + -4.5, + 1, + -2.2 + ], + [ + 2.5, + -2, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4 + ], + [ + 1.5, + 5, + 2.2, + -6.6, + 5.5 + ], + [ + -3, + 1.2, + 9, + 2.8, + -6.6 + ] + ], + "D": [ + 0, + 9999, + 0, + 9999 + ], + "strideD": 2, + "offsetD": 0, + "E": [ + 0, + 9999, + 0, + 9999 + ], + "strideE": 2, + "offsetE": 0, + "TAUQ": [ + 0, + 9999, + 0, + 9999 + ], + "strideTAUQ": 2, + "offsetTAUQ": 0, + "TAUP": [ + 0, + 9999, + 0, + 9999 + ], + "strideTAUP": 2, + "offsetTAUP": 0, + "X": [ + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999 + ], + "strideX1": 2, + "strideX2": 12, + "offsetX": 0, + "LDX": 6, + "Y": [ + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999 + ], + "strideY1": 2, + "strideY2": 10, + "offsetY": 0, + "LDY": 5, + "A_out": [ + 1, + 9999, + -0.10127946282353326, + 9999, + 0.25319865705883315, + 9999, + 0, + 9999, + 0.15191919423529987, + 9999, + -0.30383838847059974, + 9999, + 1, + 9999, + 1, + 9999, + -0.19054227437573865, + 9999, + -0.526899018490766, + 9999, + 0.6475245675965607, + 9999, + 0.01883610338962286, + 9999, + 0.10219770511529666, + 9999, + 1, + 9999, + 6.1, + 9999, + -1.1, + 9999, + 2.2, + 9999, + 9, + 9999, + -0.4751241135329162, + 9999, + 0.034896598936109594, + 9999, + 0.75, + 9999, + 4.4, + 9999, + -6.6, + 9999, + 2.8, + 9999, + 0.5446312483784129, + 9999, + 0.6571073276387958, + 9999, + 3.3, + 9999, + -4.4, + 9999, + 5.5, + 9999, + -6.6, + 9999 + ], + "A_out_mat": [ + [ + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129 + ], + [ + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958 + ], + [ + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4 + ], + [ + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5 + ], + [ + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6 + ] + ], + "D_out": [ + -5.873670062235365, + 9999, + 9.747022547553634, + 9999 + ], + "E_out": [ + 10.277882719140447, + 9999, + -3.000401789770699, + 9999 + ], + "TAUQ_out": [ + 1.681005224606999, + 9999, + 1.1536874341152112, + 9999 + ], + "TAUP_out": [ + 1.3047927397885486, + 9999, + 1.3956658033120086, + 9999 + ], + "X_out": [ + 20.55919077536717, + 9999, + 11.024221604671157, + 9999, + -6.7082179947936025, + 9999, + -5.6749886484384255, + 9999, + 10.742084972404617, + 9999, + 4.490492468212516, + 9999, + 0.443498673650984, + 9999, + -12.838631647380957, + 9999, + 8.958872342639227, + 9999, + -11.284711234784144, + 9999, + 10.733222336505026, + 9999, + 8.229287201135405, + 9999 + ], + "X_out_mat": [ + [ + 20.55919077536717, + 0.443498673650984 + ], + [ + 11.024221604671157, + -12.838631647380957 + ], + [ + -6.7082179947936025, + 8.958872342639227 + ], + [ + -5.6749886484384255, + -11.284711234784144 + ], + [ + 10.742084972404617, + 10.733222336505026 + ], + [ + 4.490492468212516, + 8.229287201135405 + ] + ], + "Y_out": [ + 0, + 9999, + 10.132624033192196, + 9999, + 4.370523014521586, + 9999, + -11.371655132729234, + 9999, + 8.403781033910063, + 9999, + 22.33291397445922, + 9999, + 0, + 9999, + -6.371162309919643, + 9999, + 4.9400268559265585, + 9999, + -10.104680307318146, + 9999 + ], + "Y_out_mat": [ + [ + 0, + 22.33291397445922 + ], + [ + 10.132624033192196, + 0 + ], + [ + 4.370523014521586, + -6.371162309919643 + ], + [ + -11.371655132729234, + 4.9400268559265585 + ], + [ + 8.403781033910063, + -10.104680307318146 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_gt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_gt_n_row_maj.json new file mode 100644 index 000000000000..564a64f96b12 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_gt_n_row_maj.json @@ -0,0 +1,430 @@ +{ + "order": "row-major", + "M": 6, + "N": 5, + "NB": 2, + "A": [ + 4, + 9999, + 7, + 9999, + 3, + 9999, + -5, + 9999, + 1.1, + 9999, + -1, + 9999, + 8.5, + 9999, + -4.5, + 9999, + 1, + 9999, + -2.2, + 9999, + 2.5, + 9999, + -2, + 9999, + 6.1, + 9999, + 0.75, + 9999, + 3.3, + 9999, + 0, + 9999, + 0.25, + 9999, + -1.1, + 9999, + 4.4, + 9999, + -4.4, + 9999, + 1.5, + 9999, + 5, + 9999, + 2.2, + 9999, + -6.6, + 9999, + 5.5, + 9999, + -3, + 9999, + 1.2, + 9999, + 9, + 9999, + 2.8, + 9999, + -6.6, + 9999 + ], + "strideA1": 10, + "strideA2": 2, + "offsetA": 0, + "LDA": 5, + "A_mat": [ + [ + 4, + 7, + 3, + -5, + 1.1 + ], + [ + -1, + 8.5, + -4.5, + 1, + -2.2 + ], + [ + 2.5, + -2, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4 + ], + [ + 1.5, + 5, + 2.2, + -6.6, + 5.5 + ], + [ + -3, + 1.2, + 9, + 2.8, + -6.6 + ] + ], + "D": [ + 0, + 9999, + 0, + 9999 + ], + "strideD": 2, + "offsetD": 0, + "E": [ + 0, + 9999, + 0, + 9999 + ], + "strideE": 2, + "offsetE": 0, + "TAUQ": [ + 0, + 9999, + 0, + 9999 + ], + "strideTAUQ": 2, + "offsetTAUQ": 0, + "TAUP": [ + 0, + 9999, + 0, + 9999 + ], + "strideTAUP": 2, + "offsetTAUP": 0, + "X": [ + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999 + ], + "strideX1": 4, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "Y": [ + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999 + ], + "strideY1": 4, + "strideY2": 2, + "offsetY": 0, + "LDY": 2, + "A_out": [ + 1, + 9999, + 1, + 9999, + 0.10219770511529666, + 9999, + -0.4751241135329162, + 9999, + 0.5446312483784129, + 9999, + -0.10127946282353326, + 9999, + 1, + 9999, + 1, + 9999, + 0.034896598936109594, + 9999, + 0.6571073276387958, + 9999, + 0.25319865705883315, + 9999, + -0.19054227437573865, + 9999, + 6.1, + 9999, + 0.75, + 9999, + 3.3, + 9999, + 0, + 9999, + -0.526899018490766, + 9999, + -1.1, + 9999, + 4.4, + 9999, + -4.4, + 9999, + 0.15191919423529987, + 9999, + 0.6475245675965607, + 9999, + 2.2, + 9999, + -6.6, + 9999, + 5.5, + 9999, + -0.30383838847059974, + 9999, + 0.01883610338962286, + 9999, + 9, + 9999, + 2.8, + 9999, + -6.6, + 9999 + ], + "A_out_mat": [ + [ + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129 + ], + [ + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958 + ], + [ + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4 + ], + [ + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5 + ], + [ + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6 + ] + ], + "D_out": [ + -5.873670062235365, + 9999, + 9.747022547553634, + 9999 + ], + "E_out": [ + 10.277882719140447, + 9999, + -3.000401789770699, + 9999 + ], + "TAUQ_out": [ + 1.681005224606999, + 9999, + 1.1536874341152112, + 9999 + ], + "TAUP_out": [ + 1.3047927397885486, + 9999, + 1.3956658033120086, + 9999 + ], + "X_out": [ + 20.55919077536717, + 9999, + 0.443498673650984, + 9999, + 11.024221604671157, + 9999, + -12.838631647380957, + 9999, + -6.7082179947936025, + 9999, + 8.958872342639227, + 9999, + -5.6749886484384255, + 9999, + -11.284711234784144, + 9999, + 10.742084972404617, + 9999, + 10.733222336505026, + 9999, + 4.490492468212516, + 9999, + 8.229287201135405, + 9999 + ], + "X_out_mat": [ + [ + 20.55919077536717, + 0.443498673650984 + ], + [ + 11.024221604671157, + -12.838631647380957 + ], + [ + -6.7082179947936025, + 8.958872342639227 + ], + [ + -5.6749886484384255, + -11.284711234784144 + ], + [ + 10.742084972404617, + 10.733222336505026 + ], + [ + 4.490492468212516, + 8.229287201135405 + ] + ], + "Y_out": [ + 0, + 9999, + 22.33291397445922, + 9999, + 10.132624033192196, + 9999, + 0, + 9999, + 4.370523014521586, + 9999, + -6.371162309919643, + 9999, + -11.371655132729234, + 9999, + 4.9400268559265585, + 9999, + 8.403781033910063, + 9999, + -10.104680307318146, + 9999 + ], + "Y_out_mat": [ + [ + 0, + 22.33291397445922 + ], + [ + 10.132624033192196, + 0 + ], + [ + 4.370523014521586, + -6.371162309919643 + ], + [ + -11.371655132729234, + 4.9400268559265585 + ], + [ + 8.403781033910063, + -10.104680307318146 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_lt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_lt_n_col_maj.json new file mode 100644 index 000000000000..984344299903 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_lt_n_col_maj.json @@ -0,0 +1,426 @@ +{ + "order": "column-major", + "M": 5, + "N": 6, + "NB": 2, + "A": [ + 2, + 9999, + -1, + 9999, + 3.5, + 9999, + 0, + 9999, + 1.2, + 9999, + 4, + 9999, + 5.5, + 9999, + -2, + 9999, + 0.25, + 9999, + -3, + 9999, + 6, + 9999, + -4.5, + 9999, + 7.1, + 9999, + -1.1, + 9999, + 2.2, + 9999, + -5, + 9999, + 1, + 9999, + 0.75, + 9999, + 4.4, + 9999, + -6.6, + 9999, + 8, + 9999, + -2.2, + 9999, + 3.3, + 9999, + -4.4, + 9999, + 5.5, + 9999, + -7, + 9999, + 6.1, + 9999, + -8.2, + 9999, + 9.3, + 9999, + -1.4, + 9999 + ], + "strideA1": 2, + "strideA2": 10, + "offsetA": 0, + "LDA": 5, + "A_mat": [ + [ + 2, + 4, + 6, + -5, + 8, + -7 + ], + [ + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1 + ], + [ + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D": [ + 0, + 9999, + 0, + 9999 + ], + "strideD": 2, + "offsetD": 0, + "E": [ + 0, + 9999, + 0, + 9999 + ], + "strideE": 2, + "offsetE": 0, + "TAUQ": [ + 0, + 9999, + 0, + 9999 + ], + "strideTAUQ": 2, + "offsetTAUQ": 0, + "TAUP": [ + 0, + 9999, + 0, + 9999 + ], + "strideTAUP": 2, + "offsetTAUP": 0, + "X": [ + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999 + ], + "strideX1": 2, + "strideX2": 10, + "offsetX": 0, + "LDX": 5, + "Y": [ + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999 + ], + "strideY1": 2, + "strideY2": 12, + "offsetY": 0, + "LDY": 6, + "A_out": [ + 1, + 9999, + 1, + 9999, + -0.42927571920226854, + 9999, + 0.45133057530596093, + 9999, + -0.3190014386838066, + 9999, + 0.25112396373019197, + 9999, + 1, + 9999, + 1, + 9999, + -0.5598442949740452, + 9999, + 0.4533192433895179, + 9999, + 0.37668594559528795, + 9999, + -0.02316001991491976, + 9999, + 7.1, + 9999, + -1.1, + 9999, + 2.2, + 9999, + -0.31390495466273993, + 9999, + -0.013172004174208005, + 9999, + 0.75, + 9999, + 4.4, + 9999, + -6.6, + 9999, + 0.5022479274603839, + 9999, + 0.07079950984804703, + 9999, + 3.3, + 9999, + -4.4, + 9999, + 5.5, + 9999, + -0.43946693652783597, + 9999, + 0.2634237587021064, + 9999, + -8.2, + 9999, + 9.3, + 9999, + -1.4, + 9999 + ], + "A_out_mat": [ + [ + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597 + ], + [ + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064 + ], + [ + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D_out": [ + -13.92838827718412, + 9999, + 10.46201443392983, + 9999 + ], + "E_out": [ + -15.15496966905916, + 9999, + 4.9476461153575455, + 9999 + ], + "TAUQ_out": [ + 1.3425171808429295, + 9999, + 1.31672159905915, + 9999 + ], + "TAUP_out": [ + 1.1435916317235477, + 9999, + 1.8602669148589588, + 9999 + ], + "X_out": [ + 0, + 9999, + -6.190837486806247, + 9999, + 12.233960999584784, + 9999, + -9.182684848720871, + 9999, + 7.690341753904352, + 9999, + 0.16632754194258703, + 9999, + 0, + 9999, + 3.386718220335033, + 9999, + -8.33722876685781, + 9999, + 3.1434992214838484, + 9999 + ], + "X_out_mat": [ + [ + 0, + 0.16632754194258703 + ], + [ + -6.190837486806247, + 0 + ], + [ + 12.233960999584784, + 3.386718220335033 + ], + [ + -9.182684848720871, + -8.33722876685781 + ], + [ + 7.690341753904352, + 3.1434992214838484 + ] + ], + "Y_out": [ + -18.04023641268767, + 9999, + 16.054792528782958, + 9999, + -2.6187420613598307, + 9999, + -1.1996899409061839, + 9999, + 2.2872452210334266, + 9999, + 8.506121505666528, + 9999, + 20.86101462997251, + 9999, + 9.47927687003247, + 9999, + -1.435130831066579, + 9999, + 1.2856459620766303, + 9999, + -1.318582442958037, + 9999, + -0.4473155444742362, + 9999 + ], + "Y_out_mat": [ + [ + -18.04023641268767, + 20.86101462997251 + ], + [ + 16.054792528782958, + 9.47927687003247 + ], + [ + -2.6187420613598307, + -1.435130831066579 + ], + [ + -1.1996899409061839, + 1.2856459620766303 + ], + [ + 2.2872452210334266, + -1.318582442958037 + ], + [ + 8.506121505666528, + -0.4473155444742362 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_lt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_lt_n_row_maj.json new file mode 100644 index 000000000000..d02bc791b9b3 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/large_strides/m_lt_n_row_maj.json @@ -0,0 +1,426 @@ +{ + "order": "row-major", + "M": 5, + "N": 6, + "NB": 2, + "A": [ + 2, + 9999, + 4, + 9999, + 6, + 9999, + -5, + 9999, + 8, + 9999, + -7, + 9999, + -1, + 9999, + 5.5, + 9999, + -4.5, + 9999, + 1, + 9999, + -2.2, + 9999, + 6.1, + 9999, + 3.5, + 9999, + -2, + 9999, + 7.1, + 9999, + 0.75, + 9999, + 3.3, + 9999, + -8.2, + 9999, + 0, + 9999, + 0.25, + 9999, + -1.1, + 9999, + 4.4, + 9999, + -4.4, + 9999, + 9.3, + 9999, + 1.2, + 9999, + -3, + 9999, + 2.2, + 9999, + -6.6, + 9999, + 5.5, + 9999, + -1.4, + 9999 + ], + "strideA1": 12, + "strideA2": 2, + "offsetA": 0, + "LDA": 6, + "A_mat": [ + [ + 2, + 4, + 6, + -5, + 8, + -7 + ], + [ + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1 + ], + [ + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D": [ + 0, + 9999, + 0, + 9999 + ], + "strideD": 2, + "offsetD": 0, + "E": [ + 0, + 9999, + 0, + 9999 + ], + "strideE": 2, + "offsetE": 0, + "TAUQ": [ + 0, + 9999, + 0, + 9999 + ], + "strideTAUQ": 2, + "offsetTAUQ": 0, + "TAUP": [ + 0, + 9999, + 0, + 9999 + ], + "strideTAUP": 2, + "offsetTAUP": 0, + "X": [ + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999 + ], + "strideX1": 4, + "strideX2": 2, + "offsetX": 0, + "LDX": 2, + "Y": [ + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999, + 0, + 9999 + ], + "strideY1": 4, + "strideY2": 2, + "offsetY": 0, + "LDY": 2, + "A_out": [ + 1, + 9999, + 0.25112396373019197, + 9999, + 0.37668594559528795, + 9999, + -0.31390495466273993, + 9999, + 0.5022479274603839, + 9999, + -0.43946693652783597, + 9999, + 1, + 9999, + 1, + 9999, + -0.02316001991491976, + 9999, + -0.013172004174208005, + 9999, + 0.07079950984804703, + 9999, + 0.2634237587021064, + 9999, + -0.42927571920226854, + 9999, + 1, + 9999, + 7.1, + 9999, + 0.75, + 9999, + 3.3, + 9999, + -8.2, + 9999, + 0.45133057530596093, + 9999, + -0.5598442949740452, + 9999, + -1.1, + 9999, + 4.4, + 9999, + -4.4, + 9999, + 9.3, + 9999, + -0.3190014386838066, + 9999, + 0.4533192433895179, + 9999, + 2.2, + 9999, + -6.6, + 9999, + 5.5, + 9999, + -1.4, + 9999 + ], + "A_out_mat": [ + [ + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597 + ], + [ + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064 + ], + [ + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D_out": [ + -13.92838827718412, + 9999, + 10.46201443392983, + 9999 + ], + "E_out": [ + -15.15496966905916, + 9999, + 4.9476461153575455, + 9999 + ], + "TAUQ_out": [ + 1.3425171808429295, + 9999, + 1.31672159905915, + 9999 + ], + "TAUP_out": [ + 1.1435916317235477, + 9999, + 1.8602669148589588, + 9999 + ], + "X_out": [ + 0, + 9999, + 0.16632754194258703, + 9999, + -6.190837486806247, + 9999, + 0, + 9999, + 12.233960999584784, + 9999, + 3.386718220335033, + 9999, + -9.182684848720871, + 9999, + -8.33722876685781, + 9999, + 7.690341753904352, + 9999, + 3.1434992214838484, + 9999 + ], + "X_out_mat": [ + [ + 0, + 0.16632754194258703 + ], + [ + -6.190837486806247, + 0 + ], + [ + 12.233960999584784, + 3.386718220335033 + ], + [ + -9.182684848720871, + -8.33722876685781 + ], + [ + 7.690341753904352, + 3.1434992214838484 + ] + ], + "Y_out": [ + -18.04023641268767, + 9999, + 20.86101462997251, + 9999, + 16.054792528782958, + 9999, + 9.47927687003247, + 9999, + -2.6187420613598307, + 9999, + -1.435130831066579, + 9999, + -1.1996899409061839, + 9999, + 1.2856459620766303, + 9999, + 2.2872452210334266, + 9999, + -1.318582442958037, + 9999, + 8.506121505666528, + 9999, + -0.4473155444742362, + 9999 + ], + "Y_out_mat": [ + [ + -18.04023641268767, + 20.86101462997251 + ], + [ + 16.054792528782958, + 9.47927687003247 + ], + [ + -2.6187420613598307, + -1.435130831066579 + ], + [ + -1.1996899409061839, + 1.2856459620766303 + ], + [ + 2.2872452210334266, + -1.318582442958037 + ], + [ + 8.506121505666528, + -0.4473155444742362 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_gt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_gt_n_col_maj.json new file mode 100644 index 000000000000..99cf447c480c --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_gt_n_col_maj.json @@ -0,0 +1,141 @@ +{ + "order": "column-major", + + "M": 6, + "N": 5, + "NB": 2, + + "A": [ 4, -1, 2.5, 0, 1.5, -3, 7, 8.5, -2, 0.25, 5, 1.2, 3, -4.5, 6.1, -1.1, 2.2, 9, -5, 1, 0.75, 4.4, -6.6, 2.8, 1.1, -2.2, 3.3, -4.4, 5.5, -6.6 ], + "strideA1": 1, + "strideA2": 6, + "offsetA": 0, + "LDA": 6, + "A_mat": [ + [4, 7, 3, -5, 1.1], + [-1, 8.5, -4.5, 1, -2.2], + [2.5, -2, 6.1, 0.75, 3.3], + [0, 0.25, -1.1, 4.4, -4.4], + [1.5, 5, 2.2, -6.6, 5.5], + [-3, 1.2, 9, 2.8, -6.6] + ], + + "D": [ 0.0, 0.0 ], + "strideD": 1, + "offsetD": 0, + + "E": [ 0.0, 0.0 ], + "strideE": 1, + "offsetE": 0, + + "TAUQ": [ 0.0, 0.0 ], + "strideTAUQ": 1, + "offsetTAUQ": 0, + + "TAUP": [ 0.0, 0.0 ], + "strideTAUP": 1, + "offsetTAUP": 0, + + "X": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + "strideX1": 1, + "strideX2": 6, + "offsetX": 0, + "LDX": 6, + + "Y": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + "strideY1": 1, + "strideY2": 5, + "offsetY": 0, + "LDY": 5, + + "A_out": [ + 1.00000000000000000E+000, + -1.01279462823533256E-001, + 2.53198657058833154E-001, + 0.00000000000000000E+000, + 1.51919194235299870E-001, + -3.03838388470599741E-001, + 1.00000000000000000E+000, + 1.00000000000000000E+000, + -1.90542274375738646E-001, + -5.26899018490766036E-001, + 6.47524567596560741E-001, + 1.88361033896228616E-002, + 1.02197705115296661E-001, + 1.00000000000000000E+000, + 6.09999999999999964E+000, + -1.10000000000000009E+000, + 2.20000000000000018E+000, + 9.00000000000000000E+000, + -4.75124113532916226E-001, + 3.48965989361095935E-002, + 7.50000000000000000E-001, + 4.40000000000000036E+000, + -6.59999999999999964E+000, + 2.79999999999999982E+000, + 5.44631248378412924E-001, + 6.57107327638795757E-001, + 3.29999999999999982E+000, + -4.40000000000000036E+000, + 5.50000000000000000E+000, + -6.59999999999999964E+000 + ], + "A_out_mat": [ + [ 1.00000000000000000E+000, 1.00000000000000000E+000, 1.02197705115296661E-001, -4.75124113532916226E-001, 5.44631248378412924E-001 ], + [ -1.01279462823533256E-001, 1.00000000000000000E+000, 1.00000000000000000E+000, 3.48965989361095935E-002, 6.57107327638795757E-001 ], + [ 2.53198657058833154E-001, -1.90542274375738646E-001, 6.09999999999999964E+000, 7.50000000000000000E-001, 3.29999999999999982E+000 ], + [ 0.00000000000000000E+000, -5.26899018490766036E-001, -1.10000000000000009E+000, 4.40000000000000036E+000, -4.40000000000000036E+000 ], + [ 1.51919194235299870E-001, 6.47524567596560741E-001, 2.20000000000000018E+000, -6.59999999999999964E+000, 5.50000000000000000E+000 ], + [ -3.03838388470599741E-001, 1.88361033896228616E-002, 9.00000000000000000E+000, 2.79999999999999982E+000,-6.59999999999999964E+000 ] + ], + + "D_out": [ -5.87367006223536503E+000, 9.74702254755363384E+000 ], + + "E_out": [ 1.02778827191404467E+001, -3.00040178977069916E+000 ], + + "TAUQ_out": [ 1.68100522460699908E+000, 1.15368743411521124E+000 ], + + "TAUP_out": [ 1.30479273978854859E+000, 1.39566580331200862E+000 ], + + "X_out": [ + 2.05591907753671705E+001, + 1.10242216046711565E+001, + -6.70821799479360248E+000, + -5.67498864843842554E+000, + 1.07420849724046175E+001, + 4.49049246821251558E+000, + 4.43498673650983999E-001, + -1.28386316473809572E+001, + 8.95887234263922672E+000, + -1.12847112347841438E+001, + 1.07332223365050261E+001, + 8.22928720113540457E+000 + ], + "X_out_mat": [ + [ 2.05591907753671705E+001, 4.43498673650983999E-001 ], + [ 1.10242216046711565E+001, -1.28386316473809572E+001 ], + [ -6.70821799479360248E+000, 8.95887234263922672E+000 ], + [ -5.67498864843842554E+000, -1.12847112347841438E+001 ], + [ 1.07420849724046175E+001, 1.07332223365050261E+001 ], + [ 4.49049246821251558E+000, 8.22928720113540457E+000 ] + ], + + "Y_out": [ + 0.00000000000000000E+000, + 1.01326240331921955E+001, + 4.37052301452158609E+000, + -1.13716551327292343E+001, + 8.40378103391006270E+000, + 2.23329139744592204E+001, + 0.00000000000000000E+000, + -6.37116230991964283E+000, + 4.94002685592655855E+000, + -1.01046803073181461E+001 + ], + "Y_out_mat": [ + [ 0.00000000000000000E+000, 2.23329139744592204E+001 ], + [ 1.01326240331921955E+001, 0.00000000000000000E+000 ], + [ 4.37052301452158609E+000, -6.37116230991964283E+000 ], + [ -1.13716551327292343E+001, 4.94002685592655855E+000 ], + [ 8.40378103391006270E+000, -1.01046803073181461E+001 ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_gt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_gt_n_row_maj.json new file mode 100644 index 000000000000..6d309cfbfa49 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_gt_n_row_maj.json @@ -0,0 +1,141 @@ +{ + "order": "row-major", + + "M": 6, + "N": 5, + "NB": 2, + + "A": [ 4, 7, 3, -5, 1.1, -1, 8.5, -4.5, 1, -2.2, 2.5, -2, 6.1, 0.75, 3.3, 0, 0.25, -1.1, 4.4, -4.4, 1.5, 5, 2.2, -6.6, 5.5, -3, 1.2, 9, 2.8, -6.6 ], + "strideA1": 5, + "strideA2": 1, + "offsetA": 0, + "LDA": 5, + "A_mat": [ + [4, 7, 3, -5, 1.1], + [-1, 8.5, -4.5, 1, -2.2], + [2.5, -2, 6.1, 0.75, 3.3], + [0, 0.25, -1.1, 4.4, -4.4], + [1.5, 5, 2.2, -6.6, 5.5], + [-3, 1.2, 9, 2.8, -6.6] + ], + + "D": [ 0.0, 0.0 ], + "strideD": 1, + "offsetD": 0, + + "E": [ 0.0, 0.0 ], + "strideE": 1, + "offsetE": 0, + + "TAUQ": [ 0.0, 0.0 ], + "strideTAUQ": 1, + "offsetTAUQ": 0, + + "TAUP": [ 0.0, 0.0 ], + "strideTAUP": 1, + "offsetTAUP": 0, + + "X": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + + "Y": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + "strideY1": 2, + "strideY2": 1, + "offsetY": 0, + "LDY": 2, + + "A_out": [ + 1.00000000000000000E+000, + 1.00000000000000000E+000, + 1.02197705115296661E-001, + -4.75124113532916226E-001, + 5.44631248378412924E-001, + -1.01279462823533256E-001, + 1.00000000000000000E+000, + 1.00000000000000000E+000, + 3.48965989361095935E-002, + 6.57107327638795757E-001, + 2.53198657058833154E-001, + -1.90542274375738646E-001, + 6.09999999999999964E+000, + 7.50000000000000000E-001, + 3.29999999999999982E+000, + 0.00000000000000000E+000, + -5.26899018490766036E-001, + -1.10000000000000009E+000, + 4.40000000000000036E+000, + -4.40000000000000036E+000, + 1.51919194235299870E-001, + 6.47524567596560741E-001, + 2.20000000000000018E+000, + -6.59999999999999964E+000, + 5.50000000000000000E+000, + -3.03838388470599741E-001, + 1.88361033896228616E-002, + 9.00000000000000000E+000, + 2.79999999999999982E+000, + -6.59999999999999964E+000 + ], + "A_out_mat": [ + [ 1.00000000000000000E+000, 1.00000000000000000E+000, 1.02197705115296661E-001, -4.75124113532916226E-001, 5.44631248378412924E-001 ], + [ -1.01279462823533256E-001, 1.00000000000000000E+000, 1.00000000000000000E+000, 3.48965989361095935E-002, 6.57107327638795757E-001 ], + [ 2.53198657058833154E-001, -1.90542274375738646E-001, 6.09999999999999964E+000, 7.50000000000000000E-001, 3.29999999999999982E+000 ], + [ 0.00000000000000000E+000, -5.26899018490766036E-001, -1.10000000000000009E+000, 4.40000000000000036E+000, -4.40000000000000036E+000 ], + [ 1.51919194235299870E-001, 6.47524567596560741E-001, 2.20000000000000018E+000, -6.59999999999999964E+000, 5.50000000000000000E+000 ], + [ -3.03838388470599741E-001, 1.88361033896228616E-002, 9.00000000000000000E+000, 2.79999999999999982E+000,-6.59999999999999964E+000 ] + ], + + "D_out": [ -5.87367006223536503E+000, 9.74702254755363384E+000 ], + + "E_out": [ 1.02778827191404467E+001, -3.00040178977069916E+000 ], + + "TAUQ_out": [ 1.68100522460699908E+000, 1.15368743411521124E+000 ], + + "TAUP_out": [ 1.30479273978854859E+000, 1.39566580331200862E+000 ], + + "X_out": [ + 2.05591907753671705E+001, + 4.43498673650983999E-001, + 1.10242216046711565E+001, + -1.28386316473809572E+001, + -6.70821799479360248E+000, + 8.95887234263922672E+000, + -5.67498864843842554E+000, + -1.12847112347841438E+001, + 1.07420849724046175E+001, + 1.07332223365050261E+001, + 4.49049246821251558E+000, + 8.22928720113540457E+000 + ], + "X_out_mat": [ + [ 2.05591907753671705E+001, 4.43498673650983999E-001 ], + [ 1.10242216046711565E+001, -1.28386316473809572E+001 ], + [ -6.70821799479360248E+000, 8.95887234263922672E+000 ], + [ -5.67498864843842554E+000, -1.12847112347841438E+001 ], + [ 1.07420849724046175E+001, 1.07332223365050261E+001 ], + [ 4.49049246821251558E+000, 8.22928720113540457E+000 ] + ], + + "Y_out": [ + 0.00000000000000000E+000, + 2.23329139744592204E+001, + 1.01326240331921955E+001, + 0.00000000000000000E+000, + 4.37052301452158609E+000, + -6.37116230991964283E+000, + -1.13716551327292343E+001, + 4.94002685592655855E+000, + 8.40378103391006270E+000, + -1.01046803073181461E+001 + ], + "Y_out_mat": [ + [ 0.00000000000000000E+000, 2.23329139744592204E+001 ], + [ 1.01326240331921955E+001, 0.00000000000000000E+000 ], + [ 4.37052301452158609E+000, -6.37116230991964283E+000 ], + [ -1.13716551327292343E+001, 4.94002685592655855E+000 ], + [ 8.40378103391006270E+000, -1.01046803073181461E+001 ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_lt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_lt_n_col_maj.json new file mode 100644 index 000000000000..e566f73dce4a --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_lt_n_col_maj.json @@ -0,0 +1,139 @@ +{ + "order": "column-major", + + "M": 5, + "N": 6, + "NB": 2, + + "A": [ 2, -1, 3.5, 0, 1.2, 4, 5.5, -2, 0.25, -3, 6, -4.5, 7.1, -1.1, 2.2, -5, 1, 0.75, 4.4, -6.6, 8, -2.2, 3.3, -4.4, 5.5, -7, 6.1, -8.2, 9.3, -1.4 ], + "strideA1": 1, + "strideA2": 5, + "offsetA": 0, + "LDA": 5, + "A_mat": [ + [2, 4, 6, -5, 8, -7], + [-1, 5.5, -4.5, 1, -2.2, 6.1], + [3.5, -2, 7.1, 0.75, 3.3, -8.2], + [0, 0.25, -1.1, 4.4, -4.4, 9.3], + [1.2, -3, 2.2, -6.6, 5.5, -1.4] + ], + + "D": [ 0.0, 0.0 ], + "strideD": 1, + "offsetD": 0, + + "E": [ 0.0, 0.0 ], + "strideE": 1, + "offsetE": 0, + + "TAUQ": [ 0.0, 0.0 ], + "strideTAUQ": 1, + "offsetTAUQ": 0, + + "TAUP": [ 0.0, 0.0 ], + "strideTAUP": 1, + "offsetTAUP": 0, + + "X": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + "strideX1": 1, + "strideX2": 5, + "offsetX": 0, + "LDX": 5, + + "Y": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + "strideY1": 1, + "strideY2": 6, + "offsetY": 0, + "LDY": 6, + + "A_out": [ + 1.00000000000000000E+000, + 1.00000000000000000E+000, + -4.29275719202268535E-001, + 4.51330575305960935E-001, + -3.19001438683806593E-001, + 2.51123963730191968E-001, + 1.00000000000000000E+000, + 1.00000000000000000E+000, + -5.59844294974045198E-001, + 4.53319243389517901E-001, + 3.76685945595287952E-001, + -2.31600199149197584E-002, + 7.09999999999999964E+000, + -1.10000000000000009E+000, + 2.20000000000000018E+000, + -3.13904954662739932E-001, + -1.31720041742080050E-002, + 7.50000000000000000E-001, + 4.40000000000000036E+000, + -6.59999999999999964E+000, + 5.02247927460383936E-001, + 7.07995098480470320E-002, + 3.29999999999999982E+000, + -4.40000000000000036E+000, + 5.50000000000000000E+000, + -4.39466936527835972E-001, + 2.63423758702106381E-001, + -8.19999999999999929E+000, + 9.30000000000000071E+000, + -1.39999999999999991E+000 + ], + "A_out_mat": [ + [ 1.00000000000000000E+000, 2.51123963730191968E-001, 3.76685945595287952E-001, -3.13904954662739932E-001, 5.02247927460383936E-001, -4.39466936527835972E-001 ], + [ 1.00000000000000000E+000, 1.00000000000000000E+000, -2.31600199149197584E-002, -1.31720041742080050E-002, 7.07995098480470320E-002, 2.63423758702106381E-001 ], + [ -4.29275719202268535E-001, 1.00000000000000000E+000, 7.09999999999999964E+000, 7.50000000000000000E-001, 3.29999999999999982E+000, -8.19999999999999929E+000 ], + [ 4.51330575305960935E-001, -5.59844294974045198E-001, -1.10000000000000009E+000, 4.40000000000000036E+000, -4.40000000000000036E+000, 9.30000000000000071E+000 ], + [ -3.19001438683806593E-001, 4.53319243389517901E-001, 2.20000000000000018E+000, -6.59999999999999964E+000, 5.50000000000000000E+000, -1.39999999999999991E+000 ] + ], + + "D_out": [ -1.39283882771841192E+001, 1.04620144339298307E+001 ], + + "E_out": [ -1.51549696690591595E+001, 4.94764611535754550E+000 ], + + "TAUQ_out": [ 1.34251718084292948E+000, 1.31672159905915009E+000 ], + + "TAUP_out": [ 1.14359163172354772E+000, 1.86026691485895879E+000 ], + + "X_out": [ + 0.00000000000000000E+000, + -6.19083748680624701E+000, + 1.22339609995847844E+001, + -9.18268484872087143E+000, + 7.69034175390435237E+000, + 1.66327541942587032E-001, + 0.00000000000000000E+000, + 3.38671822033503300E+000, + -8.33722876685781067E+000, + 3.14349922148384842E+000 + ], + "X_out_mat": [ + [ 0.00000000000000000E+000, 1.66327541942587032E-001 ], + [ -6.19083748680624701E+000, 0.00000000000000000E+000 ], + [ 1.22339609995847844E+001, 3.38671822033503300E+000 ], + [ -9.18268484872087143E+000, -8.33722876685781067E+000 ], + [ 7.69034175390435237E+000, 3.14349922148384842E+000 ] + ], + + "Y_out": [ + -1.80402364126876691E+001, + 1.60547925287829578E+001, + -2.61874206135983068E+000, + -1.19968994090618386E+000, + 2.28724522103342665E+000, + 8.50612150566652758E+000, + 2.08610146299725088E+001, + 9.47927687003246966E+000, + -1.43513083106657890E+000, + 1.28564596207663029E+000, + -1.31858244295803706E+000, + -4.47315544474236215E-001 + ], + "Y_out_mat": [ + [ -1.80402364126876691E+001, 2.08610146299725088E+001 ], + [ 1.60547925287829578E+001, 9.47927687003246966E+000 ], + [ -2.61874206135983068E+000, -1.43513083106657890E+000 ], + [ -1.19968994090618386E+000, 1.28564596207663029E+000 ], + [ 2.28724522103342665E+000, -1.31858244295803706E+000 ], + [ 8.50612150566652758E+000, -4.47315544474236215E-001 ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_lt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_lt_n_row_maj.json new file mode 100644 index 000000000000..925cc1478d12 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/m_lt_n_row_maj.json @@ -0,0 +1,139 @@ +{ + "order": "row-major", + + "M": 5, + "N": 6, + "NB": 2, + + "A": [ 2, 4, 6, -5, 8, -7, -1, 5.5, -4.5, 1, -2.2, 6.1, 3.5, -2, 7.1, 0.75, 3.3, -8.2, 0, 0.25, -1.1, 4.4, -4.4, 9.3, 1.2, -3, 2.2, -6.6, 5.5, -1.4 ], + "strideA1": 6, + "strideA2": 1, + "offsetA": 0, + "LDA": 6, + "A_mat": [ + [2, 4, 6, -5, 8, -7], + [-1, 5.5, -4.5, 1, -2.2, 6.1], + [3.5, -2, 7.1, 0.75, 3.3, -8.2], + [0, 0.25, -1.1, 4.4, -4.4, 9.3], + [1.2, -3, 2.2, -6.6, 5.5, -1.4] + ], + + "D": [ 0.0, 0.0 ], + "strideD": 1, + "offsetD": 0, + + "E": [ 0.0, 0.0 ], + "strideE": 1, + "offsetE": 0, + + "TAUQ": [ 0.0, 0.0 ], + "strideTAUQ": 1, + "offsetTAUQ": 0, + + "TAUP": [ 0.0, 0.0 ], + "strideTAUP": 1, + "offsetTAUP": 0, + + "X": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 0, + "LDX": 2, + + "Y": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + "strideY1": 2, + "strideY2": 1, + "offsetY": 0, + "LDY": 2, + + "A_out": [ + 1.00000000000000000E+000, + 2.51123963730191968E-001, + 3.76685945595287952E-001, + -3.13904954662739932E-001, + 5.02247927460383936E-001, + -4.39466936527835972E-001, + 1.00000000000000000E+000, + 1.00000000000000000E+000, + -2.31600199149197584E-002, + -1.31720041742080050E-002, + 7.07995098480470320E-002, + 2.63423758702106381E-001, + -4.29275719202268535E-001, + 1.00000000000000000E+000, + 7.09999999999999964E+000, + 7.50000000000000000E-001, + 3.29999999999999982E+000, + -8.19999999999999929E+000, + 4.51330575305960935E-001, + -5.59844294974045198E-001, + -1.10000000000000009E+000, + 4.40000000000000036E+000, + -4.40000000000000036E+000, + 9.30000000000000071E+000, + -3.19001438683806593E-001, + 4.53319243389517901E-001, + 2.20000000000000018E+000, + -6.59999999999999964E+000, + 5.50000000000000000E+000, + -1.39999999999999991E+000 + ], + "A_out_mat": [ + [ 1.00000000000000000E+000, 2.51123963730191968E-001, 3.76685945595287952E-001, -3.13904954662739932E-001, 5.02247927460383936E-001, -4.39466936527835972E-001 ], + [ 1.00000000000000000E+000, 1.00000000000000000E+000, -2.31600199149197584E-002, -1.31720041742080050E-002, 7.07995098480470320E-002, 2.63423758702106381E-001 ], + [ -4.29275719202268535E-001, 1.00000000000000000E+000, 7.09999999999999964E+000, 7.50000000000000000E-001, 3.29999999999999982E+000, -8.19999999999999929E+000 ], + [ 4.51330575305960935E-001, -5.59844294974045198E-001, -1.10000000000000009E+000, 4.40000000000000036E+000, -4.40000000000000036E+000, 9.30000000000000071E+000 ], + [ -3.19001438683806593E-001, 4.53319243389517901E-001, 2.20000000000000018E+000, -6.59999999999999964E+000, 5.50000000000000000E+000, -1.39999999999999991E+000 ] + ], + + "D_out": [ -1.39283882771841192E+001, 1.04620144339298307E+001 ], + + "E_out": [ -1.51549696690591595E+001, 4.94764611535754550E+000 ], + + "TAUQ_out": [ 1.34251718084292948E+000, 1.31672159905915009E+000 ], + + "TAUP_out": [ 1.14359163172354772E+000, 1.86026691485895879E+000 ], + + "X_out": [ + 0.00000000000000000E+000, + 1.66327541942587032E-001, + -6.19083748680624701E+000, + 0.00000000000000000E+000, + 1.22339609995847844E+001, + 3.38671822033503300E+000, + -9.18268484872087143E+000, + -8.33722876685781067E+000, + 7.69034175390435237E+000, + 3.14349922148384842E+000 + ], + "X_out_mat": [ + [ 0.00000000000000000E+000, 1.66327541942587032E-001 ], + [ -6.19083748680624701E+000, 0.00000000000000000E+000 ], + [ 1.22339609995847844E+001, 3.38671822033503300E+000 ], + [ -9.18268484872087143E+000, -8.33722876685781067E+000 ], + [ 7.69034175390435237E+000, 3.14349922148384842E+000 ] + ], + + "Y_out": [ + -1.80402364126876691E+001, + 2.08610146299725088E+001, + 1.60547925287829578E+001, + 9.47927687003246966E+000, + -2.61874206135983068E+000, + -1.43513083106657890E+000, + -1.19968994090618386E+000, + 1.28564596207663029E+000, + 2.28724522103342665E+000, + -1.31858244295803706E+000, + 8.50612150566652758E+000, + -4.47315544474236215E-001 + ], + "Y_out_mat": [ + [ -1.80402364126876691E+001, 2.08610146299725088E+001 ], + [ 1.60547925287829578E+001, 9.47927687003246966E+000 ], + [ -2.61874206135983068E+000, -1.43513083106657890E+000 ], + [ -1.19968994090618386E+000, 1.28564596207663029E+000 ], + [ 2.28724522103342665E+000, -1.31858244295803706E+000 ], + [ 8.50612150566652758E+000, -4.47315544474236215E-001 ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_gt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_gt_n_col_maj.json new file mode 100644 index 000000000000..45fb6fe6ad05 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_gt_n_col_maj.json @@ -0,0 +1,310 @@ +{ + "order": "column-major", + "M": 6, + "N": 5, + "NB": 2, + "A": [ + 1.1, + -2.2, + 3.3, + -4.4, + 5.5, + -6.6, + -5, + 1, + 0.75, + 4.4, + -6.6, + 2.8, + 3, + -4.5, + 6.1, + -1.1, + 2.2, + 9, + 7, + 8.5, + -2, + 0.25, + 5, + 1.2, + 4, + -1, + 2.5, + 0, + 1.5, + -3 + ], + "strideA1": 1, + "strideA2": -6, + "offsetA": 24, + "LDA": 6, + "A_mat": [ + [ + 4, + 7, + 3, + -5, + 1.1 + ], + [ + -1, + 8.5, + -4.5, + 1, + -2.2 + ], + [ + 2.5, + -2, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4 + ], + [ + 1.5, + 5, + 2.2, + -6.6, + 5.5 + ], + [ + -3, + 1.2, + 9, + 2.8, + -6.6 + ] + ], + "D": [ + 0, + 0 + ], + "strideD": 1, + "offsetD": 0, + "E": [ + 0, + 0 + ], + "strideE": 1, + "offsetE": 0, + "TAUQ": [ + 0, + 0 + ], + "strideTAUQ": 1, + "offsetTAUQ": 0, + "TAUP": [ + 0, + 0 + ], + "strideTAUP": 1, + "offsetTAUP": 0, + "X": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": 1, + "strideX2": -6, + "offsetX": 6, + "LDX": 6, + "Y": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": 1, + "strideY2": -5, + "offsetY": 5, + "LDY": 5, + "A_out": [ + 0.5446312483784129, + 0.6571073276387958, + 3.3, + -4.4, + 5.5, + -6.6, + -0.4751241135329162, + 0.034896598936109594, + 0.75, + 4.4, + -6.6, + 2.8, + 0.10219770511529666, + 1, + 6.1, + -1.1, + 2.2, + 9, + 1, + 1, + -0.19054227437573865, + -0.526899018490766, + 0.6475245675965607, + 0.01883610338962286, + 1, + -0.10127946282353326, + 0.25319865705883315, + 0, + 0.15191919423529987, + -0.30383838847059974 + ], + "A_out_mat": [ + [ + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129 + ], + [ + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958 + ], + [ + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4 + ], + [ + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5 + ], + [ + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6 + ] + ], + "D_out": [ + -5.873670062235365, + 9.747022547553634 + ], + "E_out": [ + 10.277882719140447, + -3.000401789770699 + ], + "TAUQ_out": [ + 1.681005224606999, + 1.1536874341152112 + ], + "TAUP_out": [ + 1.3047927397885486, + 1.3956658033120086 + ], + "X_out": [ + 0.443498673650984, + -12.838631647380957, + 8.958872342639227, + -11.284711234784144, + 10.733222336505026, + 8.229287201135405, + 20.55919077536717, + 11.024221604671157, + -6.7082179947936025, + -5.6749886484384255, + 10.742084972404617, + 4.490492468212516 + ], + "X_out_mat": [ + [ + 20.55919077536717, + 0.443498673650984 + ], + [ + 11.024221604671157, + -12.838631647380957 + ], + [ + -6.7082179947936025, + 8.958872342639227 + ], + [ + -5.6749886484384255, + -11.284711234784144 + ], + [ + 10.742084972404617, + 10.733222336505026 + ], + [ + 4.490492468212516, + 8.229287201135405 + ] + ], + "Y_out": [ + 22.33291397445922, + 0, + -6.371162309919643, + 4.9400268559265585, + -10.104680307318146, + 0, + 10.132624033192196, + 4.370523014521586, + -11.371655132729234, + 8.403781033910063 + ], + "Y_out_mat": [ + [ + 0, + 22.33291397445922 + ], + [ + 10.132624033192196, + 0 + ], + [ + 4.370523014521586, + -6.371162309919643 + ], + [ + -11.371655132729234, + 4.9400268559265585 + ], + [ + 8.403781033910063, + -10.104680307318146 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_gt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_gt_n_row_maj.json new file mode 100644 index 000000000000..2e6d96a8496e --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_gt_n_row_maj.json @@ -0,0 +1,310 @@ +{ + "order": "row-major", + "M": 6, + "N": 5, + "NB": 2, + "A": [ + -3, + 1.2, + 9, + 2.8, + -6.6, + 1.5, + 5, + 2.2, + -6.6, + 5.5, + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 2.5, + -2, + 6.1, + 0.75, + 3.3, + -1, + 8.5, + -4.5, + 1, + -2.2, + 4, + 7, + 3, + -5, + 1.1 + ], + "strideA1": -5, + "strideA2": 1, + "offsetA": 25, + "LDA": 5, + "A_mat": [ + [ + 4, + 7, + 3, + -5, + 1.1 + ], + [ + -1, + 8.5, + -4.5, + 1, + -2.2 + ], + [ + 2.5, + -2, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4 + ], + [ + 1.5, + 5, + 2.2, + -6.6, + 5.5 + ], + [ + -3, + 1.2, + 9, + 2.8, + -6.6 + ] + ], + "D": [ + 0, + 0 + ], + "strideD": 1, + "offsetD": 0, + "E": [ + 0, + 0 + ], + "strideE": 1, + "offsetE": 0, + "TAUQ": [ + 0, + 0 + ], + "strideTAUQ": 1, + "offsetTAUQ": 0, + "TAUP": [ + 0, + 0 + ], + "strideTAUP": 1, + "offsetTAUP": 0, + "X": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": -2, + "strideX2": 1, + "offsetX": 10, + "LDX": 2, + "Y": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": -2, + "strideY2": 1, + "offsetY": 8, + "LDY": 2, + "A_out": [ + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6, + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5, + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4, + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3, + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958, + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129 + ], + "A_out_mat": [ + [ + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129 + ], + [ + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958 + ], + [ + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4 + ], + [ + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5 + ], + [ + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6 + ] + ], + "D_out": [ + -5.873670062235365, + 9.747022547553634 + ], + "E_out": [ + 10.277882719140447, + -3.000401789770699 + ], + "TAUQ_out": [ + 1.681005224606999, + 1.1536874341152112 + ], + "TAUP_out": [ + 1.3047927397885486, + 1.3956658033120086 + ], + "X_out": [ + 4.490492468212516, + 8.229287201135405, + 10.742084972404617, + 10.733222336505026, + -5.6749886484384255, + -11.284711234784144, + -6.7082179947936025, + 8.958872342639227, + 11.024221604671157, + -12.838631647380957, + 20.55919077536717, + 0.443498673650984 + ], + "X_out_mat": [ + [ + 20.55919077536717, + 0.443498673650984 + ], + [ + 11.024221604671157, + -12.838631647380957 + ], + [ + -6.7082179947936025, + 8.958872342639227 + ], + [ + -5.6749886484384255, + -11.284711234784144 + ], + [ + 10.742084972404617, + 10.733222336505026 + ], + [ + 4.490492468212516, + 8.229287201135405 + ] + ], + "Y_out": [ + 8.403781033910063, + -10.104680307318146, + -11.371655132729234, + 4.9400268559265585, + 4.370523014521586, + -6.371162309919643, + 10.132624033192196, + 0, + 0, + 22.33291397445922 + ], + "Y_out_mat": [ + [ + 0, + 22.33291397445922 + ], + [ + 10.132624033192196, + 0 + ], + [ + 4.370523014521586, + -6.371162309919643 + ], + [ + -11.371655132729234, + 4.9400268559265585 + ], + [ + 8.403781033910063, + -10.104680307318146 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_lt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_lt_n_col_maj.json new file mode 100644 index 000000000000..cf3079edf476 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_lt_n_col_maj.json @@ -0,0 +1,306 @@ +{ + "order": "column-major", + "M": 5, + "N": 6, + "NB": 2, + "A": [ + -7, + 6.1, + -8.2, + 9.3, + -1.4, + 8, + -2.2, + 3.3, + -4.4, + 5.5, + -5, + 1, + 0.75, + 4.4, + -6.6, + 6, + -4.5, + 7.1, + -1.1, + 2.2, + 4, + 5.5, + -2, + 0.25, + -3, + 2, + -1, + 3.5, + 0, + 1.2 + ], + "strideA1": 1, + "strideA2": -5, + "offsetA": 25, + "LDA": 5, + "A_mat": [ + [ + 2, + 4, + 6, + -5, + 8, + -7 + ], + [ + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1 + ], + [ + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D": [ + 0, + 0 + ], + "strideD": 1, + "offsetD": 0, + "E": [ + 0, + 0 + ], + "strideE": 1, + "offsetE": 0, + "TAUQ": [ + 0, + 0 + ], + "strideTAUQ": 1, + "offsetTAUQ": 0, + "TAUP": [ + 0, + 0 + ], + "strideTAUP": 1, + "offsetTAUP": 0, + "X": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": 1, + "strideX2": -5, + "offsetX": 5, + "LDX": 5, + "Y": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": 1, + "strideY2": -6, + "offsetY": 6, + "LDY": 6, + "A_out": [ + -0.43946693652783597, + 0.2634237587021064, + -8.2, + 9.3, + -1.4, + 0.5022479274603839, + 0.07079950984804703, + 3.3, + -4.4, + 5.5, + -0.31390495466273993, + -0.013172004174208005, + 0.75, + 4.4, + -6.6, + 0.37668594559528795, + -0.02316001991491976, + 7.1, + -1.1, + 2.2, + 0.25112396373019197, + 1, + 1, + -0.5598442949740452, + 0.4533192433895179, + 1, + 1, + -0.42927571920226854, + 0.45133057530596093, + -0.3190014386838066 + ], + "A_out_mat": [ + [ + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597 + ], + [ + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064 + ], + [ + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D_out": [ + -13.92838827718412, + 10.46201443392983 + ], + "E_out": [ + -15.15496966905916, + 4.9476461153575455 + ], + "TAUQ_out": [ + 1.3425171808429295, + 1.31672159905915 + ], + "TAUP_out": [ + 1.1435916317235477, + 1.8602669148589588 + ], + "X_out": [ + 0.16632754194258703, + 0, + 3.386718220335033, + -8.33722876685781, + 3.1434992214838484, + 0, + -6.190837486806247, + 12.233960999584784, + -9.182684848720871, + 7.690341753904352 + ], + "X_out_mat": [ + [ + 0, + 0.16632754194258703 + ], + [ + -6.190837486806247, + 0 + ], + [ + 12.233960999584784, + 3.386718220335033 + ], + [ + -9.182684848720871, + -8.33722876685781 + ], + [ + 7.690341753904352, + 3.1434992214838484 + ] + ], + "Y_out": [ + 20.86101462997251, + 9.47927687003247, + -1.435130831066579, + 1.2856459620766303, + -1.318582442958037, + -0.4473155444742362, + -18.04023641268767, + 16.054792528782958, + -2.6187420613598307, + -1.1996899409061839, + 2.2872452210334266, + 8.506121505666528 + ], + "Y_out_mat": [ + [ + -18.04023641268767, + 20.86101462997251 + ], + [ + 16.054792528782958, + 9.47927687003247 + ], + [ + -2.6187420613598307, + -1.435130831066579 + ], + [ + -1.1996899409061839, + 1.2856459620766303 + ], + [ + 2.2872452210334266, + -1.318582442958037 + ], + [ + 8.506121505666528, + -0.4473155444742362 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_lt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_lt_n_row_maj.json new file mode 100644 index 000000000000..51742197e345 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/mixed_strides/m_lt_n_row_maj.json @@ -0,0 +1,306 @@ +{ + "order": "row-major", + "M": 5, + "N": 6, + "NB": 2, + "A": [ + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4, + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3, + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2, + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1, + 2, + 4, + 6, + -5, + 8, + -7 + ], + "strideA1": -6, + "strideA2": 1, + "offsetA": 24, + "LDA": 6, + "A_mat": [ + [ + 2, + 4, + 6, + -5, + 8, + -7 + ], + [ + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1 + ], + [ + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D": [ + 0, + 0 + ], + "strideD": 1, + "offsetD": 0, + "E": [ + 0, + 0 + ], + "strideE": 1, + "offsetE": 0, + "TAUQ": [ + 0, + 0 + ], + "strideTAUQ": 1, + "offsetTAUQ": 0, + "TAUP": [ + 0, + 0 + ], + "strideTAUP": 1, + "offsetTAUP": 0, + "X": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": -2, + "strideX2": 1, + "offsetX": 8, + "LDX": 2, + "Y": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": -2, + "strideY2": 1, + "offsetY": 10, + "LDY": 2, + "A_out": [ + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4, + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3, + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2, + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064, + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597 + ], + "A_out_mat": [ + [ + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597 + ], + [ + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064 + ], + [ + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D_out": [ + -13.92838827718412, + 10.46201443392983 + ], + "E_out": [ + -15.15496966905916, + 4.9476461153575455 + ], + "TAUQ_out": [ + 1.3425171808429295, + 1.31672159905915 + ], + "TAUP_out": [ + 1.1435916317235477, + 1.8602669148589588 + ], + "X_out": [ + 7.690341753904352, + 3.1434992214838484, + -9.182684848720871, + -8.33722876685781, + 12.233960999584784, + 3.386718220335033, + -6.190837486806247, + 0, + 0, + 0.16632754194258703 + ], + "X_out_mat": [ + [ + 0, + 0.16632754194258703 + ], + [ + -6.190837486806247, + 0 + ], + [ + 12.233960999584784, + 3.386718220335033 + ], + [ + -9.182684848720871, + -8.33722876685781 + ], + [ + 7.690341753904352, + 3.1434992214838484 + ] + ], + "Y_out": [ + 8.506121505666528, + -0.4473155444742362, + 2.2872452210334266, + -1.318582442958037, + -1.1996899409061839, + 1.2856459620766303, + -2.6187420613598307, + -1.435130831066579, + 16.054792528782958, + 9.47927687003247, + -18.04023641268767, + 20.86101462997251 + ], + "Y_out_mat": [ + [ + -18.04023641268767, + 20.86101462997251 + ], + [ + 16.054792528782958, + 9.47927687003247 + ], + [ + -2.6187420613598307, + -1.435130831066579 + ], + [ + -1.1996899409061839, + 1.2856459620766303 + ], + [ + 2.2872452210334266, + -1.318582442958037 + ], + [ + 8.506121505666528, + -0.4473155444742362 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_gt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_gt_n_col_maj.json new file mode 100644 index 000000000000..420029fd738d --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_gt_n_col_maj.json @@ -0,0 +1,310 @@ +{ + "order": "column-major", + "M": 6, + "N": 5, + "NB": 2, + "A": [ + -6.6, + 5.5, + -4.4, + 3.3, + -2.2, + 1.1, + 2.8, + -6.6, + 4.4, + 0.75, + 1, + -5, + 9, + 2.2, + -1.1, + 6.1, + -4.5, + 3, + 1.2, + 5, + 0.25, + -2, + 8.5, + 7, + -3, + 1.5, + 0, + 2.5, + -1, + 4 + ], + "strideA1": -1, + "strideA2": -6, + "offsetA": 29, + "LDA": 6, + "A_mat": [ + [ + 4, + 7, + 3, + -5, + 1.1 + ], + [ + -1, + 8.5, + -4.5, + 1, + -2.2 + ], + [ + 2.5, + -2, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4 + ], + [ + 1.5, + 5, + 2.2, + -6.6, + 5.5 + ], + [ + -3, + 1.2, + 9, + 2.8, + -6.6 + ] + ], + "D": [ + 0, + 0 + ], + "strideD": -1, + "offsetD": 1, + "E": [ + 0, + 0 + ], + "strideE": -1, + "offsetE": 1, + "TAUQ": [ + 0, + 0 + ], + "strideTAUQ": -1, + "offsetTAUQ": 1, + "TAUP": [ + 0, + 0 + ], + "strideTAUP": -1, + "offsetTAUP": 1, + "X": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": -1, + "strideX2": -6, + "offsetX": 11, + "LDX": 6, + "Y": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": -1, + "strideY2": -5, + "offsetY": 9, + "LDY": 5, + "A_out": [ + -6.6, + 5.5, + -4.4, + 3.3, + 0.6571073276387958, + 0.5446312483784129, + 2.8, + -6.6, + 4.4, + 0.75, + 0.034896598936109594, + -0.4751241135329162, + 9, + 2.2, + -1.1, + 6.1, + 1, + 0.10219770511529666, + 0.01883610338962286, + 0.6475245675965607, + -0.526899018490766, + -0.19054227437573865, + 1, + 1, + -0.30383838847059974, + 0.15191919423529987, + 0, + 0.25319865705883315, + -0.10127946282353326, + 1 + ], + "A_out_mat": [ + [ + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129 + ], + [ + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958 + ], + [ + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4 + ], + [ + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5 + ], + [ + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6 + ] + ], + "D_out": [ + 9.747022547553634, + -5.873670062235365 + ], + "E_out": [ + -3.000401789770699, + 10.277882719140447 + ], + "TAUQ_out": [ + 1.1536874341152112, + 1.681005224606999 + ], + "TAUP_out": [ + 1.3956658033120086, + 1.3047927397885486 + ], + "X_out": [ + 8.229287201135405, + 10.733222336505026, + -11.284711234784144, + 8.958872342639227, + -12.838631647380957, + 0.443498673650984, + 4.490492468212516, + 10.742084972404617, + -5.6749886484384255, + -6.7082179947936025, + 11.024221604671157, + 20.55919077536717 + ], + "X_out_mat": [ + [ + 20.55919077536717, + 0.443498673650984 + ], + [ + 11.024221604671157, + -12.838631647380957 + ], + [ + -6.7082179947936025, + 8.958872342639227 + ], + [ + -5.6749886484384255, + -11.284711234784144 + ], + [ + 10.742084972404617, + 10.733222336505026 + ], + [ + 4.490492468212516, + 8.229287201135405 + ] + ], + "Y_out": [ + -10.104680307318146, + 4.9400268559265585, + -6.371162309919643, + 0, + 22.33291397445922, + 8.403781033910063, + -11.371655132729234, + 4.370523014521586, + 10.132624033192196, + 0 + ], + "Y_out_mat": [ + [ + 0, + 22.33291397445922 + ], + [ + 10.132624033192196, + 0 + ], + [ + 4.370523014521586, + -6.371162309919643 + ], + [ + -11.371655132729234, + 4.9400268559265585 + ], + [ + 8.403781033910063, + -10.104680307318146 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_gt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_gt_n_row_maj.json new file mode 100644 index 000000000000..f44fb12e6cce --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_gt_n_row_maj.json @@ -0,0 +1,310 @@ +{ + "order": "row-major", + "M": 6, + "N": 5, + "NB": 2, + "A": [ + -6.6, + 2.8, + 9, + 1.2, + -3, + 5.5, + -6.6, + 2.2, + 5, + 1.5, + -4.4, + 4.4, + -1.1, + 0.25, + 0, + 3.3, + 0.75, + 6.1, + -2, + 2.5, + -2.2, + 1, + -4.5, + 8.5, + -1, + 1.1, + -5, + 3, + 7, + 4 + ], + "strideA1": -5, + "strideA2": -1, + "offsetA": 29, + "LDA": 5, + "A_mat": [ + [ + 4, + 7, + 3, + -5, + 1.1 + ], + [ + -1, + 8.5, + -4.5, + 1, + -2.2 + ], + [ + 2.5, + -2, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4 + ], + [ + 1.5, + 5, + 2.2, + -6.6, + 5.5 + ], + [ + -3, + 1.2, + 9, + 2.8, + -6.6 + ] + ], + "D": [ + 0, + 0 + ], + "strideD": -1, + "offsetD": 1, + "E": [ + 0, + 0 + ], + "strideE": -1, + "offsetE": 1, + "TAUQ": [ + 0, + 0 + ], + "strideTAUQ": -1, + "offsetTAUQ": 1, + "TAUP": [ + 0, + 0 + ], + "strideTAUP": -1, + "offsetTAUP": 1, + "X": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": -2, + "strideX2": -1, + "offsetX": 11, + "LDX": 2, + "Y": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": -2, + "strideY2": -1, + "offsetY": 9, + "LDY": 2, + "A_out": [ + -6.6, + 2.8, + 9, + 0.01883610338962286, + -0.30383838847059974, + 5.5, + -6.6, + 2.2, + 0.6475245675965607, + 0.15191919423529987, + -4.4, + 4.4, + -1.1, + -0.526899018490766, + 0, + 3.3, + 0.75, + 6.1, + -0.19054227437573865, + 0.25319865705883315, + 0.6571073276387958, + 0.034896598936109594, + 1, + 1, + -0.10127946282353326, + 0.5446312483784129, + -0.4751241135329162, + 0.10219770511529666, + 1, + 1 + ], + "A_out_mat": [ + [ + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129 + ], + [ + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958 + ], + [ + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4 + ], + [ + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5 + ], + [ + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6 + ] + ], + "D_out": [ + 9.747022547553634, + -5.873670062235365 + ], + "E_out": [ + -3.000401789770699, + 10.277882719140447 + ], + "TAUQ_out": [ + 1.1536874341152112, + 1.681005224606999 + ], + "TAUP_out": [ + 1.3956658033120086, + 1.3047927397885486 + ], + "X_out": [ + 8.229287201135405, + 4.490492468212516, + 10.733222336505026, + 10.742084972404617, + -11.284711234784144, + -5.6749886484384255, + 8.958872342639227, + -6.7082179947936025, + -12.838631647380957, + 11.024221604671157, + 0.443498673650984, + 20.55919077536717 + ], + "X_out_mat": [ + [ + 20.55919077536717, + 0.443498673650984 + ], + [ + 11.024221604671157, + -12.838631647380957 + ], + [ + -6.7082179947936025, + 8.958872342639227 + ], + [ + -5.6749886484384255, + -11.284711234784144 + ], + [ + 10.742084972404617, + 10.733222336505026 + ], + [ + 4.490492468212516, + 8.229287201135405 + ] + ], + "Y_out": [ + -10.104680307318146, + 8.403781033910063, + 4.9400268559265585, + -11.371655132729234, + -6.371162309919643, + 4.370523014521586, + 0, + 10.132624033192196, + 22.33291397445922, + 0 + ], + "Y_out_mat": [ + [ + 0, + 22.33291397445922 + ], + [ + 10.132624033192196, + 0 + ], + [ + 4.370523014521586, + -6.371162309919643 + ], + [ + -11.371655132729234, + 4.9400268559265585 + ], + [ + 8.403781033910063, + -10.104680307318146 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_lt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_lt_n_col_maj.json new file mode 100644 index 000000000000..1bf217de2cf6 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_lt_n_col_maj.json @@ -0,0 +1,306 @@ +{ + "order": "column-major", + "M": 5, + "N": 6, + "NB": 2, + "A": [ + -1.4, + 9.3, + -8.2, + 6.1, + -7, + 5.5, + -4.4, + 3.3, + -2.2, + 8, + -6.6, + 4.4, + 0.75, + 1, + -5, + 2.2, + -1.1, + 7.1, + -4.5, + 6, + -3, + 0.25, + -2, + 5.5, + 4, + 1.2, + 0, + 3.5, + -1, + 2 + ], + "strideA1": -1, + "strideA2": -5, + "offsetA": 29, + "LDA": 5, + "A_mat": [ + [ + 2, + 4, + 6, + -5, + 8, + -7 + ], + [ + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1 + ], + [ + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D": [ + 0, + 0 + ], + "strideD": -1, + "offsetD": 1, + "E": [ + 0, + 0 + ], + "strideE": -1, + "offsetE": 1, + "TAUQ": [ + 0, + 0 + ], + "strideTAUQ": -1, + "offsetTAUQ": 1, + "TAUP": [ + 0, + 0 + ], + "strideTAUP": -1, + "offsetTAUP": 1, + "X": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": -1, + "strideX2": -5, + "offsetX": 9, + "LDX": 5, + "Y": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": -1, + "strideY2": -6, + "offsetY": 11, + "LDY": 6, + "A_out": [ + -1.4, + 9.3, + -8.2, + 0.2634237587021064, + -0.43946693652783597, + 5.5, + -4.4, + 3.3, + 0.07079950984804703, + 0.5022479274603839, + -6.6, + 4.4, + 0.75, + -0.013172004174208005, + -0.31390495466273993, + 2.2, + -1.1, + 7.1, + -0.02316001991491976, + 0.37668594559528795, + 0.4533192433895179, + -0.5598442949740452, + 1, + 1, + 0.25112396373019197, + -0.3190014386838066, + 0.45133057530596093, + -0.42927571920226854, + 1, + 1 + ], + "A_out_mat": [ + [ + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597 + ], + [ + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064 + ], + [ + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D_out": [ + 10.46201443392983, + -13.92838827718412 + ], + "E_out": [ + 4.9476461153575455, + -15.15496966905916 + ], + "TAUQ_out": [ + 1.31672159905915, + 1.3425171808429295 + ], + "TAUP_out": [ + 1.8602669148589588, + 1.1435916317235477 + ], + "X_out": [ + 3.1434992214838484, + -8.33722876685781, + 3.386718220335033, + 0, + 0.16632754194258703, + 7.690341753904352, + -9.182684848720871, + 12.233960999584784, + -6.190837486806247, + 0 + ], + "X_out_mat": [ + [ + 0, + 0.16632754194258703 + ], + [ + -6.190837486806247, + 0 + ], + [ + 12.233960999584784, + 3.386718220335033 + ], + [ + -9.182684848720871, + -8.33722876685781 + ], + [ + 7.690341753904352, + 3.1434992214838484 + ] + ], + "Y_out": [ + -0.4473155444742362, + -1.318582442958037, + 1.2856459620766303, + -1.435130831066579, + 9.47927687003247, + 20.86101462997251, + 8.506121505666528, + 2.2872452210334266, + -1.1996899409061839, + -2.6187420613598307, + 16.054792528782958, + -18.04023641268767 + ], + "Y_out_mat": [ + [ + -18.04023641268767, + 20.86101462997251 + ], + [ + 16.054792528782958, + 9.47927687003247 + ], + [ + -2.6187420613598307, + -1.435130831066579 + ], + [ + -1.1996899409061839, + 1.2856459620766303 + ], + [ + 2.2872452210334266, + -1.318582442958037 + ], + [ + 8.506121505666528, + -0.4473155444742362 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_lt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_lt_n_row_maj.json new file mode 100644 index 000000000000..d853deb9a0b9 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/negative_strides/m_lt_n_row_maj.json @@ -0,0 +1,306 @@ +{ + "order": "row-major", + "M": 5, + "N": 6, + "NB": 2, + "A": [ + -1.4, + 5.5, + -6.6, + 2.2, + -3, + 1.2, + 9.3, + -4.4, + 4.4, + -1.1, + 0.25, + 0, + -8.2, + 3.3, + 0.75, + 7.1, + -2, + 3.5, + 6.1, + -2.2, + 1, + -4.5, + 5.5, + -1, + -7, + 8, + -5, + 6, + 4, + 2 + ], + "strideA1": -6, + "strideA2": -1, + "offsetA": 29, + "LDA": 6, + "A_mat": [ + [ + 2, + 4, + 6, + -5, + 8, + -7 + ], + [ + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1 + ], + [ + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D": [ + 0, + 0 + ], + "strideD": -1, + "offsetD": 1, + "E": [ + 0, + 0 + ], + "strideE": -1, + "offsetE": 1, + "TAUQ": [ + 0, + 0 + ], + "strideTAUQ": -1, + "offsetTAUQ": 1, + "TAUP": [ + 0, + 0 + ], + "strideTAUP": -1, + "offsetTAUP": 1, + "X": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": -2, + "strideX2": -1, + "offsetX": 9, + "LDX": 2, + "Y": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": -2, + "strideY2": -1, + "offsetY": 11, + "LDY": 2, + "A_out": [ + -1.4, + 5.5, + -6.6, + 2.2, + 0.4533192433895179, + -0.3190014386838066, + 9.3, + -4.4, + 4.4, + -1.1, + -0.5598442949740452, + 0.45133057530596093, + -8.2, + 3.3, + 0.75, + 7.1, + 1, + -0.42927571920226854, + 0.2634237587021064, + 0.07079950984804703, + -0.013172004174208005, + -0.02316001991491976, + 1, + 1, + -0.43946693652783597, + 0.5022479274603839, + -0.31390495466273993, + 0.37668594559528795, + 0.25112396373019197, + 1 + ], + "A_out_mat": [ + [ + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597 + ], + [ + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064 + ], + [ + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D_out": [ + 10.46201443392983, + -13.92838827718412 + ], + "E_out": [ + 4.9476461153575455, + -15.15496966905916 + ], + "TAUQ_out": [ + 1.31672159905915, + 1.3425171808429295 + ], + "TAUP_out": [ + 1.8602669148589588, + 1.1435916317235477 + ], + "X_out": [ + 3.1434992214838484, + 7.690341753904352, + -8.33722876685781, + -9.182684848720871, + 3.386718220335033, + 12.233960999584784, + 0, + -6.190837486806247, + 0.16632754194258703, + 0 + ], + "X_out_mat": [ + [ + 0, + 0.16632754194258703 + ], + [ + -6.190837486806247, + 0 + ], + [ + 12.233960999584784, + 3.386718220335033 + ], + [ + -9.182684848720871, + -8.33722876685781 + ], + [ + 7.690341753904352, + 3.1434992214838484 + ] + ], + "Y_out": [ + -0.4473155444742362, + 8.506121505666528, + -1.318582442958037, + 2.2872452210334266, + 1.2856459620766303, + -1.1996899409061839, + -1.435130831066579, + -2.6187420613598307, + 9.47927687003247, + 16.054792528782958, + 20.86101462997251, + -18.04023641268767 + ], + "Y_out_mat": [ + [ + -18.04023641268767, + 20.86101462997251 + ], + [ + 16.054792528782958, + 9.47927687003247 + ], + [ + -2.6187420613598307, + -1.435130831066579 + ], + [ + -1.1996899409061839, + 1.2856459620766303 + ], + [ + 2.2872452210334266, + -1.318582442958037 + ], + [ + 8.506121505666528, + -0.4473155444742362 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_gt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_gt_n_col_maj.json new file mode 100644 index 000000000000..fe7bb1baefcb --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_gt_n_col_maj.json @@ -0,0 +1,324 @@ +{ + "order": "column-major", + "M": 6, + "N": 5, + "NB": 2, + "A": [ + 9999, + 4, + -1, + 2.5, + 0, + 1.5, + -3, + 7, + 8.5, + -2, + 0.25, + 5, + 1.2, + 3, + -4.5, + 6.1, + -1.1, + 2.2, + 9, + -5, + 1, + 0.75, + 4.4, + -6.6, + 2.8, + 1.1, + -2.2, + 3.3, + -4.4, + 5.5, + -6.6 + ], + "strideA1": 1, + "strideA2": 6, + "offsetA": 1, + "LDA": 6, + "A_mat": [ + [ + 4, + 7, + 3, + -5, + 1.1 + ], + [ + -1, + 8.5, + -4.5, + 1, + -2.2 + ], + [ + 2.5, + -2, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4 + ], + [ + 1.5, + 5, + 2.2, + -6.6, + 5.5 + ], + [ + -3, + 1.2, + 9, + 2.8, + -6.6 + ] + ], + "D": [ + 9999, + 0, + 0 + ], + "strideD": 1, + "offsetD": 1, + "E": [ + 9999, + 0, + 0 + ], + "strideE": 1, + "offsetE": 1, + "TAUQ": [ + 9999, + 0, + 0 + ], + "strideTAUQ": 1, + "offsetTAUQ": 1, + "TAUP": [ + 9999, + 0, + 0 + ], + "strideTAUP": 1, + "offsetTAUP": 1, + "X": [ + 9999, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": 1, + "strideX2": 6, + "offsetX": 1, + "LDX": 6, + "Y": [ + 9999, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": 1, + "strideY2": 5, + "offsetY": 1, + "LDY": 5, + "A_out": [ + 9999, + 1, + -0.10127946282353326, + 0.25319865705883315, + 0, + 0.15191919423529987, + -0.30383838847059974, + 1, + 1, + -0.19054227437573865, + -0.526899018490766, + 0.6475245675965607, + 0.01883610338962286, + 0.10219770511529666, + 1, + 6.1, + -1.1, + 2.2, + 9, + -0.4751241135329162, + 0.034896598936109594, + 0.75, + 4.4, + -6.6, + 2.8, + 0.5446312483784129, + 0.6571073276387958, + 3.3, + -4.4, + 5.5, + -6.6 + ], + "A_out_mat": [ + [ + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129 + ], + [ + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958 + ], + [ + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4 + ], + [ + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5 + ], + [ + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6 + ] + ], + "D_out": [ + 9999, + -5.873670062235365, + 9.747022547553634 + ], + "E_out": [ + 9999, + 10.277882719140447, + -3.000401789770699 + ], + "TAUQ_out": [ + 9999, + 1.681005224606999, + 1.1536874341152112 + ], + "TAUP_out": [ + 9999, + 1.3047927397885486, + 1.3956658033120086 + ], + "X_out": [ + 9999, + 20.55919077536717, + 11.024221604671157, + -6.7082179947936025, + -5.6749886484384255, + 10.742084972404617, + 4.490492468212516, + 0.443498673650984, + -12.838631647380957, + 8.958872342639227, + -11.284711234784144, + 10.733222336505026, + 8.229287201135405 + ], + "X_out_mat": [ + [ + 20.55919077536717, + 0.443498673650984 + ], + [ + 11.024221604671157, + -12.838631647380957 + ], + [ + -6.7082179947936025, + 8.958872342639227 + ], + [ + -5.6749886484384255, + -11.284711234784144 + ], + [ + 10.742084972404617, + 10.733222336505026 + ], + [ + 4.490492468212516, + 8.229287201135405 + ] + ], + "Y_out": [ + 9999, + 0, + 10.132624033192196, + 4.370523014521586, + -11.371655132729234, + 8.403781033910063, + 22.33291397445922, + 0, + -6.371162309919643, + 4.9400268559265585, + -10.104680307318146 + ], + "Y_out_mat": [ + [ + 0, + 22.33291397445922 + ], + [ + 10.132624033192196, + 0 + ], + [ + 4.370523014521586, + -6.371162309919643 + ], + [ + -11.371655132729234, + 4.9400268559265585 + ], + [ + 8.403781033910063, + -10.104680307318146 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_gt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_gt_n_row_maj.json new file mode 100644 index 000000000000..a1afc00e37a5 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_gt_n_row_maj.json @@ -0,0 +1,324 @@ +{ + "order": "row-major", + "M": 6, + "N": 5, + "NB": 2, + "A": [ + 9999, + 4, + 7, + 3, + -5, + 1.1, + -1, + 8.5, + -4.5, + 1, + -2.2, + 2.5, + -2, + 6.1, + 0.75, + 3.3, + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 1.5, + 5, + 2.2, + -6.6, + 5.5, + -3, + 1.2, + 9, + 2.8, + -6.6 + ], + "strideA1": 5, + "strideA2": 1, + "offsetA": 1, + "LDA": 5, + "A_mat": [ + [ + 4, + 7, + 3, + -5, + 1.1 + ], + [ + -1, + 8.5, + -4.5, + 1, + -2.2 + ], + [ + 2.5, + -2, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4 + ], + [ + 1.5, + 5, + 2.2, + -6.6, + 5.5 + ], + [ + -3, + 1.2, + 9, + 2.8, + -6.6 + ] + ], + "D": [ + 9999, + 0, + 0 + ], + "strideD": 1, + "offsetD": 1, + "E": [ + 9999, + 0, + 0 + ], + "strideE": 1, + "offsetE": 1, + "TAUQ": [ + 9999, + 0, + 0 + ], + "strideTAUQ": 1, + "offsetTAUQ": 1, + "TAUP": [ + 9999, + 0, + 0 + ], + "strideTAUP": 1, + "offsetTAUP": 1, + "X": [ + 9999, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 1, + "LDX": 2, + "Y": [ + 9999, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": 2, + "strideY2": 1, + "offsetY": 1, + "LDY": 2, + "A_out": [ + 9999, + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129, + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958, + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3, + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4, + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5, + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6 + ], + "A_out_mat": [ + [ + 1, + 1, + 0.10219770511529666, + -0.4751241135329162, + 0.5446312483784129 + ], + [ + -0.10127946282353326, + 1, + 1, + 0.034896598936109594, + 0.6571073276387958 + ], + [ + 0.25319865705883315, + -0.19054227437573865, + 6.1, + 0.75, + 3.3 + ], + [ + 0, + -0.526899018490766, + -1.1, + 4.4, + -4.4 + ], + [ + 0.15191919423529987, + 0.6475245675965607, + 2.2, + -6.6, + 5.5 + ], + [ + -0.30383838847059974, + 0.01883610338962286, + 9, + 2.8, + -6.6 + ] + ], + "D_out": [ + 9999, + -5.873670062235365, + 9.747022547553634 + ], + "E_out": [ + 9999, + 10.277882719140447, + -3.000401789770699 + ], + "TAUQ_out": [ + 9999, + 1.681005224606999, + 1.1536874341152112 + ], + "TAUP_out": [ + 9999, + 1.3047927397885486, + 1.3956658033120086 + ], + "X_out": [ + 9999, + 20.55919077536717, + 0.443498673650984, + 11.024221604671157, + -12.838631647380957, + -6.7082179947936025, + 8.958872342639227, + -5.6749886484384255, + -11.284711234784144, + 10.742084972404617, + 10.733222336505026, + 4.490492468212516, + 8.229287201135405 + ], + "X_out_mat": [ + [ + 20.55919077536717, + 0.443498673650984 + ], + [ + 11.024221604671157, + -12.838631647380957 + ], + [ + -6.7082179947936025, + 8.958872342639227 + ], + [ + -5.6749886484384255, + -11.284711234784144 + ], + [ + 10.742084972404617, + 10.733222336505026 + ], + [ + 4.490492468212516, + 8.229287201135405 + ] + ], + "Y_out": [ + 9999, + 0, + 22.33291397445922, + 10.132624033192196, + 0, + 4.370523014521586, + -6.371162309919643, + -11.371655132729234, + 4.9400268559265585, + 8.403781033910063, + -10.104680307318146 + ], + "Y_out_mat": [ + [ + 0, + 22.33291397445922 + ], + [ + 10.132624033192196, + 0 + ], + [ + 4.370523014521586, + -6.371162309919643 + ], + [ + -11.371655132729234, + 4.9400268559265585 + ], + [ + 8.403781033910063, + -10.104680307318146 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_lt_n_col_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_lt_n_col_maj.json new file mode 100644 index 000000000000..99987c199b10 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_lt_n_col_maj.json @@ -0,0 +1,320 @@ +{ + "order": "column-major", + "M": 5, + "N": 6, + "NB": 2, + "A": [ + 9999, + 2, + -1, + 3.5, + 0, + 1.2, + 4, + 5.5, + -2, + 0.25, + -3, + 6, + -4.5, + 7.1, + -1.1, + 2.2, + -5, + 1, + 0.75, + 4.4, + -6.6, + 8, + -2.2, + 3.3, + -4.4, + 5.5, + -7, + 6.1, + -8.2, + 9.3, + -1.4 + ], + "strideA1": 1, + "strideA2": 5, + "offsetA": 1, + "LDA": 5, + "A_mat": [ + [ + 2, + 4, + 6, + -5, + 8, + -7 + ], + [ + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1 + ], + [ + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D": [ + 9999, + 0, + 0 + ], + "strideD": 1, + "offsetD": 1, + "E": [ + 9999, + 0, + 0 + ], + "strideE": 1, + "offsetE": 1, + "TAUQ": [ + 9999, + 0, + 0 + ], + "strideTAUQ": 1, + "offsetTAUQ": 1, + "TAUP": [ + 9999, + 0, + 0 + ], + "strideTAUP": 1, + "offsetTAUP": 1, + "X": [ + 9999, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": 1, + "strideX2": 5, + "offsetX": 1, + "LDX": 5, + "Y": [ + 9999, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": 1, + "strideY2": 6, + "offsetY": 1, + "LDY": 6, + "A_out": [ + 9999, + 1, + 1, + -0.42927571920226854, + 0.45133057530596093, + -0.3190014386838066, + 0.25112396373019197, + 1, + 1, + -0.5598442949740452, + 0.4533192433895179, + 0.37668594559528795, + -0.02316001991491976, + 7.1, + -1.1, + 2.2, + -0.31390495466273993, + -0.013172004174208005, + 0.75, + 4.4, + -6.6, + 0.5022479274603839, + 0.07079950984804703, + 3.3, + -4.4, + 5.5, + -0.43946693652783597, + 0.2634237587021064, + -8.2, + 9.3, + -1.4 + ], + "A_out_mat": [ + [ + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597 + ], + [ + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064 + ], + [ + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D_out": [ + 9999, + -13.92838827718412, + 10.46201443392983 + ], + "E_out": [ + 9999, + -15.15496966905916, + 4.9476461153575455 + ], + "TAUQ_out": [ + 9999, + 1.3425171808429295, + 1.31672159905915 + ], + "TAUP_out": [ + 9999, + 1.1435916317235477, + 1.8602669148589588 + ], + "X_out": [ + 9999, + 0, + -6.190837486806247, + 12.233960999584784, + -9.182684848720871, + 7.690341753904352, + 0.16632754194258703, + 0, + 3.386718220335033, + -8.33722876685781, + 3.1434992214838484 + ], + "X_out_mat": [ + [ + 0, + 0.16632754194258703 + ], + [ + -6.190837486806247, + 0 + ], + [ + 12.233960999584784, + 3.386718220335033 + ], + [ + -9.182684848720871, + -8.33722876685781 + ], + [ + 7.690341753904352, + 3.1434992214838484 + ] + ], + "Y_out": [ + 9999, + -18.04023641268767, + 16.054792528782958, + -2.6187420613598307, + -1.1996899409061839, + 2.2872452210334266, + 8.506121505666528, + 20.86101462997251, + 9.47927687003247, + -1.435130831066579, + 1.2856459620766303, + -1.318582442958037, + -0.4473155444742362 + ], + "Y_out_mat": [ + [ + -18.04023641268767, + 20.86101462997251 + ], + [ + 16.054792528782958, + 9.47927687003247 + ], + [ + -2.6187420613598307, + -1.435130831066579 + ], + [ + -1.1996899409061839, + 1.2856459620766303 + ], + [ + 2.2872452210334266, + -1.318582442958037 + ], + [ + 8.506121505666528, + -0.4473155444742362 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_lt_n_row_maj.json b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_lt_n_row_maj.json new file mode 100644 index 000000000000..b439f9c4f9e3 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/fixtures/offsets/m_lt_n_row_maj.json @@ -0,0 +1,320 @@ +{ + "order": "row-major", + "M": 5, + "N": 6, + "NB": 2, + "A": [ + 9999, + 2, + 4, + 6, + -5, + 8, + -7, + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1, + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2, + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3, + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4 + ], + "strideA1": 6, + "strideA2": 1, + "offsetA": 1, + "LDA": 6, + "A_mat": [ + [ + 2, + 4, + 6, + -5, + 8, + -7 + ], + [ + -1, + 5.5, + -4.5, + 1, + -2.2, + 6.1 + ], + [ + 3.5, + -2, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0, + 0.25, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + 1.2, + -3, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D": [ + 9999, + 0, + 0 + ], + "strideD": 1, + "offsetD": 1, + "E": [ + 9999, + 0, + 0 + ], + "strideE": 1, + "offsetE": 1, + "TAUQ": [ + 9999, + 0, + 0 + ], + "strideTAUQ": 1, + "offsetTAUQ": 1, + "TAUP": [ + 9999, + 0, + 0 + ], + "strideTAUP": 1, + "offsetTAUP": 1, + "X": [ + 9999, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideX1": 2, + "strideX2": 1, + "offsetX": 1, + "LDX": 2, + "Y": [ + 9999, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "strideY1": 2, + "strideY2": 1, + "offsetY": 1, + "LDY": 2, + "A_out": [ + 9999, + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597, + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064, + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2, + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3, + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4 + ], + "A_out_mat": [ + [ + 1, + 0.25112396373019197, + 0.37668594559528795, + -0.31390495466273993, + 0.5022479274603839, + -0.43946693652783597 + ], + [ + 1, + 1, + -0.02316001991491976, + -0.013172004174208005, + 0.07079950984804703, + 0.2634237587021064 + ], + [ + -0.42927571920226854, + 1, + 7.1, + 0.75, + 3.3, + -8.2 + ], + [ + 0.45133057530596093, + -0.5598442949740452, + -1.1, + 4.4, + -4.4, + 9.3 + ], + [ + -0.3190014386838066, + 0.4533192433895179, + 2.2, + -6.6, + 5.5, + -1.4 + ] + ], + "D_out": [ + 9999, + -13.92838827718412, + 10.46201443392983 + ], + "E_out": [ + 9999, + -15.15496966905916, + 4.9476461153575455 + ], + "TAUQ_out": [ + 9999, + 1.3425171808429295, + 1.31672159905915 + ], + "TAUP_out": [ + 9999, + 1.1435916317235477, + 1.8602669148589588 + ], + "X_out": [ + 9999, + 0, + 0.16632754194258703, + -6.190837486806247, + 0, + 12.233960999584784, + 3.386718220335033, + -9.182684848720871, + -8.33722876685781, + 7.690341753904352, + 3.1434992214838484 + ], + "X_out_mat": [ + [ + 0, + 0.16632754194258703 + ], + [ + -6.190837486806247, + 0 + ], + [ + 12.233960999584784, + 3.386718220335033 + ], + [ + -9.182684848720871, + -8.33722876685781 + ], + [ + 7.690341753904352, + 3.1434992214838484 + ] + ], + "Y_out": [ + 9999, + -18.04023641268767, + 20.86101462997251, + 16.054792528782958, + 9.47927687003247, + -2.6187420613598307, + -1.435130831066579, + -1.1996899409061839, + 1.2856459620766303, + 2.2872452210334266, + -1.318582442958037, + 8.506121505666528, + -0.4473155444742362 + ], + "Y_out_mat": [ + [ + -18.04023641268767, + 20.86101462997251 + ], + [ + 16.054792528782958, + 9.47927687003247 + ], + [ + -2.6187420613598307, + -1.435130831066579 + ], + [ + -1.1996899409061839, + 1.2856459620766303 + ], + [ + 2.2872452210334266, + -1.318582442958037 + ], + [ + 8.506121505666528, + -0.4473155444742362 + ] + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.dlabrd.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.dlabrd.js new file mode 100644 index 000000000000..e474b700b59d --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.dlabrd.js @@ -0,0 +1,508 @@ +/** +* @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 dlabrd = require( './../lib/dlabrd.js' ); + + +// FIXTURES // + +var M_GT_N_ROW_MAJ = require( './fixtures/m_gt_n_row_maj.json' ); +var M_LT_N_ROW_MAJ = require( './fixtures/m_lt_n_row_maj.json' ); +var M_GT_N_COL_MAJ = require( './fixtures/m_gt_n_col_maj.json' ); +var M_LT_N_COL_MAJ = require( './fixtures/m_lt_n_col_maj.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dlabrd, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 14', function test( t ) { + t.strictEqual( dlabrd.length, 14, '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 TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + var i; + + A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + D = new Float64Array( [ 0.0 ] ); + E = new Float64Array( [ 0.0 ] ); + TAUQ = new Float64Array( [ 0.0 ] ); + TAUP = new Float64Array( [ 0.0 ] ); + X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + Y = new Float64Array( [ 0.0, 0.0 ] ); + + 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() { + dlabrd( value, 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); + }; + } +}); + +tape( 'the function throws an error if provided a second argument which is smaller than 0', function test( t ) { + var values; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + var i; + + A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + D = new Float64Array( [ 0.0 ] ); + E = new Float64Array( [ 0.0 ] ); + TAUQ = new Float64Array( [ 0.0 ] ); + TAUP = new Float64Array( [ 0.0 ] ); + X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + Y = new Float64Array( [ 0.0, 0.0 ] ); + + values = [ + -1, + -2, + -3 + ]; + + 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() { + dlabrd( 'column-major', value, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); + }; + } +}); + +tape( 'the function throws an error if provided a third argument which is smaller than 0', function test( t ) { + var values; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + var i; + + A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + D = new Float64Array( [ 0.0 ] ); + E = new Float64Array( [ 0.0 ] ); + TAUQ = new Float64Array( [ 0.0 ] ); + TAUP = new Float64Array( [ 0.0 ] ); + X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + Y = new Float64Array( [ 0.0, 0.0 ] ); + + values = [ + -1, + -2, + -3 + ]; + + 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() { + dlabrd( 'column-major', 3, value, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid LDA value (row-major)', function test( t ) { + var values; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + var i; + + A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + D = new Float64Array( [ 0.0 ] ); + E = new Float64Array( [ 0.0 ] ); + TAUQ = new Float64Array( [ 0.0 ] ); + TAUP = new Float64Array( [ 0.0 ] ); + X = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + Y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); + + values = [ + -1, + 0, + 1 + ]; + + 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() { + dlabrd( 'row-major', 3, 2, 1, A, value, D, E, TAUQ, TAUP, X, 2, Y, 2 ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid LDX value (row-major)', function test( t ) { + var values; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + var i; + + A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + D = new Float64Array( [ 0.0 ] ); + E = new Float64Array( [ 0.0 ] ); + TAUQ = new Float64Array( [ 0.0 ] ); + TAUP = new Float64Array( [ 0.0 ] ); + X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + Y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); + + values = [ + -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() { + dlabrd( 'row-major', 3, 2, 1, A, 2, D, E, TAUQ, TAUP, X, value, Y, 2 ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid LDY value (row-major)', function test( t ) { + var values; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + var i; + + A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + D = new Float64Array( [ 0.0 ] ); + E = new Float64Array( [ 0.0 ] ); + TAUQ = new Float64Array( [ 0.0 ] ); + TAUP = new Float64Array( [ 0.0 ] ); + X = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + Y = new Float64Array( [ 0.0, 0.0 ] ); + + values = [ + -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() { + dlabrd( 'row-major', 3, 2, 1, A, 2, D, E, TAUQ, TAUP, X, 2, Y, value ); + }; + } +}); + +tape( 'the function quick returns when `M` or `N` is equal to 0', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_GT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A ); + expectedD = new Float64Array( data.D ); + expectedE = new Float64Array( data.E ); + expectedTAUQ = new Float64Array( data.TAUQ ); + expectedTAUP = new Float64Array( data.TAUP ); + expectedX = new Float64Array( data.X ); + expectedY = new Float64Array( data.Y ); + + dlabrd( data.order, 0, 0, data.NB, A, data.LDA, D, E, TAUQ, TAUP, X, data.LDX, Y, data.LDY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, row-major)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_GT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.order, data.M, data.N, data.NB, A, data.LDA, D, E, TAUQ, TAUP, X, data.LDX, Y, data.LDY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 4 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 0 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, column-major)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_GT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.order, data.M, data.N, data.NB, A, data.LDA, D, E, TAUQ, TAUP, X, data.LDX, Y, data.LDY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, row-major)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_LT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.order, data.M, data.N, data.NB, A, data.LDA, D, E, TAUQ, TAUP, X, data.LDX, Y, data.LDY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 21 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, column-major)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_LT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.order, data.M, data.N, data.NB, A, data.LDA, D, E, TAUQ, TAUP, X, data.LDX, Y, data.LDY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.js new file mode 100644 index 000000000000..e8df6c0fc701 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/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 dlabrd = 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 dlabrd, '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 dlabrd.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 dlabrd = proxyquire( './../lib', { + '@stdlib/utils/try-require': tryRequire + }); + + t.strictEqual( dlabrd, 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 dlabrd; + var main; + + main = require( './../lib/dlabrd.js' ); + + dlabrd = proxyquire( './../lib', { + '@stdlib/utils/try-require': tryRequire + }); + + t.strictEqual( dlabrd, main, 'returns expected value' ); + t.end(); + + function tryRequire() { + return new Error( 'Cannot find module' ); + } +}); diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.ndarray.js new file mode 100644 index 000000000000..f8f288b89183 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/test/test.ndarray.js @@ -0,0 +1,1104 @@ +/** +* @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 dlabrd = require( './../lib/ndarray.js' ); + + +// FIXTURES // + +var M_GT_N_ROW_MAJ = require( './fixtures/m_gt_n_row_maj.json' ); +var M_LT_N_ROW_MAJ = require( './fixtures/m_lt_n_row_maj.json' ); +var M_GT_N_COL_MAJ = require( './fixtures/m_gt_n_col_maj.json' ); +var M_LT_N_COL_MAJ = require( './fixtures/m_lt_n_col_maj.json' ); +var LAR_STR_M_GT_N_ROW_MAJ = require( './fixtures/large_strides/m_gt_n_row_maj.json' ); +var LAR_STR_M_LT_N_ROW_MAJ = require( './fixtures/large_strides/m_lt_n_row_maj.json' ); +var LAR_STR_M_GT_N_COL_MAJ = require( './fixtures/large_strides/m_gt_n_col_maj.json' ); +var LAR_STR_M_LT_N_COL_MAJ = require( './fixtures/large_strides/m_lt_n_col_maj.json' ); +var MIX_STR_M_GT_N_ROW_MAJ = require( './fixtures/mixed_strides/m_gt_n_row_maj.json' ); +var MIX_STR_M_LT_N_ROW_MAJ = require( './fixtures/mixed_strides/m_lt_n_row_maj.json' ); +var MIX_STR_M_GT_N_COL_MAJ = require( './fixtures/mixed_strides/m_gt_n_col_maj.json' ); +var MIX_STR_M_LT_N_COL_MAJ = require( './fixtures/mixed_strides/m_lt_n_col_maj.json' ); +var NEG_STR_M_GT_N_ROW_MAJ = require( './fixtures/negative_strides/m_gt_n_row_maj.json' ); +var NEG_STR_M_LT_N_ROW_MAJ = require( './fixtures/negative_strides/m_lt_n_row_maj.json' ); +var NEG_STR_M_GT_N_COL_MAJ = require( './fixtures/negative_strides/m_gt_n_col_maj.json' ); +var NEG_STR_M_LT_N_COL_MAJ = require( './fixtures/negative_strides/m_lt_n_col_maj.json' ); +var OFF_M_GT_N_ROW_MAJ = require( './fixtures/offsets/m_gt_n_row_maj.json' ); +var OFF_M_LT_N_ROW_MAJ = require( './fixtures/offsets/m_lt_n_row_maj.json' ); +var OFF_M_GT_N_COL_MAJ = require( './fixtures/offsets/m_gt_n_col_maj.json' ); +var OFF_M_LT_N_COL_MAJ = require( './fixtures/offsets/m_lt_n_col_maj.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dlabrd, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 27', function test( t ) { + t.strictEqual( dlabrd.length, 27, 'returns expected value' ); + t.end(); +}); + +tape( 'the function throws an error if provided a first argument which is smaller than 0', function test( t ) { + var values; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + var i; + + A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + D = new Float64Array( [ 0.0 ] ); + E = new Float64Array( [ 0.0 ] ); + TAUQ = new Float64Array( [ 0.0 ] ); + TAUP = new Float64Array( [ 0.0 ] ); + X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + Y = new Float64Array( [ 0.0, 0.0 ] ); + + values = [ + -1, + -2, + -3 + ]; + + 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() { + dlabrd( value, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); + }; + } +}); + +tape( 'the function throws an error if provided a second argument which is smaller than 0', function test( t ) { + var values; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + var i; + + A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + D = new Float64Array( [ 0.0 ] ); + E = new Float64Array( [ 0.0 ] ); + TAUQ = new Float64Array( [ 0.0 ] ); + TAUP = new Float64Array( [ 0.0 ] ); + X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + Y = new Float64Array( [ 0.0, 0.0 ] ); + + values = [ + -1, + -2, + -3 + ]; + + 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() { + dlabrd( 3, value, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); + }; + } +}); + +tape( 'the function quick returns when `M` or `N` is equal to 0', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_GT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A ); + expectedD = new Float64Array( data.D ); + expectedE = new Float64Array( data.E ); + expectedTAUQ = new Float64Array( data.TAUQ ); + expectedTAUP = new Float64Array( data.TAUP ); + expectedX = new Float64Array( data.X ); + expectedY = new Float64Array( data.Y ); + + dlabrd( 0, 0, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, row-major)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_GT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 4 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 0 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, column-major)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_GT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, row-major)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_LT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 21 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, column-major)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = M_LT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, row-major, large stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = LAR_STR_M_GT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 4 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 0 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, column-major, large stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = LAR_STR_M_GT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, row-major, large stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = LAR_STR_M_LT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 21 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, column-major, large stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = LAR_STR_M_LT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, row-major, mixed stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = MIX_STR_M_GT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 4 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 0 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, column-major, mixed stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = MIX_STR_M_GT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, row-major, mixed stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = MIX_STR_M_LT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 21 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, column-major, mixed stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = MIX_STR_M_LT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, row-major, negative stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = NEG_STR_M_GT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 4 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 0 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, column-major, negative stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = NEG_STR_M_GT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, row-major, negative stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = NEG_STR_M_LT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 21 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, column-major, negative stride)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = NEG_STR_M_LT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, row-major, offset)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = OFF_M_GT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 4 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 0 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M >= N, column-major, offset)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = OFF_M_GT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, row-major, offset)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = OFF_M_LT_N_ROW_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 2 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 0 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 21 ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function reduces the first `NB` rows and columns of a general matrix to a bi-diagonal form (M < N, column-major, offset)', function test( t ) { + var expectedTAUQ; + var expectedTAUP; + var expectedA; + var expectedD; + var expectedE; + var expectedX; + var expectedY; + var data; + var TAUP; + var TAUQ; + var A; + var D; + var E; + var X; + var Y; + + data = OFF_M_LT_N_COL_MAJ; + + A = new Float64Array( data.A ); + D = new Float64Array( data.D ); + E = new Float64Array( data.E ); + TAUQ = new Float64Array( data.TAUQ ); + TAUP = new Float64Array( data.TAUP ); + X = new Float64Array( data.X ); + Y = new Float64Array( data.Y ); + + expectedA = new Float64Array( data.A_out ); + expectedD = new Float64Array( data.D_out ); + expectedE = new Float64Array( data.E_out ); + expectedTAUQ = new Float64Array( data.TAUQ_out ); + expectedTAUP = new Float64Array( data.TAUP_out ); + expectedX = new Float64Array( data.X_out ); + expectedY = new Float64Array( data.Y_out ); + + dlabrd( data.M, data.N, data.NB, A, data.strideA1, data.strideA2, data.offsetA, D, data.strideD, data.offsetD, E, data.strideE, data.offsetE, TAUQ, data.strideTAUQ, data.offsetTAUQ, TAUP, data.strideTAUP, data.offsetTAUP, X, data.strideX1, data.strideX2, data.offsetX, Y, data.strideY1, data.strideY2, data.offsetY ); + t.strictEqual( isAlmostEqual( A, expectedA, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( D, expectedD, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( E, expectedE, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUQ, expectedTAUQ, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( TAUP, expectedTAUP, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( X, expectedX, 1 ), true, 'returns expected value' ); + t.strictEqual( isAlmostEqual( Y, expectedY, 1 ), true, 'returns expected value' ); + t.end(); +}); From 372ed2012725de8a7344e5259914f1495fbb7621 Mon Sep 17 00:00:00 2001 From: Prajjwal Bajpai Date: Mon, 22 Jun 2026 14:51:51 +0530 Subject: [PATCH 3/5] feat: add benchmarks, example and docs --- 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: passed - 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - 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: passed - task: lint_license_headers status: passed --- --- .../@stdlib/lapack/base/dlabrd/README.md | 452 +++++++++ .../lapack/base/dlabrd/benchmark/benchmark.js | 137 +++ .../dlabrd/benchmark/benchmark.ndarray.js | 154 +++ .../lapack/base/dlabrd/docs/types/index.d.ts | 231 +++++ .../lapack/base/dlabrd/docs/types/test.ts | 935 ++++++++++++++++++ .../lapack/base/dlabrd/examples/index.js | 55 ++ 6 files changed, 1964 insertions(+) create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/README.md create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/benchmark/benchmark.ndarray.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/examples/index.js diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/README.md b/lib/node_modules/@stdlib/lapack/base/dlabrd/README.md new file mode 100644 index 000000000000..99f8a5c59ec0 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/README.md @@ -0,0 +1,452 @@ + + +# dlabrd + +> Reduce the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P`. + +
+ +This is an auxiliary routine called by `dgebrd` to perform the bidiagonal reduction of a general matrix. + +The matrices `Q` and `P` are represented as products of elementary reflectors: + + + +```math +Q = H(1) H(2) \dots H(nb) \quad \text{and} \quad P = G(1) G(2) \dots G(nb) +``` + + + +Each `H(i)` and `G(i)` has the form: + + + +```math +H(i) = I - \tau_q \cdot v \cdot v^T \quad \text{and} \quad G(i) = I - \tau_p \cdot u \cdot u^T +``` + + + +where `τ_q` and `τ_p` are real scalars, and `v` and `u` are real vectors. + +If `M ≥ N`, `v(1:i-1) = 0`, `v(i) = 1`, and `v(i:M)` is stored on exit in `A(i:M,i)`; `u(1:i) = 0`, `u(i+1) = 1`, and `u(i+1:N)` is stored on exit in `A(i,i+1:N)`; `τ_q` is stored in `TAUQ(i)` and `τ_p` in `TAUP(i)`. + +If `M < N`, `v(1:i) = 0`, `v(i+1) = 1`, and `v(i+1:M)` is stored on exit in `A(i+2:M,i)`; `u(1:i-1) = 0`, `u(i) = 1`, and `u(i:N)` is stored on exit in `A(i,i+1:N)`; `τ_q` is stored in `TAUQ(i)` and `τ_p` in `TAUP(i)`. + +The elements of the vectors `v` and `u` together form the `M`-by-`NB` matrix `V` and the `NB`-by-`N` matrix `U^T` which are needed, with `X` and `Y`, to apply the transformation to the unreduced part of the matrix, using a block update of the form: + + + +```math +A := A - V \cdot Y^T - X \cdot U^T +``` + + + +The contents of `A` on exit are illustrated by the following examples with `nb = 2`: + +For `M = 6` and `N = 5` (`M > N`): + + + +```math +A = \left[ +\begin{array}{ccccc} + 1 & 1 & u_1 & u_1 & u_1 \\ + v_1 & 1 & 1 & u_2 & u_2 \\ + v_1 & v_2 & a & a & a \\ + v_1 & v_2 & a & a & a \\ + v_1 & v_2 & a & a & a \\ + v_1 & v_2 & a & a & a +\end{array} +\right] +``` + + + +For `m = 5` and `n = 6` (`M < N`): + + + +```math +A = \left[ +\begin{array}{rrrrrr} + 1 & u_1 & u_1 & u_1 & u_1 & u_1 \\ + 1 & 1 & u_2 & u_2 & u_2 & u_2 \\ + v_1 & 1 & a & a & a & a \\ + v_1 & v_2 & a & a & a & a \\ + v_1 & v_2 & a & a & a & a +\end{array} +\right] +``` + + + +where `A` denotes an element of the original matrix which is unchanged, `v_i` denotes an element of the vector defining `H(i)`, and `u_i` an element of the vector defining `G(i)`. + +
+ + + +
+ +## Usage + +```javascript +var dlabrd = require( '@stdlib/lapack/base/dlabrd' ); +``` + +#### dlabrd( order, M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, LDY ) + +Reduces the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P`. + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +var D = new Float64Array( [ 0.0 ] ); +var E = new Float64Array( [ 0.0 ] ); +var TAUQ = new Float64Array( [ 0.0 ] ); +var TAUP = new Float64Array( [ 0.0 ] ); +var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); +var Y = new Float64Array( [ 0.0, 0.0 ] ); + +dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); +// A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +// D => [ ~-3.742 ] +// E => [ ~-8.552 ] +// TAUQ => [ ~1.267 ] +// TAUP => [ 0.0 ] +// X => [ ~12.552, 0.0, 0.0 ] +// Y => [ 0.0, ~12.552 ] +``` + +The function has the following parameters: + +- **order**: storage layout. Must be either `'row-major'` or `'column-major'`. +- **M**: number of rows in `A`. +- **N**: number of columns in `A`. +- **NB**: number of leading rows and columns of `A` to reduce. +- **A**: input matrix stored in linear memory as a [`Float64Array`][@stdlib/array/float64]. +- **LDA**: stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`). +- **D**: the diagonal elements of the reduced matrix (length `NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **E**: the off-diagonal elements of the reduced matrix (length `NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **TAUQ**: scalar factors of the elementary reflectors that represent the orthogonal matrix `Q` (length `NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **TAUP**: scalar factors of the elementary reflectors that represent the orthogonal matrix `P` (length `NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **X**: output matrix (dimension `LDX-by-NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **LDX**: stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`). +- **Y**: output matrix (dimension `LDY-by-NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **LDY**: stride of the first dimension of `Y` (a.k.a., leading dimension of the matrix `Y`). + +If `M >= N`, `A` is reduced to upper bi-diagonal form. If `M < N`, `A` is reduced to lower bi-diagonal form. + +The function mutates the input arrays `A`, `D`, `E`, `TAUQ`, `TAUP`, `X`, and `Y`. + +Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views. + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +// Initial arrays... +var A0 = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +var D0 = new Float64Array( [ 0.0, 0.0 ] ); +var E0 = new Float64Array( [ 0.0, 0.0 ] ); +var TAUQ0 = new Float64Array( [ 0.0, 0.0 ] ); +var TAUP0 = new Float64Array( [ 0.0, 0.0 ] ); +var X0 = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); +var Y0 = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + +/* + A = [ + [ 1.0, 4.0 ], + [ 2.0, 5.0 ], + [ 3.0, 6.0 ] + ] +*/ + +// Create offset views... +var A = new Float64Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var D = new Float64Array( D0.buffer, D0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var E = new Float64Array( E0.buffer, E0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var TAUQ = new Float64Array( TAUQ0.buffer, TAUQ0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var TAUP = new Float64Array( TAUP0.buffer, TAUP0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var X = new Float64Array( X0.buffer, X0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var Y = new Float64Array( Y0.buffer, Y0.BYTES_PER_ELEMENT*1 ); // start at 2nd element + +dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); +// A0 => [ 0.0, 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +// D0 => [ 0.0, ~-3.742 ] +// E0 => [ 0.0, ~-8.552 ] +// TAUQ0 => [ 0.0, ~1.267 ] +// TAUP0 => [ 0.0, 0.0 ] +// X0 => [ 0.0, ~12.552, 0.0, 0.0 ] +// Y0 => [ 0.0, 0.0, ~12.552 ] +``` + + + +#### dlabrd.ndarray( M, N, NB, A, strideA1, strideA2, offsetA, D, strideD, offsetD, E, strideE, offsetE, TAUQ, strideTAUQ, offsetTAUQ, TAUP, strideTAUP, offsetTAUP, X, strideX1, strideX2, offsetX, Y, strideY1, strideY2, offsetY ) + +Reduces the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P` using alternative indexing semantics. + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +var D = new Float64Array( [ 0.0 ] ); +var E = new Float64Array( [ 0.0 ] ); +var TAUQ = new Float64Array( [ 0.0 ] ); +var TAUP = new Float64Array( [ 0.0 ] ); +var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); +var Y = new Float64Array( [ 0.0, 0.0 ] ); + +dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); +// A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +// D => [ ~-3.742 ] +// E => [ ~-8.552 ] +// TAUQ => [ ~1.267 ] +// TAUP => [ 0.0 ] +// X => [ ~12.552, 0.0, 0.0 ] +// Y => [ 0.0, ~12.552 ] +``` + +The function has the following additional parameters: + +- **M**: number of rows in `A`. +- **N**: number of columns in `A`. +- **NB**: number of leading rows and columns of `A` to reduce. +- **A**: input matrix as a [`Float64Array`][@stdlib/array/float64]. +- **strideA1**: stride of the first dimension of `A`. +- **strideA2**: stride of the second dimension of `A`. +- **offsetA**: starting index for `A`. +- **D**: the diagonal elements of the reduced matrix (length `NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **strideD**: stride length for `D`. +- **offsetD**: starting index for `D`. +- **E**: the off-diagonal elements of the reduced matrix (length `NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **strideE**: stride length for `E`. +- **offsetE**: starting index for `E`. +- **TAUQ**: scalar factors of the elementary reflectors that represent the orthogonal matrix `Q` (length `NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **strideTAUQ**: stride length for `TAUQ`. +- **offsetTAUQ**: starting index for `TAUQ`. +- **TAUP**: scalar factors of the elementary reflectors that represent the orthogonal matrix `P` (length `NB`) as a [`Float64Array`][@stdlib/array/float64]. +- **strideTAUP**: stride length for `TAUP`. +- **offsetTAUP**: starting index for `TAUP`. +- **X**: output matrix as a [`Float64Array`][@stdlib/array/float64]. +- **strideX1**: stride of the first dimension of `X`. +- **strideX2**: stride of the second dimension of `X`. +- **offsetX**: starting index for `X`. +- **Y**: output matrix as a [`Float64Array`][@stdlib/array/float64]. +- **strideY1**: stride of the first dimension of `Y`. +- **strideY2**: stride of the second dimension of `Y`. +- **offsetY**: starting index for `Y`. + +While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +var D = new Float64Array( [ 0.0, 0.0 ] ); +var E = new Float64Array( [ 0.0, 0.0 ] ); +var TAUQ = new Float64Array( [ 0.0, 0.0 ] ); +var TAUP = new Float64Array( [ 0.0, 0.0 ] ); +var X = new Float64Array( [ 0.0, 0.0, 0.0, 0.0 ] ); +var Y = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + +dlabrd.ndarray( 3, 2, 1, A, 1, 3, 1, D, 1, 1, E, 1, 1, TAUQ, 1, 1, TAUP, 1, 1, X, 1, 3, 1, Y, 1, 2, 1 ); +// A => [ 0.0, 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +// D => [ 0.0, ~-3.742 ] +// E => [ 0.0, ~-8.552 ] +// TAUQ => [ 0.0, ~1.267 ] +// TAUP => [ 0.0, 0.0 ] +// X => [ 0.0, ~12.552, 0.0, 0.0 ] +// Y => [ 0.0, 0.0, ~12.552 ] +``` + +
+ + + +
+ +## Notes + +- When `M <= 0` or `N <= 0`, the function returns immediately. + +- `dlabrd()` corresponds to the [LAPACK][LAPACK] auxiliary routine [`dlabrd`][lapack-dlabrd]. + +
+ + + +
+ +## Examples + + + + + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); +var dlabrd = require( '@stdlib/lapack/base/dlabrd' ); + +var M = 5; +var N = 4; +var NB = 2; + +var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0 ] ); +var D = new Float64Array( NB ); +var E = new Float64Array( NB ); +var TAUQ = new Float64Array( NB ); +var TAUP = new Float64Array( NB ); +var X = new Float64Array( M * NB ); +var Y = new Float64Array( N * NB ); + +/* + A = [ + [ 1.0, 6.0, 11.0, 16.0 ], + [ 2.0, 7.0, 12.0, 17.0 ], + [ 3.0, 8.0, 13.0, 18.0 ], + [ 4.0, 9.0, 14.0, 19.0 ], + [ 5.0, 10.0, 15.0, 20.0 ], + ] +*/ + +// Reduce the first NB rows and columns of A to bi-diagonal form: +dlabrd( 'column-major', M, N, NB, A, M, D, E, TAUQ, TAUP, X, M, Y, N ); + +console.log( A ); +console.log( D ); +console.log( E ); +console.log( TAUQ ); +console.log( TAUP ); +console.log( X ); +console.log( Y ); + +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +TODO +``` + +#### TODO + +TODO. + +```c +TODO +``` + +TODO + +```c +TODO +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +TODO +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/benchmark/benchmark.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/benchmark/benchmark.js new file mode 100644 index 000000000000..37660a7e62c7 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/benchmark/benchmark.js @@ -0,0 +1,137 @@ +/** +* @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 isnan = require( '@stdlib/math/base/assert/is-nan' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var floor = require( '@stdlib/math/base/special/floor' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var dlabrd = require( './../lib/dlabrd.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} M - number of rows +* @param {PositiveInteger} N - number of columns +* @param {PositiveInteger} NB - number of leading rows and columns to reduce +* @returns {Function} benchmark function +*/ +function createBenchmark( order, M, N, NB ) { + var TAUQ = new Float64Array( NB ); + var TAUP = new Float64Array( NB ); + var LDA; + var LDX; + var LDY; + var A = discreteUniform( M * N, 1.0, 10.0, opts ); + var X = new Float64Array( M * NB ); + var Y = new Float64Array( N * NB ); + var D = new Float64Array( NB ); + var E = new Float64Array( NB ); + + if ( order === 'row-major' ) { + LDA = N; + LDX = NB; + LDY = NB; + } else { + LDA = M; + LDX = M; + LDY = N; + } + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + dlabrd( order, M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, LDY ); + if ( isnan( A[ i%M ] ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( A[ i%M ] ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var minVal; + var maxVal; + var ord; + var NB; + var N; + var f; + var i; + var j; + + minVal = 1; // 10^minVal + maxVal = 6; // 10^maxVal + + for ( j = 0; j < LAYOUTS.length; j++ ) { + ord = LAYOUTS[ j ]; + for ( i = minVal; i <= maxVal; i++ ) { + N = floor( pow( pow( 10, i ), 1.0/3.0 ) ); + NB = N; + f = createBenchmark( ord, N, N, NB ); + bench( format( '%s:order=%s,size=%d', pkg, ord, N*N ), f ); + } + } +} + +main(); diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/benchmark/benchmark.ndarray.js new file mode 100644 index 000000000000..58ba7a031780 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/benchmark/benchmark.ndarray.js @@ -0,0 +1,154 @@ +/** +* @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 isnan = require( '@stdlib/math/base/assert/is-nan' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var floor = require( '@stdlib/math/base/special/floor' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var dlabrd = 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} M - number of rows +* @param {PositiveInteger} N - number of columns +* @param {PositiveInteger} NB - number of leading rows and columns to reduce +* @returns {Function} benchmark function +*/ +function createBenchmark( order, M, N, NB ) { + var TAUQ; + var TAUP; + var sA1; + var sA2; + var sX1; + var sX2; + var sY1; + var sY2; + var A; + var D; + var E; + var X; + var Y; + + A = discreteUniform( M * N, 1.0, 10.0, opts ); + D = new Float64Array( NB ); + E = new Float64Array( NB ); + TAUQ = new Float64Array( NB ); + TAUP = new Float64Array( NB ); + X = new Float64Array( M * NB ); + Y = new Float64Array( N * NB ); + if ( isColumnMajor( order ) ) { + sA1 = 1; + sA2 = M; + sX1 = 1; + sX2 = M; + sY1 = 1; + sY2 = N; + } else { // order === 'row-major' + sA1 = N; + sA2 = 1; + sX1 = NB; + sX2 = 1; + sY1 = NB; + sY2 = 1; + } + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + dlabrd( M, N, NB, A, sA1, sA2, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, sX1, sX2, 0, Y, sY1, sY2, 0 ); // eslint-disable-line max-len + if ( isnan( A[ i%M ] ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( A[ i%M ] ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var minVal; + var maxVal; + var ord; + var NB; + var N; + var f; + var i; + var j; + + minVal = 1; // 10^minVal + maxVal = 6; // 10^maxVal + + for ( j = 0; j < LAYOUTS.length; j++ ) { + ord = LAYOUTS[ j ]; + for ( i = minVal; i <= maxVal; i++ ) { + N = floor( pow( pow( 10, i ), 1.0/3.0 ) ); + NB = N; + f = createBenchmark( ord, N, N, NB ); + bench( format( '%s:ndarray:order=%s,size=%d', pkg, ord, N*N ), f ); + } + } +} + +main(); diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/dlabrd/docs/types/index.d.ts new file mode 100644 index 000000000000..48cc4b5834af --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/docs/types/index.d.ts @@ -0,0 +1,231 @@ +/* +* @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. +*/ + +// TypeScript Version: 4.1 + +/// + +import { Layout } from '@stdlib/types/blas'; + +/** +* Interface describing `dlabrd`. +*/ +interface Routine { + /** + * Reduces the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P`. + * + * ## Notes + * + * - If `M >= N`, + * + * - `A` is reduced to upper bi-diagonal form. + * - Elements on and below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. + * - Elements above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. + * + * - If `M < N`, + * + * - `A` is reduced to lower bi-diagonal form. + * - Elements below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. + * - Elements on and above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. + * + * @param order - storage layout + * @param M - number of rows in `A` + * @param N - number of columns in `A` + * @param NB - number of leading rows and columns of `A` to reduce + * @param A - input matrix + * @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) + * @param D - real diagonal elements (length `NB`) + * @param E - real off-diagonal elements (length `NB`) + * @param TAUQ - scalar factors of the elementary reflectors that represent the orthogonal matrix `Q` (length `NB`) + * @param TAUP - scalar factors of the elementary reflectors that represent the orthogonal matrix `P` (length `NB`) + * @param X - output matrix + * @param LDX - stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`) + * @param Y - output matrix + * @param LDY - stride of the first dimension of `Y` (a.k.a., leading dimension of the matrix `Y`) + * @returns `void` + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var D = new Float64Array( [ 0.0 ] ); + * var E = new Float64Array( [ 0.0 ] ); + * var TAUQ = new Float64Array( [ 0.0 ] ); + * var TAUP = new Float64Array( [ 0.0 ] ); + * var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + * var Y = new Float64Array( [ 0.0, 0.0 ] ); + * + * dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); + * // A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] + * // D => [ ~-3.742 ] + * // E => [ ~-8.552 ] + * // TAUQ => [ ~1.267 ] + * // TAUP => [ 0.0 ] + * // X => [ ~12.552, 0.0, 0.0 ] + * // Y => [ 0.0, ~12.552 ] + */ + ( order: Layout, M: number, N: number, NB: number, A: Float64Array, LDA: number, D: Float64Array, E: Float64Array, TAUQ: Float64Array, TAUP: Float64Array, X: Float64Array, LDX: number, Y: Float64Array, LDY: number ): void; + + /** + * Reduces the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P` using alternative indexing semantics. + * + * ## Notes + * + * - If `M >= N`, + * + * - `A` is reduced to upper bi-diagonal form. + * - Elements on and below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. + * - Elements above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. + * + * - If `M < N`, + * + * - `A` is reduced to lower bi-diagonal form. + * - Elements below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. + * - Elements on and above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. + * + * @param M - number of rows in `A` + * @param N - number of columns in `A` + * @param NB - number of leading rows and columns of `A` to reduce + * @param A - input matrix + * @param strideA1 - stride of the first dimension of `A` + * @param strideA2 - stride of the second dimension of `A` + * @param offsetA - starting index for `A` + * @param D - real diagonal elements (length `NB`) + * @param strideD - stride length for `D` + * @param offsetD - starting index for `D` + * @param E - real off-diagonal elements (length `NB`) + * @param strideE - stride length for `E` + * @param offsetE - starting index for `E` + * @param TAUQ - scalar factors of the elementary reflectors that represent the orthogonal matrix `Q` (length `NB`) + * @param strideTAUQ - stride length for `TAUQ` + * @param offsetTAUQ - starting index for `TAUQ` + * @param TAUP - scalar factors of the elementary reflectors that represent the orthogonal matrix `P` (length `NB`) + * @param strideTAUP - stride length for `TAUP` + * @param offsetTAUP - starting index for `TAUP` + * @param X - output matrix + * @param strideX1 - stride of the first dimension of `X` + * @param strideX2 - stride of the second dimension of `X` + * @param offsetX - starting index for `X` + * @param Y - output matrix + * @param strideY1 - stride of the first dimension of `Y` + * @param strideY2 - stride of the second dimension of `Y` + * @param offsetY - starting index for `Y` + * @returns `void` + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var D = new Float64Array( [ 0.0 ] ); + * var E = new Float64Array( [ 0.0 ] ); + * var TAUQ = new Float64Array( [ 0.0 ] ); + * var TAUP = new Float64Array( [ 0.0 ] ); + * var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + * var Y = new Float64Array( [ 0.0, 0.0 ] ); + * + * dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); + * // A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] + * // D => [ ~-3.742 ] + * // E => [ ~-8.552 ] + * // TAUQ => [ ~1.267 ] + * // TAUP => [ 0.0 ] + * // X => [ ~12.552, 0.0, 0.0 ] + * // Y => [ 0.0, ~12.552 ] + */ + ndarray( M: number, N: number, NB: number, A: Float64Array, strideA1: number, strideA2: number, offsetA: number, D: Float64Array, strideD: number, offsetD: number, E: Float64Array, strideE: number, offsetE: number, TAUQ: Float64Array, strideTAUQ: number, offsetTAUQ: number, TAUP: Float64Array, strideTAUP: number, offsetTAUP: number, X: Float64Array, strideX1: number, strideX2: number, offsetX: number, Y: Float64Array, strideY1: number, strideY2: number, offsetY: number ): void; +} + +/** +* Reduces the first `NB` rows and columns of a real general matrix `A` to upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P`. +* +* ## Notes +* +* - If `M >= N`, +* +* - `A` is reduced to upper bi-diagonal form. +* - Elements on and below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* - Elements above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. +* +* - If `M < N`, +* +* - `A` is reduced to lower bi-diagonal form. +* - Elements below the diagonal in the first `NB` columns, with the array `TAUQ`, represent the orthogonal matrix `Q` as a product of elementary reflectors. +* - Elements on and above the diagonal in the first `NB` rows, with the array `TAUP`, represent the orthogonal matrix `P` as a product of elementary reflectors. +* +* @param order - storage layout +* @param M - number of rows in `A` +* @param N - number of columns in `A` +* @param NB - number of leading rows and columns of `A` to reduce +* @param A - input matrix +* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) +* @param D - real diagonal elements (length `NB`) +* @param E - real off-diagonal elements (length `NB`) +* @param TAUQ - scalar factors of the elementary reflectors that represent the orthogonal matrix `Q` (length `NB`) +* @param TAUP - scalar factors of the elementary reflectors that represent the orthogonal matrix `P` (length `NB`) +* @param X - output matrix +* @param LDX - stride of the first dimension of `X` (a.k.a., leading dimension of the matrix `X`) +* @param Y - output matrix +* @param LDY - stride of the first dimension of `Y` (a.k.a., leading dimension of the matrix `Y`) +* @returns `void` +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var D = new Float64Array( [ 0.0 ] ); +* var E = new Float64Array( [ 0.0 ] ); +* var TAUQ = new Float64Array( [ 0.0 ] ); +* var TAUP = new Float64Array( [ 0.0 ] ); +* var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); +* var Y = new Float64Array( [ 0.0, 0.0 ] ); +* +* dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); +* // A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +* // D => [ ~-3.742 ] +* // E => [ ~-8.552 ] +* // TAUQ => [ ~1.267 ] +* // TAUP => [ 0.0 ] +* // X => [ ~12.552, 0.0, 0.0 ] +* // Y => [ 0.0, ~12.552 ] +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var D = new Float64Array( [ 0.0 ] ); +* var E = new Float64Array( [ 0.0 ] ); +* var TAUQ = new Float64Array( [ 0.0 ] ); +* var TAUP = new Float64Array( [ 0.0 ] ); +* var X = new Float64Array( [ 0.0, 0.0, 0.0 ] ); +* var Y = new Float64Array( [ 0.0, 0.0 ] ); +* +* dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); +* // A => [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] +* // D => [ ~-3.742 ] +* // E => [ ~-8.552 ] +* // TAUQ => [ ~1.267 ] +* // TAUP => [ 0.0 ] +* // X => [ ~12.552, 0.0, 0.0 ] +* // Y => [ 0.0, ~12.552 ] +*/ +declare var dlabrd: Routine; + + +// EXPORTS // + +export = dlabrd; diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/docs/types/test.ts b/lib/node_modules/@stdlib/lapack/base/dlabrd/docs/types/test.ts new file mode 100644 index 000000000000..d51018bd83cb --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/docs/types/test.ts @@ -0,0 +1,935 @@ +/* +* @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. +*/ + +import dlabrd = require( './index' ); + + +// TESTS // + +// The function returns void... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectType void +} + +// The compiler throws an error if the function is provided a first argument which is not a valid layout... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 5, 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( true, 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( false, 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( null, 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( void 0, 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( [], 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( {}, 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( ( x: number ): number => x, 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', '5', 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', true, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', false, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', null, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', void 0, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', [], 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', {}, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', ( x: number ): number => x, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, '5', 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, true, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, false, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, null, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, void 0, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, [], 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, {}, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, ( x: number ): number => x, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, '5', A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, true, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, false, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, null, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, void 0, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, [], A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, {}, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, ( x: number ): number => x, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fifth argument which is not a Float64Array... +{ + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, '5', 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, 5, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, true, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, false, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, null, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, void 0, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, [], 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, {}, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, ( x: number ): number => x, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a sixth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, A, '5', D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, true, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, false, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, null, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, void 0, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, [], D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, {}, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, ( x: number ): number => x, D, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a seventh argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, A, 3, '5', E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, 5, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, true, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, false, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, null, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, void 0, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, [], E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, {}, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, ( x: number ): number => x, E, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eighth argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, A, 3, D, '5', TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, 5, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, true, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, false, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, null, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, void 0, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, [], TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, {}, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, ( x: number ): number => x, TAUQ, TAUP, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a ninth argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, '5', TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, 5, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, true, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, false, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, null, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, void 0, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, [], TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, {}, TAUP, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, ( x: number ): number => x, TAUP, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a tenth argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, '5', X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, 5, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, true, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, false, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, null, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, void 0, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, [], X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, {}, X, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, ( x: number ): number => x, X, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eleventh argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, '5', 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, 5, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, true, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, false, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, null, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, void 0, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, [], 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, {}, 3, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, ( x: number ): number => x, 3, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a twelfth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, '5', Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, true, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, false, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, null, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, void 0, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, [], Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, {}, Y, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, ( x: number ): number => x, Y, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a thirteenth argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, '5', 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, 5, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, true, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, false, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, null, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, void 0, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, [], 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, {}, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, ( x: number ): number => x, 2 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourteenth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, '5' ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, true ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, false ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, null ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, void 0 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, [] ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, {} ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd(); // $ExpectError + dlabrd( 'column-major' ); // $ExpectError + dlabrd( 'column-major', 3 ); // $ExpectError + dlabrd( 'column-major', 3, 2 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3 ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y ); // $ExpectError + dlabrd( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2, 10 ); // $ExpectError +} + +// Attached to main export is an `ndarray` method which returns void... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectType void +} + +// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( '5', 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( true, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( false, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( null, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( void 0, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( [], 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( {}, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( ( x: number ): number => x, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a second argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, '5', 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, true, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, false, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, null, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, void 0, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, [], 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, {}, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, ( x: number ): number => x, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, '5', A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, true, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, false, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, null, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, void 0, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, [], A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, {}, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, ( x: number ): number => x, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a Float64Array... +{ + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, '5', 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, 5, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, true, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, false, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, null, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, void 0, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, [], 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, {}, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, ( x: number ): number => x, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, '5', 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, true, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, false, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, null, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, void 0, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, [], 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, {}, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, ( x: number ): number => x, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, '5', 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, true, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, false, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, null, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, void 0, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, [], 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, {}, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, ( x: number ): number => x, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, '5', D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, true, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, false, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, null, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, void 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, [], D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, {}, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, ( x: number ): number => x, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, '5', 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, 5, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, true, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, false, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, null, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, void 0, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, [], 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, {}, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, ( x: number ): number => x, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, '5', 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, true, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, false, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, null, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, void 0, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, [], 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, {}, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, ( x: number ): number => x, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a tenth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, '5', E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, true, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, false, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, null, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, void 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, [], E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, {}, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, ( x: number ): number => x, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an eleventh argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, '5', 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, 5, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, true, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, false, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, null, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, void 0, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, [], 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, {}, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, ( x: number ): number => x, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twelfth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, '5', 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, true, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, false, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, null, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, void 0, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, [], 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, {}, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, ( x: number ): number => x, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a thirteenth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, '5', TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, true, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, false, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, null, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, void 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, [], TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, {}, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, ( x: number ): number => x, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fourteenth argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, '5', 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, 5, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, true, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, false, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, null, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, void 0, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, [], 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, {}, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, ( x: number ): number => x, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a fifteenth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, '5', 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, true, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, false, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, null, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, void 0, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, [], 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, {}, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, ( x: number ): number => x, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a sixteenth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, '5', TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, true, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, false, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, null, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, void 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, [], TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, {}, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, ( x: number ): number => x, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a seventeenth argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, '5', 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, 5, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, true, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, false, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, null, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, void 0, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, [], 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, {}, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, ( x: number ): number => x, 1, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an eighteenth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, '5', 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, true, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, false, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, null, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, void 0, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, [], 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, {}, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, ( x: number ): number => x, 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a nineteenth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, '5', X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, true, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, false, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, null, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, void 0, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, [], X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, {}, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, ( x: number ): number => x, X, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twentieth argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, '5', 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, 5, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, true, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, false, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, null, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, void 0, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, [], 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, {}, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, ( x: number ): number => x, 1, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-first argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, '5', 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, true, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, false, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, null, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, void 0, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, [], 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, {}, 3, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, ( x: number ): number => x, 3, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-second argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, '5', 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, true, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, false, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, null, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, void 0, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, [], 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, {}, 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, ( x: number ): number => x, 0, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-third argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, '5', Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, true, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, false, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, null, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, void 0, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, [], Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, {}, Y, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, ( x: number ): number => x, Y, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-fourth argument which is not a Float64Array... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, '5', 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, 5, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, true, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, false, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, null, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, void 0, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, [], 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, {}, 1, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, ( x: number ): number => x, 1, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-fifth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, '5', 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, true, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, false, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, null, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, void 0, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, [], 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, {}, 2, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, ( x: number ): number => x, 2, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-sixth argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, '5', 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, true, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, false, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, null, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, void 0, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, [], 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, {}, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, ( x: number ): number => x, 0 ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided a twenty-seventh argument which is not a number... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, '5' ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, true ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, false ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, null ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, void 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, [] ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, {} ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... +{ + const A = new Float64Array( 6 ); + const D = new Float64Array( 1 ); + const E = new Float64Array( 1 ); + const TAUQ = new Float64Array( 1 ); + const TAUP = new Float64Array( 1 ); + const X = new Float64Array( 3 ); + const Y = new Float64Array( 2 ); + + dlabrd.ndarray(); // $ExpectError + dlabrd.ndarray( 3 ); // $ExpectError + dlabrd.ndarray( 3, 2 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2 ); // $ExpectError + dlabrd.ndarray( 3, 2, 1, A, 1, 3, 0, D, 1, 0, E, 1, 0, TAUQ, 1, 0, TAUP, 1, 0, X, 1, 3, 0, Y, 1, 2, 0, 10 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/examples/index.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/examples/index.js new file mode 100644 index 000000000000..8b12693230e4 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/examples/index.js @@ -0,0 +1,55 @@ +/** +* @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'; + +var Float64Array = require( '@stdlib/array/float64' ); +var dlabrd = require( './../lib' ); + +var M = 5; +var N = 4; +var NB = 2; + +var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0 ] ); +var D = new Float64Array( NB ); +var E = new Float64Array( NB ); +var TAUQ = new Float64Array( NB ); +var TAUP = new Float64Array( NB ); +var X = new Float64Array( M * NB ); +var Y = new Float64Array( N * NB ); + +/* + A = [ + [ 1.0, 6.0, 11.0, 16.0 ], + [ 2.0, 7.0, 12.0, 17.0 ], + [ 3.0, 8.0, 13.0, 18.0 ], + [ 4.0, 9.0, 14.0, 19.0 ], + [ 5.0, 10.0, 15.0, 20.0 ], + ] +*/ + +// Reduce the first NB rows and columns of A to bi-diagonal form: +dlabrd( 'column-major', M, N, NB, A, M, D, E, TAUQ, TAUP, X, M, Y, N ); + +console.log( A ); +console.log( D ); +console.log( E ); +console.log( TAUQ ); +console.log( TAUP ); +console.log( X ); +console.log( Y ); From b1b7e80db1d6c7e37e9dd59fc3f6e747a3abfb0a Mon Sep 17 00:00:00 2001 From: Prajjwal Bajpai Date: Mon, 22 Jun 2026 14:55:03 +0530 Subject: [PATCH 4/5] docs: add repl.txt --- .../@stdlib/lapack/base/dlabrd/docs/repl.txt | 226 ++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 lib/node_modules/@stdlib/lapack/base/dlabrd/docs/repl.txt diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/docs/repl.txt b/lib/node_modules/@stdlib/lapack/base/dlabrd/docs/repl.txt new file mode 100644 index 000000000000..581920cee339 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/docs/repl.txt @@ -0,0 +1,226 @@ + +{{alias}}( order, M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, LDY ) + Reduces the first `NB` rows and columns of a real general matrix `A` to + upper or lower bi-diagonal form by an orthogonal transformation `Q**T*A*P`. + + If `M >= N`, `A` is reduced to upper bi-diagonal form. If `M < N`, `A` is + reduced to lower bi-diagonal form. + + When `NB = 0` or `min(M, N) = 0`, the function returns immediately. + + The function mutates the following input arrays: `A`, `D`, `E`, `TAUQ`, + `TAUP`, `X`, `Y`. + + Parameters + ---------- + order: string + Storage layout. Must be either 'row-major' or 'column-major'. + + M: integer + Number of rows in `A`. + + N: integer + Number of columns in `A`. + + NB: integer + Number of leading rows and columns of `A` to reduce. + + A: Float64Array + Input matrix. On exit, the first `NB` rows and columns contain the + bidiagonal reduction along with the elementary reflectors. + + LDA: integer + Stride of the first dimension of `A` (a.k.a., leading dimension of + the matrix `A`). + + D: Float64Array + The diagonal elements of the reduced matrix (length `NB`). + + E: Float64Array + The off-diagonal elements of the reduced matrix (length `NB`). + + TAUQ: Float64Array + Scalar factors of the elementary reflectors that represent the + orthogonal matrix `Q` (length `NB`). + + TAUP: Float64Array + Scalar factors of the elementary reflectors that represent the + orthogonal matrix `P` (length `NB`). + + X: Float64Array + Output matrix (dimension `LDX-by-NB`). + + LDX: integer + Stride of the first dimension of `X` (a.k.a., leading dimension of + the matrix `X`). + + Y: Float64Array + Output matrix (dimension `LDY-by-NB`). + + LDY: integer + Stride of the first dimension of `Y` (a.k.a., leading dimension of + the matrix `Y`). + + Returns + ------- + void + + Examples + -------- + > var A = new {{alias:@stdlib/array/float64}}( [1.0,2.0,3.0,4.0,5.0,6.0] ); + > var D = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); + > var E = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); + > var TAUQ = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); + > var TAUP = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); + > var X = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0 ] ); + > var Y = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0 ] ); + > {{alias}}( 'column-major', 3, 2, 1, A, 3, D, E, TAUQ, TAUP, X, 3, Y, 2 ); + > A + [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] + > D + [ ~-3.742 ] + > E + [ ~-8.552 ] + > TAUQ + [ ~1.267 ] + > TAUP + [ 0.0 ] + > X + [ ~12.552, 0.0, 0.0 ] + > Y + [ 0.0, ~12.552 ] + + +{{alias}}.ndarray(M,N,NB,A,sA1,sA2,oA,D,sD,oD,E,sE,oE,TAUQ,sTAUQ,oTAUQ,TAUP,sTAUP,oTAUP,X,sX1,sX2,oX,Y,sY1,sY2,oY) + Reduces the first `NB` rows and columns of a real general matrix `A` to + upper or lower bi-diagonal form by an orthogonal transformation + `Q**T*A*P` using alternative indexing semantics. + + If `M >= N`, `A` is reduced to upper bi-diagonal form. If `M < N`, `A` is + reduced to lower bi-diagonal form. + + When `NB = 0` or `min(M, N) = 0`, the function returns immediately. + + The function mutates the following input arrays: `A`, `D`, `E`, `TAUQ`, + `TAUP`, `X`, `Y`. + + While typed array views mandate a view offset based on the underlying + buffer, the offset parameters support indexing semantics based on starting + indices. + + Parameters + ---------- + M: integer + Number of rows in `A`. + + N: integer + Number of columns in `A`. + + NB: integer + Number of leading rows and columns of `A` to reduce. + + A: Float64Array + Input matrix. + + sA1: integer + Stride of the first dimension of `A`. + + sA2: integer + Stride of the second dimension of `A`. + + oA: integer + Starting index for `A`. + + D: Float64Array + The diagonal elements of the reduced matrix (length `NB`). + + sD: integer + Stride length for `D`. + + oD: integer + Starting index for `D`. + + E: Float64Array + The off-diagonal elements of the reduced matrix (length `NB`). + + sE: integer + Stride length for `E`. + + oE: integer + Starting index for `E`. + + TAUQ: Float64Array + Scalar factors of the elementary reflectors that represent the + orthogonal matrix `Q` (length `NB`). + + sTAUQ: integer + Stride length for `TAUQ`. + + oTAUQ: integer + Starting index for `TAUQ`. + + TAUP: Float64Array + Scalar factors of the elementary reflectors that represent the + orthogonal matrix `P` (length `NB`). + + sTAUP: integer + Stride length for `TAUP`. + + oTAUP: integer + Starting index for `TAUP`. + + X: Float64Array + Output matrix. + + sX1: integer + Stride of the first dimension of `X`. + + sX2: integer + Stride of the second dimension of `X`. + + oX: integer + Starting index for `X`. + + Y: Float64Array + Output matrix. + + sY1: integer + Stride of the first dimension of `Y`. + + sY2: integer + Stride of the second dimension of `Y`. + + oY: integer + Starting index for `Y`. + + Returns + ------- + void + + Examples + -------- + > var A = new {{alias:@stdlib/array/float64}}( [1.0,2.0,3.0,4.0,5.0,6.0] ); + > var D = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); + > var E = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); + > var TAUQ = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); + > var TAUP = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); + > var X = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0, 0.0 ] ); + > var Y = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0 ] ); + > {{alias}}.ndarray(3,2,1,A,1,3,0,D,1,0,E,1,0,TAUQ,1,0,TAUP,1,0,X,1,3,0,Y,1,2,0); + > A + [ 1.0, ~0.422, ~0.633, 1.0, 5.0, 6.0 ] + > D + [ ~-3.742 ] + > E + [ ~-8.552 ] + > TAUQ + [ ~1.267 ] + > TAUP + [ 0.0 ] + > X + [ ~12.552, 0.0, 0.0 ] + > Y + [ 0.0, ~12.552 ] + + See Also + -------- From 520721583d2c44b3f18f2096228b2f1b20b2705b Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Mon, 22 Jun 2026 09:29:13 +0000 Subject: [PATCH 5/5] chore: update copyright years --- lib/node_modules/@stdlib/lapack/base/dlabrd/lib/ndarray.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/ndarray.js index fcdcb0a55aaa..ae762903e062 100644 --- a/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/ndarray.js +++ b/lib/node_modules/@stdlib/lapack/base/dlabrd/lib/ndarray.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* 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.