@stdlib/strided-base-ternary
Advanced tools
| # Security | ||
| > Policy for reporting security vulnerabilities. | ||
| See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). |
| { | ||
| "version": 3, | ||
| "sources": ["../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 ternary callback to strided input array elements and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject<Collection>} arrays - array-like object containing three input arrays 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 input and output arrays\n* @param {Callback} fcn - ternary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function add( x, y, z ) {\n* return x + y + z;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var w = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1, 1 ];\n*\n* ternary( [ x, y, z, w ], shape, strides, add );\n*\n* console.log( w );\n* // => <Float64Array>[ 3.0, 6.0, 9.0, 12.0, 15.0 ]\n*/\nfunction ternary( arrays, shape, strides, fcn ) {\n\tvar sx;\n\tvar sy;\n\tvar sz;\n\tvar sw;\n\tvar ix;\n\tvar iy;\n\tvar iz;\n\tvar iw;\n\tvar x;\n\tvar y;\n\tvar z;\n\tvar w;\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\tsy = strides[ 1 ];\n\tsz = strides[ 2 ];\n\tsw = strides[ 3 ];\n\tif ( sx < 0 ) {\n\t\tix = (1-N) * sx;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( sy < 0 ) {\n\t\tiy = (1-N) * sy;\n\t} else {\n\t\tiy = 0;\n\t}\n\tif ( sz < 0 ) {\n\t\tiz = (1-N) * sz;\n\t} else {\n\t\tiz = 0;\n\t}\n\tif ( sw < 0 ) {\n\t\tiw = (1-N) * sw;\n\t} else {\n\t\tiw = 0;\n\t}\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tw = arrays[ 3 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tw[ iw ] = fcn( x[ ix ], y[ iy ], z[ iz ] );\n\t\tix += sx;\n\t\tiy += sy;\n\t\tiz += sz;\n\t\tiw += sw;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = ternary;\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 ternary callback to strided input array elements and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject<Collection>} arrays - array-like object containing three input arrays 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 input and output arrays\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the input and output arrays\n* @param {Callback} fcn - ternary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function add( x, y, z ) {\n* return x + y + z;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var w = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1, 1 ];\n* var offsets = [ 0, 0, 0, 0 ];\n*\n* ternary( [ x, y, z, w ], shape, strides, offsets, add );\n*\n* console.log( w );\n* // => <Float64Array>[ 3.0, 6.0, 9.0, 12.0, 15.0 ]\n*/\nfunction ternary( arrays, shape, strides, offsets, fcn ) {\n\tvar sx;\n\tvar sy;\n\tvar sz;\n\tvar sw;\n\tvar ix;\n\tvar iy;\n\tvar iz;\n\tvar iw;\n\tvar x;\n\tvar y;\n\tvar z;\n\tvar w;\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\tiy = offsets[ 1 ];\n\tiz = offsets[ 2 ];\n\tiw = offsets[ 3 ];\n\tsx = strides[ 0 ];\n\tsy = strides[ 1 ];\n\tsz = strides[ 2 ];\n\tsw = strides[ 3 ];\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tw = arrays[ 3 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tw[ iw ] = fcn( x[ ix ], y[ iy ], z[ iz ] );\n\t\tix += sx;\n\t\tiy += sy;\n\t\tiz += sz;\n\t\tiw += sw;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = ternary;\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 ternary callback to strided input array elements and assign results to elements in a strided output array.\n*\n* @module @stdlib/strided-base-ternary\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ternary = require( '@stdlib/strided-base-ternary' );\n*\n* function add( x, y, z ) {\n* return x + y + z;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var w = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1, 1 ];\n*\n* ternary( [ x, y, z, w ], shape, strides, add );\n*\n* console.log( w );\n* // => <Float64Array>[ 3.0, 6.0, 9.0, 12.0, 15.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ternary = require( '@stdlib/strided-base-ternary' );\n*\n* function add( x, y, z ) {\n* return x + y + z;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var w = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1, 1 ];\n* var offsets = [ 0, 0, 0, 0 ];\n*\n* ternary.ndarray( [ x, y, z, w ], shape, strides, offsets, add );\n*\n* console.log( w );\n* // => <Float64Array>[ 3.0, 6.0, 9.0, 12.0, 15.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,EAAAC,EAAA,cAmDA,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAAM,CAC/C,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGJ,GADAD,EAAIf,EAAO,CAAE,EACR,EAAAe,GAAK,GA+BV,IA5BAZ,EAAKF,EAAS,CAAE,EAChBG,EAAKH,EAAS,CAAE,EAChBI,EAAKJ,EAAS,CAAE,EAChBK,EAAKL,EAAS,CAAE,EACXE,EAAK,EACTI,GAAM,EAAEQ,GAAKZ,EAEbI,EAAK,EAEDH,EAAK,EACTI,GAAM,EAAEO,GAAKX,EAEbI,EAAK,EAEDH,EAAK,EACTI,GAAM,EAAEM,GAAKV,EAEbI,EAAK,EAEDH,EAAK,EACTI,GAAM,EAAEK,GAAKT,EAEbI,EAAK,EAENC,EAAIZ,EAAQ,CAAE,EACda,EAAIb,EAAQ,CAAE,EACdc,EAAId,EAAQ,CAAE,EACde,EAAIf,EAAQ,CAAE,EACRiB,EAAI,EAAGA,EAAID,EAAGC,IACnBF,EAAGJ,CAAG,EAAIR,EAAKS,EAAGJ,CAAG,EAAGK,EAAGJ,CAAG,EAAGK,EAAGJ,CAAG,CAAE,EACzCF,GAAMJ,EACNK,GAAMJ,EACNK,GAAMJ,EACNK,GAAMJ,CAER,CAKAT,EAAO,QAAUC,IC/GjB,IAAAmB,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAqDA,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAASC,EAAM,CACxD,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGJ,GADAD,EAAIhB,EAAO,CAAE,EACR,EAAAgB,GAAK,GAeV,IAZAR,EAAKN,EAAS,CAAE,EAChBO,EAAKP,EAAS,CAAE,EAChBQ,EAAKR,EAAS,CAAE,EAChBS,EAAKT,EAAS,CAAE,EAChBE,EAAKH,EAAS,CAAE,EAChBI,EAAKJ,EAAS,CAAE,EAChBK,EAAKL,EAAS,CAAE,EAChBM,EAAKN,EAAS,CAAE,EAChBW,EAAIb,EAAQ,CAAE,EACdc,EAAId,EAAQ,CAAE,EACde,EAAIf,EAAQ,CAAE,EACdgB,EAAIhB,EAAQ,CAAE,EACRkB,EAAI,EAAGA,EAAID,EAAGC,IACnBF,EAAGJ,CAAG,EAAIR,EAAKS,EAAGJ,CAAG,EAAGK,EAAGJ,CAAG,EAAGK,EAAGJ,CAAG,CAAE,EACzCF,GAAMJ,EACNK,GAAMJ,EACNK,GAAMJ,EACNK,GAAMJ,CAER,CAKAV,EAAO,QAAUC,IC1BjB,IAAIoB,EAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,EAAU,IAKdF,EAAaC,EAAM,UAAWC,CAAQ,EAKtC,OAAO,QAAUD", | ||
| "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 ternary callback to strided input array elements and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject<Collection>} arrays - array-like object containing three input arrays 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 input and output arrays\n* @param {Callback} fcn - ternary callback\n* @returns {void}\n*\n* @example\n* var add = require( '@stdlib/math-base-ops-add3' );\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var w = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1, 1 ];\n*\n* ternary( [ x, y, z, w ], shape, strides, add );\n*\n* console.log( w );\n* // => <Float64Array>[ 3.0, 6.0, 9.0, 12.0, 15.0 ]\n*/\nfunction ternary( arrays, shape, strides, fcn ) {\n\tvar sx;\n\tvar sy;\n\tvar sz;\n\tvar sw;\n\tvar ix;\n\tvar iy;\n\tvar iz;\n\tvar iw;\n\tvar x;\n\tvar y;\n\tvar z;\n\tvar w;\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\tsy = strides[ 1 ];\n\tsz = strides[ 2 ];\n\tsw = strides[ 3 ];\n\tif ( sx < 0 ) {\n\t\tix = (1-N) * sx;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( sy < 0 ) {\n\t\tiy = (1-N) * sy;\n\t} else {\n\t\tiy = 0;\n\t}\n\tif ( sz < 0 ) {\n\t\tiz = (1-N) * sz;\n\t} else {\n\t\tiz = 0;\n\t}\n\tif ( sw < 0 ) {\n\t\tiw = (1-N) * sw;\n\t} else {\n\t\tiw = 0;\n\t}\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tw = arrays[ 3 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tw[ iw ] = fcn( x[ ix ], y[ iy ], z[ iz ] );\n\t\tix += sx;\n\t\tiy += sy;\n\t\tiz += sz;\n\t\tiw += sw;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = ternary;\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 ternary callback to strided input array elements and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject<Collection>} arrays - array-like object containing three input arrays 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 input and output arrays\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the input and output arrays\n* @param {Callback} fcn - ternary callback\n* @returns {void}\n*\n* @example\n* var add = require( '@stdlib/math-base-ops-add3' );\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var w = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1, 1 ];\n* var offsets = [ 0, 0, 0, 0 ];\n*\n* ternary( [ x, y, z, w ], shape, strides, offsets, add );\n*\n* console.log( w );\n* // => <Float64Array>[ 3.0, 6.0, 9.0, 12.0, 15.0 ]\n*/\nfunction ternary( arrays, shape, strides, offsets, fcn ) {\n\tvar sx;\n\tvar sy;\n\tvar sz;\n\tvar sw;\n\tvar ix;\n\tvar iy;\n\tvar iz;\n\tvar iw;\n\tvar x;\n\tvar y;\n\tvar z;\n\tvar w;\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\tiy = offsets[ 1 ];\n\tiz = offsets[ 2 ];\n\tiw = offsets[ 3 ];\n\tsx = strides[ 0 ];\n\tsy = strides[ 1 ];\n\tsz = strides[ 2 ];\n\tsw = strides[ 3 ];\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tw = arrays[ 3 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tw[ iw ] = fcn( x[ ix ], y[ iy ], z[ iz ] );\n\t\tix += sx;\n\t\tiy += sy;\n\t\tiz += sz;\n\t\tiw += sw;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = ternary;\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 ternary callback to strided input array elements and assign results to elements in a strided output array.\n*\n* @module @stdlib/strided-base-ternary\n*\n* @example\n* var add = require( '@stdlib/math-base-ops-add3' );\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ternary = require( '@stdlib/strided-base-ternary' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var w = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1, 1 ];\n*\n* ternary( [ x, y, z, w ], shape, strides, add );\n*\n* console.log( w );\n* // => <Float64Array>[ 3.0, 6.0, 9.0, 12.0, 15.0 ]\n*\n* @example\n* var add = require( '@stdlib/math-base-ops-add3' );\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ternary = require( '@stdlib/strided-base-ternary' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var w = new Float64Array( x.length );\n*\n* var shape = [ x.length ];\n* var strides = [ 1, 1, 1, 1 ];\n* var offsets = [ 0, 0, 0, 0 ];\n*\n* ternary.ndarray( [ x, y, z, w ], shape, strides, offsets, add );\n*\n* console.log( w );\n* // => <Float64Array>[ 3.0, 6.0, 9.0, 12.0, 15.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,EAAAC,EAAA,cAgDA,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAAM,CAC/C,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGJ,GADAD,EAAIf,EAAO,CAAE,EACR,EAAAe,GAAK,GA+BV,IA5BAZ,EAAKF,EAAS,CAAE,EAChBG,EAAKH,EAAS,CAAE,EAChBI,EAAKJ,EAAS,CAAE,EAChBK,EAAKL,EAAS,CAAE,EACXE,EAAK,EACTI,GAAM,EAAEQ,GAAKZ,EAEbI,EAAK,EAEDH,EAAK,EACTI,GAAM,EAAEO,GAAKX,EAEbI,EAAK,EAEDH,EAAK,EACTI,GAAM,EAAEM,GAAKV,EAEbI,EAAK,EAEDH,EAAK,EACTI,GAAM,EAAEK,GAAKT,EAEbI,EAAK,EAENC,EAAIZ,EAAQ,CAAE,EACda,EAAIb,EAAQ,CAAE,EACdc,EAAId,EAAQ,CAAE,EACde,EAAIf,EAAQ,CAAE,EACRiB,EAAI,EAAGA,EAAID,EAAGC,IACnBF,EAAGJ,CAAG,EAAIR,EAAKS,EAAGJ,CAAG,EAAGK,EAAGJ,CAAG,EAAGK,EAAGJ,CAAG,CAAE,EACzCF,GAAMJ,EACNK,GAAMJ,EACNK,GAAMJ,EACNK,GAAMJ,CAER,CAKAT,EAAO,QAAUC,IC5GjB,IAAAmB,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAkDA,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAASC,EAAM,CACxD,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGJ,GADAD,EAAIhB,EAAO,CAAE,EACR,EAAAgB,GAAK,GAeV,IAZAR,EAAKN,EAAS,CAAE,EAChBO,EAAKP,EAAS,CAAE,EAChBQ,EAAKR,EAAS,CAAE,EAChBS,EAAKT,EAAS,CAAE,EAChBE,EAAKH,EAAS,CAAE,EAChBI,EAAKJ,EAAS,CAAE,EAChBK,EAAKL,EAAS,CAAE,EAChBM,EAAKN,EAAS,CAAE,EAChBW,EAAIb,EAAQ,CAAE,EACdc,EAAId,EAAQ,CAAE,EACde,EAAIf,EAAQ,CAAE,EACdgB,EAAIhB,EAAQ,CAAE,EACRkB,EAAI,EAAGA,EAAID,EAAGC,IACnBF,EAAGJ,CAAG,EAAIR,EAAKS,EAAGJ,CAAG,EAAGK,EAAGJ,CAAG,EAAGK,EAAGJ,CAAG,CAAE,EACzCF,GAAMJ,EACNK,GAAMJ,EACNK,GAAMJ,EACNK,GAAMJ,CAER,CAKAV,EAAO,QAAUC,IC7BjB,IAAIoB,EAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,EAAU,IAKdF,EAAaC,EAAM,UAAWC,CAAQ,EAKtC,OAAO,QAAUD", | ||
| "names": ["require_main", "__commonJSMin", "exports", "module", "ternary", "arrays", "shape", "strides", "fcn", "sx", "sy", "sz", "sw", "ix", "iy", "iz", "iw", "x", "y", "z", "w", "N", "i", "require_ndarray", "__commonJSMin", "exports", "module", "ternary", "arrays", "shape", "strides", "offsets", "fcn", "sx", "sy", "sz", "sw", "ix", "iy", "iz", "iw", "x", "y", "z", "w", "N", "i", "setReadOnly", "main", "ndarray"] | ||
| } |
+10
-22
@@ -48,8 +48,5 @@ /* | ||
| * @example | ||
| * var Float64Array = require( `@stdlib/array/float64` ); | ||
| * var add = require( '@stdlib/math-base-ops-add3' ); | ||
| * var Float64Array = require( '@stdlib/array-float64' ); | ||
| * | ||
| * function add( x, y, z ) { | ||
| * return x + y + z; | ||
| * } | ||
| * | ||
| * var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -68,3 +65,3 @@ * var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
| */ | ||
| ( arrays: ArrayLike<ArrayLike<any>>, shape: ArrayLike<number>, strides: ArrayLike<number>, fcn: Ternary ): void; // tslint:disable-line:max-line-length | ||
| ( arrays: ArrayLike<ArrayLike<any>>, shape: ArrayLike<number>, strides: ArrayLike<number>, fcn: Ternary ): void; | ||
@@ -81,8 +78,5 @@ /** | ||
| * @example | ||
| * var Float64Array = require( `@stdlib/array/float64` ); | ||
| * var add = require( '@stdlib/math-base-ops-add3' ); | ||
| * var Float64Array = require( '@stdlib/array-float64' ); | ||
| * | ||
| * function add( x, y, z ) { | ||
| * return x + y + z; | ||
| * } | ||
| * | ||
| * var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -102,3 +96,3 @@ * var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
| */ | ||
| ndarray( arrays: ArrayLike<ArrayLike<any>>, shape: ArrayLike<number>, strides: ArrayLike<number>, offsets: ArrayLike<number>, fcn: Ternary ): void; // tslint:disable-line:max-line-length | ||
| ndarray( arrays: ArrayLike<ArrayLike<any>>, shape: ArrayLike<number>, strides: ArrayLike<number>, offsets: ArrayLike<number>, fcn: Ternary ): void; | ||
| } | ||
@@ -115,8 +109,5 @@ | ||
| * @example | ||
| * var Float64Array = require( `@stdlib/array/float64` ); | ||
| * var add = require( '@stdlib/math-base-ops-add3' ); | ||
| * var Float64Array = require( '@stdlib/array-float64' ); | ||
| * | ||
| * function add( x, y, z ) { | ||
| * return x + y + z; | ||
| * } | ||
| * | ||
| * var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -136,8 +127,5 @@ * var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
| * @example | ||
| * var Float64Array = require( `@stdlib/array/float64` ); | ||
| * var add = require( '@stdlib/math-base-ops-add3' ); | ||
| * var Float64Array = require( '@stdlib/array-float64' ); | ||
| * | ||
| * function add( x, y, z ) { | ||
| * return x + y + z; | ||
| * } | ||
| * | ||
| * var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -144,0 +132,0 @@ * var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); |
+2
-8
@@ -27,9 +27,6 @@ /** | ||
| * @example | ||
| * var add = require( '@stdlib/math-base-ops-add3' ); | ||
| * var Float64Array = require( '@stdlib/array-float64' ); | ||
| * var ternary = require( '@stdlib/strided-base-ternary' ); | ||
| * | ||
| * function add( x, y, z ) { | ||
| * return x + y + z; | ||
| * } | ||
| * | ||
| * var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -49,9 +46,6 @@ * var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
| * @example | ||
| * var add = require( '@stdlib/math-base-ops-add3' ); | ||
| * var Float64Array = require( '@stdlib/array-float64' ); | ||
| * var ternary = require( '@stdlib/strided-base-ternary' ); | ||
| * | ||
| * function add( x, y, z ) { | ||
| * return x + y + z; | ||
| * } | ||
| * | ||
| * var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -58,0 +52,0 @@ * var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); |
+1
-4
@@ -33,8 +33,5 @@ /** | ||
| * @example | ||
| * var add = require( '@stdlib/math-base-ops-add3' ); | ||
| * var Float64Array = require( '@stdlib/array-float64' ); | ||
| * | ||
| * function add( x, y, z ) { | ||
| * return x + y + z; | ||
| * } | ||
| * | ||
| * var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -41,0 +38,0 @@ * var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); |
+1
-4
@@ -34,8 +34,5 @@ /** | ||
| * @example | ||
| * var add = require( '@stdlib/math-base-ops-add3' ); | ||
| * var Float64Array = require( '@stdlib/array-float64' ); | ||
| * | ||
| * function add( x, y, z ) { | ||
| * return x + y + z; | ||
| * } | ||
| * | ||
| * var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -42,0 +39,0 @@ * var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); |
+1
-1
@@ -1,1 +0,1 @@ | ||
| Copyright (c) 2016-2023 The Stdlib Authors. | ||
| Copyright (c) 2016-2024 The Stdlib Authors. |
+11
-9
| { | ||
| "name": "@stdlib/strided-base-ternary", | ||
| "version": "0.1.1", | ||
| "version": "0.2.0", | ||
| "description": "Apply a ternary callback to strided input array elements and assign results to elements in a strided output array.", | ||
@@ -40,4 +40,4 @@ "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@stdlib/types": "^0.1.0", | ||
| "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.1" | ||
| "@stdlib/types": "^0.3.1", | ||
| "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0" | ||
| }, | ||
@@ -47,8 +47,8 @@ "devDependencies": { | ||
| "@stdlib/array-filled-by": "^0.1.0", | ||
| "@stdlib/array-float64": "^0.1.0", | ||
| "@stdlib/bench": "^0.1.0", | ||
| "@stdlib/math-base-assert-is-nan": "^0.1.0", | ||
| "@stdlib/math-base-special-floor": "^0.1.0", | ||
| "@stdlib/array-float64": "^0.1.1", | ||
| "@stdlib/math-base-assert-is-nan": "^0.1.1", | ||
| "@stdlib/math-base-ops-add3": "^0.1.0", | ||
| "@stdlib/math-base-special-floor": "^0.1.1", | ||
| "@stdlib/math-base-special-pow": "^0.1.0", | ||
| "@stdlib/math-base-special-round": "^0.1.0", | ||
| "@stdlib/math-base-special-round": "^0.1.1", | ||
| "@stdlib/random-base-discrete-uniform": "^0.1.0", | ||
@@ -58,3 +58,5 @@ "@stdlib/random-base-randu": "^0.1.0", | ||
| "istanbul": "^0.4.1", | ||
| "tap-min": "git+https://github.com/Planeshifter/tap-min.git" | ||
| "tap-min": "git+https://github.com/Planeshifter/tap-min.git", | ||
| "@stdlib/bench-harness": "^0.1.2", | ||
| "@stdlib/bench": "^0.3.1" | ||
| }, | ||
@@ -61,0 +63,0 @@ "engines": { |
+36
-27
@@ -67,8 +67,5 @@ <!-- | ||
| ```javascript | ||
| var add = require( '@stdlib/math-base-ops-add3' ); | ||
| var Float64Array = require( '@stdlib/array-float64' ); | ||
| function add( x, y, z ) { | ||
| return x + y + z; | ||
| } | ||
| var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -93,8 +90,5 @@ var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
| ```javascript | ||
| var add = require( '@stdlib/math-base-ops-add3' ); | ||
| var Float64Array = require( '@stdlib/array-float64' ); | ||
| function add( x, y, z ) { | ||
| return x + y + z; | ||
| } | ||
| var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -112,8 +106,5 @@ var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
| ```javascript | ||
| var add = require( '@stdlib/math-base-ops-add3' ); | ||
| var Float64Array = require( '@stdlib/array-float64' ); | ||
| function add( x, y, z ) { | ||
| return x + y + z; | ||
| } | ||
| // Initial arrays... | ||
@@ -142,8 +133,5 @@ var x0 = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); | ||
| ```javascript | ||
| var add = require( '@stdlib/math-base-ops-add3' ); | ||
| var Float64Array = require( '@stdlib/array-float64' ); | ||
| function add( x, y, z ) { | ||
| return x + y + z; | ||
| } | ||
| var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
@@ -167,8 +155,5 @@ var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); | ||
| ```javascript | ||
| var add = require( '@stdlib/math-base-ops-add3' ); | ||
| var Float64Array = require( '@stdlib/array-float64' ); | ||
| function add( x, y, z ) { | ||
| return x + y + z; | ||
| } | ||
| var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); | ||
@@ -203,8 +188,5 @@ var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); | ||
| var filledarrayBy = require( '@stdlib/array-filled-by' ); | ||
| var add = require( '@stdlib/math-base-ops-add3' ); | ||
| var ternary = require( '@stdlib/strided-base-ternary' ); | ||
| function add( x, y, z ) { | ||
| return x + y + z; | ||
| } | ||
| var N = 10; | ||
@@ -240,2 +222,12 @@ | ||
| * * * | ||
| ## See Also | ||
| - <span class="package-name">[`@stdlib/strided-base/binary`][@stdlib/strided/base/binary]</span><span class="delimiter">: </span><span class="description">apply a binary callback to elements in strided input arrays and assign results to elements in a strided output array.</span> | ||
| - <span class="package-name">[`@stdlib/strided-base/nullary`][@stdlib/strided/base/nullary]</span><span class="delimiter">: </span><span class="description">apply a nullary callback and assign results to elements in a strided output array.</span> | ||
| - <span class="package-name">[`@stdlib/strided-base/quaternary`][@stdlib/strided/base/quaternary]</span><span class="delimiter">: </span><span class="description">apply a quaternary callback to strided input array elements and assign results to elements in a strided output array.</span> | ||
| - <span class="package-name">[`@stdlib/strided-base/quinary`][@stdlib/strided/base/quinary]</span><span class="delimiter">: </span><span class="description">apply a quinary callback to strided input array elements and assign results to elements in a strided output array.</span> | ||
| - <span class="package-name">[`@stdlib/strided-base/unary`][@stdlib/strided/base/unary]</span><span class="delimiter">: </span><span class="description">apply a unary callback to elements in a strided input array and assign results to elements in a strided output array.</span> | ||
| </section> | ||
@@ -271,3 +263,3 @@ | ||
| Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. | ||
| Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. | ||
@@ -285,4 +277,4 @@ </section> | ||
| [test-image]: https://github.com/stdlib-js/strided-base-ternary/actions/workflows/test.yml/badge.svg?branch=v0.1.1 | ||
| [test-url]: https://github.com/stdlib-js/strided-base-ternary/actions/workflows/test.yml?query=branch:v0.1.1 | ||
| [test-image]: https://github.com/stdlib-js/strided-base-ternary/actions/workflows/test.yml/badge.svg?branch=v0.2.0 | ||
| [test-url]: https://github.com/stdlib-js/strided-base-ternary/actions/workflows/test.yml?query=branch:v0.2.0 | ||
@@ -310,4 +302,7 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/strided-base-ternary/main.svg | ||
| [deno-url]: https://github.com/stdlib-js/strided-base-ternary/tree/deno | ||
| [deno-readme]: https://github.com/stdlib-js/strided-base-ternary/blob/deno/README.md | ||
| [umd-url]: https://github.com/stdlib-js/strided-base-ternary/tree/umd | ||
| [umd-readme]: https://github.com/stdlib-js/strided-base-ternary/blob/umd/README.md | ||
| [esm-url]: https://github.com/stdlib-js/strided-base-ternary/tree/esm | ||
| [esm-readme]: https://github.com/stdlib-js/strided-base-ternary/blob/esm/README.md | ||
| [branches-url]: https://github.com/stdlib-js/strided-base-ternary/blob/main/branches.md | ||
@@ -319,4 +314,18 @@ | ||
| <!-- <related-links> --> | ||
| [@stdlib/strided/base/binary]: https://www.npmjs.com/package/@stdlib/strided-base-binary | ||
| [@stdlib/strided/base/nullary]: https://www.npmjs.com/package/@stdlib/strided-base-nullary | ||
| [@stdlib/strided/base/quaternary]: https://www.npmjs.com/package/@stdlib/strided-base-quaternary | ||
| [@stdlib/strided/base/quinary]: https://www.npmjs.com/package/@stdlib/strided-base-quinary | ||
| [@stdlib/strided/base/unary]: https://www.npmjs.com/package/@stdlib/strided-base-unary | ||
| <!-- </related-links> --> | ||
| </section> | ||
| <!-- /.links --> |
Sorry, the diff of this file is not supported yet
48889
3.55%321
2.88%15
15.38%402
-5.63%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated