From 733d77fbe45a0dd2b19589661696c658a7bd1da5 Mon Sep 17 00:00:00 2001 From: 0PrashantYadav0 Date: Tue, 18 Aug 2026 10:27:55 +0530 Subject: [PATCH 1/2] feat: add @stdlib/blas/ext/base/nannsum/results/factory --- .../base/nannsum/results/factory/README.md | 125 +++++ .../results/factory/benchmark/benchmark.js | 106 ++++ .../nannsum/results/factory/docs/repl.txt | 24 + .../results/factory/docs/types/index.d.ts | 141 +++++ .../results/factory/docs/types/test.ts | 54 ++ .../nannsum/results/factory/examples/index.js | 41 ++ .../base/nannsum/results/factory/lib/index.js | 48 ++ .../base/nannsum/results/factory/lib/main.js | 357 +++++++++++++ .../base/nannsum/results/factory/package.json | 69 +++ .../base/nannsum/results/factory/test/test.js | 503 ++++++++++++++++++ 10 files changed, 1468 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/README.md create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/examples/index.js create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/index.js create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/main.js create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/package.json create mode 100644 lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/test/test.js diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/README.md b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/README.md new file mode 100644 index 000000000000..792e03d05143 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/README.md @@ -0,0 +1,125 @@ + + +# resultsFactory + +> Create a new constructor for creating a NaN-aware summation results object. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var resultsFactory = require( '@stdlib/blas/ext/base/nannsum/results/factory' ); +``` + +#### resultsFactory( dtype ) + +Returns a new constructor for creating a NaN-aware summation results object. + +```javascript +var Results = resultsFactory( 'float64' ); +// returns + +var r = new Results(); +// returns +``` + +The function supports the following parameters: + +- **dtype**: floating-point data type for storing floating-point results. Must be either `'float64'` or `'float32'`. + +
+ + + + + +
+ +## Notes + +- A results object is a [`struct`][@stdlib/dstructs/struct] providing a fixed-width composite data structure for storing NaN-aware summation results and providing an ABI-stable data layout for JavaScript-C interoperation. + +
+ + + + + +
+ +## Examples + + + +```javascript +var BigInt = require( '@stdlib/bigint/ctor' ); +var resultsFactory = require( '@stdlib/blas/ext/base/nannsum/results/factory' ); + +var Results = resultsFactory( 'float64' ); +var results = new Results({ + 'sum': 11.7586, + 'count': BigInt( 5 ) +}); + +var str = results.toString(); +console.log( str ); +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/benchmark/benchmark.js new file mode 100644 index 000000000000..da460afad89d --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/benchmark/benchmark.js @@ -0,0 +1,106 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2020 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 isFunction = require( '@stdlib/assert/is-function' ); +var isObject = require( '@stdlib/assert/is-object' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var factory = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var values; + var v; + var i; + + values = [ + 'float64', + 'float32' + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = factory( values[ i%values.length ] ); + if ( typeof v !== 'function' ) { + b.fail( 'should return a function' ); + } + } + b.toc(); + if ( !isFunction( v ) ) { + b.fail( 'should return a function' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( format( '%s::constructor,new', pkg ), function benchmark( b ) { + var values; + var v; + var i; + + values = [ + factory( 'float64' ), + factory( 'float32' ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = new ( values[ i%values.length ] )(); + if ( typeof v !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !isObject( v ) ) { + b.fail( 'should return an object' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( format( '%s::constructor,no_new', pkg ), function benchmark( b ) { + var values; + var v; + var i; + + values = [ + factory( 'float64' ), + factory( 'float32' ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = values[ i%values.length ](); + if ( typeof v !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !isObject( v ) ) { + b.fail( 'should return an object' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/repl.txt new file mode 100644 index 000000000000..a69cd5027339 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/repl.txt @@ -0,0 +1,24 @@ + +{{alias}}( dtype ) + Returns a constructor for creating a NaN-aware summation results object. + + Parameters + ---------- + dtype: string + Floating-point data type for storing floating-point results. + + Returns + ------- + fcn: Function + Results constructor. + + Examples + -------- + > var R = {{alias}}( 'float64' ); + > var r = new R(); + > r.toString() + + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/index.d.ts new file mode 100644 index 000000000000..76d3b7eb28b8 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/index.d.ts @@ -0,0 +1,141 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2020 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 + +/** +* Interface describing NaN-aware summation results. +*/ +interface Results { + /** + * Sum of non-NaN elements. + */ + sum?: number; + + /** + * Number of non-NaN elements. + */ + count?: bigint; +} + +/** +* Interface describing options when serializing a results object to a string. +*/ +interface ToStringOptions { + /** + * Number of digits to display after decimal points. Default: `4`. + */ + digits?: number; +} + +/** +* Interface describing a results data structure. +*/ +declare class ResultsStruct { + /** + * Results constructor. + * + * @param arg - buffer or data object + * @param byteOffset - byte offset + * @param byteLength - maximum byte length + * @returns results + */ + constructor( arg?: ArrayBuffer | Results, byteOffset?: number, byteLength?: number ); + + /** + * Sum of non-NaN elements. + */ + sum: number; + + /** + * Number of non-NaN elements. + */ + count: bigint; + + /** + * Method name. + */ + method: string; + + /** + * Serializes a results object as a formatted string. + * + * @param options - options object + * @returns serialized results + */ + toString( options?: ToStringOptions ): string; + + /** + * Serializes a results object as a JSON object. + * + * @returns serialized object + */ + toJSON(): object; + + /** + * Returns a DataView of a results object. + * + * @returns DataView + */ + toDataView(): DataView; +} + +/** +* Interface defining a results constructor which is both "newable" and "callable". +*/ +interface ResultsConstructor { + /** + * Results constructor. + * + * @param arg - buffer or data object + * @param byteOffset - byte offset + * @param byteLength - maximum byte length + * @returns results object + */ + new( arg?: ArrayBuffer | Results, byteOffset?: number, byteLength?: number ): ResultsStruct; + + /** + * Results constructor. + * + * @param arg - buffer or data object + * @param byteOffset - byte offset + * @param byteLength - maximum byte length + * @returns results object + */ + ( arg?: ArrayBuffer | Results, byteOffset?: number, byteLength?: number ): ResultsStruct; +} + +/** +* Returns a new results constructor for creating a NaN-aware summation results object. +* +* @param dtype - floating-point data type for storing floating-point results +* @returns results constructor +* +* @example +* var Results = resultsFactory( 'float64' ); +* // returns +* +* var r = new Results(); +* // returns +*/ +declare function resultsFactory( dtype: 'float64' | 'float32' ): ResultsConstructor; + + +// EXPORTS // + +export = resultsFactory; diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/test.ts new file mode 100644 index 000000000000..d4e050ec149e --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/test.ts @@ -0,0 +1,54 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2020 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 resultsFactory = require( './index' ); + + +// TESTS // + +// The function returns a function... +{ + resultsFactory( 'float64' ); // $ExpectType ResultsConstructor + resultsFactory( 'float32' ); // $ExpectType ResultsConstructor +} + +// The compiler throws an error if not provided a supported data type... +{ + resultsFactory( 10 ); // $ExpectError + resultsFactory( true ); // $ExpectError + resultsFactory( false ); // $ExpectError + resultsFactory( null ); // $ExpectError + resultsFactory( undefined ); // $ExpectError + resultsFactory( [] ); // $ExpectError + resultsFactory( {} ); // $ExpectError + resultsFactory( ( x: number ): number => x ); // $ExpectError +} + +// The function returns a function which returns a results object... +{ + const Results = resultsFactory( 'float64' ); + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const r1 = new Results( new ArrayBuffer( 80 ) ); // $ExpectType ResultsStruct + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const r2 = new Results( new ArrayBuffer( 80 ), 8 ); // $ExpectType ResultsStruct + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const r3 = new Results( new ArrayBuffer( 80 ), 8, 16 ); // $ExpectType ResultsStruct +} diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/examples/index.js new file mode 100644 index 000000000000..e6ec4d2e2917 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/examples/index.js @@ -0,0 +1,41 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2020 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 BigInt = require( '@stdlib/bigint/ctor' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var resultsFactory = require( './../lib' ); + +var Results = resultsFactory( 'float64' ); +var results = new Results({ + 'sum': 11.7586, + 'count': BigInt( 5 ) +}); + +var str = results.toString(); +console.log( str ); + +Results = resultsFactory( 'float32' ); +results = new Results({ + 'sum': f32( 11.7586 ), + 'count': BigInt( 5 ) +}); + +str = results.toString(); +console.log( str ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/index.js new file mode 100644 index 000000000000..ece00337d441 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/index.js @@ -0,0 +1,48 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2020 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'; + +/** +* Return a constructor for creating a NaN-aware summation results object. +* +* @module @stdlib/blas/ext/base/nannsum/results/factory +* +* @example +* var resultsFactory = require( '@stdlib/blas/ext/base/nannsum/results/factory' ); +* +* var Results = resultsFactory( 'float64' ); +* +* var results = new Results(); +* // returns +* +* results.sum = 11.7586; +* results.count = 5; +* +* var str = results.toString(); +* // returns +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/main.js new file mode 100644 index 000000000000..652868a00c72 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/main.js @@ -0,0 +1,357 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2020 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 no-invalid-this, no-restricted-syntax */ + +'use strict'; + +// MODULES // + +var isArrayBuffer = require( '@stdlib/assert/is-arraybuffer' ); +var isObject = require( '@stdlib/assert/is-object' ); +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var setReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' ); +var contains = require( '@stdlib/array/base/assert/contains' ).factory; +var join = require( '@stdlib/array/base/join' ); +var inherit = require( '@stdlib/utils/inherit' ); +var structFactory = require( '@stdlib/blas/ext/base/nannsum/results/struct-factory' ); +var res2json = require( '@stdlib/blas/ext/base/nannsum/results/to-json' ); +var res2str = require( '@stdlib/blas/ext/base/nannsum/results/to-string' ); +var format = require( '@stdlib/string/format' ); + + +// VARIABLES // + +var DTYPES = [ + 'float64', + 'float32' +]; + +var isDataType = contains( DTYPES ); + + +// MAIN // + +/** +* Returns a constructor for creating a NaN-aware summation results object. +* +* @param {string} dtype - storage data type for floating-point values +* @throws {TypeError} first argument must be a supported data type +* @returns {Function} constructor +* +* @example +* var Results = factory( 'float64' ); +* +* var results = new Results(); +* // returns +* +* results.sum = 11.7586; +* results.count = 5; +* +* var str = results.toString(); +* // returns +*/ +function factory( dtype ) { + var Struct; + + if ( !isDataType( dtype ) ) { + throw new TypeError( format( 'invalid argument. First argument must be one of the following: "%s". Value: `%s`.', join( DTYPES, ', ' ), dtype ) ); + } + + // Create a struct constructor: + Struct = structFactory( dtype ); + + /** + * Returns a NaN-aware summation results object. + * + * @private + * @constructor + * @param {(ArrayBuffer|Object)} [arg] - underlying byte buffer or a data object + * @param {NonNegativeInteger} [byteOffset] - byte offset + * @param {NonNegativeInteger} [byteLength] - maximum byte length + * @throws {TypeError} first argument must be an ArrayBuffer or a data object + * @returns {Results} results object + */ + function Results( arg, byteOffset, byteLength ) { + var nargs; + var args; + var i; + + nargs = arguments.length; + if ( !( this instanceof Results ) ) { + if ( nargs === 0 ) { + return new Results(); + } + if ( nargs === 1 ) { + return new Results( arg ); + } + if ( nargs === 2 ) { + return new Results( arg, byteOffset ); + } + return new Results( arg, byteOffset, byteLength ); + } + args = []; + if ( nargs > 0 ) { + if ( isArrayBuffer( arg ) ) { + for ( i = 0; i < nargs; i++ ) { + args.push( arguments[ i ] ); + } + } else if ( isObject( arg ) ) { + args.push( arg ); + } else { + throw new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer or a data object. Value: `%s`.', arg ) ); + } + } + // Call the parent constructor... + Struct.apply( this, args ); + return this; + } + + /* + * Inherit from the parent constructor. + */ + inherit( Results, Struct ); + + /** + * Constructor name. + * + * @private + * @name name + * @memberof Results + * @readonly + * @type {string} + */ + setReadOnly( Results, 'name', Struct.name ); + + /** + * Alignment. + * + * @private + * @name alignment + * @memberof Results + * @readonly + * @type {PositiveInteger} + */ + setReadOnly( Results, 'alignment', Struct.alignment ); + + /** + * Size (in bytes) of the `struct`. + * + * @private + * @name byteLength + * @memberof Results + * @readonly + * @type {PositiveInteger} + */ + setReadOnly( Results, 'byteLength', Struct.byteLength ); + + /** + * Returns a list of `struct` fields. + * + * @private + * @name fields + * @memberof Results + * @readonly + * @type {Array} + */ + setReadOnlyAccessor( Results, 'fields', function get() { + return Struct.fields; + }); + + /** + * Returns a string corresponding to the `struct` layout. + * + * @private + * @name layout + * @memberof Results + * @readonly + * @type {string} + */ + setReadOnlyAccessor( Results, 'layout', function get() { + return Struct.layout; + }); + + /** + * Returns the underlying byte buffer of a `struct`. + * + * @private + * @name bufferOf + * @memberof Results + * @readonly + * @type {Function} + * @param {Object} obj - struct instance + * @throws {TypeError} must provide a `struct` instance + * @returns {ArrayBuffer} underlying byte buffer + */ + setReadOnly( Results, 'bufferOf', Struct.bufferOf ); + + /** + * Returns the length, in bytes, of the value specified by the provided field name. + * + * @private + * @name byteLengthOf + * @memberof Results + * @readonly + * @type {Function} + * @param {string} name - field name + * @throws {Error} struct must have at least one field + * @throws {TypeError} must provide a recognized field name + * @returns {NonNegativeInteger} byte length + */ + setReadOnly( Results, 'byteLengthOf', Struct.byteLengthOf ); + + /** + * Returns the offset, in bytes, from the beginning of a `struct` to the value specified by the provided field name. + * + * @private + * @name byteOffsetOf + * @memberof Results + * @readonly + * @type {Function} + * @param {string} name - field name + * @throws {Error} struct must have at least one field + * @throws {TypeError} must provide a recognized field name + * @returns {NonNegativeInteger} byte offset + */ + setReadOnly( Results, 'byteOffsetOf', Struct.byteOffsetOf ); + + /** + * Returns the description associated with a provided field name. + * + * @private + * @name descriptionOf + * @memberof Results + * @readonly + * @type {Function} + * @param {string} name - field name + * @throws {Error} struct must have at least one field + * @throws {TypeError} must provide a recognized field name + * @returns {string} description + */ + setReadOnly( Results, 'descriptionOf', Struct.descriptionOf ); + + /** + * Returns a boolean indicating whether a provided value is a `struct` instance. + * + * @private + * @name isStruct + * @memberof Results + * @readonly + * @type {Function} + * @param {*} value - input value + * @returns {boolean} boolean indicating whether a value is a `struct` instance + */ + setReadOnly( Results, 'isStruct', Struct.isStruct ); + + /** + * Returns the type associated with a provided field name. + * + * @private + * @name typeOf + * @memberof Results + * @readonly + * @type {Function} + * @param {string} name - field name + * @throws {Error} struct must have at least one field + * @throws {TypeError} must provide a recognized field name + * @returns {(string|Object)} type + */ + setReadOnly( Results, 'typeOf', Struct.typeOf ); + + /** + * Returns the underlying byte buffer of a `struct` as a `DataView`. + * + * @private + * @name viewOf + * @memberof Results + * @readonly + * @type {Function} + * @param {Object} obj - struct instance + * @throws {TypeError} must provide a `struct` instance + * @returns {DataView} view of underlying byte buffer + */ + setReadOnly( Results, 'viewOf', Struct.viewOf ); + + /** + * Method name. + * + * @private + * @name method + * @memberof Results.prototype + * @type {string} + * @default 'NaN-aware summation' + */ + setReadOnly( Results.prototype, 'method', 'NaN-aware summation' ); + + /** + * Serializes a results object as a string. + * + * @private + * @name toString + * @memberof Results.prototype + * @type {Function} + * @param {Options} [opts] - options object + * @param {PositiveInteger} [opts.digits=4] - number of digits after the decimal point + * @throws {TypeError} options argument must be an object + * @throws {TypeError} must provide valid options + * @returns {string} serialized results + */ + setReadOnly( Results.prototype, 'toString', function toString( opts ) { + if ( arguments.length ) { + return res2str( this, opts ); + } + return res2str( this ); + }); + + /** + * Serializes a results object as a JSON object. + * + * ## Notes + * + * - `JSON.stringify()` implicitly calls this method when stringifying a `Results` instance. + * + * @private + * @name toJSON + * @memberof Results.prototype + * @type {Function} + * @returns {Object} serialized object + */ + setReadOnly( Results.prototype, 'toJSON', function toJSON() { + return res2json( this ); + }); + + /** + * Returns a DataView of a results object. + * + * @private + * @name toDataView + * @memberof Results.prototype + * @type {Function} + * @returns {DataView} DataView + */ + setReadOnly( Results.prototype, 'toDataView', function toDataView() { + return Struct.viewOf( this ); + }); + + return Results; +} + + +// EXPORTS // + +module.exports = factory; diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/package.json b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/package.json new file mode 100644 index 000000000000..371361952e2d --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/package.json @@ -0,0 +1,69 @@ +{ + "name": "@stdlib/blas/ext/base/nannsum/results/factory", + "version": "0.0.0", + "description": "Return a constructor for creating a NaN-aware summation results object.", + "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", + "blas", + "linear", + "algebra", + "linalg", + "nannsum", + "nan", + "sum", + "utilities", + "utility", + "utils", + "util", + "constructor", + "ctor", + "results" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/test/test.js new file mode 100644 index 000000000000..671e2fc1c037 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/test/test.js @@ -0,0 +1,503 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2020 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 BigInt = require( '@stdlib/bigint/ctor' ); +var Number = require( '@stdlib/number/ctor' ); +var isDataView = require( '@stdlib/assert/is-dataview' ); +var isStringArray = require( '@stdlib/assert/is-string-array' ).primitives; +var ArrayBuffer = require( '@stdlib/array/buffer' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var resultsFactory = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof resultsFactory, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function throws an error if provided a first argument which is not a supported data type', function test( t ) { + var values; + var i; + + values = [ + '5', + 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() { + resultsFactory( value ); + }; + } +}); + +tape( 'the function returns a constructor which throws an error if provided a first argument which is not an ArrayBuffer or data object', function test( t ) { + var results; + var values; + var i; + + results = resultsFactory( 'float64' ); + + values = [ + '5', + 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() { + results( value ); + }; + } +}); + +tape( 'the function returns a constructor which throws an error if provided a second argument which is not a nonnegative integer', function test( t ) { + var results; + var values; + var i; + + results = resultsFactory( 'float64' ); + + values = [ + '5', + -5, + 3.14, + 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() { + results( new ArrayBuffer( 1024 ), value ); + }; + } +}); + +tape( 'the function returns a constructor which throws an error if provided a third argument which is not a nonnegative integer', function test( t ) { + var results; + var values; + var i; + + results = resultsFactory( 'float64' ); + + values = [ + '5', + -5, + 3.14, + 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() { + results( new ArrayBuffer( 1024 ), 0, value ); + }; + } +}); + +tape( 'the function returns a constructor which does not require the `new` operator', function test( t ) { + var results; + var res; + + results = resultsFactory( 'float64' ); + + res = results(); + t.strictEqual( res instanceof results, true, 'returns expected value' ); + + res = results( {} ); + t.strictEqual( res instanceof results, true, 'returns expected value' ); + + res = results( new ArrayBuffer( 1024 ) ); + t.strictEqual( res instanceof results, true, 'returns expected value' ); + + res = results( new ArrayBuffer( 1024 ), 0 ); + t.strictEqual( res instanceof results, true, 'returns expected value' ); + + res = results( new ArrayBuffer( 1024 ), 0, 1024 ); + t.strictEqual( res instanceof results, true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns a constructor for creating a fixed-width results object (dtype=float64)', function test( t ) { + var expected; + var Results; + var actual; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + actual = new Results({ + 'sum': 11.7586, + 'count': BigInt( 5 ) + }); + + expected = { + 'sum': 11.7586, + 'count': 5 + }; + + t.strictEqual( actual instanceof Results, true, 'returns expected value' ); + t.strictEqual( actual.sum, expected.sum, 'returns expected value' ); + t.strictEqual( Number( actual.count ), expected.count, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor for creating a fixed-width results object (dtype=float32)', function test( t ) { + var expected; + var Results; + var actual; + + Results = resultsFactory( 'float32' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + actual = new Results({ + 'sum': f32( 11.7586 ), + 'count': BigInt( 5 ) + }); + + expected = { + 'sum': f32( 11.7586 ), + 'count': 5 + }; + + t.strictEqual( actual instanceof Results, true, 'returns expected value' ); + t.strictEqual( actual.sum, expected.sum, 'returns expected value' ); + t.strictEqual( Number( actual.count ), expected.count, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor for creating a fixed-width results object (no arguments)', function test( t ) { + var expected; + var Results; + var actual; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + actual = new Results(); + + actual.sum = 11.7586; + actual.count = BigInt( 5 ); + + expected = { + 'sum': 11.7586, + 'count': 5 + }; + + t.strictEqual( actual instanceof Results, true, 'returns expected value' ); + t.strictEqual( actual.sum, expected.sum, 'returns expected value' ); + t.strictEqual( Number( actual.count ), expected.count, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor for creating a fixed-width results object (empty object)', function test( t ) { + var expected; + var Results; + var actual; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + actual = new Results( {} ); + + actual.sum = 11.7586; + actual.count = BigInt( 5 ); + + expected = { + 'sum': 11.7586, + 'count': 5 + }; + + t.strictEqual( actual instanceof Results, true, 'returns expected value' ); + t.strictEqual( actual.sum, expected.sum, 'returns expected value' ); + t.strictEqual( Number( actual.count ), expected.count, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor for creating a fixed-width results object (ArrayBuffer)', function test( t ) { + var expected; + var Results; + var actual; + var buf; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + buf = new ArrayBuffer( 1024 ); + actual = new Results( buf ); + + actual.sum = 11.7586; + actual.count = BigInt( 5 ); + + expected = { + 'sum': 11.7586, + 'count': 5 + }; + + t.strictEqual( actual instanceof Results, true, 'returns expected value' ); + t.strictEqual( actual.toDataView().buffer, buf, 'returns expected value' ); + t.strictEqual( actual.toDataView().byteOffset, 0, 'returns expected value' ); + t.strictEqual( actual.sum, expected.sum, 'returns expected value' ); + t.strictEqual( Number( actual.count ), expected.count, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor for creating a fixed-width results object (ArrayBuffer, byteOffset)', function test( t ) { + var expected; + var Results; + var actual; + var buf; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + buf = new ArrayBuffer( 1024 ); + actual = new Results( buf, 16 ); + + actual.sum = 11.7586; + actual.count = BigInt( 5 ); + + expected = { + 'sum': 11.7586, + 'count': 5 + }; + + t.strictEqual( actual instanceof Results, true, 'returns expected value' ); + t.strictEqual( actual.toDataView().buffer, buf, 'returns expected value' ); + t.strictEqual( actual.toDataView().byteOffset, 16, 'returns expected value' ); + t.strictEqual( actual.sum, expected.sum, 'returns expected value' ); + t.strictEqual( Number( actual.count ), expected.count, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor for creating a fixed-width results object (ArrayBuffer, byteOffset, byteLength)', function test( t ) { + var expected; + var Results; + var actual; + var buf; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + buf = new ArrayBuffer( 1024 ); + actual = new Results( buf, 16, 160 ); + + actual.sum = 11.7586; + actual.count = BigInt( 5 ); + + expected = { + 'sum': 11.7586, + 'count': 5 + }; + + t.strictEqual( actual instanceof Results, true, 'returns expected value' ); + t.strictEqual( actual.toDataView().buffer, buf, 'returns expected value' ); + t.strictEqual( actual.toDataView().byteOffset, 16, 'returns expected value' ); + t.strictEqual( actual.sum, expected.sum, 'returns expected value' ); + t.strictEqual( Number( actual.count ), expected.count, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor which returns an instance having a method property', function test( t ) { + var Results; + var results; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + results = new Results(); + + t.strictEqual( results.method, 'NaN-aware summation', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor which returns an instance having a `toString` method', function test( t ) { + var Results; + var results; + var actual; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + results = new Results(); + + actual = results.toString(); + t.strictEqual( typeof actual, 'string', 'returns expected value' ); + + actual = results.toString({ + 'digits': 2 + }); + t.strictEqual( typeof actual, 'string', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor which returns an instance having a `toJSON` method', function test( t ) { + var Results; + var results; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + results = new Results(); + t.strictEqual( typeof results.toJSON, 'function', 'returns expected value' ); + t.strictEqual( typeof results.toJSON(), 'object', 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns a constructor which returns an instance having a `toDataView` method', function test( t ) { + var Results; + var results; + + Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + + results = new Results(); + t.strictEqual( typeof results.toDataView, 'function', 'returns expected value' ); + t.strictEqual( isDataView( results.toDataView() ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns a constructor having a `name` property', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.name, 'string', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having an `alignment` property', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.alignment, 'number', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having a `byteLength` property', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.byteLength, 'number', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having a `fields` property', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( isStringArray( Results.fields ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having a `layout` property', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.layout, 'string', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having a `bufferOf` method', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.bufferOf, 'function', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having a `byteLengthOf` method', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.byteLengthOf, 'function', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having a `byteOffsetOf` method', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.byteOffsetOf, 'function', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having a `descriptionOf` method', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.descriptionOf, 'function', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having an `isStruct` method', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.isStruct, 'function', 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a constructor having a `viewOf` method', function test( t ) { + var Results = resultsFactory( 'float64' ); + t.strictEqual( typeof Results, 'function', 'returns expected value' ); + t.strictEqual( typeof Results.viewOf, 'function', 'returns expected value' ); + t.end(); +}); From 979561b9b47571db6d7ef01789aced99dfe03994 Mon Sep 17 00:00:00 2001 From: 0PrashantYadav0 Date: Tue, 18 Aug 2026 10:32:55 +0530 Subject: [PATCH 2/2] chore: update copyright years --- .../@stdlib/blas/ext/base/nannsum/results/factory/README.md | 2 +- .../ext/base/nannsum/results/factory/benchmark/benchmark.js | 2 +- .../blas/ext/base/nannsum/results/factory/docs/types/index.d.ts | 2 +- .../blas/ext/base/nannsum/results/factory/docs/types/test.ts | 2 +- .../blas/ext/base/nannsum/results/factory/examples/index.js | 2 +- .../@stdlib/blas/ext/base/nannsum/results/factory/lib/index.js | 2 +- .../@stdlib/blas/ext/base/nannsum/results/factory/lib/main.js | 2 +- .../@stdlib/blas/ext/base/nannsum/results/factory/test/test.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/README.md b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/README.md index 792e03d05143..24c8328ca3bf 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2020 The Stdlib Authors. +Copyright (c) 2026 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/benchmark/benchmark.js index da460afad89d..61d8755d75b3 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2020 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/index.d.ts index 76d3b7eb28b8..0668df73c484 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2020 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/test.ts index d4e050ec149e..6e87cd71c035 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2020 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/examples/index.js index e6ec4d2e2917..91ceb14e3532 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/examples/index.js +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2020 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/index.js index ece00337d441..efdf515f5bbf 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/index.js +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2020 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/main.js index 652868a00c72..4be930914832 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/main.js +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/lib/main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2020 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/test/test.js index 671e2fc1c037..92b0ed868333 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/test/test.js +++ b/lib/node_modules/@stdlib/blas/ext/base/nannsum/results/factory/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2020 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.