diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/README.md b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/README.md
new file mode 100644
index 000000000000..9908537daa62
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/README.md
@@ -0,0 +1,170 @@
+
+
+# gfill-anti-diagonal
+
+> Fill the anti-diagonal of a matrix with a specified scalar constant.
+
+
+
+## Usage
+
+```javascript
+var gfillAntiDiagonal = require( '@stdlib/blas/ext/base/gfill-anti-diagonal' );
+```
+
+#### gfillAntiDiagonal( order, M, N, k, alpha, A, LDA )
+
+Fills the anti-diagonal of a matrix with a specified scalar constant.
+
+```javascript
+var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+
+gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3 );
+// A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+```
+
+The function has the following parameters:
+
+- **order**: storage layout.
+- **M**: number of rows in `A`.
+- **N**: number of columns in `A`.
+- **k**: starting index for the anti-diagonal.
+- **alpha**: scalar constant.
+- **A**: input matrix as a linear array.
+- **LDA**: stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`).
+
+The `order` and `LDA` parameters determine the matrix layout. For example, to fill an upper anti-diagonal:
+
+```javascript
+var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+
+gfillAntiDiagonal( 'row-major', 2, 3, 1, 8.0, A, 3 );
+// A => [ 1.0, 8.0, 3.0, 8.0, 5.0, 6.0 ]
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+
+// Initial matrix...
+var A0 = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+// Create an offset view...
+var A1 = new Float64Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+// Fill main anti-diagonal...
+gfillAntiDiagonal( 'row-major', 2, 3, 0, 8.0, A1, 3 );
+// A0 => [ 0.0, 1.0, 2.0, 8.0, 4.0, 8.0, 6.0 ]
+```
+
+#### gfillAntiDiagonal.ndarray( M, N, k, alpha, A, strideA1, strideA2, offsetA )
+
+Fills the anti-diagonal of a matrix with a specified scalar constant using alternative indexing semantics.
+
+```javascript
+var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+
+gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, 0 );
+// A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+```
+
+The function has the following parameters:
+
+- **M**: number of rows in `A`.
+- **N**: number of columns in `A`.
+- **k**: starting index for the anti-diagonal.
+- **alpha**: scalar constant.
+- **A**: input matrix as a linear array.
+- **strideA1**: stride length for the first dimension of `A`.
+- **strideA2**: stride length for the second dimension of `A`.
+- **offsetA**: starting index for `A`.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, with an offset:
+
+```javascript
+var A = [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+
+gfillAntiDiagonal.ndarray( 2, 3, 0, 8.0, A, 3, 1, 1 );
+// A => [ 0.0, 1.0, 2.0, 8.0, 4.0, 8.0, 6.0 ]
+```
+
+
+
+
+
+
+
+## Notes
+
+- If `M <= 0` or `N <= 0`, both functions return `A` unchanged.
+- Both functions support array-like objects having getter and setter accessors for array element access (e.g., [`@stdlib/array/base/accessor`][@stdlib/array/base/accessor]).
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var uniform = require( '@stdlib/random/array/uniform' );
+var gfillAntiDiagonal = require( '@stdlib/blas/ext/base/gfill-anti-diagonal' );
+
+var A = uniform( 6, -100, 100, {
+ 'dtype': 'float64'
+});
+console.log( A );
+
+gfillAntiDiagonal( 'row-major', 2, 3, 0, 5.0, A, 3 );
+console.log( A );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+[@stdlib/array/base/accessor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/accessor
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/benchmark/benchmark.js
new file mode 100644
index 000000000000..9e9006ca73e0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/benchmark/benchmark.js
@@ -0,0 +1,115 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var 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 zeros = require( '@stdlib/array/zeros' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var gfillAntiDiagonal = require( './../lib/main.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'generic'
+};
+
+var LAYOUTS = [
+ 'row-major',
+ 'column-major'
+];
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {string} order - storage layout
+* @param {PositiveInteger} N - number of elements along each dimension
+* @returns {Function} benchmark function
+*/
+function createBenchmark( order, N ) {
+ var A = zeros( N * N, options.dtype );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var y;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ y = gfillAntiDiagonal( order, N, N, 0, i, A, N );
+ if ( isnan( y[ 0 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( y[ 0 ] ) ) {
+ 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 k;
+
+ min = 1; // 10^min
+ max = 3; // 10^max
+
+ for ( k = 0; k < LAYOUTS.length; k++ ) {
+ ord = LAYOUTS[ k ];
+ for ( i = min; i <= max; i++ ) {
+ N = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ f = createBenchmark( ord, N );
+ bench( format( '%s::square_matrix:order=%s,size=%d', pkg, ord, N*N ), f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..2b7ee390bed5
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/benchmark/benchmark.ndarray.js
@@ -0,0 +1,122 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var 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 zeros = require( '@stdlib/array/zeros' );
+var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var gfillAntiDiagonal = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var LAYOUTS = [
+ 'row-major',
+ 'column-major'
+];
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {string} order - storage layout
+* @param {PositiveInteger} N - number of elements along each dimension
+* @returns {Function} benchmark function
+*/
+function createBenchmark( order, N ) {
+ var A = zeros( N*N, 'generic' );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var sa1;
+ var sa2;
+ var y;
+ var i;
+
+ if ( isColumnMajor( order ) ) {
+ sa1 = 1;
+ sa2 = N;
+ } else { // order === 'row-major'
+ sa1 = N;
+ sa2 = 1;
+ }
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ y = gfillAntiDiagonal( N, N, 0, i, A, sa1, sa2, 0 );
+ if ( isnan( y[ 0 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( y[ 0 ] ) ) {
+ 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 k;
+
+ min = 1; // 10^min
+ max = 3; // 10^max
+
+ for ( k = 0; k < LAYOUTS.length; k++ ) {
+ ord = LAYOUTS[ k ];
+ for ( i = min; i <= max; i++ ) {
+ N = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ f = createBenchmark( ord, N );
+ bench( format( '%s::square_matrix:ndarray:order=%s,size=%d', pkg, ord, N*N ), f );
+ }
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/docs/repl.txt
new file mode 100644
index 000000000000..d85e6c152f40
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/docs/repl.txt
@@ -0,0 +1,112 @@
+
+{{alias}}( order, M, N, k, alpha, A, LDA )
+ Fills the anti-diagonal of a matrix with a specified scalar constant.
+
+ The `order` parameter specifies the storage layout of the matrix.
+
+ The `k` parameter determines which anti-diagonal to fill: `0` for the main
+ anti-diagonal, positive values for upper anti-diagonals, and negative values
+ for lower anti-diagonals.
+
+ If `M <= 0` or `N <= 0`, the function returns `A` unchanged.
+
+ Parameters
+ ----------
+ order: string
+ Storage layout.
+
+ M: integer
+ Number of rows in `A`.
+
+ N: integer
+ Number of columns in `A`.
+
+ k: integer
+ Starting index for the anti-diagonal.
+
+ alpha: any
+ Scalar constant.
+
+ A: ArrayLikeObject
+ Input matrix as a linear array.
+
+ LDA: integer
+ Stride length for the first dimension of `A` (a.k.a., leading
+ dimension of the matrix `A`).
+
+ Returns
+ -------
+ A: ArrayLikeObject
+ Input matrix.
+
+ Examples
+ --------
+ // Standard Usage:
+ > var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ > {{alias}}( 'row-major', 2, 3, 0, 7.0, A, 3 )
+ [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+
+ // Filling upper anti-diagonal:
+ > A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ > {{alias}}( 'row-major', 2, 3, 1, 8.0, A, 3 )
+ [ 1.0, 8.0, 3.0, 8.0, 5.0, 6.0 ]
+
+ // Filling lower anti-diagonal:
+ > A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ > {{alias}}( 'row-major', 2, 3, -1, 9.0, A, 3 )
+ [ 1.0, 2.0, 3.0, 4.0, 5.0, 9.0 ]
+
+
+{{alias}}.ndarray( M, N, k, alpha, A, strideA1, strideA2, offsetA )
+ Fills the anti-diagonal of a matrix with a specified scalar constant using
+ alternative indexing semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, the offset parameter supports indexing semantics based on a starting
+ index.
+
+ Parameters
+ ----------
+ M: integer
+ Number of rows in `A`.
+
+ N: integer
+ Number of columns in `A`.
+
+ k: integer
+ Starting index for the anti-diagonal.
+
+ alpha: any
+ Scalar constant.
+
+ A: ArrayLikeObject
+ Input matrix as a linear array.
+
+ strideA1: integer
+ Stride length for the first dimension of `A`.
+
+ strideA2: integer
+ Stride length for the second dimension of `A`.
+
+ offsetA: integer
+ Starting index for `A`.
+
+ Returns
+ -------
+ A: ArrayLikeObject
+ Input matrix.
+
+ Examples
+ --------
+ // Standard Usage:
+ > var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ > {{alias}}.ndarray( 2, 3, 0, 7.0, A, 3, 1, 0 )
+ [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+
+ // Using an offset:
+ > A = [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ > {{alias}}.ndarray( 2, 3, 0, 8.0, A, 3, 1, 1 )
+ [ 0.0, 1.0, 2.0, 8.0, 4.0, 8.0, 6.0 ]
+
+ See Also
+ --------
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/docs/types/index.d.ts
new file mode 100644
index 000000000000..ffa0f2a39394
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/docs/types/index.d.ts
@@ -0,0 +1,146 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { Collection, AccessorArrayLike } from '@stdlib/types/array';
+import { Layout } from '@stdlib/types/blas';
+
+/**
+* Interface describing `gfillAntiDiagonal`.
+*/
+interface Routine {
+ /**
+ * Fills the anti-diagonal of a matrix with a specified scalar constant.
+ *
+ * @param order - storage layout
+ * @param M - number of rows in `A`
+ * @param N - number of columns in `A`
+ * @param k - starting index for the anti-diagonal
+ * @param alpha - scalar constant
+ * @param A - input matrix
+ * @param LDA - stride of the first dimension of `A`
+ * @returns `A`
+ *
+ * @example
+ * var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+ *
+ * var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ *
+ * gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, toAccessorArray( A ), 3 );
+ * // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+ */
+ ( order: Layout, M: number, N: number, k: number, alpha: T, A: AccessorArrayLike, LDA: number ): AccessorArrayLike;
+
+ /**
+ * Fills the anti-diagonal of a matrix with a specified scalar constant.
+ *
+ * @param order - storage layout
+ * @param M - number of rows in `A`
+ * @param N - number of columns in `A`
+ * @param k - starting index for the anti-diagonal
+ * @param alpha - scalar constant
+ * @param A - input matrix
+ * @param LDA - stride of the first dimension of `A`
+ * @returns `A`
+ *
+ * @example
+ * var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ *
+ * gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3 );
+ * // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+ */
+ ( order: Layout, M: number, N: number, k: number, alpha: T, A: Collection, LDA: number ): Collection;
+
+ /**
+ * Fills the anti-diagonal of a matrix with a specified scalar constant using alternative indexing semantics.
+ *
+ * @param M - number of rows in `A`
+ * @param N - number of columns in `A`
+ * @param k - starting index for the anti-diagonal
+ * @param alpha - scalar constant
+ * @param A - input matrix as a linear array
+ * @param strideA1 - stride length for the first dimension of `A`
+ * @param strideA2 - stride length for the second dimension of `A`
+ * @param offsetA - starting index for `A`
+ * @returns `A`
+ *
+ * @example
+ * var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+ *
+ * var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ *
+ * gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, toAccessorArray( A ), 3, 1, 0 );
+ * // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+ */
+ ndarray( M: number, N: number, k: number, alpha: T, A: AccessorArrayLike, strideA1: number, strideA2: number, offsetA: number ): AccessorArrayLike;
+
+ /**
+ * Fills the anti-diagonal of a matrix with a specified scalar constant using alternative indexing semantics.
+ *
+ * @param M - number of rows in `A`
+ * @param N - number of columns in `A`
+ * @param k - starting index for the anti-diagonal
+ * @param alpha - scalar constant
+ * @param A - input matrix as a linear array
+ * @param strideA1 - stride length for the first dimension of `A`
+ * @param strideA2 - stride length for the second dimension of `A`
+ * @param offsetA - starting index for `A`
+ * @returns `A`
+ *
+ * @example
+ * var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ *
+ * gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, 0 );
+ * // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+ */
+ ndarray( M: number, N: number, k: number, alpha: T, A: Collection, strideA1: number, strideA2: number, offsetA: number ): Collection;
+}
+
+/**
+* Fills the anti-diagonal of a matrix with a specified scalar constant.
+*
+* @param order - storage layout
+* @param M - number of rows in `A`
+* @param N - number of columns in `A`
+* @param k - starting index for the anti-diagonal
+* @param alpha - scalar constant
+* @param A - input matrix
+* @param LDA - stride of the first dimension of `A`
+* @returns `A`
+*
+* @example
+* var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3 );
+* // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+*
+* @example
+* var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, 0 );
+* // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+*/
+declare var gfillAntiDiagonal: Routine;
+
+
+// EXPORTS //
+
+export = gfillAntiDiagonal;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/docs/types/test.ts
new file mode 100644
index 000000000000..a5ab77cf798e
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/docs/types/test.ts
@@ -0,0 +1,218 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import AccessorArray = require( '@stdlib/array/base/accessor' );
+import gfillAntiDiagonal = require( './index' );
+
+
+// TESTS //
+
+// The function returns a collection...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3 ); // $ExpectType Collection
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, new AccessorArray( A ), 2 ); // $ExpectType AccessorArrayLike
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a string...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal( 10, 2, 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( true, 2, 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( null, 2, 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( undefined, 2, 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( [], 2, 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( {}, 2, 3, 0, 7.0, A, 3 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal( 'row-major', '2', 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', true, 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', null, 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', undefined, 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', [], 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', {}, 3, 0, 7.0, A, 3 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal( 'row-major', 2, '3', 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, true, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, null, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, undefined, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, [], 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, {}, 0, 7.0, A, 3 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal( 'row-major', 2, 3, '0', 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, true, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, null, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, undefined, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, [], 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, {}, 7.0, A, 3 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a sixth argument which is not a collection...
+{
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, 10, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, true, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, null, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, undefined, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, {}, 3 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a seventh argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, '3' ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, true ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, null ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, undefined ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, [] ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal(); // $ExpectError
+ gfillAntiDiagonal( 'row-major' ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0 ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A ); // $ExpectError
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3, 10 ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a collection...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, 0 ); // $ExpectType Collection
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, new AccessorArray( A ), 3, 1, 0 ); // $ExpectType AccessorArrayLike
+}
+
+// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal.ndarray( '2', 3, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( true, 3, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( null, 3, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( undefined, 3, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( [], 3, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( {}, 3, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a second argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal.ndarray( 2, '3', 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, true, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, null, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, undefined, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, [], 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, {}, 0, 7.0, A, 3, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal.ndarray( 2, 3, '0', 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, true, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, null, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, undefined, 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, [], 7.0, A, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, {}, 7.0, A, 3, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a collection...
+{
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, 10, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, true, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, null, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, undefined, 3, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, {}, 3, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, '3', 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, true, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, null, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, undefined, 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, [], 1, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, {}, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, '1', 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, true, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, null, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, undefined, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, [], 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, {}, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a number...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, '0' ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, true ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, null ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, undefined ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, [] ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const A = new Float64Array( 6 );
+
+ gfillAntiDiagonal.ndarray(); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1 ); // $ExpectError
+ gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, 0, 10 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/examples/index.js
new file mode 100644
index 000000000000..2f0e3229a5ac
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/examples/index.js
@@ -0,0 +1,30 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var uniform = require( '@stdlib/random/array/uniform' );
+var gfillAntiDiagonal = require( './../lib' );
+
+var A = uniform( 6, -100, 100, {
+ 'dtype': 'float64'
+});
+console.log( A );
+
+gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3 );
+console.log( A );
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/lib/index.js
new file mode 100644
index 000000000000..015b1df1e678
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/lib/index.js
@@ -0,0 +1,57 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/**
+* Fill the anti-diagonal of a matrix with a specified scalar constant.
+*
+* @module @stdlib/blas/ext/base/gfill-anti-diagonal
+*
+* @example
+* var gfillAntiDiagonal = require( '@stdlib/blas/ext/base/gfill-anti-diagonal' );
+*
+* var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3 );
+* // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+*
+* @example
+* var gfillAntiDiagonal = require( '@stdlib/blas/ext/base/gfill-anti-diagonal' );
+*
+* var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gfillAntiDiagonal.ndarray( 2, 3, 0, 7.0, A, 3, 1, 0 );
+* // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+*/
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var main = require( './main.js' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+setReadOnly( main, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/lib/main.js
new file mode 100644
index 000000000000..727afae5b005
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/lib/main.js
@@ -0,0 +1,80 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var isLayout = require( '@stdlib/blas/base/assert/is-layout' );
+var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' );
+var format = require( '@stdlib/string/format' );
+var max = require( '@stdlib/math/base/special/fast/max' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+/**
+* Fills the anti-diagonal of a matrix with a specified scalar constant.
+*
+* @param {string} order - storage layout
+* @param {PositiveInteger} M - number of rows in `A`
+* @param {PositiveInteger} N - number of columns in `A`
+* @param {integer} k - starting index for the anti-diagonal
+* @param {*} alpha - scalar constant
+* @param {Collection} A - input matrix
+* @param {integer} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+* @throws {TypeError} first argument must be a valid order
+* @throws {RangeError} seventh argument must be greater than or equal to max(1,M) for column-major or max(1,N) for row-major
+* @returns {Collection} input matrix
+*
+* @example
+* var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3 );
+* // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+*/
+function gfillAntiDiagonal( order, M, N, k, alpha, A, LDA ) {
+ var strideA1;
+ var strideA2;
+ var s;
+
+ if ( !isLayout( order ) ) {
+ throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) );
+ }
+
+ if ( isColumnMajor( order ) ) {
+ s = M;
+ strideA1 = 1;
+ strideA2 = LDA;
+ } else { // order === 'row-major'
+ s = N;
+ strideA1 = LDA;
+ strideA2 = 1;
+ }
+ if ( LDA < max( 1, s ) ) {
+ throw new RangeError( format( 'invalid argument. Seventh argument must be greater than or equal to max(1,%d). Value: `%d`.', s, LDA ) );
+ }
+
+ return ndarray( M, N, k, alpha, A, strideA1, strideA2, 0 );
+}
+
+
+// EXPORTS //
+
+module.exports = gfillAntiDiagonal;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/lib/ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/lib/ndarray.js
new file mode 100644
index 000000000000..dfb981f8a146
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/lib/ndarray.js
@@ -0,0 +1,98 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var gfill = require( '@stdlib/blas/ext/base/gfill' ).ndarray;
+var min = require( '@stdlib/math/base/special/fast/min' );
+
+
+// MAIN //
+
+/**
+* Fills the anti-diagonal of a matrix with a specified scalar constant using alternative indexing semantics.
+*
+* @param {PositiveInteger} M - number of rows in `A`
+* @param {PositiveInteger} N - number of columns in `A`
+* @param {integer} k - starting index for the anti-diagonal
+* @param {*} alpha - scalar constant
+* @param {Collection} A - input matrix
+* @param {integer} strideA1 - stride length for the first dimension of `A`
+* @param {integer} strideA2 - stride length for the second dimension of `A`
+* @param {NonNegativeInteger} offsetA - starting index for `A`
+* @returns {Collection} input matrix
+*
+* @example
+* var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gfillAntiDiagonal( 2, 3, 0, 7.0, A, 3, 1, 0 );
+* // A => [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ]
+*
+* @example
+* var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gfillAntiDiagonal( 2, 3, 1, 8.0, A, 3, 1, 0 );
+* // A => [ 1.0, 8.0, 3.0, 8.0, 5.0, 6.0 ]
+*
+* @example
+* var A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gfillAntiDiagonal( 2, 3, -1, 9.0, A, 3, 1, 0 );
+* // A => [ 1.0, 2.0, 3.0, 4.0, 5.0, 9.0 ]
+*
+* @example
+* var 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 ];
+*
+* gfillAntiDiagonal( 2, 3, 0, 10.0, A, 4, 1, 5 );
+* // A => [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 10.0, 9.0, 10.0, 10.0, 12.0 ]
+*/
+function gfillAntiDiagonal( M, N, k, alpha, A, strideA1, strideA2, offsetA ) {
+ var dStride;
+ var offset;
+ var nDiag;
+
+ if ( M <= 0 || N <= 0 ) {
+ return A;
+ }
+
+ // Determine the number of elements on the anti-diagonal...
+ if ( k >= 0 ) {
+ nDiag = min( M, N - k );
+ offset = offsetA + ( ( N - 1 - k ) * strideA2 );
+ } else {
+ nDiag = min( M + k, N );
+ offset = offsetA - ( k * strideA1 ) + ( ( N - 1 ) * strideA2 );
+ }
+
+ if ( nDiag <= 0 ) {
+ return A;
+ }
+
+ // The anti-diagonal stride moves down one row and left one column:
+ dStride = strideA1 - strideA2;
+
+ // Fill the anti-diagonal:
+ return gfill( nDiag, alpha, A, dStride, offset );
+}
+
+
+// EXPORTS //
+
+module.exports = gfillAntiDiagonal;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/package.json b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/package.json
new file mode 100644
index 000000000000..1beb5d2bce7a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "@stdlib/blas/ext/base/gfill-anti-diagonal",
+ "version": "0.0.0",
+ "description": "Fill the anti-diagonal of a matrix with a specified scalar constant.",
+ "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",
+ "blas",
+ "extended",
+ "fill",
+ "anti-diagonal",
+ "assign",
+ "set",
+ "matrix",
+ "constant",
+ "strided",
+ "array",
+ "ndarray"
+ ],
+ "__stdlib__": {}
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/test/test.js
new file mode 100644
index 000000000000..5cbd73908ba2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/test/test.js
@@ -0,0 +1,38 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var gfillAntiDiagonal = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof gfillAntiDiagonal, '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 gfillAntiDiagonal.ndarray, 'function', 'method is a function' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/test/test.main.js b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/test/test.main.js
new file mode 100644
index 000000000000..652dd2c8ada6
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/test/test.main.js
@@ -0,0 +1,444 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float64Array = require( '@stdlib/array/float64' );
+var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+var gfillAntiDiagonal = require( './../lib/main.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof gfillAntiDiagonal, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function throws an error if provided an invalid order', function test( t ) {
+ var values;
+ var A;
+ var i;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ values = [
+ 'foo',
+ 'bar',
+ -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() {
+ gfillAntiDiagonal( value, 2, 3, 0, 7.0, A, 3 );
+ };
+ }
+});
+
+tape( 'the function throws an error if LDA is less than max(1, M) for column-major', function test( t ) {
+ var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ t.throws( badValue, RangeError, 'throws an error when LDA < M' );
+ t.end();
+
+ function badValue() {
+ gfillAntiDiagonal( 'column-major', 3, 2, 0, 7.0, A, 2 );
+ }
+});
+
+tape( 'the function throws an error if LDA is less than max(1, N) for row-major', function test( t ) {
+ var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ t.throws( badValue, RangeError, 'throws an error when LDA < N' );
+ t.end();
+
+ function badValue() {
+ gfillAntiDiagonal( 'row-major', 2, 5, 0, 7.0, A, 3 );
+ }
+});
+
+tape( 'the function has an arity of 7', function test( t ) {
+ t.strictEqual( gfillAntiDiagonal.length, 7, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the input matrix', function test( t ) {
+ var out;
+ var A;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ out = gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3 );
+
+ t.strictEqual( out, A, 'returns input matrix' );
+ t.end();
+});
+
+tape( 'the function handles empty matrices (M <= 0)', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ gfillAntiDiagonal( 'row-major', 0, 3, 0, 7.0, A, 3 );
+
+ t.deepEqual( A, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function handles empty matrices (N <= 0)', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ gfillAntiDiagonal( 'row-major', 2, 0, 0, 7.0, A, 3 );
+
+ t.deepEqual( A, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function handles out-of-range anti-diagonal offsets', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ gfillAntiDiagonal( 'row-major', 2, 3, 10, 7.0, A, 3 );
+
+ t.deepEqual( A, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function handles out-of-range negative anti-diagonal offsets', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ gfillAntiDiagonal( 'row-major', 2, 3, -5, 7.0, A, 3 );
+
+ t.deepEqual( A, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a row-major matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 7.0,
+ 4.0,
+ 7.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, A, 3 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a row-major matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ expected = [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ];
+
+ gfillAntiDiagonal( 'row-major', 2, 3, 0, 7.0, toAccessorArray( A ), 3 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills an upper anti-diagonal of a row-major matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 7.0,
+ 3.0,
+ 7.0,
+ 5.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 'row-major', 2, 3, 1, 7.0, A, 3 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills an upper anti-diagonal of a row-major matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ expected = [ 1.0, 7.0, 3.0, 7.0, 5.0, 6.0 ];
+
+ gfillAntiDiagonal( 'row-major', 2, 3, 1, 7.0, toAccessorArray( A ), 3 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a lower anti-diagonal of a row-major matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 8.0
+ ]);
+
+ gfillAntiDiagonal( 'row-major', 2, 3, -1, 8.0, A, 3 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a lower anti-diagonal of a row-major matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ expected = [ 1.0, 2.0, 3.0, 4.0, 5.0, 8.0 ];
+
+ gfillAntiDiagonal( 'row-major', 2, 3, -1, 8.0, toAccessorArray( A ), 3 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills an upper anti-diagonal of a column-major matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 5.0,
+ 3.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 7.0,
+ 7.0,
+ 5.0,
+ 3.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 'column-major', 2, 3, 1, 7.0, A, 2 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills an upper anti-diagonal of a column-major matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ];
+ expected = [ 1.0, 7.0, 7.0, 5.0, 3.0, 6.0 ];
+
+ gfillAntiDiagonal( 'column-major', 2, 3, 1, 7.0, toAccessorArray( A ), 2 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a lower anti-diagonal of a column-major matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 5.0,
+ 3.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 5.0,
+ 3.0,
+ 8.0
+ ]);
+
+ gfillAntiDiagonal( 'column-major', 2, 3, -1, 8.0, A, 2 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a lower anti-diagonal of a column-major matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ];
+ expected = [ 1.0, 4.0, 2.0, 5.0, 3.0, 8.0 ];
+
+ gfillAntiDiagonal( 'column-major', 2, 3, -1, 8.0, toAccessorArray( A ), 2 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a column-major matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 5.0,
+ 3.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 7.0,
+ 7.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 'column-major', 2, 3, 0, 7.0, A, 2 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a column-major matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ];
+ expected = [ 1.0, 4.0, 2.0, 7.0, 7.0, 6.0 ];
+
+ gfillAntiDiagonal( 'column-major', 2, 3, 0, 7.0, toAccessorArray( A ), 2 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a 3x3 matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 7.0,
+ 4.0,
+ 7.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0
+ ]);
+
+ gfillAntiDiagonal( 'row-major', 3, 3, 0, 7.0, A, 3 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a 3x3 matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 ];
+ expected = [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0, 7.0, 8.0, 9.0 ];
+
+ gfillAntiDiagonal( 'row-major', 3, 3, 0, 7.0, toAccessorArray( A ), 3 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/test/test.ndarray.js
new file mode 100644
index 000000000000..1f24cab1fbc2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gfill-anti-diagonal/test/test.ndarray.js
@@ -0,0 +1,867 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float64Array = require( '@stdlib/array/float64' );
+var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+var gfillAntiDiagonal = require( './../lib/ndarray.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof gfillAntiDiagonal, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 8', function test( t ) {
+ t.strictEqual( gfillAntiDiagonal.length, 8, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns the input matrix', function test( t ) {
+ var out;
+ var A;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ out = gfillAntiDiagonal( 2, 3, 0, 7.0, A, 3, 1, 0 );
+
+ t.strictEqual( out, A, 'returns input matrix' );
+ t.end();
+});
+
+tape( 'the function handles empty matrices (M <= 0)', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ gfillAntiDiagonal( 0, 3, 0, 7.0, A, 3, 1, 0 );
+
+ t.deepEqual( A, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function handles empty matrices (N <= 0)', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ gfillAntiDiagonal( 2, 0, 0, 7.0, A, 3, 1, 0 );
+
+ t.deepEqual( A, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function handles out-of-range anti-diagonal offsets', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+
+ gfillAntiDiagonal( 2, 3, 10, 7.0, A, 3, 1, 0 );
+
+ t.deepEqual( A, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function handles out-of-bounds k with extended array', function test( t ) {
+ var expected;
+ var A;
+
+ A = [
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ];
+ expected = [
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ];
+
+ gfillAntiDiagonal( 2, 3, 5, 9.0, toAccessorArray( A ), 3, 1, 0 );
+
+ t.deepEqual( A, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 7.0,
+ 4.0,
+ 7.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, 0, 7.0, A, 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ expected = [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0 ];
+
+ gfillAntiDiagonal( 2, 3, 0, 7.0, toAccessorArray( A ), 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills an upper anti-diagonal of a matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 7.0,
+ 3.0,
+ 7.0,
+ 5.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, 1, 7.0, A, 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills an upper anti-diagonal of a matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ expected = [ 1.0, 8.0, 3.0, 8.0, 5.0, 6.0 ];
+
+ gfillAntiDiagonal( 2, 3, 1, 8.0, toAccessorArray( A ), 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a lower anti-diagonal of a matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 8.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, -1, 8.0, A, 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a lower anti-diagonal of a matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ expected = [ 1.0, 2.0, 3.0, 4.0, 5.0, 8.0 ];
+
+ gfillAntiDiagonal( 2, 3, -1, 8.0, toAccessorArray( A ), 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles offset parameter', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 9.0,
+ 9.0,
+ 10.0,
+ 9.0,
+ 12.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, 0, 9.0, A, 4, 1, 5 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles offset parameter (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ 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 ];
+ expected = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 9.0, 9.0, 10.0, 9.0, 12.0 ];
+
+ gfillAntiDiagonal( 2, 3, 0, 9.0, toAccessorArray( A ), 4, 1, 5 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a 3x3 matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 7.0,
+ 4.0,
+ 7.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0
+ ]);
+
+ gfillAntiDiagonal( 3, 3, 0, 7.0, A, 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a 3x3 matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 ];
+ expected = [ 1.0, 2.0, 7.0, 4.0, 7.0, 6.0, 7.0, 8.0, 9.0 ];
+
+ gfillAntiDiagonal( 3, 3, 0, 7.0, toAccessorArray( A ), 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a column-major matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 5.0,
+ 3.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 7.0,
+ 7.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, 0, 7.0, A, 1, 2, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills the main anti-diagonal of a column-major matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ];
+ expected = [ 1.0, 4.0, 2.0, 7.0, 7.0, 6.0 ];
+
+ gfillAntiDiagonal( 2, 3, 0, 7.0, toAccessorArray( A ), 1, 2, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills an upper anti-diagonal of a column-major matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 5.0,
+ 3.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 7.0,
+ 7.0,
+ 5.0,
+ 3.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, 1, 7.0, A, 1, 2, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills an upper anti-diagonal of a column-major matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ];
+ expected = [ 1.0, 7.0, 7.0, 5.0, 3.0, 6.0 ];
+
+ gfillAntiDiagonal( 2, 3, 1, 7.0, toAccessorArray( A ), 1, 2, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a lower anti-diagonal of a column-major matrix', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 5.0,
+ 3.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 4.0,
+ 2.0,
+ 5.0,
+ 3.0,
+ 8.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, -1, 8.0, A, 1, 2, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a lower anti-diagonal of a column-major matrix (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ];
+ expected = [ 1.0, 4.0, 2.0, 5.0, 3.0, 8.0 ];
+
+ gfillAntiDiagonal( 2, 3, -1, 8.0, toAccessorArray( A ), 1, 2, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles mixed strides (row-major)', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 6.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 6.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, 0, 6.0, A, 5, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles mixed strides (row-major, accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ 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
+ ];
+ expected = [
+ 1.0,
+ 2.0,
+ 6.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 6.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ];
+
+ gfillAntiDiagonal( 2, 3, 0, 6.0, toAccessorArray( A ), 5, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles mixed strides (column-major)', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 6.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, 0, 6.0, A, 1, 4, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles mixed strides (column-major, accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ 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 ];
+ expected = [
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 6.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ];
+
+ gfillAntiDiagonal( 2, 3, 0, 6.0, toAccessorArray( A ), 1, 4, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles negative strides', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 6.0,
+ 4.0,
+ 6.0,
+ 6.0,
+ 6.0,
+ 8.0,
+ 9.0
+ ]);
+
+ gfillAntiDiagonal( 3, 3, 0, 6.0, A, -3, -1, 8 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles negative strides (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 ];
+ expected = [ 1.0, 2.0, 6.0, 4.0, 6.0, 6.0, 6.0, 8.0, 9.0 ];
+
+ gfillAntiDiagonal( 3, 3, 0, 6.0, toAccessorArray( A ), -3, -1, 8 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a tall matrix (M > N)', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 9.0,
+ 3.0,
+ 9.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0
+ ]);
+
+ gfillAntiDiagonal( 3, 2, 0, 9.0, A, 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function fills a tall matrix (M > N, accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ A = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 ];
+ expected = [ 1.0, 9.0, 3.0, 9.0, 5.0, 6.0, 7.0, 8.0, 9.0 ];
+
+ gfillAntiDiagonal( 3, 2, 0, 9.0, toAccessorArray( A ), 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles negative boundary k value (k <= -M)', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, -2, 9.0, A, 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles upper boundary k value (k=N-1)', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 8.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, 2, 8.0, A, 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles lower boundary k value (k=-(M-1))', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 8.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, -1, 8.0, A, 3, 1, 0 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles offset with column-major layout', function test( t ) {
+ var expected;
+ var A;
+
+ A = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ]);
+ expected = new Float64Array([
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 9.0,
+ 7.0,
+ 9.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ]);
+
+ gfillAntiDiagonal( 2, 3, 0, 9.0, A, 1, 3, 1 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function handles offset with column-major layout (accessors)', function test( t ) {
+ var expected;
+ var A;
+
+ 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
+ ];
+ expected = [
+ 1.0,
+ 2.0,
+ 3.0,
+ 4.0,
+ 5.0,
+ 9.0,
+ 7.0,
+ 9.0,
+ 9.0,
+ 10.0,
+ 11.0,
+ 12.0
+ ];
+
+ gfillAntiDiagonal( 2, 3, 0, 9.0, toAccessorArray( A ), 1, 3, 1 );
+ t.deepEqual( A, expected, 'returns expected value' );
+
+ t.end();
+});