From 01d87da72d17be7a5ff4f9fd99e4c96892bca9c6 Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 03:45:17 +0530 Subject: [PATCH 01/12] feat:add stats/incr/nanmsumabs2 --- .../@stdlib/stats/incr/nanmsumabs2/README.md | 180 +++++++++++++++ .../incr/nanmsumabs2/benchmark/benchmark.js | 83 +++++++ ...ion_moving_sum_squared_absolute_values.svg | 37 +++ .../stats/incr/nanmsumabs2/docs/repl.text | 48 ++++ .../incr/nanmsumabs2/docs/types/index.d.ts | 74 ++++++ .../stats/incr/nanmsumabs2/docs/types/test.ts | 60 +++++ .../stats/incr/nanmsumabs2/examples/index.js | 37 +++ .../stats/incr/nanmsumabs2/lib/index.js | 50 +++++ .../stats/incr/nanmsumabs2/lib/main.js | 90 ++++++++ .../stats/incr/nanmsumabs2/package.json | 77 +++++++ .../stats/incr/nanmsumabs2/test/test.js | 210 ++++++++++++++++++ 11 files changed, 946 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/img/equation_moving_sum_squared_absolute_values.svg create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/repl.text create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/index.js create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/package.json create mode 100644 lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md new file mode 100644 index 000000000000..5e30bdfe2e66 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md @@ -0,0 +1,180 @@ + + +# incrnanmsumabs2 + +> Compute a moving sum of squared absolute values incrementally, ignoring NaN values. + +
+ +For a window of size `W`, the moving sum of squared absolute values is defined as + + + +```math +s = \sum_{\substack{i=0\\x_i \neq \mathrm{NaN}}}^{W-1} x_i^2 +``` + + + + + +
+ + + +
+ +## Usage + +```javascript +var incrnanmsumabs2 = require( '@stdlib/stats/incr/nanmsumabs2' ); +``` + +#### incrnanmsumabs2( window ) + +Returns an accumulator `function` which incrementally computes a moving sum of squared absolute values, ignoring `NaN` values. The `window` parameter defines the number of values over which to compute the moving sum. + +```javascript +var accumulator = incrnanmsumabs2( 3 ); +``` + +#### accumulator( \[x] ) + +If provided an input value `x`, the accumulator function returns an updated sum. If not provided an input value `x`, the accumulator function returns the current sum. + +```javascript +var accumulator = incrnanmsumabs2( 3 ); + +var sum = accumulator(); +// returns null + +// Fill the window... +sum = accumulator( 2.0 ); // [2.0] +// returns 4.0 + +sum = accumulator( -1.0 ); // [2.0, -1.0] +// returns 5.0 + +sum = accumulator( NaN ); // [2.0, -1.0, NaN] +// returns 5.0 + +sum = accumulator( 3.0 ); // [2.0, -1.0, 3.0] +// returns 14.0 + +// Window begins sliding... +sum = accumulator( -7.0 ); // [-1.0, 3.0, -7.0] +// returns 59.0 + +sum = accumulator( NaN ); // [3.0, -7.0, NaN] +// returns 58.0 + +sum = accumulator(); +// returns 58.0 +``` + +
+ + + +
+ +## Notes + +- Input values are **not** type checked. If non-numeric inputs are possible, you are advised to type check and handle accordingly **before** passing the value to the accumulator function. +- `NaN` values are ignored. +- As `W` values (excluding `NaN` values) are needed to fill the window buffer, the first `W-1` returned values are calculated from smaller sample sizes. Until the window is full, each returned value is calculated from all provided values (excluding `NaN` values). + +
+ + + +
+ +## Examples + + + +```javascript +var randu = require( '@stdlib/random/base/randu' ); +var incrnanmsumabs2 = require( '@stdlib/stats/incr/nanmsumabs2' ); + +var accumulator; +var v; +var i; + +// Initialize an accumulator: +accumulator = incrnanmsumabs2( 5 ); + +// For each simulated datum, update the moving sum... +for ( i = 0; i < 100; i++ ) { + if ( randu() < 0.2 ) { + v = NaN; + } else { + v = ( randu()*100.0 ) - 50.0; + } + accumulator( v ); +} +console.log( accumulator() ); +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js new file mode 100644 index 000000000000..aec83fe3725c --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js @@ -0,0 +1,83 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +'use strict'; +// MODULES // +var bench = require( '@stdlib/bench' ); +var randu = require( '@stdlib/random/base/randu' ); +var pkg = require( '@stdlib/stats/incr/nanmsumabs2/package.json' ).name; +var incrnanmsumabs2 = require( '@stdlib/stats/incr/nanmsumabs2/lib' ); +// MAIN // +bench( pkg, function benchmark( b ) { + var f; + var i; + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + f = incrnanmsumabs2( (i%5)+1 ); + if ( typeof f !== 'function' ) { + b.fail( 'should return a function' ); + } + } + b.toc(); + if ( typeof f !== 'function' ) { + b.fail( 'should return a function' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); +bench( pkg+'::accumulator', function benchmark( b ) { + var acc; + var v; + var i; + acc = incrnanmsumabs2( 5 ); + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = acc( randu()-0.5 ); + if ( v !== v ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( v !== v ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); +bench( pkg+'::accumulator,includes_nan', function benchmark( b ) { + var acc; + var v; + var i; + acc = incrnanmsumabs2( 5 ); + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + if ( i % 10 === 0 ) { + v = acc( NaN ); + } else { + v = acc( randu()-0.5 ); + } + if ( v !== v && i % 10 !== 0 ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( v !== v && b.iterations % 10 !== 0 ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/img/equation_moving_sum_squared_absolute_values.svg b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/img/equation_moving_sum_squared_absolute_values.svg new file mode 100644 index 000000000000..a550903e807e --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/img/equation_moving_sum_squared_absolute_values.svg @@ -0,0 +1,37 @@ + +s equals sigma-summation Underscript i equals 0 Overscript upper W minus 1 Endscripts x Subscript i Superscript 2 + + + \ No newline at end of file diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/repl.text b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/repl.text new file mode 100644 index 000000000000..0c7be7a7df32 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/repl.text @@ -0,0 +1,48 @@ +{{alias}}( W ) + Returns an accumulator function which incrementally computes a moving sum of + squared absolute values, ignoring NaN values. + + The `W` parameter defines the number of values over which to compute the + moving sum. + + If provided a value, the accumulator function returns an updated moving sum. + If not provided a value, the accumulator function returns the current moving + sum. + + As `W` values are needed to fill the window buffer, the first `W-1` returned + values are calculated from smaller sample sizes. Until the window is full, + each returned value is calculated from all provided values. + + NaN values are ignored. If the window consists solely of NaN values, the + function returns the current sum. + + Parameters + ---------- + W: integer + Window size. + + Returns + ------- + acc: Function + Accumulator function. + + Examples + -------- + > var accumulator = {{alias}}( 3 ); + > var s = accumulator() + null + > s = accumulator( 2.0 ) + 4.0 + > s = accumulator( -5.0 ) + 29.0 + > s = accumulator( NaN ) + 29.0 + > s = accumulator( 3.0 ) + 34.0 + > s = accumulator() + 34.0 + + See Also + -------- + @stdlib/stats/incr/msumabs2: compute a moving sum of squared absolute values incrementally. + @stdlib/stats/incr/nansum: compute a sum incrementally, ignoring NaN values. diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/types/index.d.ts new file mode 100644 index 000000000000..a73f4c634246 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/types/index.d.ts @@ -0,0 +1,74 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/// + +/** +* If provided a value, returns an updated sum of squared absolute values; otherwise, returns the current sum of squared absolute values. +* +* ## Notes +* +* - NaN values are ignored. +* +* @param x - value +* @returns sum of squared absolute values +*/ +type accumulator = ( x?: number ) => number | null; + +/** +* Returns an accumulator function which incrementally computes a moving sum of squared absolute values, ignoring NaN values. +* +* ## Notes +* +* - The `W` parameter defines the number of values over which to compute the moving sum. +* - As `W` values are needed to fill the window buffer, the first `W-1` returned values are calculated from smaller sample sizes. Until the window is full, each returned value is calculated from all provided values. +* - NaN values are ignored. +* +* @param W - window size +* @throws must provide a positive integer +* @returns accumulator function +* +* @example +* var accumulator = incrnanmsumabs2( 3 ); +* +* var sum = accumulator(); +* // returns null +* +* sum = accumulator( 2.0 ); +* // returns 4.0 +* +* sum = accumulator( -5.0 ); +* // returns 29.0 +* +* sum = accumulator( NaN ); +* // returns 29.0 +* +* sum = accumulator( 3.0 ); +* // returns 34.0 +* +* sum = accumulator(); +* // returns 34.0 +*/ +declare function incrnanmsumabs2( W: number ): accumulator; + + +// EXPORTS // + +export = incrnanmsumabs2; diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/types/test.ts b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/types/test.ts new file mode 100644 index 000000000000..3116afbb680b --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/types/test.ts @@ -0,0 +1,60 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import incrnanmsumabs2 from './index'; + + +// TESTS // + +// The function returns an accumulator function... +{ + incrnanmsumabs2( 3 ); // $ExpectType accumulator +} + +// The compiler throws an error if the function is provided an argument that is not a number... +{ + incrnanmsumabs2( '5' ); // $ExpectError + incrnanmsumabs2( true ); // $ExpectError + incrnanmsumabs2( false ); // $ExpectError + incrnanmsumabs2( null ); // $ExpectError + incrnanmsumabs2( undefined ); // $ExpectError + incrnanmsumabs2( [] ); // $ExpectError + incrnanmsumabs2( {} ); // $ExpectError + incrnanmsumabs2( ( x: number ): number => x ); // $ExpectError +} + +// The function returns an accumulator function which returns an accumulated result... +{ + const acc = incrnanmsumabs2( 3 ); + + acc(); // $ExpectType number | null + acc( 3.14 ); // $ExpectType number | null +} + +// The compiler throws an error if the returned function is provided invalid arguments... +{ + const acc = incrnanmsumabs2( 3 ); + + acc( '5' ); // $ExpectError + acc( true ); // $ExpectError + acc( false ); // $ExpectError + acc( null ); // $ExpectError + acc( [] ); // $ExpectError + acc( {} ); // $ExpectError + acc( ( x: number ): number => x ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js new file mode 100644 index 000000000000..11260c6c505e --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js @@ -0,0 +1,37 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +'use strict'; +var randu = require( '@stdlib/random/base/randu' ); +var incrnanmsumabs2 = require( './../lib' ); +var accumulator; +var sum; +var v; +var i; +// Initialize an accumulator: +accumulator = incrnanmsumabs2( 5 ); +// For each simulated datum, update the moving sum... +console.log( '\nValue\tSum\n' ); +for ( i = 0; i < 100; i++ ) { + if ( randu() < 0.2 ) { + v = NaN; + } else { + v = ( randu()*100.0 ) - 50.0; + } + sum = accumulator( v ); + console.log( '%s\t%d', v.toString(), sum.toFixed( 3 ) ); +} diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/index.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/index.js new file mode 100644 index 000000000000..18025a123caf --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/index.js @@ -0,0 +1,50 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +'use strict'; +/** +* Compute a moving sum of squared absolute values incrementally, ignoring NaN values. +* +* @module @stdlib/stats/incr/nanmsumabs2 +* +* @example +* var incrnanmsumabs2 = require( '@stdlib/stats/incr/nanmsumabs2' ); +* +* var accumulator = incrnanmsumabs2( 3 ); +* +* var sum = accumulator(); +* // returns null +* +* sum = accumulator( 2.0 ); +* // returns 4.0 +* +* sum = accumulator( -5.0 ); +* // returns 29.0 +* +* sum = accumulator( NaN ); +* // returns 29.0 +* +* sum = accumulator( 3.0 ); +* // returns 34.0 +* +* sum = accumulator(); +* // returns 34.0 +*/ +// MODULES // +var incrnanmsumabs2 = require( './main.js' ); +// EXPORTS // +module.exports = incrnanmsumabs2; diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js new file mode 100644 index 000000000000..fc7e29e14be4 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js @@ -0,0 +1,90 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive; +var incrmsum = require( '@stdlib/stats/incr/msum' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var format = require( '@stdlib/string/format' ); + + +// MAIN // + +/** +* Returns an accumulator function which incrementally computes a moving sum of squared absolute values, ignoring NaN values. +* +* @param {PositiveInteger} W - window size +* @throws {TypeError} must provide a positive integer +* @returns {Function} accumulator function +* +* @example +* var accumulator = incrnanmsumabs2( 3 ); +* +* var sum = accumulator(); +* // returns null +* +* sum = accumulator( 2.0 ); +* // returns 4.0 +* +* sum = accumulator( -5.0 ); +* // returns 29.0 +* +* sum = accumulator( NaN ); +* // returns 29.0 +* +* sum = accumulator( 3.0 ); +* // returns 34.0 +* +* sum = accumulator(); +* // returns 34.0 +*/ +function incrnanmsumabs2( W ) { + var sum; + var N; + if ( !isPositiveInteger( W ) ) { + throw new TypeError( format( 'invalid argument. Must provide a positive integer. Value: `%s`.', W ) ); + } + sum = incrmsum( W ); + N = 0; + return accumulator; + + /** + * If provided a value, the accumulator function returns an updated sum. If not provided a value, the accumulator function returns the current sum. + * + * @private + * @param {number} [x] - input value + * @returns {(number|null)} sum or null + */ + function accumulator( x ) { + if ( arguments.length === 0 ) { + return sum(); + } + if ( isnan( x ) ) { + return sum(); + } + return sum( x*x ); + } +} + + +// EXPORTS // + +module.exports = incrnanmsumabs2; diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/package.json b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/package.json new file mode 100644 index 000000000000..4d30728df79b --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/package.json @@ -0,0 +1,77 @@ +{ + "name": "@stdlib/stats/incr/nanmsumabs2", + "version": "0.0.0", + "description": "Compute a moving sum of squared absolute values incrementally, ignoring NaN values.", + "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", + "statistics", + "stats", + "mathematics", + "math", + "sum", + "total", + "incremental", + "accumulator", + "moving sum", + "sliding window", + "sliding", + "window", + "moving", + "rolling", + "absolute", + "value", + "abs", + "abs2", + "math.abs", + "magnitude", + "squared", + "nan" + ] +} diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js new file mode 100644 index 000000000000..be9694467d85 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js @@ -0,0 +1,210 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var incrnanmsumabs2 = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof incrnanmsumabs2, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function throws an error if not provided a positive integer', function test( t ) { + var values; + var i; + + values = [ + '5', + -5.0, + 0.0, + 3.14, + true, + null, + void 0, + NaN, + [], + {}, + 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() { + incrnanmsumabs2( value ); + }; + } +}); + +tape( 'the function returns an accumulator function', function test( t ) { + t.equal( typeof incrnanmsumabs2( 3 ), 'function', 'returns a function' ); + t.end(); +}); + +tape( 'the accumulator function computes a moving sum of squared absolute values incrementally', function test( t ) { + var expected; + var actual; + var data; + var acc; + var N; + var i; + + data = [ 2.0, -3.0, 2.0, -4.0, 3.0, -4.0 ]; + N = data.length; + + acc = incrnanmsumabs2( 3 ); + + actual = []; + for ( i = 0; i < N; i++ ) { + actual.push( acc( data[ i ] ) ); + } + expected = [ 4.0, 13.0, 17.0, 29.0, 29.0, 41.0 ]; + + t.deepEqual( actual, expected, 'returns expected incremental results' ); + t.end(); +}); + +tape( 'the accumulator function correctly handles NaN values by ignoring them', function test( t ) { + var expected; + var actual; + var data; + var acc; + var N; + var i; + + data = [ 2.0, NaN, -3.0, NaN, 2.0, -4.0, 3.0, NaN, -4.0 ]; + N = data.length; + + acc = incrnanmsumabs2( 3 ); + + actual = []; + for ( i = 0; i < N; i++ ) { + actual.push( acc( data[ i ] ) ); + } + expected = [ 4.0, 4.0, 13.0, 13.0, 17.0, 29.0, 29.0, 29.0, 41.0 ]; + + t.deepEqual( actual, expected, 'returns expected incremental results when handling NaN values' ); + t.end(); +}); + +tape( 'if not provided an input value, the accumulator function returns the current sum', function test( t ) { + var data; + var acc; + var i; + + data = [ 2.0, -3.0, -5.0 ]; + acc = incrnanmsumabs2( 2 ); + for ( i = 0; i < data.length; i++ ) { + acc( data[ i ] ); + } + t.equal( acc(), 34.0, 'returns expected value' ); + t.end(); +}); + +tape( 'if data has yet to be provided, the accumulator function returns `null`', function test( t ) { + var acc = incrnanmsumabs2( 3 ); + t.equal( acc(), null, 'returns null' ); + t.end(); +}); + +tape( 'if only provided `NaN` values, the accumulator function returns `null`', function test( t ) { + var acc = incrnanmsumabs2( 3 ); + acc( NaN ); + acc( NaN ); + acc( NaN ); + t.equal( acc(), null, 'returns null' ); + t.end(); +}); + +tape( 'the accumulator function does not include `NaN` values in the window size count', function test( t ) { + var data; + var acc; + var i; + + data = [ 2.0, -3.0, NaN, 5.0 ]; + acc = incrnanmsumabs2( 3 ); + for ( i = 0; i < data.length; i++ ) { + acc( data[ i ] ); + } + t.equal( acc(), 38.0, 'returns expected value' ); + t.end(); +}); + +tape( 'the accumulator function can handle a mixture of `NaN` and non-`NaN` values', function test( t ) { + var expected; + var actual; + var data; + var acc; + var N; + var i; + + data = [ + NaN, // null (no values) + 3.14, // 9.8596 + NaN, // still 9.8596 + 3.14, // 19.7192 + NaN, // still 19.7192 + NaN, // still 19.7192 + 3.14, // 29.5788 + 3.14, // 29.5788 (3.14, 3.14, 3.14) + NaN, // 29.5788 + 3.14 // 29.5788 (3.14, 3.14, 3.14) + ]; + + expected = [ + null, + 9.8596, + 9.8596, + 19.7192, + 19.7192, + 19.7192, + 29.5788, + 29.5788, + 29.5788, + 29.5788 + ]; + + acc = incrnanmsumabs2( 3 ); + + actual = []; + for ( i = 0; i < data.length; i++ ) { + actual.push( acc( data[ i ] ) ); + } + + for ( i = 0; i < expected.length; i++ ) { + if ( expected[i] === null ) { + t.equal( actual[i], null, 'returns expected value for index ' + i ); + } else { + t.equal( actual[i], expected[i], 'returns expected value for index ' + i ); + } + } + + t.end(); +}); From adce8ac32251ea8963744f28c9eeff23d3eefb67 Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 04:00:24 +0530 Subject: [PATCH 02/12] update example/index.js --- .../@stdlib/stats/incr/nanmsumabs2/examples/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js index 11260c6c505e..fe5eeccbe9d3 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js @@ -33,5 +33,5 @@ for ( i = 0; i < 100; i++ ) { v = ( randu()*100.0 ) - 50.0; } sum = accumulator( v ); - console.log( '%s\t%d', v.toString(), sum.toFixed( 3 ) ); + console.log( '%s\t%s', v.toString(), sum !== null ? sum.toFixed(3) : 'null' ); } From 980e2f7c2d0be09ad399daa2ea7f1adc845e6cf1 Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 04:50:50 +0530 Subject: [PATCH 03/12] solved eslint issue --- lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md | 4 ++-- .../@stdlib/stats/incr/nanmsumabs2/lib/index.js | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md index 5e30bdfe2e66..6a10e3bb6040 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md @@ -87,10 +87,10 @@ sum = accumulator( -7.0 ); // [-1.0, 3.0, -7.0] // returns 59.0 sum = accumulator( NaN ); // [3.0, -7.0, NaN] -// returns 58.0 +// returns 59.0 sum = accumulator(); -// returns 58.0 +// returns 59.0 ``` diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/index.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/index.js index 18025a123caf..37a157db3e14 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/index.js @@ -15,7 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + 'use strict'; + /** * Compute a moving sum of squared absolute values incrementally, ignoring NaN values. * @@ -44,7 +46,13 @@ * sum = accumulator(); * // returns 34.0 */ + + // MODULES // + var incrnanmsumabs2 = require( './main.js' ); + + // EXPORTS // + module.exports = incrnanmsumabs2; From 575e25e011e4de07156d1ae6731c393520676469 Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 04:56:14 +0530 Subject: [PATCH 04/12] solved eslint issue --- .../@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js | 7 +++++++ .../@stdlib/stats/incr/nanmsumabs2/examples/index.js | 2 ++ .../@stdlib/stats/incr/nanmsumabs2/lib/main.js | 7 +++---- .../@stdlib/stats/incr/nanmsumabs2/test/test.js | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js index aec83fe3725c..550c9c724fde 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js @@ -15,13 +15,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + 'use strict'; + + // MODULES // + var bench = require( '@stdlib/bench' ); var randu = require( '@stdlib/random/base/randu' ); var pkg = require( '@stdlib/stats/incr/nanmsumabs2/package.json' ).name; var incrnanmsumabs2 = require( '@stdlib/stats/incr/nanmsumabs2/lib' ); + + // MAIN // + bench( pkg, function benchmark( b ) { var f; var i; diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js index fe5eeccbe9d3..7ba957971ed7 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js @@ -15,7 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + 'use strict'; + var randu = require( '@stdlib/random/base/randu' ); var incrnanmsumabs2 = require( './../lib' ); var accumulator; diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js index fc7e29e14be4..d702cd4f7db5 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js @@ -18,6 +18,7 @@ 'use strict'; + // MODULES // var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive; @@ -51,19 +52,17 @@ var format = require( '@stdlib/string/format' ); * // returns 29.0 * * sum = accumulator( 3.0 ); -* // returns 34.0 +* // returns 38.0 * * sum = accumulator(); -* // returns 34.0 +* // returns 38.0 */ function incrnanmsumabs2( W ) { var sum; - var N; if ( !isPositiveInteger( W ) ) { throw new TypeError( format( 'invalid argument. Must provide a positive integer. Value: `%s`.', W ) ); } sum = incrmsum( W ); - N = 0; return accumulator; /** diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js index be9694467d85..9eb3d5b6702f 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js @@ -18,6 +18,7 @@ 'use strict'; + // MODULES // var tape = require( 'tape' ); From 126399d758b3f8f5d753fca75e952692cb9fb20b Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 05:01:59 +0530 Subject: [PATCH 05/12] solving eslint issue --- lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js | 1 - lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js index d702cd4f7db5..f5441ed15e99 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/lib/main.js @@ -18,7 +18,6 @@ 'use strict'; - // MODULES // var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive; diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js index 9eb3d5b6702f..be9694467d85 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js @@ -18,7 +18,6 @@ 'use strict'; - // MODULES // var tape = require( 'tape' ); From d91b610a813045d5643c24be3ab9f5207ab0d456 Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 05:07:48 +0530 Subject: [PATCH 06/12] solving eslint issue --- .../stats/incr/nanmsumabs2/examples/index.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js index 7ba957971ed7..ae417df77544 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js @@ -20,20 +20,26 @@ var randu = require( '@stdlib/random/base/randu' ); var incrnanmsumabs2 = require( './../lib' ); + var accumulator; var sum; var v; var i; + // Initialize an accumulator: accumulator = incrnanmsumabs2( 5 ); + // For each simulated datum, update the moving sum... + console.log( '\nValue\tSum\n' ); + for ( i = 0; i < 100; i++ ) { - if ( randu() < 0.2 ) { - v = NaN; + if ( randu() >= 0.2 ) { + v = ( randu() * 100.0 ) - 50.0; } else { - v = ( randu()*100.0 ) - 50.0; + v = NaN; } + sum = accumulator( v ); - console.log( '%s\t%s', v.toString(), sum !== null ? sum.toFixed(3) : 'null' ); + console.log( '%s\t%s', v.toString(), (sum !== null) ? sum.toFixed(3) : 'null' ); } From ce23a57f3b11abac1bd55ced95975961c67785fa Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 05:11:13 +0530 Subject: [PATCH 07/12] solving eslint issue --- .../@stdlib/stats/incr/nanmsumabs2/examples/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js index ae417df77544..76a9d4785ef0 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js @@ -34,10 +34,10 @@ accumulator = incrnanmsumabs2( 5 ); console.log( '\nValue\tSum\n' ); for ( i = 0; i < 100; i++ ) { - if ( randu() >= 0.2 ) { - v = ( randu() * 100.0 ) - 50.0; - } else { + if ( randu() < 0.2 ) { v = NaN; + } else { + v = ( randu() * 100.0 ) - 50.0; } sum = accumulator( v ); From fa53c9bb8f8b1602da21005cd07916e8b977f580 Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 05:14:26 +0530 Subject: [PATCH 08/12] solving eslint issue in example/index.js --- .../@stdlib/stats/incr/nanmsumabs2/examples/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js index 76a9d4785ef0..35ca7e273bef 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js @@ -41,5 +41,5 @@ for ( i = 0; i < 100; i++ ) { } sum = accumulator( v ); - console.log( '%s\t%s', v.toString(), (sum !== null) ? sum.toFixed(3) : 'null' ); + console.log( '%s\t%s', v.toString(), sum ? sum.toFixed(3) : 'null' ); } From 419babc6f9aea9b4fc858eb9be2eaf64ff3990ee Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 05:17:47 +0530 Subject: [PATCH 09/12] solving eslint issue in example/index.js --- .../@stdlib/stats/incr/nanmsumabs2/examples/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js index 35ca7e273bef..ebc3aa943da4 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/examples/index.js @@ -41,5 +41,5 @@ for ( i = 0; i < 100; i++ ) { } sum = accumulator( v ); - console.log( '%s\t%s', v.toString(), sum ? sum.toFixed(3) : 'null' ); + console.log( '%s\t%s', v.toString(), (sum) ? sum.toFixed(3) : 'null' ); } From a27cbf004a4ce15585c5f124c71d4572118551c5 Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 05:21:27 +0530 Subject: [PATCH 10/12] solving eslint issue in test/test.js --- lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js index be9694467d85..79460f2efb0e 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/test/test.js @@ -21,7 +21,6 @@ // MODULES // var tape = require( 'tape' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); var incrnanmsumabs2 = require( './../lib' ); @@ -162,7 +161,6 @@ tape( 'the accumulator function can handle a mixture of `NaN` and non-`NaN` valu var actual; var data; var acc; - var N; var i; data = [ From 9ce0db3f4a002d9c725b8b411405ac16508a2751 Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 05:25:27 +0530 Subject: [PATCH 11/12] solving eslint issue in benchmark.js --- .../@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js index 550c9c724fde..46389c981b52 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js @@ -18,7 +18,6 @@ 'use strict'; - // MODULES // var bench = require( '@stdlib/bench' ); From 9b943cf71e83fc313240d3ecd37d5f78abe8d110 Mon Sep 17 00:00:00 2001 From: gopi kishan Date: Tue, 18 Mar 2025 15:24:20 +0530 Subject: [PATCH 12/12] updated benchmark.js and readme.md --- .../@stdlib/stats/incr/nanmsumabs2/README.md | 4 +-- .../incr/nanmsumabs2/benchmark/benchmark.js | 26 +++---------------- .../stats/incr/nanmsumabs2/docs/repl.text | 3 +-- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md index 6a10e3bb6040..06b27f58d9d2 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/README.md @@ -76,7 +76,7 @@ sum = accumulator( 2.0 ); // [2.0] sum = accumulator( -1.0 ); // [2.0, -1.0] // returns 5.0 -sum = accumulator( NaN ); // [2.0, -1.0, NaN] +sum = accumulator( NaN ); // [2.0, -1.0] // returns 5.0 sum = accumulator( 3.0 ); // [2.0, -1.0, 3.0] @@ -86,7 +86,7 @@ sum = accumulator( 3.0 ); // [2.0, -1.0, 3.0] sum = accumulator( -7.0 ); // [-1.0, 3.0, -7.0] // returns 59.0 -sum = accumulator( NaN ); // [3.0, -7.0, NaN] +sum = accumulator( NaN ); // [3.0, -7.0] // returns 59.0 sum = accumulator(); diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js index 46389c981b52..d319f7bf589c 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/benchmark/benchmark.js @@ -45,11 +45,14 @@ bench( pkg, function benchmark( b ) { b.pass( 'benchmark finished' ); b.end(); }); + bench( pkg+'::accumulator', function benchmark( b ) { var acc; var v; var i; + acc = incrnanmsumabs2( 5 ); + b.tic(); for ( i = 0; i < b.iterations; i++ ) { v = acc( randu()-0.5 ); @@ -64,26 +67,3 @@ bench( pkg+'::accumulator', function benchmark( b ) { b.pass( 'benchmark finished' ); b.end(); }); -bench( pkg+'::accumulator,includes_nan', function benchmark( b ) { - var acc; - var v; - var i; - acc = incrnanmsumabs2( 5 ); - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - if ( i % 10 === 0 ) { - v = acc( NaN ); - } else { - v = acc( randu()-0.5 ); - } - if ( v !== v && i % 10 !== 0 ) { - b.fail( 'should not return NaN' ); - } - } - b.toc(); - if ( v !== v && b.iterations % 10 !== 0 ) { - b.fail( 'should not return NaN' ); - } - b.pass( 'benchmark finished' ); - b.end(); -}); diff --git a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/repl.text b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/repl.text index 0c7be7a7df32..f120e18f31b3 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/repl.text +++ b/lib/node_modules/@stdlib/stats/incr/nanmsumabs2/docs/repl.text @@ -44,5 +44,4 @@ See Also -------- - @stdlib/stats/incr/msumabs2: compute a moving sum of squared absolute values incrementally. - @stdlib/stats/incr/nansum: compute a sum incrementally, ignoring NaN values. +