From f6a8f4801abe7f6fafa3b076475759bc8813dcde Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 6 Jul 2024 21:58:36 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 1 + dist/index.js | 26 ++++++++++---------- dist/index.js.map | 8 +++---- lib/accessors.js | 61 ++++++++++------------------------------------- lib/unary.js | 55 ++++++++++-------------------------------- package.json | 1 + 6 files changed, 45 insertions(+), 107 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c779770..b5f0372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@
+- [`e47b1be`](https://github.com/stdlib-js/stdlib/commit/e47b1be3a80eb9a7ab1fa9f421a133a580ce4366) - **refactor:** reduce code duplication _(by Athan Reines)_ - [`dc36936`](https://github.com/stdlib-js/stdlib/commit/dc369364ee617f8f62b40d951a0f0d34f795da6e) - **feat:** add boolean dtype support to `strided/base/mskunary` [(#2520)](https://github.com/stdlib-js/stdlib/pull/2520) _(by Jaysukh Makvana)_ - [`cf3f92e`](https://github.com/stdlib-js/stdlib/commit/cf3f92eddd20ec1a4106c8a34f7d7705a9a99dbc) - **fix:** update include paths _(by Athan Reines)_ - [`75d4f83`](https://github.com/stdlib-js/stdlib/commit/75d4f83cb85610d23a04dc21a03f8075f6d3665f) - **refactor:** update require and include paths _(by Athan Reines)_ diff --git a/dist/index.js b/dist/index.js index a576e87..4809766 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,16 +1,16 @@ -"use strict";var p=function(r,f){return function(){return f||r((f={exports:{}}).exports,f),f.exports}};var b=p(function(tr,R){ -function Q(r,f,u,m){var n,a,i,t,e,v,x,y,q,c,o;if(c=f[0],!(c<=0))for(n=u[0],a=u[1],i=u[2],n<0?t=(1-c)*n:t=0,a<0?e=(1-c)*a:e=0,i<0?v=(1-c)*i:v=0,x=r[0],y=r[1],q=r[2],o=0;o} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n*\n* mskunary( [ x, m, y ], shape, strides, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\nfunction mskunary( arrays, shape, strides, fcn ) {\n\tvar sx;\n\tvar sm;\n\tvar sy;\n\tvar ix;\n\tvar im;\n\tvar iy;\n\tvar x;\n\tvar m;\n\tvar y;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tsx = strides[ 0 ];\n\tsm = strides[ 1 ];\n\tsy = strides[ 2 ];\n\tif ( sx < 0 ) {\n\t\tix = (1-N) * sx;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( sm < 0 ) {\n\t\tim = (1-N) * sm;\n\t} else {\n\t\tim = 0;\n\t}\n\tif ( sy < 0 ) {\n\t\tiy = (1-N) * sy;\n\t} else {\n\t\tiy = 0;\n\t}\n\tx = arrays[ 0 ];\n\tm = arrays[ 1 ];\n\ty = arrays[ 2 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( m[ im ] === 0 ) {\n\t\t\ty[ iy ] = fcn( x[ ix ] );\n\t\t}\n\t\tix += sx;\n\t\tim += sm;\n\t\tiy += sy;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {Array} accessors - array-like object containing accessors for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function xget( buf, idx ) {\n* return buf[ idx ] * 2.0;\n* }\n*\n* function mget( buf, idx ) {\n* return buf[ idx ];\n* }\n*\n* function set( buf, idx, value ) {\n* buf[ idx ] = value;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n*\n* mskunary( [ x, m, y ], shape, strides, [ xget, mget, set ], scale );\n*\n* console.log( y );\n* // => [ 20.0, 40.0, 0.0, 80.0, 100.0 ]\n*/\nfunction mskunary( arrays, shape, strides, accessors, fcn ) {\n\tvar xget;\n\tvar mget;\n\tvar yset;\n\tvar sx;\n\tvar sm;\n\tvar sy;\n\tvar ix;\n\tvar im;\n\tvar iy;\n\tvar x;\n\tvar m;\n\tvar y;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tsx = strides[ 0 ];\n\tsm = strides[ 1 ];\n\tsy = strides[ 2 ];\n\tif ( sx < 0 ) {\n\t\tix = (1-N) * sx;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( sm < 0 ) {\n\t\tim = (1-N) * sm;\n\t} else {\n\t\tim = 0;\n\t}\n\tif ( sy < 0 ) {\n\t\tiy = (1-N) * sy;\n\t} else {\n\t\tiy = 0;\n\t}\n\tx = arrays[ 0 ];\n\tm = arrays[ 1 ];\n\ty = arrays[ 2 ];\n\txget = accessors[ 0 ];\n\tmget = accessors[ 1 ];\n\tyset = accessors[ 2 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( mget( m, im ) === 0 ) {\n\t\t\tyset( y, iy, fcn( xget( x, ix ) ) );\n\t\t}\n\t\tix += sx;\n\t\tim += sm;\n\t\tiy += sy;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' );\nvar accessorGetter = require( '@stdlib/array-base-accessor-getter' );\nvar accessorSetter = require( '@stdlib/array-base-accessor-setter' );\nvar getter = require( '@stdlib/array-base-getter' );\nvar setter = require( '@stdlib/array-base-setter' );\nvar dtype = require( '@stdlib/array-dtype' );\nvar strided = require( './unary.js' );\nvar accessors = require( './accessors.js' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n*\n* mskunary( [ x, m, y ], shape, strides, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\nfunction mskunary( arrays, shape, strides, fcn ) {\n\tvar xget;\n\tvar mget;\n\tvar yset;\n\tvar x;\n\tvar m;\n\tvar y;\n\n\tx = arrays[ 0 ];\n\tif ( isAccessorArray( x ) ) {\n\t\txget = accessorGetter( dtype( x ) );\n\t}\n\tm = arrays[ 1 ];\n\tif ( isAccessorArray( m ) ) {\n\t\tmget = accessorGetter( dtype( m ) );\n\t}\n\ty = arrays[ 2 ];\n\tif ( isAccessorArray( y ) ) {\n\t\tyset = accessorSetter( dtype( y ) );\n\t}\n\tif ( xget || mget || yset ) {\n\t\txget = xget || getter( dtype( x ) );\n\t\tmget = mget || getter( dtype( m ) );\n\t\tyset = yset || setter( dtype( y ) );\n\t\treturn accessors( arrays, shape, strides, [ xget, mget, yset ], fcn );\n\t}\n\treturn strided( arrays, shape, strides, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n* var offsets = [ 0, 0, 0 ];\n*\n* mskunary( [ x, m, y ], shape, strides, offsets, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\nfunction mskunary( arrays, shape, strides, offsets, fcn ) {\n\tvar sx;\n\tvar sm;\n\tvar sy;\n\tvar ix;\n\tvar im;\n\tvar iy;\n\tvar x;\n\tvar m;\n\tvar y;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tix = offsets[ 0 ];\n\tim = offsets[ 1 ];\n\tiy = offsets[ 2 ];\n\tsx = strides[ 0 ];\n\tsm = strides[ 1 ];\n\tsy = strides[ 2 ];\n\tx = arrays[ 0 ];\n\tm = arrays[ 1 ];\n\ty = arrays[ 2 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( m[ im ] === 0 ) {\n\t\t\ty[ iy ] = fcn( x[ ix ] );\n\t\t}\n\t\tix += sx;\n\t\tim += sm;\n\t\tiy += sy;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the strided arrays\n* @param {Array} accessors - array-like object containing accessors for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function xget( buf, idx ) {\n* return buf[ idx ] * 2.0;\n* }\n*\n* function mget( buf, idx ) {\n* return buf[ idx ];\n* }\n*\n* function set( buf, idx, value ) {\n* buf[ idx ] = value;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n* var offsets = [ 0, 0, 0 ];\n*\n* mskunary( [ x, m, y ], shape, strides, offsets, [ xget, mget, set ], scale );\n*\n* console.log( y );\n* // => [ 20.0, 40.0, 0.0, 80.0, 100.0 ]\n*/\nfunction mskunary( arrays, shape, strides, offsets, accessors, fcn ) {\n\tvar xget;\n\tvar mget;\n\tvar yset;\n\tvar sx;\n\tvar sm;\n\tvar sy;\n\tvar ix;\n\tvar im;\n\tvar iy;\n\tvar x;\n\tvar m;\n\tvar y;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tix = offsets[ 0 ];\n\tim = offsets[ 1 ];\n\tiy = offsets[ 2 ];\n\tsx = strides[ 0 ];\n\tsm = strides[ 1 ];\n\tsy = strides[ 2 ];\n\tx = arrays[ 0 ];\n\tm = arrays[ 1 ];\n\ty = arrays[ 2 ];\n\txget = accessors[ 0 ];\n\tmget = accessors[ 1 ];\n\tyset = accessors[ 2 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( mget( m, im ) === 0 ) {\n\t\t\tyset( y, iy, fcn( xget( x, ix ) ) );\n\t\t}\n\t\tix += sx;\n\t\tim += sm;\n\t\tiy += sy;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' );\nvar accessorGetter = require( '@stdlib/array-base-accessor-getter' );\nvar accessorSetter = require( '@stdlib/array-base-accessor-setter' );\nvar getter = require( '@stdlib/array-base-getter' );\nvar setter = require( '@stdlib/array-base-setter' );\nvar dtype = require( '@stdlib/array-dtype' );\nvar strided = require( './unary.ndarray.js' );\nvar accessors = require( './accessors.ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n* var offsets = [ 0, 0, 0 ];\n*\n* mskunary( [ x, m, y ], shape, strides, offsets, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\nfunction mskunary( arrays, shape, strides, offsets, fcn ) {\n\tvar xget;\n\tvar mget;\n\tvar yset;\n\tvar x;\n\tvar m;\n\tvar y;\n\n\tx = arrays[ 0 ];\n\tif ( isAccessorArray( x ) ) {\n\t\txget = accessorGetter( dtype( x ) );\n\t}\n\tm = arrays[ 1 ];\n\tif ( isAccessorArray( m ) ) {\n\t\tmget = accessorGetter( dtype( m ) );\n\t}\n\ty = arrays[ 2 ];\n\tif ( isAccessorArray( y ) ) {\n\t\tyset = accessorSetter( dtype( y ) );\n\t}\n\tif ( xget || mget || yset ) {\n\t\txget = xget || getter( dtype( x ) );\n\t\tmget = mget || getter( dtype( m ) );\n\t\tyset = yset || setter( dtype( y ) );\n\t\treturn accessors( arrays, shape, strides, offsets, [ xget, mget, yset ], fcn ); // eslint-disable-line max-len\n\t}\n\treturn strided( arrays, shape, strides, offsets, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a unary callback to elements in a strided input array according to elements in a strided mask array and assign results to elements in a strided output array.\n*\n* @module @stdlib/strided-base-mskunary\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n* var mskunary = require( '@stdlib/strided-base-mskunary' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n*\n* mskunary( [ x, m, y ], shape, strides, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n* var mskunary = require( '@stdlib/strided-base-mskunary' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n* var offsets = [ 0, 0, 0 ];\n*\n* mskunary.ndarray( [ x, m, y ], shape, strides, offsets, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], - "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,GAAAC,EAAA,cAoDA,SAASC,EAAUC,EAAQC,EAAOC,EAASC,EAAM,CAChD,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACA,EACAC,EACAC,EACAC,EACAC,EAGJ,GADAD,EAAIX,EAAO,CAAE,EACR,EAAAW,GAAK,GAwBV,IArBAR,EAAKF,EAAS,CAAE,EAChBG,EAAKH,EAAS,CAAE,EAChBI,EAAKJ,EAAS,CAAE,EACXE,EAAK,EACTG,GAAM,EAAEK,GAAKR,EAEbG,EAAK,EAEDF,EAAK,EACTG,GAAM,EAAEI,GAAKP,EAEbG,EAAK,EAEDF,EAAK,EACTG,GAAM,EAAEG,GAAKN,EAEbG,EAAK,EAEN,EAAIT,EAAQ,CAAE,EACdU,EAAIV,EAAQ,CAAE,EACdW,EAAIX,EAAQ,CAAE,EACRa,EAAI,EAAGA,EAAID,EAAGC,IACdH,EAAGF,CAAG,IAAM,IAChBG,EAAGF,CAAG,EAAIN,EAAK,EAAGI,CAAG,CAAE,GAExBA,GAAMH,EACNI,GAAMH,EACNI,GAAMH,CAER,CAKAR,EAAO,QAAUC,ICvGjB,IAA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,EAAQ,CAAE,EACTT,EAAiBkB,CAAE,IACvBH,EAAOd,EAAgBI,EAAOa,CAAE,CAAE,GAEnCC,EAAIV,EAAQ,CAAE,EACTT,EAAiBmB,CAAE,IACvBH,EAAOd,EAAgBG,EAAOc,CAAE,CAAE,GAE9BL,GAAQC,GAAQC,GACpBF,EAAOA,GAAQX,EAAQE,EAAOY,CAAE,CAAE,EAClCF,EAAOA,GAAQZ,EAAQE,EAAOa,CAAE,CAAE,EAClCF,EAAOA,GAAQZ,EAAQC,EAAOc,CAAE,CAAE,EAC3BZ,GAAWE,EAAQC,EAAOC,EAASC,EAAS,CAAEE,EAAMC,EAAMC,CAAK,EAAGH,CAAI,GAEvEP,EAASG,EAAQC,EAAOC,EAASC,EAASC,CAAI,CACtD,CAKAd,EAAO,QAAUS,KC1BjB,IAAIY,GAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,GAAU,IAKdF,GAAaC,EAAM,UAAWC,EAAQ,EAKtC,OAAO,QAAUD", - "names": ["require_unary", "__commonJSMin", "exports", "module", "mskunary", "arrays", "shape", "strides", "fcn", "sx", "sm", "sy", "ix", "im", "iy", "m", "y", "N", "i", "require_accessors", "__commonJSMin", "exports", "module", "mskunary", "arrays", "shape", "strides", "accessors", "fcn", "xget", "mget", "yset", "sx", "sm", "sy", "ix", "im", "iy", "x", "m", "y", "N", "i", "require_main", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorGetter", "accessorSetter", "getter", "setter", "dtype", "strided", "accessors", "mskunary", "arrays", "shape", "strides", "fcn", "xget", "mget", "yset", "x", "m", "y", "require_unary_ndarray", "__commonJSMin", "exports", "module", "mskunary", "arrays", "shape", "strides", "offsets", "fcn", "sx", "sm", "sy", "ix", "im", "iy", "x", "m", "y", "N", "i", "require_accessors_ndarray", "__commonJSMin", "exports", "module", "mskunary", "arrays", "shape", "strides", "offsets", "accessors", "fcn", "xget", "mget", "yset", "sx", "sm", "sy", "ix", "im", "iy", "x", "m", "y", "N", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorGetter", "accessorSetter", "getter", "setter", "dtype", "strided", "accessors", "mskunary", "arrays", "shape", "strides", "offsets", "fcn", "xget", "mget", "yset", "x", "m", "y", "setReadOnly", "main", "ndarray"] + "sources": ["../lib/unary.ndarray.js", "../lib/unary.js", "../lib/accessors.ndarray.js", "../lib/accessors.js", "../lib/main.js", "../lib/ndarray.js", "../lib/index.js"], + "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n* var offsets = [ 0, 0, 0 ];\n*\n* mskunary( [ x, m, y ], shape, strides, offsets, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\nfunction mskunary( arrays, shape, strides, offsets, fcn ) {\n\tvar sx;\n\tvar sm;\n\tvar sy;\n\tvar ix;\n\tvar im;\n\tvar iy;\n\tvar x;\n\tvar m;\n\tvar y;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tix = offsets[ 0 ];\n\tim = offsets[ 1 ];\n\tiy = offsets[ 2 ];\n\tsx = strides[ 0 ];\n\tsm = strides[ 1 ];\n\tsy = strides[ 2 ];\n\tx = arrays[ 0 ];\n\tm = arrays[ 1 ];\n\ty = arrays[ 2 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( m[ im ] === 0 ) {\n\t\t\ty[ iy ] = fcn( x[ ix ] );\n\t\t}\n\t\tix += sx;\n\t\tim += sm;\n\t\tiy += sy;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar stride2offset = require( '@stdlib/strided-base-stride2offset' );\nvar ndarray = require( './unary.ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n*\n* mskunary( [ x, m, y ], shape, strides, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\nfunction mskunary( arrays, shape, strides, fcn ) {\n\tvar offsets;\n\tvar N;\n\n\tN = shape[ 0 ];\n\toffsets = [\n\t\tstride2offset( N, strides[ 0 ] ),\n\t\tstride2offset( N, strides[ 1 ] ),\n\t\tstride2offset( N, strides[ 2 ] )\n\t];\n\treturn ndarray( arrays, shape, strides, offsets, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the strided arrays\n* @param {Array} accessors - array-like object containing accessors for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function xget( buf, idx ) {\n* return buf[ idx ] * 2.0;\n* }\n*\n* function mget( buf, idx ) {\n* return buf[ idx ];\n* }\n*\n* function set( buf, idx, value ) {\n* buf[ idx ] = value;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n* var offsets = [ 0, 0, 0 ];\n*\n* mskunary( [ x, m, y ], shape, strides, offsets, [ xget, mget, set ], scale );\n*\n* console.log( y );\n* // => [ 20.0, 40.0, 0.0, 80.0, 100.0 ]\n*/\nfunction mskunary( arrays, shape, strides, offsets, accessors, fcn ) {\n\tvar xget;\n\tvar mget;\n\tvar yset;\n\tvar sx;\n\tvar sm;\n\tvar sy;\n\tvar ix;\n\tvar im;\n\tvar iy;\n\tvar x;\n\tvar m;\n\tvar y;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tix = offsets[ 0 ];\n\tim = offsets[ 1 ];\n\tiy = offsets[ 2 ];\n\tsx = strides[ 0 ];\n\tsm = strides[ 1 ];\n\tsy = strides[ 2 ];\n\tx = arrays[ 0 ];\n\tm = arrays[ 1 ];\n\ty = arrays[ 2 ];\n\txget = accessors[ 0 ];\n\tmget = accessors[ 1 ];\n\tyset = accessors[ 2 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( mget( m, im ) === 0 ) {\n\t\t\tyset( y, iy, fcn( xget( x, ix ) ) );\n\t\t}\n\t\tix += sx;\n\t\tim += sm;\n\t\tiy += sy;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar stride2offset = require( '@stdlib/strided-base-stride2offset' );\nvar ndarray = require( './accessors.ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {Array} accessors - array-like object containing accessors for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function xget( buf, idx ) {\n* return buf[ idx ] * 2.0;\n* }\n*\n* function mget( buf, idx ) {\n* return buf[ idx ];\n* }\n*\n* function set( buf, idx, value ) {\n* buf[ idx ] = value;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n*\n* mskunary( [ x, m, y ], shape, strides, [ xget, mget, set ], scale );\n*\n* console.log( y );\n* // => [ 20.0, 40.0, 0.0, 80.0, 100.0 ]\n*/\nfunction mskunary( arrays, shape, strides, accessors, fcn ) {\n\tvar offsets;\n\tvar N;\n\n\tN = shape[ 0 ];\n\toffsets = [\n\t\tstride2offset( N, strides[ 0 ] ),\n\t\tstride2offset( N, strides[ 1 ] ),\n\t\tstride2offset( N, strides[ 2 ] )\n\t];\n\treturn ndarray( arrays, shape, strides, offsets, accessors, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' );\nvar accessorGetter = require( '@stdlib/array-base-accessor-getter' );\nvar accessorSetter = require( '@stdlib/array-base-accessor-setter' );\nvar getter = require( '@stdlib/array-base-getter' );\nvar setter = require( '@stdlib/array-base-setter' );\nvar dtype = require( '@stdlib/array-dtype' );\nvar strided = require( './unary.js' );\nvar accessors = require( './accessors.js' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n*\n* mskunary( [ x, m, y ], shape, strides, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\nfunction mskunary( arrays, shape, strides, fcn ) {\n\tvar xget;\n\tvar mget;\n\tvar yset;\n\tvar x;\n\tvar m;\n\tvar y;\n\n\tx = arrays[ 0 ];\n\tif ( isAccessorArray( x ) ) {\n\t\txget = accessorGetter( dtype( x ) );\n\t}\n\tm = arrays[ 1 ];\n\tif ( isAccessorArray( m ) ) {\n\t\tmget = accessorGetter( dtype( m ) );\n\t}\n\ty = arrays[ 2 ];\n\tif ( isAccessorArray( y ) ) {\n\t\tyset = accessorSetter( dtype( y ) );\n\t}\n\tif ( xget || mget || yset ) {\n\t\txget = xget || getter( dtype( x ) );\n\t\tmget = mget || getter( dtype( m ) );\n\t\tyset = yset || setter( dtype( y ) );\n\t\treturn accessors( arrays, shape, strides, [ xget, mget, yset ], fcn );\n\t}\n\treturn strided( arrays, shape, strides, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' );\nvar accessorGetter = require( '@stdlib/array-base-accessor-getter' );\nvar accessorSetter = require( '@stdlib/array-base-accessor-setter' );\nvar getter = require( '@stdlib/array-base-getter' );\nvar setter = require( '@stdlib/array-base-setter' );\nvar dtype = require( '@stdlib/array-dtype' );\nvar strided = require( './unary.ndarray.js' );\nvar accessors = require( './accessors.ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a strided input array according to elements in a strided mask array and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array, a mask array, and one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride lengths for the strided arrays\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the strided arrays\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n* var offsets = [ 0, 0, 0 ];\n*\n* mskunary( [ x, m, y ], shape, strides, offsets, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\nfunction mskunary( arrays, shape, strides, offsets, fcn ) {\n\tvar xget;\n\tvar mget;\n\tvar yset;\n\tvar x;\n\tvar m;\n\tvar y;\n\n\tx = arrays[ 0 ];\n\tif ( isAccessorArray( x ) ) {\n\t\txget = accessorGetter( dtype( x ) );\n\t}\n\tm = arrays[ 1 ];\n\tif ( isAccessorArray( m ) ) {\n\t\tmget = accessorGetter( dtype( m ) );\n\t}\n\ty = arrays[ 2 ];\n\tif ( isAccessorArray( y ) ) {\n\t\tyset = accessorSetter( dtype( y ) );\n\t}\n\tif ( xget || mget || yset ) {\n\t\txget = xget || getter( dtype( x ) );\n\t\tmget = mget || getter( dtype( m ) );\n\t\tyset = yset || setter( dtype( y ) );\n\t\treturn accessors( arrays, shape, strides, offsets, [ xget, mget, yset ], fcn ); // eslint-disable-line max-len\n\t}\n\treturn strided( arrays, shape, strides, offsets, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = mskunary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a unary callback to elements in a strided input array according to elements in a strided mask array and assign results to elements in a strided output array.\n*\n* @module @stdlib/strided-base-mskunary\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n* var mskunary = require( '@stdlib/strided-base-mskunary' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n*\n* mskunary( [ x, m, y ], shape, strides, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var Uint8Array = require( '@stdlib/array-uint8' );\n* var mskunary = require( '@stdlib/strided-base-mskunary' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var m = new Uint8Array( [ 0, 0, 1, 0, 0 ] );\n* var y = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1 ];\n* var offsets = [ 0, 0, 0 ];\n*\n* mskunary.ndarray( [ x, m, y ], shape, strides, offsets, scale );\n*\n* console.log( y );\n* // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,GAAAC,EAAA,cAsDA,SAASC,EAAUC,EAAQC,EAAOC,EAASC,EAASC,EAAM,CACzD,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGJ,GADAD,EAAIb,EAAO,CAAE,EACR,EAAAa,GAAK,GAYV,IATAN,EAAKL,EAAS,CAAE,EAChBM,EAAKN,EAAS,CAAE,EAChBO,EAAKP,EAAS,CAAE,EAChBE,EAAKH,EAAS,CAAE,EAChBI,EAAKJ,EAAS,CAAE,EAChBK,EAAKL,EAAS,CAAE,EAChBS,EAAIX,EAAQ,CAAE,EACdY,EAAIZ,EAAQ,CAAE,EACda,EAAIb,EAAQ,CAAE,EACRe,EAAI,EAAGA,EAAID,EAAGC,IACdH,EAAGH,CAAG,IAAM,IAChBI,EAAGH,CAAG,EAAIN,EAAKO,EAAGH,CAAG,CAAE,GAExBA,GAAMH,EACNI,GAAMH,EACNI,GAAMH,CAER,CAKAT,EAAO,QAAUC,IC7FjB,IAAAiB,EAAAC,EAAA,SAAAC,GAAAC,EAAA,cAsBA,IAAIC,EAAgB,QAAS,oCAAqC,EAC9DC,EAAU,IAmCd,SAASC,EAAUC,EAAQC,EAAOC,EAASC,EAAM,CAChD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GAAAC,EAAA,cAsBA,IAAIC,EAAkB,QAAS,6CAA8C,EACzEC,EAAiB,QAAS,oCAAqC,EAC/DC,GAAiB,QAAS,oCAAqC,EAC/DC,EAAS,QAAS,2BAA4B,EAC9CC,GAAS,QAAS,2BAA4B,EAC9CC,EAAQ,QAAS,qBAAsB,EACvCC,GAAU,IACVC,GAAY,IAoChB,SAASC,GAAUC,EAAQC,EAAOC,EAASC,EAASC,EAAM,CACzD,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EAcJ,OAZAF,EAAIR,EAAQ,CAAE,EACTT,EAAiBiB,CAAE,IACvBH,EAAOb,EAAgBI,EAAOY,CAAE,CAAE,GAEnCC,EAAIT,EAAQ,CAAE,EACTT,EAAiBkB,CAAE,IACvBH,EAAOd,EAAgBI,EAAOa,CAAE,CAAE,GAEnCC,EAAIV,EAAQ,CAAE,EACTT,EAAiBmB,CAAE,IACvBH,EAAOd,GAAgBG,EAAOc,CAAE,CAAE,GAE9BL,GAAQC,GAAQC,GACpBF,EAAOA,GAAQX,EAAQE,EAAOY,CAAE,CAAE,EAClCF,EAAOA,GAAQZ,EAAQE,EAAOa,CAAE,CAAE,EAClCF,EAAOA,GAAQZ,GAAQC,EAAOc,CAAE,CAAE,EAC3BZ,GAAWE,EAAQC,EAAOC,EAASC,EAAS,CAAEE,EAAMC,EAAMC,CAAK,EAAGH,CAAI,GAEvEP,GAASG,EAAQC,EAAOC,EAASC,EAASC,CAAI,CACtD,CAKAd,EAAO,QAAUS,KC1BjB,IAAIY,GAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,GAAU,IAKdF,GAAaC,EAAM,UAAWC,EAAQ,EAKtC,OAAO,QAAUD", + "names": ["require_unary_ndarray", "__commonJSMin", "exports", "module", "mskunary", "arrays", "shape", "strides", "offsets", "fcn", "sx", "sm", "sy", "ix", "im", "iy", "x", "m", "y", "N", "i", "require_unary", "__commonJSMin", "exports", "module", "stride2offset", "ndarray", "mskunary", "arrays", "shape", "strides", "fcn", "offsets", "N", "require_accessors_ndarray", "__commonJSMin", "exports", "module", "mskunary", "arrays", "shape", "strides", "offsets", "accessors", "fcn", "xget", "mget", "yset", "sx", "sm", "sy", "ix", "im", "iy", "x", "m", "y", "N", "i", "require_accessors", "__commonJSMin", "exports", "module", "stride2offset", "ndarray", "mskunary", "arrays", "shape", "strides", "accessors", "fcn", "offsets", "N", "require_main", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorGetter", "accessorSetter", "getter", "setter", "dtype", "strided", "accessors", "mskunary", "arrays", "shape", "strides", "fcn", "xget", "mget", "yset", "x", "m", "y", "require_ndarray", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorGetter", "accessorSetter", "getter", "setter", "dtype", "strided", "accessors", "mskunary", "arrays", "shape", "strides", "offsets", "fcn", "xget", "mget", "yset", "x", "m", "y", "setReadOnly", "main", "ndarray"] } diff --git a/lib/accessors.js b/lib/accessors.js index 9847afc..39201b3 100644 --- a/lib/accessors.js +++ b/lib/accessors.js @@ -18,6 +18,12 @@ 'use strict'; +// MODULES // + +var stride2offset = require( '@stdlib/strided-base-stride2offset' ); +var ndarray = require( './accessors.ndarray.js' ); + + // MAIN // /** @@ -63,57 +69,16 @@ * // => [ 20.0, 40.0, 0.0, 80.0, 100.0 ] */ function mskunary( arrays, shape, strides, accessors, fcn ) { - var xget; - var mget; - var yset; - var sx; - var sm; - var sy; - var ix; - var im; - var iy; - var x; - var m; - var y; + var offsets; var N; - var i; N = shape[ 0 ]; - if ( N <= 0 ) { - return; - } - sx = strides[ 0 ]; - sm = strides[ 1 ]; - sy = strides[ 2 ]; - if ( sx < 0 ) { - ix = (1-N) * sx; - } else { - ix = 0; - } - if ( sm < 0 ) { - im = (1-N) * sm; - } else { - im = 0; - } - if ( sy < 0 ) { - iy = (1-N) * sy; - } else { - iy = 0; - } - x = arrays[ 0 ]; - m = arrays[ 1 ]; - y = arrays[ 2 ]; - xget = accessors[ 0 ]; - mget = accessors[ 1 ]; - yset = accessors[ 2 ]; - for ( i = 0; i < N; i++ ) { - if ( mget( m, im ) === 0 ) { - yset( y, iy, fcn( xget( x, ix ) ) ); - } - ix += sx; - im += sm; - iy += sy; - } + offsets = [ + stride2offset( N, strides[ 0 ] ), + stride2offset( N, strides[ 1 ] ), + stride2offset( N, strides[ 2 ] ) + ]; + return ndarray( arrays, shape, strides, offsets, accessors, fcn ); } diff --git a/lib/unary.js b/lib/unary.js index 2f6b638..985de4f 100644 --- a/lib/unary.js +++ b/lib/unary.js @@ -18,6 +18,12 @@ 'use strict'; +// MODULES // + +var stride2offset = require( '@stdlib/strided-base-stride2offset' ); +var ndarray = require( './unary.ndarray.js' ); + + // MAIN // /** @@ -51,51 +57,16 @@ * // => [ 10.0, 20.0, 0.0, 40.0, 50.0 ] */ function mskunary( arrays, shape, strides, fcn ) { - var sx; - var sm; - var sy; - var ix; - var im; - var iy; - var x; - var m; - var y; + var offsets; var N; - var i; N = shape[ 0 ]; - if ( N <= 0 ) { - return; - } - sx = strides[ 0 ]; - sm = strides[ 1 ]; - sy = strides[ 2 ]; - if ( sx < 0 ) { - ix = (1-N) * sx; - } else { - ix = 0; - } - if ( sm < 0 ) { - im = (1-N) * sm; - } else { - im = 0; - } - if ( sy < 0 ) { - iy = (1-N) * sy; - } else { - iy = 0; - } - x = arrays[ 0 ]; - m = arrays[ 1 ]; - y = arrays[ 2 ]; - for ( i = 0; i < N; i++ ) { - if ( m[ im ] === 0 ) { - y[ iy ] = fcn( x[ ix ] ); - } - ix += sx; - im += sm; - iy += sy; - } + offsets = [ + stride2offset( N, strides[ 0 ] ), + stride2offset( N, strides[ 1 ] ), + stride2offset( N, strides[ 2 ] ) + ]; + return ndarray( arrays, shape, strides, offsets, fcn ); } diff --git a/package.json b/package.json index 193c8da..867b3a0 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@stdlib/array-dtype": "^0.2.1", "@stdlib/complex-float32-ctor": "^0.0.1", "@stdlib/complex-float64-ctor": "^0.0.1", + "@stdlib/strided-base-stride2offset": "github:stdlib-js/strided-base-stride2offset#main", "@stdlib/types": "^0.3.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-library-manifest": "^0.2.1"