diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/README.md b/lib/node_modules/@stdlib/lapack/base/zlaswp/README.md
new file mode 100644
index 000000000000..3616f8969f58
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/README.md
@@ -0,0 +1,303 @@
+
+
+# zlaswp
+
+> Perform a series of row interchanges on an input matrix.
+
+
+
+## Usage
+
+```javascript
+var zlaswp = require( '@stdlib/lapack/base/zlaswp' );
+```
+
+#### zlaswp( N, A, LDA, k1, k2, IPIV, incx )
+
+Performs a series of row interchanges on an input matrix `A` using pivot indices stored in `IPIV`.
+
+
+
+```javascript
+var Int32Array = require( '@stdlib/array/int32' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+var IPIV = new Int32Array( [ 2, 0, 1 ] );
+
+zlaswp( 'row-major', 2, A, 2, 0, 2, IPIV, 1 );
+// A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+```
+
+The function has the following parameters:
+
+- **order**: storage layout.
+- **N**: number of columns in `A`.
+- **A**: input matrix stored in linear memory as a [`Complex128Array`][@stdlib/array/complex128].
+- **LDA**: stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`).
+- **k1**: index of first row to interchange when `incx` is positive and the index of the last row to interchange when `incx` is negative.
+- **k2**: index of last row to interchange when `incx` is positive and the index of the first row to interchange when `incx` is negative.
+- **IPIV**: vector of pivot indices as an [`Int32Array`][@stdlib/array/int32]. Must contain at least `k1+(k2-k1)*abs(incx)` elements. Only the elements in positions `k1` through `k1+(k2-k1)*abs(incx)` are accessed.
+- **incx**: increment between successive values of `IPIV`. Elements from `IPIV` are accessed according to `IPIV[k1+(k-k1)*abs(incx)] = j`, thus implying that rows `k` and `j` should be interchanged. If `incx` is negative, the pivots are applied in reverse order.
+
+The sign of the increment parameter `incx` determines the order in which pivots are applied. For example, to apply pivots in reverse order,
+
+
+
+```javascript
+var Int32Array = require( '@stdlib/array/int32' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+var IPIV = new Int32Array( [ 2, 0, 1 ] );
+
+zlaswp( 'row-major', 2, A, 2, 0, 2, IPIV, -1 );
+// A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+```
+
+To perform strided access over `IPIV`, provide an `abs(incx)` value greater than one. For example, to access every other element in `IPIV`,
+
+
+
+```javascript
+var Int32Array = require( '@stdlib/array/int32' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+var IPIV = new Int32Array( [ 2, 999, 0, 999, 1 ] );
+
+zlaswp( 'row-major', 2, A, 2, 0, 2, IPIV, 2 );
+// A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+
+
+```javascript
+var Int32Array = require( '@stdlib/array/int32' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+// Initial arrays...
+var A0 = new Complex128Array( [ 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+var IPIV0 = new Int32Array( [ 0, 2, 0, 1 ] );
+
+// Create offset views...
+var A1 = new Complex128Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+var IPIV1 = new Int32Array( IPIV0.buffer, IPIV0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+zlaswp( 'row-major', 2, A1, 2, 0, 2, IPIV1, 1 );
+// A0 => [ 0.0, 0.0, 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+```
+
+#### zlaswp.ndarray( N, A, sa1, sa2, oa, k1, k2, inck, IPIV, si, oi )
+
+Performs a series of row interchanges on the matrix `A` using pivot indices stored in `IPIV` and alternative indexing semantics.
+
+
+
+```javascript
+var Int32Array = require( '@stdlib/array/int32' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+var IPIV = new Int32Array( [ 2, 0, 1 ] );
+
+zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 );
+// A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+```
+
+The function has the following additional parameters:
+
+- **N**: number of columns in `A`.
+- **A**: input matrix stored in linear memory as a [`Complex128Array`][@stdlib/array/complex128].
+- **sa1**: stride of the first dimension of `A`.
+- **sa2**: stride of the second dimension of `A`.
+- **oa**: starting index for `A`.
+- **k1**: index of first row to interchange when `inck` is positive and the index of the last row to interchange when `inck` is negative.
+- **k2**: index of last row to interchange when `inck` is positive and the index of the first row to interchange when `inck` is negative.
+- **inck**: direction in which to apply pivots (-1 to apply pivots in reverse order; otherwise, apply in provided order).
+- **IPIV**: vector of pivot indices as an [`Int32Array`][@stdlib/array/int32].
+- **si**: index increment for `IPIV`.
+- **oi**: starting index for `IPIV`.
+
+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 Int32Array = require( '@stdlib/array/int32' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+
+var A = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+var IPIV = new Int32Array( [ 0, 0, 2, 0, 1 ] );
+
+zlaswp.ndarray( 2, A, 2, 1, 2, 0, 2, 1, IPIV, 1, 2 );
+// A => [ 0.0, 0.0, 0.0, 0.0, 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+```
+
+
+
+
+
+
+
+## Notes
+
+- Both functions access `k2-k1+1` elements from `IPIV`.
+- While `zlaswp` conflates the order in which pivots are applied with the order in which elements in `IPIV` are accessed, the `ndarray` method delineates control of those behaviors with separate parameters `inck` and `si`.
+- `zlaswp()` corresponds to the [LAPACK][LAPACK] level 1 function [`zlaswp`][lapack-zlaswp].
+
+
+
+
+
+
+
+## Examples
+
+
+
+
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Int32Array = require( '@stdlib/array/int32' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var zlaswp = require( '@stdlib/lapack/base/zlaswp' );
+
+// Specify matrix meta data:
+var shape = [ 4, 2 ];
+var strides = [ 1, 4 ];
+var offset = 0;
+var order = 'column-major';
+
+// Create a matrix stored in linear memory:
+var A = new Complex128Array( [ 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 ] );
+console.log( ndarray2array( A, shape, strides, offset, order ) );
+
+// Define a vector of pivot indices:
+var IPIV = new Int32Array( [ 2, 0, 3, 1 ] );
+
+// Interchange rows:
+zlaswp( order, shape[ 1 ], A, strides[ 1 ], 0, shape[ 0 ]-1, IPIV, 1 );
+console.log( ndarray2array( A, shape, strides, offset, order ) );
+```
+
+
+
+
+
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+TODO
+```
+
+#### TODO
+
+TODO.
+
+```c
+TODO
+```
+
+TODO
+
+```c
+TODO
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+TODO
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[lapack]: https://www.netlib.org/lapack/explore-html/
+
+[lapack-zlaswp]: https://www.netlib.org/lapack/explore-html/d1/d7e/group__laswp_ga6c7f83bff7887543bcb6c019e06e131d.html
+
+[@stdlib/array/complex128]: https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/array/complex128
+
+[@stdlib/array/int32]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/int32
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+
+
+
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/benchmark/benchmark.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/benchmark/benchmark.js
new file mode 100644
index 000000000000..79caa6f779d4
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/benchmark/benchmark.js
@@ -0,0 +1,130 @@
+/**
+* @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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+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 pkg = require( './../package.json' ).name;
+var zlaswp = require( './../lib/zlaswp.js' );
+
+
+// VARIABLES //
+
+var LAYOUTS = [
+ 'row-major',
+ 'column-major'
+];
+var opts = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {string} order - storage layout
+* @param {PositiveInteger} N - number of elements along each dimension
+* @param {PositiveInteger} nrows - number of rows to interchange
+* @returns {Function} benchmark function
+*/
+function createBenchmark( order, N, nrows ) {
+ var IPIV;
+ var abuf;
+ var A;
+
+ IPIV = discreteUniform( nrows, 0, N-1, {
+ 'dtype': 'int32'
+ });
+
+ abuf = uniform( 2*N*N, -10.0, 10.0, opts );
+ A = new Complex128Array( abuf );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zlaswp( order, N, A, N, 0, nrows-1, IPIV, 1 );
+ if ( isnan( abuf[ i%abuf.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( abuf[ i%abuf.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var min;
+ var max;
+ var ord;
+ var N;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < LAYOUTS.length; k++ ) {
+ ord = LAYOUTS[ k ];
+ for ( i = min; i <= max; i++ ) {
+ N = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ j = 1;
+ while ( j <= N ) {
+ f = createBenchmark( ord, N, j );
+ bench( pkg+'::square_matrix:order='+ord+',nrows='+j+',size='+(N*N), f );
+ j *= 2;
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..192e6c1af6ad
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/benchmark/benchmark.ndarray.js
@@ -0,0 +1,139 @@
+/**
+* @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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+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 pkg = require( './../package.json' ).name;
+var zlaswp = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var LAYOUTS = [
+ 'row-major',
+ 'column-major'
+];
+var opts = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {string} order - storage layout
+* @param {PositiveInteger} N - number of elements along each dimension
+* @param {PositiveInteger} nrows - number of rows to interchange
+* @returns {Function} benchmark function
+*/
+function createBenchmark( order, N, nrows ) {
+ var IPIV;
+ var abuf;
+ var sa1;
+ var sa2;
+ var A;
+
+ if ( order === 'column-major' ) {
+ sa1 = 1;
+ sa2 = N;
+ } else { // order === 'row-major'
+ sa1 = N;
+ sa2 = 1;
+ }
+ IPIV = discreteUniform( nrows, 0, N-1, {
+ 'dtype': 'int32'
+ });
+
+ abuf = uniform( 2*N*N, -10.0, 10.0, opts );
+ A = new Complex128Array( abuf );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zlaswp( N, A, sa1, sa2, 0, 0, nrows-1, 1, IPIV, 1, 0 );
+ if ( isnan( abuf[ i%abuf.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( abuf[ i%abuf.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var min;
+ var max;
+ var ord;
+ var N;
+ var f;
+ var i;
+ var j;
+ var k;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( k = 0; k < LAYOUTS.length; k++ ) {
+ ord = LAYOUTS[ k ];
+ for ( i = min; i <= max; i++ ) {
+ N = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ j = 1;
+ while ( j <= N ) {
+ f = createBenchmark( ord, N, j );
+ bench( pkg+'::square_matrix:ndarray:order='+ord+',nrows='+j+',size='+(N*N), f );
+ j *= 2;
+ }
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/docs/repl.txt b/lib/node_modules/@stdlib/lapack/base/zlaswp/docs/repl.txt
new file mode 100644
index 000000000000..d90fe83ef87c
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/docs/repl.txt
@@ -0,0 +1,121 @@
+
+{{alias}}( order, N, A, LDA, k1, k2, IPIV, incx )
+ Performs a series of row interchanges on the matrix `A` using pivot indices
+ stored in `IPIV`.
+
+ Indexing is relative to the first index. To introduce an offset, use typed
+ array views.
+
+ If `incx` is equal to `0`, the function returns `A` unchanged.
+
+ Parameters
+ ----------
+ order: string
+ Row-major (C-style) or column-major (Fortran-style) order. Must be
+ either 'row-major' or 'column-major'.
+
+ N: integer
+ Number of columns in `A`.
+
+ A: Complex128Array
+ Input matrix.
+
+ LDA: integer
+ Stride of the first dimension of `A` (a.k.a., leading dimension of the
+ matrix `A`).
+
+ k1: integer
+ Index of first row to interchange.
+
+ k2: integer
+ Index of last row to interchange.
+
+ IPIV: Int32Array
+ Array of pivot indices.
+
+ incx: integer
+ Increment between successive values of `IPIV`.
+
+ Returns
+ -------
+ A: Complex128Array
+ Mutated input matrix.
+
+ Examples
+ --------
+ > var IPIV = new {{alias:@stdlib/array/int32}}( [ 1, 1 ] );
+ > var v = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ];
+ > var A = new {{alias:@stdlib/array/complex128}}( v );
+ > var ord = 'row-major';
+ > {{alias}}( ord, 2, A, 2, 0, 1, IPIV, 1 )
+ [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0 ]
+
+ // Using typed array views:
+ > var IPIV0 = new {{alias:@stdlib/array/int32}}( [ 0, 1, 1 ] );
+ > var A0 = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 1.0, 2.0, 3.0, 4.0 ] );
+ > IPIV = new Int32Array( IPIV0.buffer, IPIV0.BYTES_PER_ELEMENT*1 );
+ > A = new Complex128Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 );
+ > {{alias}}( ord, 1, A, 1, 0, 1, IPIV, 1 );
+ > A0
+ [ 0.0, 0.0, 3.0, 4.0, 1.0, 2.0 ]
+
+
+{{alias}}.ndarray( N, A, sa1, sa2, oa, k1, k2, inck, IPIV, si, oi )
+ Performs a series of row interchanges on the matrix `A` using pivot indices
+ stored in `IPIV` and alternative indexing semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, the offset parameters support indexing semantics based on starting
+ indices.
+
+ Parameters
+ ----------
+ N: integer
+ Number of columns in `A`.
+
+ A: Complex128Array
+ Input matrix.
+
+ sa1: integer
+ Stride of the first dimension of `A`.
+
+ sa2: integer
+ Stride of the second dimension of `A`.
+
+ oa: integer
+ Index offset for `A`.
+
+ k1: integer
+ Index of first row to interchange.
+
+ k2: integer
+ Index of last row to interchange.
+
+ inck: integer
+ Direction in which to apply pivots (-1 to apply pivots in reverse order;
+ otherwise, apply in provided order).
+
+ IPIV: Int32Array
+ Array of pivot indices.
+
+ si: integer
+ Index increment for `IPIV`.
+
+ oi: integer
+ Index offset for `IPIV`.
+
+ Returns
+ -------
+ A: Complex128Array
+ Mutated input matrix.
+
+ Examples
+ --------
+ > var IPIV = new {{alias:@stdlib/array/int32}}( [ 1, 1 ] );
+ > var v = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ];
+ > var A = new {{alias:@stdlib/array/complex128}}( v );
+ > {{alias}}.ndarray( 2, A, 2, 1, 0, 0, 1, 1, IPIV, 1, 0 )
+ [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0 ]
+
+ See Also
+ --------
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/zlaswp/docs/types/index.d.ts
new file mode 100644
index 000000000000..de8de30fefa9
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/docs/types/index.d.ts
@@ -0,0 +1,122 @@
+/*
+* @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.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { Layout } from '@stdlib/types/blas';
+import { Complex128Array } from '@stdlib/types/array';
+
+/**
+* Interface describing `zlaswp`.
+*/
+interface Routine {
+ /**
+ * Performs a series of row interchanges on a matrix `A` using pivot indices stored in `IPIV`.
+ *
+ * @param order - storage layout
+ * @param N - number of columns in `A`
+ * @param A - input matrix
+ * @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+ * @param k1 - index of first row to interchange
+ * @param k2 - index of last row to interchange
+ * @param IPIV - vector of pivot indices
+ * @param incx - increment between successive values of `IPIV`
+ * @returns permuted matrix `A`
+ *
+ * @example
+ * var Int32Array = require( '@stdlib/array/int32' );
+ * var Complex128Array = require( '@stdlib/array/complex128' );
+ *
+ * var IPIV = new Int32Array( [ 2, 0, 1 ] );
+ * var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+ *
+ * zlaswp( 'row-major', 2, A, 2, 0, 2, IPIV, 1 );
+ * // A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+ */
+ ( order: Layout, N: number, A: Complex128Array, LDA: number, k1: number, k2: number, IPIV: Int32Array, incx: number ): Complex128Array;
+
+ /**
+ * Performs a series of row interchanges on a matrix `A` using pivot indices stored in `IPIV` and alternative indexing semantics.
+ *
+ * @param N - number of columns in `A`
+ * @param A - input matrix
+ * @param strideA1 - stride of the first dimension of `A`
+ * @param strideA2 - stride of the second dimension of `A`
+ * @param offsetA - index offset for `A`
+ * @param k1 - index of first row to interchange
+ * @param k2 - index of last row to interchange
+ * @param inck - direction in which to apply pivots (-1 to apply pivots in reverse order; otherwise, apply in provided order)
+ * @param IPIV - vector of pivot indices
+ * @param strideIPIV - `IPIV` stride length
+ * @param offsetIPIV - index offset for `IPIV`
+ * @returns permuted matrix `A`
+ *
+ * @example
+ * var Int32Array = require( '@stdlib/array/int32' );
+ * var Complex128Array = require( '@stdlib/array/complex128' );
+ *
+ * var IPIV = new Int32Array( [ 2, 0, 1 ] );
+ * var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+ *
+ * zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 );
+ * // A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+ */
+ ndarray( N: number, A: Complex128Array, strideA1: number, strideA2: number, offsetA: number, k1: number, k2: number, inck: number, IPIV: Int32Array, strideIPIV: number, offsetIPIV: number ): Complex128Array;
+}
+
+/**
+* Performs a series of row interchanges on a matrix `A` using pivot indices stored in `IPIV`.
+*
+* @param order - storage layout
+* @param N - number of columns in `A`
+* @param A - input matrix
+* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+* @param k1 - index of first row to interchange
+* @param k2 - index of last row to interchange
+* @param IPIV - vector of pivot indices
+* @param incx - increment between successive values of `IPIV`
+* @returns permuted matrix `A`
+*
+* @example
+* var Int32Array = require( '@stdlib/array/int32' );
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var IPIV = new Int32Array( [ 2, 0, 1 ] );
+* var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* zlaswp( 'row-major', 2, A, 2, 0, 2, IPIV, 1 );
+* // A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+*
+* @example
+* var Int32Array = require( '@stdlib/array/int32' );
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var IPIV = new Int32Array( [ 2, 0, 1 ] );
+* var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 );
+* // A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+*/
+declare var zlaswp: Routine;
+
+
+// EXPORTS //
+
+export = zlaswp;
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/docs/types/test.ts b/lib/node_modules/@stdlib/lapack/base/zlaswp/docs/types/test.ts
new file mode 100644
index 000000000000..9ac1546d2cab
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/docs/types/test.ts
@@ -0,0 +1,359 @@
+/*
+* @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.
+*/
+
+import Complex128Array = require( '@stdlib/array/complex128' );
+import zlaswp = require( './index' );
+
+
+// TESTS //
+
+// The function returns a Complex128Array...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectType Complex128Array
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a string...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp( 5, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( true, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( false, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( null, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( void 0, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( [], 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( {}, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( ( x: number ): number => x, 3, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp( 'column-major', '5', A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', true, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', false, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', null, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', void 0, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', [], A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', {}, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', ( x: number ): number => x, A, 2, 0, 2, IPIV, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a Complex128Array...
+{
+ const IPIV = new Int32Array( 3 );
+
+ zlaswp( 'column-major', 3, '5', 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, 5, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, true, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, false, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, null, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, void 0, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, [], 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, {}, 2, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, ( x: number ): number => x, 2, 0, 2, IPIV, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp( 'column-major', 3, A, '5', 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, true, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, false, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, null, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, void 0, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, [], 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, {}, 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, ( x: number ): number => x, 0, 2, IPIV, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fifth argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp( 'column-major', 3, A, 2, '5', 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, true, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, false, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, null, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, void 0, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, [], 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, {}, 2, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, ( x: number ): number => x, 2, IPIV, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a sixth argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp( 'column-major', 3, A, 2, 0, '5', IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, true, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, false, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, null, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, void 0, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, [], IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, {}, IPIV, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, ( x: number ): number => x, IPIV, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a seventh argument which is not an Int32Array...
+{
+ const A = new Complex128Array( 6 );
+
+ zlaswp( 'column-major', 3, A, 2, 0, 2, '5', 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, 5, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, true, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, false, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, null, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, void 0, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, [], 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, {}, 1 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, ( x: number ): number => x, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eighth argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, '5' ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, true ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, false ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, null ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, void 0 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, [] ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, {} ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp(); // $ExpectError
+ zlaswp( 'column-major' ); // $ExpectError
+ zlaswp( 'column-major', 3 ); // $ExpectError
+ zlaswp( 'column-major', 3, A ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2 ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV ); // $ExpectError
+ zlaswp( 'column-major', 3, A, 2, 0, 2, IPIV, 1, 10 ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a Complex128Array...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectType Complex128Array
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( '5', A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( true, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( false, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( null, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( void 0, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( [], A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( {}, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( ( x: number ): number => x, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a Complex128Array...
+{
+ const IPIV = new Int32Array( 3 );
+
+ zlaswp.ndarray( 2, '5', 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, 5, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, true, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, false, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, null, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, void 0, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, [], 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, {}, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, ( x: number ): number => x, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, '5', 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, true, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, false, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, null, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, void 0, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, [], 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, {}, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, ( x: number ): number => x, 1, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, 2, '5', 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, true, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, false, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, null, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, void 0, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, [], 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, {}, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, ( x: number ): number => x, 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fifth argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, 2, 1, '5', 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, true, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, false, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, null, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, void 0, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, [], 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, {}, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, ( x: number ): number => x, 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a sixth argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, 2, 1, 0, '5', 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, true, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, false, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, null, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, void 0, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, [], 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, {}, 2, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, ( x: number ): number => x, 2, 1, IPIV, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a seventh argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, '5', 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, true, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, false, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, null, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, void 0, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, [], 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, {}, 1, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, ( x: number ): number => x, 1, IPIV, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eighth argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, '5', IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, true, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, false, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, null, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, void 0, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, [], IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, {}, IPIV, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, ( x: number ): number => x, IPIV, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a ninth argument which is not an Int32Array...
+{
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, '5', 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, 5, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, true, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, false, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, null, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, void 0, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, [], 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, {}, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, ( x: number ): number => x, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a tenth argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, '5', 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, true, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, false, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, null, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, void 0, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, [], 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, {}, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, ( x: number ): number => x, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eleventh argument which is not a number...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, '5' ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, true ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, false ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, null ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, void 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, [] ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, {} ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const IPIV = new Int32Array( 3 );
+ const A = new Complex128Array( 6 );
+
+ zlaswp.ndarray(); // $ExpectError
+ zlaswp.ndarray( 2 ); // $ExpectError
+ zlaswp.ndarray( 2, A ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1 ); // $ExpectError
+ zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0, 10 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/examples/index.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/examples/index.js
new file mode 100644
index 000000000000..56e89e3e3765
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/examples/index.js
@@ -0,0 +1,41 @@
+/**
+* @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.
+*/
+
+'use strict';
+
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Int32Array = require( '@stdlib/array/int32' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var zlaswp = require( './../lib' );
+
+// Specify matrix meta data:
+var shape = [ 4, 2 ];
+var strides = [ 1, 4 ];
+var offset = 0;
+var order = 'column-major';
+
+// Create a matrix stored in linear memory:
+var A = new Complex128Array( [ 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 ] ); // eslint-disable-line max-len
+console.log( ndarray2array( A, shape, strides, offset, order ) );
+
+// Define a vector of pivot indices:
+var IPIV = new Int32Array( [ 2, 0, 3, 1 ] );
+
+// Interchange rows:
+zlaswp( order, shape[ 1 ], A, strides[ 1 ], 0, shape[ 0 ]-1, IPIV, 1 );
+console.log( ndarray2array( A, shape, strides, offset, order ) );
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/base.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/base.js
new file mode 100644
index 000000000000..f7950d28552a
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/base.js
@@ -0,0 +1,158 @@
+/**
+* @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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' );
+var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var zswap = require( '@stdlib/blas/base/zswap' ).ndarray;
+
+
+// VARIABLES //
+
+var BLOCK_SIZE = 32;
+
+
+// MAIN //
+
+/**
+* Performs a series of row interchanges on a matrix `A` using pivot indices stored in `IPIV`.
+*
+* @private
+* @param {PositiveInteger} N - number of columns in `A`
+* @param {Complex128Array} 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 - index offset for `A`
+* @param {NonNegativeInteger} k1 - index of first row to interchange
+* @param {NonNegativeInteger} k2 - index of last row to interchange
+* @param {integer} inck - direction in which to apply pivots (-1 to apply pivots in reverse order; otherwise, apply in provided order)
+* @param {Int32Array} IPIV - vector of pivot indices
+* @param {integer} strideIPIV - `IPIV` stride length
+* @param {NonNegativeInteger} offsetIPIV - index offset for `IPIV`
+* @returns {Complex128Array} permuted matrix `A`
+*
+* @example
+* var Int32Array = require( '@stdlib/array/int32' );
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var IPIV = new Int32Array( [ 2, 0, 1 ] );
+* var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* zlaswp( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 );
+* // A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+*/
+function zlaswp( N, A, strideA1, strideA2, offsetA, k1, k2, inck, IPIV, strideIPIV, offsetIPIV ) { // eslint-disable-line max-len, max-params
+ var nrows;
+ var viewA;
+ var n32;
+ var tmp;
+ var row;
+ var ia1;
+ var ia2;
+ var ip;
+ var i;
+ var j;
+ var k;
+ var n;
+ var o;
+
+ // Compute the number of rows to be interchanged:
+ if ( inck > 0 ) {
+ nrows = k2 - k1;
+ } else {
+ nrows = k1 - k2;
+ }
+ nrows += 1;
+
+ // If the order is row-major, we can delegate to the Level 1 routine `zswap` for interchanging rows...
+ if ( isRowMajor( [ strideA1, strideA2 ] ) ) {
+ ip = offsetIPIV;
+ for ( i = 0, k = k1; i < nrows; i++, k += inck ) {
+ row = IPIV[ ip ];
+ if ( row !== k ) {
+ zswap( N, A, strideA2, offsetA+(k*strideA1), A, strideA2, offsetA+(row*strideA1) ); // eslint-disable-line max-len
+ }
+ ip += strideIPIV;
+ }
+ return A;
+ }
+ viewA = reinterpret( A, 0 );
+
+ strideA1 *= 2;
+ strideA2 *= 2;
+ offsetA *= 2;
+
+ // If the order is column-major, we need to use loop tiling to ensure efficient cache access when accessing matrix elements...
+ n32 = floor( N/BLOCK_SIZE ) * BLOCK_SIZE;
+ if ( n32 !== 0 ) {
+ for ( j = 0; j < n32; j += BLOCK_SIZE ) {
+ ip = offsetIPIV;
+ for ( i = 0, k = k1; i < nrows; i++, k += inck ) {
+ row = IPIV[ ip ];
+ if ( row !== k ) {
+ ia1 = offsetA + ( k*strideA1 );
+ ia2 = offsetA + ( row*strideA1 );
+ for ( n = j; n < j+BLOCK_SIZE; n++ ) {
+ o = n * strideA2;
+
+ tmp = viewA[ ia1+o ];
+ viewA[ ia1+o ] = viewA[ ia2+o ];
+ viewA[ ia2+o ] = tmp;
+
+ tmp = viewA[ ia1+o+1 ];
+ viewA[ ia1+o+1 ] = viewA[ ia2+o+1 ];
+ viewA[ ia2+o+1 ] = tmp;
+ }
+ }
+ ip += strideIPIV;
+ }
+ }
+ }
+ if ( n32 !== N ) {
+ ip = offsetIPIV;
+ for ( i = 0, k = k1; i < nrows; i++, k += inck ) {
+ row = IPIV[ ip ];
+ if ( row !== k ) {
+ ia1 = offsetA + ( k*strideA1 );
+ ia2 = offsetA + ( row*strideA1 );
+ for ( n = n32; n < N; n++ ) {
+ o = n * strideA2;
+
+ tmp = viewA[ ia1+o ];
+ viewA[ ia1+o ] = viewA[ ia2+o ];
+ viewA[ ia2+o ] = tmp;
+
+ tmp = viewA[ ia1+o+1 ];
+ viewA[ ia1+o+1 ] = viewA[ ia2+o+1 ];
+ viewA[ ia2+o+1 ] = tmp;
+ }
+ }
+ ip += strideIPIV;
+ }
+ }
+ return A;
+}
+
+
+// EXPORTS //
+
+module.exports = zlaswp;
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/index.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/index.js
new file mode 100644
index 000000000000..fdedfc53e905
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/index.js
@@ -0,0 +1,70 @@
+/**
+* @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.
+*/
+
+'use strict';
+
+/**
+* LAPACK routine to perform a series of row interchanges on an input matrix.
+*
+* @module @stdlib/lapack/base/zlaswp
+*
+* @example
+* var Int32Array = require( '@stdlib/array/int32' );
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var zlaswp = require( '@stdlib/lapack/base/zlaswp' );
+*
+* var IPIV = new Int32Array( [ 2, 0, 1 ] );
+* var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* zlaswp( 'row-major', 2, A, 2, 0, 2, IPIV, 1 );
+* // A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+*
+* @example
+* var Int32Array = require( '@stdlib/array/int32' );
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var zlaswp = require( '@stdlib/lapack/base/zlaswp' );
+*
+* var IPIV = new Int32Array( [ 2, 0, 1 ] );
+* var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* zlaswp.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 );
+* // A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+*/
+
+// MODULES //
+
+var join = require( 'path' ).join;
+var tryRequire = require( '@stdlib/utils/try-require' );
+var isError = require( '@stdlib/assert/is-error' );
+var main = require( './main.js' );
+
+
+// MAIN //
+
+var zlaswp;
+var tmp = tryRequire( join( __dirname, './native.js' ) );
+if ( isError( tmp ) ) {
+ zlaswp = main;
+} else {
+ zlaswp = tmp;
+}
+
+
+// EXPORTS //
+
+module.exports = zlaswp;
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/main.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/main.js
new file mode 100644
index 000000000000..39222d8e5445
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/main.js
@@ -0,0 +1,35 @@
+/**
+* @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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var zlaswp = require( './zlaswp.js' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+setReadOnly( zlaswp, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = zlaswp;
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/ndarray.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/ndarray.js
new file mode 100644
index 000000000000..ba712704ae18
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/ndarray.js
@@ -0,0 +1,73 @@
+/**
+* @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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var base = require( './base.js' );
+
+
+// MAIN //
+
+/**
+* Performs a series of row interchanges on a matrix `A` using pivot indices stored in `IPIV`.
+*
+* @param {PositiveInteger} N - number of columns in `A`
+* @param {Complex128Array} 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 - index offset for `A`
+* @param {NonNegativeInteger} k1 - index of first row to interchange
+* @param {NonNegativeInteger} k2 - index of last row to interchange
+* @param {integer} inck - direction in which to apply pivots (-1 to apply pivots in reverse order; otherwise, apply in provided order)
+* @param {Int32Array} IPIV - vector of pivot indices
+* @param {integer} strideIPIV - `IPIV` stride length
+* @param {NonNegativeInteger} offsetIPIV - index offset for `IPIV`
+* @returns {Complex128Array} permuted matrix `A`
+*
+* @example
+* var Int32Array = require( '@stdlib/array/int32' );
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var IPIV = new Int32Array( [ 2, 0, 1 ] );
+* var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* zlaswp( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 );
+* // A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+*/
+function zlaswp( N, A, strideA1, strideA2, offsetA, k1, k2, inck, IPIV, strideIPIV, offsetIPIV ) { // eslint-disable-line max-len, max-params
+ var tmp;
+ if ( inck < 0 ) {
+ offsetIPIV += k2 * strideIPIV;
+ strideIPIV *= -1;
+ tmp = k1;
+ k1 = k2;
+ k2 = tmp;
+ inck = -1;
+ } else {
+ offsetIPIV += k1 * strideIPIV;
+ inck = 1;
+ }
+ return base( N, A, strideA1, strideA2, offsetA, k1, k2, inck, IPIV, strideIPIV, offsetIPIV ); // eslint-disable-line max-len
+}
+
+
+// EXPORTS //
+
+module.exports = zlaswp;
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/zlaswp.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/zlaswp.js
new file mode 100644
index 000000000000..8fca18214f29
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/lib/zlaswp.js
@@ -0,0 +1,93 @@
+/**
+* @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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var isLayout = require( '@stdlib/blas/base/assert/is-layout' );
+var max = require( '@stdlib/math/base/special/max' );
+var format = require( '@stdlib/string/format' );
+var base = require( './base.js' );
+
+
+// MAIN //
+
+/**
+* Performs a series of row interchanges on a matrix `A` using pivot indices stored in `IPIV`.
+*
+* @param {string} order - storage layout
+* @param {PositiveInteger} N - number of columns in `A`
+* @param {Complex128Array} A - input matrix
+* @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+* @param {NonNegativeInteger} k1 - index of first row to interchange
+* @param {NonNegativeInteger} k2 - index of last row to interchange
+* @param {Int32Array} IPIV - vector of pivot indices
+* @param {integer} incx - increment between successive values of `IPIV`
+* @throws {TypeError} first argument must be a valid order
+* @throws {RangeError} fourth argument must be greater than or equal to max(1,N)
+* @returns {Complex128Array} permuted matrix `A`
+*
+* @example
+* var Int32Array = require( '@stdlib/array/int32' );
+* var Complex128Array = require( '@stdlib/array/complex128' );
+*
+* var IPIV = new Int32Array( [ 2, 0, 1 ] );
+* var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* zlaswp( 'row-major', 2, A, 2, 0, 2, IPIV, 1 );
+* // A => [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ]
+*/
+function zlaswp( order, N, A, LDA, k1, k2, IPIV, incx ) {
+ var tmp;
+ var inc;
+ var sa1;
+ var sa2;
+ var io;
+ if ( !isLayout( order ) ) {
+ throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) );
+ }
+ if ( order === 'row-major' && LDA < max( 1, N ) ) {
+ throw new RangeError( format( 'invalid argument. Fourth argument must be greater than or equal to max(1,%d). Value: `%d`.', N, LDA ) );
+ }
+ if ( incx > 0 ) {
+ inc = 1;
+ io = k1;
+ } else if ( incx < 0 ) {
+ inc = -1;
+ io = k1 + ( (k1-k2) * incx );
+ tmp = k1;
+ k1 = k2;
+ k2 = tmp;
+ } else {
+ return A;
+ }
+ if ( order === 'column-major' ) {
+ sa1 = 1;
+ sa2 = LDA;
+ } else { // order === 'row-major'
+ sa1 = LDA;
+ sa2 = 1;
+ }
+ return base( N, A, sa1, sa2, 0, k1, k2, inc, IPIV, incx, io );
+}
+
+
+// EXPORTS //
+
+module.exports = zlaswp;
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/package.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/package.json
new file mode 100644
index 000000000000..54f98903c33e
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/package.json
@@ -0,0 +1,75 @@
+{
+ "name": "@stdlib/lapack/base/zlaswp",
+ "version": "0.0.0",
+ "description": "Perform a series of row interchanges on an input matrix.",
+ "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",
+ "zlaswp",
+ "interchange",
+ "swap",
+ "exchange",
+ "permute",
+ "permutedims",
+ "linear",
+ "algebra",
+ "subroutines",
+ "array",
+ "ndarray",
+ "float64",
+ "double",
+ "complex128array",
+ "complex128",
+ "complex",
+ "cmplx"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_a_offset.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_a_offset.json
new file mode 100644
index 000000000000..9f419ce60ba0
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_a_offset.json
@@ -0,0 +1,38 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 1,
+ "A": [ 9999.0, 9999.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 9999.0, 9999.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [ 9999.0, 9999.0, 3.0, 4.0, 1.0, 2.0, 5.0, 6.0, 9.0, 10.0, 7.0, 8.0, 11.0, 12.0, 9999.0, 9999.0 ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_a_strides.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_a_strides.json
new file mode 100644
index 000000000000..c3dc982b643d
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_a_strides.json
@@ -0,0 +1,137 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": null,
+ "strideA1": 2,
+ "strideA2": 12,
+ "offsetA": 0,
+ "A": [
+ 1.0,
+ 2.0,
+ 9999.0,
+ 9999.0,
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0,
+ 9999.0,
+ 9999.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+],
+
+ "A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 1.0,
+ 2.0,
+ 9999.0,
+ 9999.0,
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0,
+ 9999.0,
+ 9999.0,
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+ ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_complex_access_patterns.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_complex_access_patterns.json
new file mode 100644
index 000000000000..df3049ca93ac
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_complex_access_patterns.json
@@ -0,0 +1,140 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": null,
+ "strideA1": -2,
+ "strideA2": 12,
+ "offsetA": 5,
+ "A": [
+ 9999.0,
+ 9999.0,
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 1.0,
+ 2.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0,
+ 9999.0,
+ 9999.0,
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+ ],
+
+"A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 9999, 9999, 1, 9999, 0, 9999, 2, 9999, 9999 ],
+ "strideIPIV": -2,
+ "offsetIPIV": 6,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [
+ 9999.0,
+ 9999.0,
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 1.0,
+ 2.0,
+ 9999.0,
+ 9999.0,
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+ ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_ipiv_offset.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_ipiv_offset.json
new file mode 100644
index 000000000000..d203d968f3b2
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_ipiv_offset.json
@@ -0,0 +1,38 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 3, 4, 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 2,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [ 3.0, 4.0, 1.0, 2.0, 5.0, 6.0, 9.0, 10.0, 7.0, 8.0, 11.0, 12.0 ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_ipiv_stride_negative.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_ipiv_stride_negative.json
new file mode 100644
index 000000000000..aa69302b324a
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_ipiv_stride_negative.json
@@ -0,0 +1,38 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": -1,
+
+ "IPIV": [ 2, 999, 0, 999, 1, 999 ],
+ "strideIPIV": -2,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 2, 1 ],
+ [ 1, 0 ],
+ [ 0, 2 ]
+ ],
+
+ "A_out": [ 3.0, 4.0, 1.0, 2.0, 5.0, 6.0, 9.0, 10.0, 7.0, 8.0, 11.0, 12.0 ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_ipiv_stride_positive.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_ipiv_stride_positive.json
new file mode 100644
index 000000000000..344004cbab32
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_ipiv_stride_positive.json
@@ -0,0 +1,38 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 999, 0, 999, 1, 999 ],
+ "strideIPIV": 2,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [ 3.0, 4.0, 1.0, 2.0, 5.0, 6.0, 9.0, 10.0, 7.0, 8.0, 11.0, 12.0 ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_k1.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_k1.json
new file mode 100644
index 000000000000..1f75e178b868
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_k1.json
@@ -0,0 +1,44 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 6,
+ "strideA1": 1,
+ "strideA2": 6,
+ "offsetA": 0,
+ "A": [ 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, 21.0, 22.0, 23.0, 24.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 13.0, 14.0 ],
+ [ 3.0, 4.0, 15.0, 16.0 ],
+ [ 5.0, 6.0, 17.0, 18.0 ],
+ [ 7.0, 8.0, 19.0, 20.0 ],
+ [ 9.0, 10.0, 21.0, 22.0 ],
+ [ 11.0, 12.0, 23.0, 24.0 ]
+ ],
+
+ "k1": 3,
+ "k2": 5,
+ "incK": 1,
+
+ "IPIV": [ 999, 999, 999, 2, 1, 0 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 3, 2 ],
+ [ 4, 1 ],
+ [ 5, 0 ]
+ ],
+
+ "A_out": [ 11.0, 12.0, 9.0, 10.0, 7.0, 8.0, 5.0, 6.0, 3.0, 4.0, 1.0, 2.0, 23.0, 24.0, 21.0, 22.0, 19.0, 20.0, 17.0, 18.0, 15.0, 16.0, 13.0, 14.0 ],
+
+ "A_out_mat": [
+ [ 11.0, 12.0, 23.0, 24.0 ],
+ [ 9.0, 10.0, 21.0, 22.0 ],
+ [ 7.0, 8.0, 19.0, 20.0 ],
+ [ 5.0, 6.0, 17.0, 18.0 ],
+ [ 3.0, 4.0, 15.0, 16.0 ],
+ [ 1.0, 2.0, 13.0, 14.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_lda.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_lda.json
new file mode 100644
index 000000000000..78d641c87a17
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_lda.json
@@ -0,0 +1,128 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 11,
+ "strideA1": 1,
+ "strideA2": 11,
+ "offsetA": 0,
+ "A": [
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+],
+
+"A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [
+ 3.0,
+ 4.0,
+ 1.0,
+ 2.0,
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0,
+ 7.0,
+ 8.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+ ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_no_offsets.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_no_offsets.json
new file mode 100644
index 000000000000..542d93d59f87
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_no_offsets.json
@@ -0,0 +1,38 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [ 3.0, 4.0, 1.0, 2.0, 5.0, 6.0, 9.0, 10.0, 7.0, 8.0, 11.0, 12.0 ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_reverse_pivots.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_reverse_pivots.json
new file mode 100644
index 000000000000..cb77a20404d3
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_reverse_pivots.json
@@ -0,0 +1,38 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": -1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 2, 1 ],
+ [ 1, 0 ],
+ [ 0, 2 ]
+ ],
+
+ "A_out": [ 3.0, 4.0, 1.0, 2.0, 5.0, 6.0, 9.0, 10.0, 7.0, 8.0, 11.0, 12.0 ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_reverse_pivots_ipiv_offset.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_reverse_pivots_ipiv_offset.json
new file mode 100644
index 000000000000..cf3f23d1fa15
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_reverse_pivots_ipiv_offset.json
@@ -0,0 +1,38 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": -1,
+
+ "IPIV": [ 3, 4, 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 2,
+
+ "interchanges": [
+ [ 2, 1 ],
+ [ 1, 0 ],
+ [ 0, 2 ]
+ ],
+
+ "A_out": [ 3.0, 4.0, 1.0, 2.0, 5.0, 6.0, 9.0, 10.0, 7.0, 8.0, 11.0, 12.0 ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_reverse_pivots_ipiv_stride.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_reverse_pivots_ipiv_stride.json
new file mode 100644
index 000000000000..e1e06039622b
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/column_major_reverse_pivots_ipiv_stride.json
@@ -0,0 +1,38 @@
+{
+ "order": "column-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": -1,
+
+ "IPIV": [ 1, 0, 2 ],
+ "strideIPIV": -1,
+ "offsetIPIV": 2,
+
+ "interchanges": [
+ [ 2, 1 ],
+ [ 1, 0 ],
+ [ 0, 2 ]
+ ],
+
+ "A_out": [ 3.0, 4.0, 1.0, 2.0, 5.0, 6.0, 9.0, 10.0, 7.0, 8.0, 11.0, 12.0 ],
+
+ "A_out_mat": [
+ [ 3.0, 4.0, 9.0, 10.0 ],
+ [ 1.0, 2.0, 7.0, 8.0 ],
+ [ 5.0, 6.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_a_offset.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_a_offset.json
new file mode 100644
index 000000000000..fd670557fcf8
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_a_offset.json
@@ -0,0 +1,38 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 2,
+ "strideA2": 1,
+ "offsetA": 1,
+ "A": [ 9999.0, 9999.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [ 9999.0, 9999.0, 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat_out": [
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_a_strides.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_a_strides.json
new file mode 100644
index 000000000000..79aed460b691
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_a_strides.json
@@ -0,0 +1,112 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": null,
+ "strideA1": 6,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A": [
+ 1.0,
+ 2.0,
+ 9999.0,
+ 9999.0,
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0,
+ 9999.0,
+ 9999.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+],
+
+"A_mat": [
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 1.0,
+ 2.0,
+ 9999.0,
+ 9999.0,
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0,
+ 9999.0,
+ 9999.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+ ],
+
+ "A_mat_out": [
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_complex_access_patterns.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_complex_access_patterns.json
new file mode 100644
index 000000000000..9e0b93c8e31e
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_complex_access_patterns.json
@@ -0,0 +1,84 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": null,
+ "strideA1": 4,
+ "strideA2": -2,
+ "offsetA": 2,
+ "A": [
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 1.0,
+ 2.0,
+ 9999.0,
+ 9999.0,
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0
+],
+
+"A_mat": [
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 9999, 1, 9999, 0, 9999, 2, 9999 ],
+ "strideIPIV": -2,
+ "offsetIPIV": 5,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 5.0,
+ 6.0,
+ 9999.0,
+ 9999.0,
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 1.0,
+ 2.0,
+ 9999.0,
+ 9999.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0
+ ],
+
+ "A_mat_out": [
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_ipiv_offset.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_ipiv_offset.json
new file mode 100644
index 000000000000..b1da01332276
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_ipiv_offset.json
@@ -0,0 +1,38 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": 3,
+ "strideA1": 2,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 3, 4, 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 2,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat_out": [
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_ipiv_stride_negative.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_ipiv_stride_negative.json
new file mode 100644
index 000000000000..611d915eb9a2
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_ipiv_stride_negative.json
@@ -0,0 +1,38 @@
+{
+ "order": "row-major",
+
+ "N": 3,
+ "LDA": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A": [ 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 ],
+
+ "A_mat": [
+ [ 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 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": -1,
+
+ "IPIV": [ 2, 9999, 0, 9999, 1, 9999 ],
+ "strideIPIV": -2,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 2, 1 ],
+ [ 1, 0 ],
+ [ 0, 2 ]
+ ],
+
+ "A_out": [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0 ],
+
+ "A_out_mat": [
+ [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ [ 13.0, 14.0, 15.0, 16.0, 17.0, 18.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_ipiv_stride_positive.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_ipiv_stride_positive.json
new file mode 100644
index 000000000000..c39a1b304a65
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_ipiv_stride_positive.json
@@ -0,0 +1,38 @@
+{
+ "order": "row-major",
+
+ "N": 3,
+ "LDA": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A": [ 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 ],
+
+ "A_mat": [
+ [ 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 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 9999, 0, 9999, 1, 9999 ],
+ "strideIPIV": 2,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 2, 1 ],
+ [ 1, 0 ],
+ [ 0, 2 ]
+ ],
+
+ "A_out": [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0 ],
+
+ "A_out_mat": [
+ [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ [ 13.0, 14.0, 15.0, 16.0, 17.0, 18.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_k1.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_k1.json
new file mode 100644
index 000000000000..dfb38ee59873
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_k1.json
@@ -0,0 +1,44 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": 2,
+ "strideA1": 2,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A": [ 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, 21.0, 22.0, 23.0, 24.0 ],
+
+ "A_mat": [
+ [ 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 ],
+ [ 21.0, 22.0, 23.0, 24.0 ]
+ ],
+
+ "k1": 3,
+ "k2": 5,
+ "incK": 1,
+
+ "IPIV": [ 999, 999, 999, 2, 1, 0 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 3, 2 ],
+ [ 4, 1 ],
+ [ 5, 0 ]
+ ],
+
+ "A_out": [ 21.0, 22.0, 23.0, 24.0, 17.0, 18.0, 19.0, 20.0, 13.0, 14.0, 15.0, 16.0, 9.0, 10.0, 11.0, 12.0, 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0 ],
+
+ "A_out_mat": [
+ [ 21.0, 22.0, 23.0, 24.0 ],
+ [ 17.0, 18.0, 19.0, 20.0 ],
+ [ 13.0, 14.0, 15.0, 16.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_lda.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_lda.json
new file mode 100644
index 000000000000..6bdde039e27f
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_lda.json
@@ -0,0 +1,87 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": 4,
+ "strideA1": 4,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A": [
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+],
+
+"A_mat": [
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0,
+ 9999.0,
+ 9999.0,
+ 9999.0,
+ 9999.0
+ ],
+ "A_mat_out": [
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_no_offsets.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_no_offsets.json
new file mode 100644
index 000000000000..4b7f68cfd5f5
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_no_offsets.json
@@ -0,0 +1,37 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": 2,
+ "strideA1": 2,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": 1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 0, 2 ],
+ [ 1, 0 ],
+ [ 2, 1 ]
+ ],
+
+ "A_out": [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ],
+ "A_mat_out": [
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_reverse_pivots.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_reverse_pivots.json
new file mode 100644
index 000000000000..56dbe67c9761
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_reverse_pivots.json
@@ -0,0 +1,38 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": 2,
+ "strideA1": 2,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": -1,
+
+ "IPIV": [ 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 0,
+
+ "interchanges": [
+ [ 2, 1 ],
+ [ 1, 0 ],
+ [ 0, 2 ]
+ ],
+
+ "A_out": [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat_out": [
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_reverse_pivots_ipiv_offset.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_reverse_pivots_ipiv_offset.json
new file mode 100644
index 000000000000..0f6038997db5
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_reverse_pivots_ipiv_offset.json
@@ -0,0 +1,37 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": 2,
+ "strideA1": 2,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": -1,
+
+ "IPIV": [ 3, 4, 2, 0, 1 ],
+ "strideIPIV": 1,
+ "offsetIPIV": 2,
+
+ "interchanges": [
+ [ 2, 1 ],
+ [ 1, 0 ],
+ [ 0, 2 ]
+ ],
+
+ "A_out": [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ],
+ "A_mat_out": [
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_reverse_pivots_ipiv_stride.json b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_reverse_pivots_ipiv_stride.json
new file mode 100644
index 000000000000..74ab87a77c96
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/fixtures/row_major_reverse_pivots_ipiv_stride.json
@@ -0,0 +1,38 @@
+{
+ "order": "row-major",
+
+ "N": 2,
+ "LDA": 2,
+ "strideA1": 2,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat": [
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ],
+
+ "k1": 0,
+ "k2": 2,
+ "incK": -1,
+
+ "IPIV": [ 1, 0, 2 ],
+ "strideIPIV": -1,
+ "offsetIPIV": 2,
+
+ "interchanges": [
+ [ 2, 1 ],
+ [ 1, 0 ],
+ [ 0, 2 ]
+ ],
+
+ "A_out": [ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ],
+
+ "A_mat_out": [
+ [ 5.0, 6.0, 7.0, 8.0 ],
+ [ 1.0, 2.0, 3.0, 4.0 ],
+ [ 9.0, 10.0, 11.0, 12.0 ]
+ ]
+}
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/test.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/test.js
new file mode 100644
index 000000000000..4a298984c4f1
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/test.js
@@ -0,0 +1,82 @@
+/**
+* @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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var proxyquire = require( 'proxyquire' );
+var IS_BROWSER = require( '@stdlib/assert/is-browser' );
+var zlaswp = 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 zlaswp, '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 zlaswp.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 zlaswp = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( zlaswp, 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 zlaswp;
+ var main;
+
+ main = require( './../lib/zlaswp.js' );
+
+ zlaswp = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( zlaswp, main, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return new Error( 'Cannot find module' );
+ }
+});
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/test.ndarray.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/test.ndarray.js
new file mode 100644
index 000000000000..f8936b3041e9
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/test.ndarray.js
@@ -0,0 +1,591 @@
+/**
+* @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 tape = require( 'tape' );
+var isSameComplex128Array = require( '@stdlib/assert/is-same-complex128array' );
+var Int32Array = require( '@stdlib/array/int32' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var oneTo = require( '@stdlib/array/one-to' );
+var flatten = require( '@stdlib/array/base/flatten' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var numel = require( '@stdlib/ndarray/base/numel' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
+var zlaswp = require( './../lib/ndarray.js' );
+
+
+// FIXTURES //
+
+var COL_MAJOR = require( './fixtures/column_major_no_offsets.json' );
+var COL_MAJOR_IPIV_STRIDE_POS = require( './fixtures/column_major_ipiv_stride_positive.json' );
+var COL_MAJOR_IPIV_OFFSET = require( './fixtures/column_major_ipiv_offset.json' );
+var COL_MAJOR_A_STRIDES = require( './fixtures/column_major_a_strides.json' );
+var COL_MAJOR_A_OFFSET = require( './fixtures/column_major_a_offset.json' );
+var COL_MAJOR_CMPLX_ACCESS = require( './fixtures/column_major_complex_access_patterns.json' );
+var COL_MAJOR_REV_PIVOTS = require( './fixtures/column_major_reverse_pivots.json' );
+var COL_MAJOR_REV_PIVOTS_IPIV_STRIDE = require( './fixtures/column_major_reverse_pivots_ipiv_stride.json' ); // eslint-disable-line id-length
+var COL_MAJOR_REV_PIVOTS_IPIV_OFFSET = require( './fixtures/column_major_reverse_pivots_ipiv_offset.json' ); // eslint-disable-line id-length
+var COL_MAJOR_K1 = require( './fixtures/column_major_k1.json' );
+
+var ROW_MAJOR = require( './fixtures/row_major_no_offsets.json' );
+var ROW_MAJOR_IPIV_STRIDE_POS = require( './fixtures/row_major_ipiv_stride_positive.json' );
+var ROW_MAJOR_IPIV_OFFSET = require( './fixtures/row_major_ipiv_offset.json' );
+var ROW_MAJOR_A_STRIDES = require( './fixtures/row_major_a_strides.json' );
+var ROW_MAJOR_A_OFFSET = require( './fixtures/row_major_a_offset.json' );
+var ROW_MAJOR_CMPLX_ACCESS = require( './fixtures/row_major_complex_access_patterns.json' );
+var ROW_MAJOR_REV_PIVOTS = require( './fixtures/row_major_reverse_pivots.json' );
+var ROW_MAJOR_REV_PIVOTS_IPIV_STRIDE = require( './fixtures/row_major_reverse_pivots_ipiv_stride.json' ); // eslint-disable-line id-length
+var ROW_MAJOR_REV_PIVOTS_IPIV_OFFSET = require( './fixtures/row_major_reverse_pivots_ipiv_offset.json' ); // eslint-disable-line id-length
+var ROW_MAJOR_K1 = require( './fixtures/row_major_k1.json' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zlaswp, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 11', function test( t ) {
+ t.strictEqual( zlaswp.length, 11, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function performs a series of row interchanges (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a series of row interchanges (column-major, k1 > 0)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_K1;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports applying pivots in reverse order (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_REV_PIVOTS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `IPIV` stride (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_IPIV_STRIDE_POS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `IPIV` stride (reverse pivots, column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_REV_PIVOTS_IPIV_STRIDE;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `IPIV` offset (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_IPIV_OFFSET;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `IPIV` offset (reverse pivots, column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_REV_PIVOTS_IPIV_OFFSET;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports `A` strides (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_A_STRIDES;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `A` offset (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_A_OFFSET;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_CMPLX_ACCESS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function efficiently handles large datasets (column-major)', function test( t ) {
+ var expectedMat;
+ var expectedBuf;
+ var expected;
+ var IPIV;
+ var abuf;
+ var buf;
+ var mat;
+ var out;
+ var ord;
+ var sh;
+ var st;
+ var A;
+ var o;
+
+ ord = 'column-major';
+ sh = [ 5, 1000 ];
+ st = shape2strides( sh, ord );
+ o = 0;
+
+ // Define a linear buffer:
+ buf = oneTo( 2 * numel( sh ), 'generic' );
+
+ // Define an input matrix in linear storage:
+ A = new Complex128Array( buf );
+ abuf = reinterpret( A, 0 );
+
+ // Convert to a nested array:
+ mat = ndarray2array( abuf, [ sh[0], sh[1], 2 ], [ 2*st[0], 2*st[1], 1 ], o, ord );
+
+ // Create an array of pivot indices:
+ IPIV = new Int32Array( [ 9999, 9999, 9999, 1, 0 ] );
+
+ // Define the expected output array:
+ expectedMat = reverse( mat.slice() );
+ expectedBuf = flatten( expectedMat, sh, true );
+ expectedBuf = flatten( expectedBuf, [ numel( sh ), 2 ], false );
+ expected = new Complex128Array( expectedBuf );
+
+ // Interchange rows:
+ out = zlaswp( sh[1], A, st[0], st[1], o, 3, 4, 1, IPIV, 1, 0 );
+
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a series of row interchanges (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a series of row interchanges (row-major, k1 > 0)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_K1;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports applying pivots in reverse order (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_REV_PIVOTS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `IPIV` stride (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_IPIV_STRIDE_POS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `IPIV` stride (reverse pivots, row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_REV_PIVOTS_IPIV_STRIDE;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `IPIV` offset (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_IPIV_OFFSET;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `IPIV` offset (reverse pivots, row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_REV_PIVOTS_IPIV_OFFSET;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports `A` strides (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_A_STRIDES;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports an `A` offset (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_A_OFFSET;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_CMPLX_ACCESS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.N, A, data.strideA1, data.strideA2, data.offsetA, data.k1, data.k2, data.incK, IPIV, data.strideIPIV, data.offsetIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function efficiently handles large datasets (row-major)', function test( t ) {
+ var expectedBuf;
+ var expectedMat;
+ var expected;
+ var IPIV;
+ var abuf;
+ var buf;
+ var mat;
+ var out;
+ var ord;
+ var sh;
+ var st;
+ var A;
+ var o;
+
+ ord = 'row-major';
+ sh = [ 5, 1000 ];
+ st = shape2strides( sh, ord );
+ o = 0;
+
+ // Define a linear buffer:
+ buf = oneTo( 2 * numel( sh ), 'generic' );
+
+ // Define an input matrix in linear storage:
+ A = new Complex128Array( buf );
+ abuf = reinterpret( A, 0 );
+
+ // Convert to a nested array:
+ mat = ndarray2array( abuf, [ sh[0], sh[1], 2 ], [ 2*st[0], 2*st[1], 1 ], o, ord );
+
+ // Create an array of pivot indices:
+ IPIV = new Int32Array( [ 9999, 9999, 9999, 1, 0 ] );
+
+ // Define the expected output array:
+ expectedMat = reverse( mat.slice() );
+ expectedBuf = flatten( expectedMat, sh, false );
+ expectedBuf = flatten( expectedBuf, [ numel( sh ), 2 ], false );
+ expected = new Complex128Array( expectedBuf );
+
+ // Interchange rows:
+ out = zlaswp( sh[1], A, st[0], st[1], o, 3, 4, 1, IPIV, 1, 0 );
+
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/lapack/base/zlaswp/test/test.zlaswp.js b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/test.zlaswp.js
new file mode 100644
index 000000000000..57320786bbcb
--- /dev/null
+++ b/lib/node_modules/@stdlib/lapack/base/zlaswp/test/test.zlaswp.js
@@ -0,0 +1,516 @@
+/**
+* @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 tape = require( 'tape' );
+var isSameComplex128Array = require( '@stdlib/assert/is-same-complex128array' );
+var Int32Array = require( '@stdlib/array/int32' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var oneTo = require( '@stdlib/array/one-to' );
+var flatten = require( '@stdlib/array/base/flatten' );
+var reverse = require( '@stdlib/array/base/reverse' );
+var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
+var numel = require( '@stdlib/ndarray/base/numel' );
+var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
+var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
+var zlaswp = require( './../lib/zlaswp.js' );
+
+
+// FIXTURES //
+
+var COL_MAJOR = require( './fixtures/column_major_no_offsets.json' );
+var COL_MAJOR_IPIV_STRIDE_POS = require( './fixtures/column_major_ipiv_stride_positive.json' );
+var COL_MAJOR_IPIV_STRIDE_NEG = require( './fixtures/column_major_ipiv_stride_negative.json' );
+var COL_MAJOR_LDA = require( './fixtures/column_major_lda.json' );
+var COL_MAJOR_REV_PIVOTS = require( './fixtures/column_major_reverse_pivots.json' );
+var COL_MAJOR_K1 = require( './fixtures/column_major_k1.json' );
+
+var ROW_MAJOR = require( './fixtures/row_major_no_offsets.json' );
+var ROW_MAJOR_IPIV_STRIDE_POS = require( './fixtures/row_major_ipiv_stride_positive.json' );
+var ROW_MAJOR_IPIV_STRIDE_NEG = require( './fixtures/row_major_ipiv_stride_negative.json' );
+var ROW_MAJOR_LDA = require( './fixtures/row_major_lda.json' );
+var ROW_MAJOR_REV_PIVOTS = require( './fixtures/row_major_reverse_pivots.json' );
+var ROW_MAJOR_K1 = require( './fixtures/row_major_k1.json' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zlaswp, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 8', function test( t ) {
+ t.strictEqual( zlaswp.length, 8, '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 data;
+ var i;
+
+ data = COL_MAJOR;
+
+ 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() {
+ zlaswp( value, data.N, data.A, data.LDA, data.k1, data.k2, data.IPIV, data.strideIPIV );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided a fourth argument which is not a valid `LDA` value (row-major)', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = ROW_MAJOR;
+
+ values = [
+ 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() {
+ zlaswp( data.order, data.N, data.A, value, data.k1, data.k2, data.IPIV, data.strideIPIV );
+ };
+ }
+});
+
+tape( 'the function performs a series of row interchanges (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a series of row interchanges (column-major, k1 > 0)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_K1;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports applying pivots in reverse order (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_REV_PIVOTS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an `LDA` parameter for operating on sub-matrices (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_LDA;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a positive increment between successive values of `IPIV` (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_IPIV_STRIDE_POS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a negative increment between successive values of `IPIV` (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR_IPIV_STRIDE_NEG;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an increment between successive values of `IPIV` equal to `0`, the function returns the input matrix unchanged (column-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = COL_MAJOR;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, 0 );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function efficiently handles large datasets (column-major)', function test( t ) {
+ var expectedMat;
+ var expectedBuf;
+ var expected;
+ var IPIV;
+ var abuf;
+ var buf;
+ var mat;
+ var out;
+ var ord;
+ var sh;
+ var st;
+ var A;
+ var o;
+
+ ord = 'column-major';
+ sh = [ 5, 1000 ];
+ st = shape2strides( sh, ord );
+ o = 0;
+
+ // Define a linear buffer:
+ buf = oneTo( 2 * numel( sh ), 'generic' );
+
+ // Define an input matrix in linear storage:
+ A = new Complex128Array( buf );
+ abuf = reinterpret( A, 0 );
+
+ // Convert to a nested array:
+ mat = ndarray2array( abuf, [ sh[0], sh[1], 2 ], [ 2*st[0], 2*st[1], 1 ], o, ord );
+
+ // Create an array of pivot indices:
+ IPIV = new Int32Array( [ 9999, 9999, 9999, 1, 0 ] );
+
+ // Define the expected output array:
+ expectedMat = reverse( mat.slice() );
+ expectedBuf = flatten( expectedMat, sh, true );
+ expectedBuf = flatten( expectedBuf, [ numel( sh ), 2 ], false );
+ expected = new Complex128Array( expectedBuf );
+
+ // Interchange rows:
+ out = zlaswp( ord, sh[1], A, sh[0], 3, 4, IPIV, 1 );
+
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a series of row interchanges (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a series of row interchanges (row-major, k1 > 0)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_K1;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports applying pivots in reverse order (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_REV_PIVOTS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an `LDA` parameter for operating on sub-matrices (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_LDA;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a positive increment between successive values of `IPIV` (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_IPIV_STRIDE_POS;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a negative increment between successive values of `IPIV` (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR_IPIV_STRIDE_NEG;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A_out );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, data.strideIPIV );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an increment between successive values of `IPIV` equal to `0`, the function returns the input matrix unchanged (row-major)', function test( t ) {
+ var expected;
+ var IPIV;
+ var data;
+ var out;
+ var A;
+
+ data = ROW_MAJOR;
+
+ A = new Complex128Array( data.A );
+ IPIV = new Int32Array( data.IPIV );
+
+ expected = new Complex128Array( data.A );
+
+ out = zlaswp( data.order, data.N, A, data.LDA, data.k1, data.k2, IPIV, 0 );
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function efficiently handles large datasets (row-major)', function test( t ) {
+ var expectedBuf;
+ var expectedMat;
+ var expected;
+ var IPIV;
+ var abuf;
+ var buf;
+ var mat;
+ var out;
+ var ord;
+ var sh;
+ var st;
+ var A;
+ var o;
+
+ ord = 'row-major';
+ sh = [ 5, 1000 ];
+ st = shape2strides( sh, ord );
+ o = 0;
+
+ // Define a linear buffer:
+ buf = oneTo( 2 * numel( sh ), 'generic' );
+
+ // Define an input matrix in linear storage:
+ A = new Complex128Array( buf );
+ abuf = reinterpret( A, 0 );
+
+ // Convert to a nested array:
+ mat = ndarray2array( abuf, [ sh[0], sh[1], 2 ], [ 2*st[0], 2*st[1], 1 ], o, ord );
+
+ // Create an array of pivot indices:
+ IPIV = new Int32Array( [ 9999, 9999, 9999, 1, 0 ] );
+
+ // Define the expected output array:
+ expectedMat = reverse( mat.slice() );
+ expectedBuf = flatten( expectedMat, sh, false );
+ expectedBuf = flatten( expectedBuf, [ numel( sh ), 2 ], false );
+ expected = new Complex128Array( expectedBuf );
+
+ // Interchange rows:
+ out = zlaswp( ord, sh[1], A, sh[1], 3, 4, IPIV, 1 );
+
+ t.strictEqual( out, A, 'returns expected value' );
+ t.ok( isSameComplex128Array( out, expected ), 'returns expected value' );
+
+ t.end();
+});