From 59560c5f2a9865c85d4964ca03c715c0f377eb2d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 8 Sep 2023 04:16:52 +0000 Subject: [PATCH] Update artifacts --- array/base/binarynd/coverage.ndjson | 1 + array/base/binarynd/index.html | 131 ++++++++++ array/base/binarynd/index.js.html | 238 ++++++++++++++++++ array/base/binarynd/main.js.html | 376 ++++++++++++++++++++++++++++ array/base/coverage.ndjson | 1 + array/base/index.html | 10 +- array/base/index.js.html | 35 ++- 7 files changed, 783 insertions(+), 9 deletions(-) create mode 100644 array/base/binarynd/coverage.ndjson create mode 100644 array/base/binarynd/index.html create mode 100644 array/base/binarynd/index.js.html create mode 100644 array/base/binarynd/main.js.html diff --git a/array/base/binarynd/coverage.ndjson b/array/base/binarynd/coverage.ndjson new file mode 100644 index 000000000..b6534f7ad --- /dev/null +++ b/array/base/binarynd/coverage.ndjson @@ -0,0 +1 @@ +[148,148,100,8,8,100,2,2,100,148,148,100,"4d792be2ea188b25a3a1d7dee12fc3cece307757","2023-09-07 21:13:19 -0700"] diff --git a/array/base/binarynd/index.html b/array/base/binarynd/index.html new file mode 100644 index 000000000..db9bb6bcd --- /dev/null +++ b/array/base/binarynd/index.html @@ -0,0 +1,131 @@ + + + + + + Code coverage report for array/base/binarynd/lib + + + + + + + + + +
+
+

All files array/base/binarynd/lib

+
+ +
+ 100% + Statements + 148/148 +
+ + +
+ 100% + Branches + 8/8 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 100% + Lines + 148/148 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
100%51/51100%1/1100%0/0100%51/51
main.js +
+
100%97/97100%7/7100%2/2100%97/97
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/array/base/binarynd/index.js.html b/array/base/binarynd/index.js.html new file mode 100644 index 000000000..71bf84c17 --- /dev/null +++ b/array/base/binarynd/index.js.html @@ -0,0 +1,238 @@ + + + + + + Code coverage report for array/base/binarynd/lib/index.js + + + + + + + + + +
+
+

All files / array/base/binarynd/lib index.js

+
+ +
+ 100% + Statements + 51/51 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 51/51 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +521x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2023 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';
+ 
+/**
+* Apply a binary callback to elements in an n-dimensional nested input array and assign results to elements in an n-dimensional nested output array.
+*
+* @module @stdlib/array/base/binarynd
+*
+* @example
+* var add = require( '@stdlib/math/base/ops/add' );
+* var onesnd = require( '@stdlib/array/base/onesnd' );
+* var zerosnd = require( '@stdlib/array/base/zerosnd' );
+* var binarynd = require( '@stdlib/array/base/binarynd' );
+*
+* var shape = [ 2, 2 ];
+*
+* var x = onesnd( shape );
+* var y = onesnd( shape );
+* var z = zerosnd( shape );
+*
+* binarynd( [ x, y, z ], shape, add );
+*
+* console.log( z );
+* // => [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ]
+*/
+ 
+// MODULES //
+ 
+var main = require( './main.js' );
+ 
+ 
+// EXPORTS //
+ 
+module.exports = main;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/array/base/binarynd/main.js.html b/array/base/binarynd/main.js.html new file mode 100644 index 000000000..887ad8fd0 --- /dev/null +++ b/array/base/binarynd/main.js.html @@ -0,0 +1,376 @@ + + + + + + Code coverage report for array/base/binarynd/lib/main.js + + + + + + + + + +
+
+

All files / array/base/binarynd/lib main.js

+
+ +
+ 100% + Statements + 97/97 +
+ + +
+ 100% + Branches + 7/7 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 100% + Lines + 97/97 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +981x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +190x +190x +190x +190x +190x +190x +190x +190x +190x +190x +190x +81x +81x +99x +99x +81x +81x +109x +190x +164x +164x +190x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +26x +26x +26x +1x +1x +1x +1x +1x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2023 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';
+ 
+// FUNCTIONS //
+ 
+/**
+* Recursively applies a binary callback.
+*
+* @private
+* @param {ArrayLikeObject} x - input array
+* @param {ArrayLikeObject} y - input array
+* @param {ArrayLikeObject} z - output array
+* @param {NonNegativeInteger} ndims - number of dimensions
+* @param {NonNegativeIntegerArray} shape - array shape
+* @param {NonNegativeInteger} dim - dimension index
+* @param {Callback} fcn - binary callback
+* @returns {void}
+*/
+function recurse( x, y, z, ndims, shape, dim, fcn ) {
+	var S;
+	var d;
+	var i;
+ 
+	S = shape[ dim ];
+ 
+	// Check whether we've reached the innermost dimension:
+	d = dim + 1;
+ 
+	if ( d === ndims ) {
+		// Apply the provided callback...
+		for ( i = 0; i < S; i++ ) {
+			z[ i ] = fcn( x[ i ], y[ i ] );
+		}
+		return;
+	}
+	// Continue recursing into the nested arrays...
+	for ( i = 0; i < S; i++ ) {
+		recurse( x[ i ], y[ i ], z[ i ], ndims, shape, d, fcn );
+	}
+}
+ 
+ 
+// MAIN //
+ 
+/**
+* Applies a binary callback to elements in n-dimensional nested input arrays and assigns results to elements in an n-dimensional nested output array.
+*
+* ## Notes
+*
+* -   The function assumes that the input and output arrays have the same shape.
+*
+* @param {ArrayLikeObject} arrays - array-like object containing two input nested arrays and one output nested array
+* @param {NonNegativeIntegerArray} shape - array shape
+* @param {Callback} fcn - binary callback
+* @returns {void}
+*
+* @example
+* var add = require( '@stdlib/math/base/ops/add' );
+* var onesnd = require( '@stdlib/array/base/onesnd' );
+* var zerosnd = require( '@stdlib/array/base/zerosnd' );
+*
+* var shape = [ 2, 2 ];
+*
+* var x = onesnd( shape );
+* var y = onesnd( shape );
+* var z = zerosnd( shape );
+*
+* binarynd( [ x, y, z ], shape, add );
+*
+* console.log( z );
+* // => [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ]
+*/
+function binarynd( arrays, shape, fcn ) {
+	return recurse( arrays[ 0 ], arrays[ 1 ], arrays[ 2 ], shape.length, shape, 0, fcn ); // eslint-disable-line max-len
+}
+ 
+ 
+// EXPORTS //
+ 
+module.exports = binarynd;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/array/base/coverage.ndjson b/array/base/coverage.ndjson index 94faa0be1..d82a43e1a 100644 --- a/array/base/coverage.ndjson +++ b/array/base/coverage.ndjson @@ -19,3 +19,4 @@ [699,699,100,1,1,100,0,0,100,699,699,100,"b171a2f6759b7995aaf8524fad5ab07d672e19a0","2023-09-07 19:58:52 -0700"] [708,708,100,1,1,100,0,0,100,708,708,100,"beeb2a51f8b558b0b7b1de686f74e9a22e4e0cdc","2023-09-07 20:17:41 -0700"] [717,717,100,1,1,100,0,0,100,717,717,100,"7eadb6dfc401413096f93301660c368fdc417a60","2023-09-07 20:32:16 -0700"] +[726,726,100,1,1,100,0,0,100,726,726,100,"4d792be2ea188b25a3a1d7dee12fc3cece307757","2023-09-07 21:13:19 -0700"] diff --git a/array/base/index.html b/array/base/index.html index 2850f1c33..e84659ff7 100644 --- a/array/base/index.html +++ b/array/base/index.html @@ -25,7 +25,7 @@

All files array/base/lib

100% Statements - 717/717 + 726/726
@@ -46,7 +46,7 @@

All files array/base/lib

100% Lines - 717/717 + 726/726
@@ -84,13 +84,13 @@

All files array/base/lib

100% - 717/717 + 726/726 100% 1/1 100% 0/0 100% - 717/717 + 726/726 @@ -101,7 +101,7 @@

All files array/base/lib