-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.mjs.map
1 lines (1 loc) · 4.94 KB
/
index.mjs.map
1
{"version":3,"file":"index.mjs","sources":["../lib/main.js"],"sourcesContent":["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 quinary callback to elements in five five-dimensional nested input arrays and assigns results to elements in a five-dimensional nested output array.\n*\n* ## Notes\n*\n* - The function assumes that the input and output arrays have the same shape.\n*\n* @param {ArrayLikeObject<Array<Array<Array<Array<Collection>>>>>} arrays - array-like object containing five input nested arrays and one output nested array\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {Callback} fcn - quinary callback\n* @returns {void}\n*\n* @example\n* import ones5d from '@stdlib/array-base-ones5d';\n* import zeros5d from '@stdlib/array-base-zeros5d';\n* import add from '@stdlib/math-base-ops-add5';\n*\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* var x = ones5d( shape );\n* var y = ones5d( shape );\n* var z = ones5d( shape );\n* var w = ones5d( shape );\n* var v = ones5d( shape );\n* var out = zeros5d( shape );\n*\n* quinary5d( [ x, y, z, w, v, out ], shape, add );\n*\n* console.log( out );\n* // => [ [ [ [ [ 5.0, 5.0 ], [ 5.0, 5.0 ] ] ] ] ]\n*/\nfunction quinary5d( arrays, shape, fcn ) {\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar x0;\n\tvar y0;\n\tvar z0;\n\tvar w0;\n\tvar u0;\n\tvar v0;\n\tvar x1;\n\tvar y1;\n\tvar z1;\n\tvar w1;\n\tvar u1;\n\tvar v1;\n\tvar x2;\n\tvar y2;\n\tvar z2;\n\tvar w2;\n\tvar u2;\n\tvar v2;\n\tvar x3;\n\tvar y3;\n\tvar z3;\n\tvar w3;\n\tvar u3;\n\tvar v3;\n\tvar x;\n\tvar y;\n\tvar z;\n\tvar w;\n\tvar u;\n\tvar v;\n\n\tS0 = shape[ 4 ];\n\tS1 = shape[ 3 ];\n\tS2 = shape[ 2 ];\n\tS3 = shape[ 1 ];\n\tS4 = shape[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 || S2 <= 0 || S3 <= 0 || S4 <= 0 ) {\n\t\treturn;\n\t}\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tw = arrays[ 3 ];\n\tu = arrays[ 4 ];\n\tv = arrays[ 5 ];\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tx3 = x[ i4 ];\n\t\ty3 = y[ i4 ];\n\t\tz3 = z[ i4 ];\n\t\tw3 = w[ i4 ];\n\t\tu3 = u[ i4 ];\n\t\tv3 = v[ i4 ];\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tx2 = x3[ i3 ];\n\t\t\ty2 = y3[ i3 ];\n\t\t\tz2 = z3[ i3 ];\n\t\t\tw2 = w3[ i3 ];\n\t\t\tu2 = u3[ i3 ];\n\t\t\tv2 = v3[ i3 ];\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tx1 = x2[ i2 ];\n\t\t\t\ty1 = y2[ i2 ];\n\t\t\t\tz1 = z2[ i2 ];\n\t\t\t\tw1 = w2[ i2 ];\n\t\t\t\tu1 = u2[ i2 ];\n\t\t\t\tv1 = v2[ i2 ];\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tx0 = x1[ i1 ];\n\t\t\t\t\ty0 = y1[ i1 ];\n\t\t\t\t\tz0 = z1[ i1 ];\n\t\t\t\t\tw0 = w1[ i1 ];\n\t\t\t\t\tu0 = u1[ i1 ];\n\t\t\t\t\tv0 = v1[ i1 ];\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tv0[ i0 ] = fcn( x0[ i0 ], y0[ i0 ], z0[ i0 ], w0[ i0 ], u0[ i0 ] ); // eslint-disable-line max-len\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default quinary5d;\n"],"names":["quinary5d","arrays","shape","fcn","S0","S1","S2","S3","S4","i0","i1","i2","i3","i4","x0","y0","z0","w0","u0","v0","x1","y1","z1","w1","u1","v1","x2","y2","z2","w2","u2","v2","x3","y3","z3","w3","u3","v3","x","y","z","w","u","v"],"mappings":";;AAqDA,SAASA,EAAWC,EAAQC,EAAOC,GAClC,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAOJ,GALAvC,EAAKF,EAAO,GACZG,EAAKH,EAAO,GACZI,EAAKJ,EAAO,GACZK,EAAKL,EAAO,GACZM,EAAKN,EAAO,KACPE,GAAM,GAAKC,GAAM,GAAKC,GAAM,GAAKC,GAAM,GAAKC,GAAM,GASvD,IANA8B,EAAIrC,EAAQ,GACZsC,EAAItC,EAAQ,GACZuC,EAAIvC,EAAQ,GACZwC,EAAIxC,EAAQ,GACZyC,EAAIzC,EAAQ,GACZ0C,EAAI1C,EAAQ,GACNY,EAAK,EAAGA,EAAKL,EAAIK,IAOtB,IANAmB,EAAKM,EAAGzB,GACRoB,EAA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