diff --git a/base/group-entries-by/README.md b/base/group-entries-by/README.md
new file mode 100644
index 00000000..32762748
--- /dev/null
+++ b/base/group-entries-by/README.md
@@ -0,0 +1,173 @@
+
+
+# groupEntriesBy
+
+> Group element entries according to an indicator function.
+
+
+
+
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var groupEntriesBy = require( '@stdlib/array/base/group-entries-by' );
+```
+
+#### groupEntriesBy( x, indicator\[, thisArg] )
+
+Groups element entries according to an indicator function.
+
+```javascript
+function indicator( v ) {
+ return v[ 0 ];
+}
+
+var x = [ 'beep', 'boop', 'foo', 'bar' ];
+
+var out = groupEntriesBy( x, indicator );
+// returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
+```
+
+An `indicator` function is provided the following arguments:
+
+- **value**: current array element.
+- **index**: current array element index.
+- **arr**: input array.
+
+To set the `indicator` function execution context, provide a `thisArg`.
+
+```javascript
+function indicator( v ) {
+ this.count += 1;
+ return v[ 0 ];
+}
+
+var x = [ 'beep', 'boop', 'foo', 'bar' ];
+
+var context = {
+ 'count': 0
+};
+var out = groupEntriesBy( x, indicator, context );
+// returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
+
+var cnt = context.count;
+// returns 4
+```
+
+
+
+
+
+
+
+
+
+## Notes
+
+- The value returned by an `indicator` function should be a value which can be serialized as an object key. As a counterexample,
+
+ ```javascript
+ function indicator( v ) {
+ return {};
+ }
+ var x = [ 'beep', 'boop', 'foo', 'bar' ];
+
+ var out = groupEntriesBy( x, indicator );
+ // returns { '[object Object]': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 2, 'foo' ], [ 3, 'bar' ] ] }
+ ```
+
+ while each group identifier is unique, all input array elements resolve to the same group because each group identifier serializes to the same string.
+
+
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var take = require( '@stdlib/array/base/take' );
+var groupEntriesBy = require( '@stdlib/array/base/group-entries-by' );
+
+function indicator( v ) {
+ // Use the first letter of each element to define groups:
+ return v[ 0 ];
+}
+
+// Define an initial array of values:
+var values = [ 'beep', 'boop', 'foo', 'bar', 'woot', 'woot' ];
+
+// Sample from the initial array to generate a random collection:
+var indices = discreteUniform( 100, 0, values.length-1, {
+ 'dtype': 'generic'
+});
+var x = take( values, indices );
+// returns [...]
+
+// Group the values:
+var out = groupEntriesBy( x, indicator );
+// returns {...}
+
+console.log( out );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base/group-entries-by/benchmark/benchmark.length.js b/base/group-entries-by/benchmark/benchmark.length.js
new file mode 100644
index 00000000..821f12a4
--- /dev/null
+++ b/base/group-entries-by/benchmark/benchmark.length.js
@@ -0,0 +1,109 @@
+/**
+* @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';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var isPlainObject = require( '@stdlib/assert/is-plain-object' );
+var zeroTo = require( './../../../base/zero-to' );
+var pkg = require( './../package.json' ).name;
+var groupEntriesBy = require( './../lib' );
+
+
+// FUNCTIONS //
+
+/**
+* Indicator function.
+*
+* @private
+* @param {*} value - current array element
+* @param {NonNegativeInteger} index - current array element index
+* @param {Collection} arr - input array
+* @returns {*} indicator value
+*/
+function indicator( value, index ) {
+ return index; // note: this corresponds to the extreme case where every element is in a distinct group
+}
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var x = zeroTo( len );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var out;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = groupEntriesBy( x, indicator );
+ if ( typeof out !== 'object' ) {
+ b.fail( 'should return an object' );
+ }
+ }
+ b.toc();
+ if ( !isPlainObject( out ) ) {
+ b.fail( 'should return an object' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+
+ f = createBenchmark( len );
+ bench( pkg+':len='+len+',num_groups='+len, f );
+ }
+}
+
+main();
diff --git a/base/group-entries-by/docs/repl.txt b/base/group-entries-by/docs/repl.txt
new file mode 100644
index 00000000..b5a927ec
--- /dev/null
+++ b/base/group-entries-by/docs/repl.txt
@@ -0,0 +1,42 @@
+
+{{alias}}( x, indicator[, thisArg] )
+ Groups element entries according to an indicator function.
+
+ When invoked, the indicator function is provided the following arguments:
+
+ - value: current array element.
+ - index: current array element index.
+ - arr: input array.
+
+ The value returned by an indicator function should be a value which can be
+ serialized as an object key.
+
+ If provided an empty array, the function returns an empty object.
+
+ Parameters
+ ----------
+ x: ArrayLike
+ Input array.
+
+ indicator: Function
+ Indicator function specifying which group an element in the input array
+ belongs to.
+
+ thisArg: any (optional)
+ Indicator function execution context.
+
+ Returns
+ -------
+ out: Object
+ Group results.
+
+ Examples
+ --------
+ > function fcn( v ) { return v[ 0 ]; };
+ > var x = [ 'beep', 'boop', 'foo', 'bar' ];
+ > var out = {{alias}}( x, fcn )
+ { 'b': [ [0,'beep'], [1,'boop'], [3,'bar'] ], 'f': [ [2,'foo'] ] }
+
+ See Also
+ --------
+
diff --git a/base/group-entries-by/docs/types/index.d.ts b/base/group-entries-by/docs/types/index.d.ts
new file mode 100644
index 00000000..31f1c569
--- /dev/null
+++ b/base/group-entries-by/docs/types/index.d.ts
@@ -0,0 +1,107 @@
+/*
+* @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.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { Collection, AccessorArrayLike } from '@stdlib/types/array';
+
+/**
+* Object key.
+*/
+type Key = string | symbol | number;
+
+/**
+* Specifies which group an element in the input array belongs to.
+*
+* @returns object key
+*/
+type Nullary = ( this: U ) => Key;
+
+/**
+* Specifies which group an element in the input array belongs to.
+*
+* @param value - current array element
+* @returns object key
+*/
+type Unary = ( this: U, value: T ) => Key;
+
+/**
+* Specifies which group an element in the input array belongs to.
+*
+* @param value - current array element
+* @param index - current array element index
+* @returns object key
+*/
+type Binary = ( this: U, value: T, index: number ) => Key;
+
+/**
+* Specifies which group an element in the input array belongs to.
+*
+* @param value - current array element
+* @param index - current array element index
+* @param arr - input array
+* @returns object key
+*/
+type Ternary = ( this: U, value: T, index: number, arr: Collection ) => Key;
+
+/**
+* Specifies which group an element in the input array belongs to.
+*
+* @param value - current array element
+* @param index - current array element index
+* @param arr - input array
+* @returns object key
+*/
+type Indicator = Nullary | Unary | Binary | Ternary;
+
+/**
+* Interface describing returned group results.
+*/
+interface EntriesResults {
+ /**
+ * Object properties.
+ */
+ [key: K]: Array<[ number, T ]>;
+}
+
+/**
+* Groups element entries according to an indicator function.
+*
+* @param x - input array
+* @param indicator - indicator function specifying which group an element in the input array belongs to
+* @param thisArg - indicator function execution context
+* @returns group results
+*
+* @example
+* function indicator( v ) {
+* return v[ 0 ];
+* }
+*
+* var x = [ 'beep', 'boop', 'foo', 'bar' ];
+*
+* var out = groupEntriesBy( x, indicator );
+* // returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
+*/
+declare function groupEntriesBy( x: Collection | AccessorArrayLike, indicator: Indicator, thisArg?: ThisParameterType> ): EntriesResults;
+
+
+// EXPORTS //
+
+export = groupEntriesBy;
diff --git a/base/group-entries-by/docs/types/test.ts b/base/group-entries-by/docs/types/test.ts
new file mode 100644
index 00000000..7f3fd499
--- /dev/null
+++ b/base/group-entries-by/docs/types/test.ts
@@ -0,0 +1,73 @@
+/*
+* @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.
+*/
+
+import groupEntriesBy = require( './index' );
+
+/**
+* Indicator function.
+*
+* @param v - value
+* @returns result
+*/
+function indicator( v: string ): string {
+ return v[ 0 ];
+}
+
+
+// TESTS //
+
+// The function returns group results...
+{
+ const x = [ 'foo', 'bar' ];
+
+ groupEntriesBy( x, indicator ); // $ExpectType EntriesResults
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an array...
+{
+ groupEntriesBy( 5, indicator ); // $ExpectError
+ groupEntriesBy( true, indicator ); // $ExpectError
+ groupEntriesBy( false, indicator ); // $ExpectError
+ groupEntriesBy( null, indicator ); // $ExpectError
+ groupEntriesBy( void 0, indicator ); // $ExpectError
+ groupEntriesBy( {}, indicator ); // $ExpectError
+ groupEntriesBy( ( x: number ): number => x, indicator ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a valid function...
+{
+ const x = [ 'foo', 'bar' ];
+
+ groupEntriesBy( x, '5' ); // $ExpectError
+ groupEntriesBy( x, 5 ); // $ExpectError
+ groupEntriesBy( x, true ); // $ExpectError
+ groupEntriesBy( x, false ); // $ExpectError
+ groupEntriesBy( x, null ); // $ExpectError
+ groupEntriesBy( x, void 0 ); // $ExpectError
+ groupEntriesBy( x, {} ); // $ExpectError
+ groupEntriesBy( x, [] ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = [ 'foo', 'bar' ];
+
+ groupEntriesBy(); // $ExpectError
+ groupEntriesBy( x ); // $ExpectError
+ groupEntriesBy( x, indicator, {}, {} ); // $ExpectError
+}
diff --git a/base/group-entries-by/examples/index.js b/base/group-entries-by/examples/index.js
new file mode 100644
index 00000000..c60ec912
--- /dev/null
+++ b/base/group-entries-by/examples/index.js
@@ -0,0 +1,44 @@
+/**
+* @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';
+
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var take = require( './../../../base/take' );
+var groupEntriesBy = require( './../lib' );
+
+function indicator( v ) {
+ // Use the first letter of each element to define groups:
+ return v[ 0 ];
+}
+
+// Define an initial array of values:
+var values = [ 'beep', 'boop', 'foo', 'bar', 'woot', 'woot' ];
+
+// Sample from the initial array to generate a random collection:
+var indices = discreteUniform( 100, 0, values.length-1, {
+ 'dtype': 'generic'
+});
+var x = take( values, indices );
+// returns [...]
+
+// Group the values:
+var out = groupEntriesBy( x, indicator );
+// returns {...}
+
+console.log( out );
diff --git a/base/group-entries-by/lib/index.js b/base/group-entries-by/lib/index.js
new file mode 100644
index 00000000..82328325
--- /dev/null
+++ b/base/group-entries-by/lib/index.js
@@ -0,0 +1,46 @@
+/**
+* @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';
+
+/**
+* Group element entries according to an indicator function.
+*
+* @module @stdlib/array/base/group-entries-by
+*
+* @example
+* var groupEntriesBy = require( '@stdlib/array/base/group-entries-by' );
+*
+* function indicator( v ) {
+* return v[ 0 ];
+* }
+*
+* var x = [ 'beep', 'boop', 'foo', 'bar' ];
+*
+* var out = groupEntriesBy( x, indicator );
+* // returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/base/group-entries-by/lib/main.js b/base/group-entries-by/lib/main.js
new file mode 100644
index 00000000..2301a928
--- /dev/null
+++ b/base/group-entries-by/lib/main.js
@@ -0,0 +1,80 @@
+/**
+* @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';
+
+// MODULES //
+
+var isArray = require( '@stdlib/assert/is-array' );
+var resolveGetter = require( './../../../base/resolve-getter' );
+
+
+// MAIN //
+
+/**
+* Groups element entries according to an indicator function.
+*
+* @param {Collection} x - input array
+* @param {Function} indicator - indicator function specifying which group an element in the input collection belongs to
+* @param {*} [thisArg] - indicator function execution context
+* @returns {Object} group results
+*
+* @example
+* function indicator( v ) {
+* return v[ 0 ];
+* }
+*
+* var x = [ 'beep', 'boop', 'foo', 'bar' ];
+*
+* var out = groupEntriesBy( x, indicator );
+* // returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
+*/
+function groupEntriesBy( x, indicator, thisArg ) {
+ var get;
+ var len;
+ var out;
+ var g;
+ var o;
+ var v;
+ var i;
+
+ // Get the number of elements to group:
+ len = x.length;
+
+ // Resolve an accessor for retrieving array elements:
+ get = resolveGetter( x );
+
+ // Loop over the elements and assign each to a group...
+ out = {};
+ for ( i = 0; i < len; i++ ) {
+ v = get( x, i );
+ g = indicator.call( thisArg, v, i, x );
+ o = out[ g ];
+ if ( isArray( o ) ) {
+ o.push( [ i, v ] );
+ } else {
+ out[ g ] = [ [ i, v ] ];
+ }
+ }
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = groupEntriesBy;
diff --git a/base/group-entries-by/package.json b/base/group-entries-by/package.json
new file mode 100644
index 00000000..14bc856a
--- /dev/null
+++ b/base/group-entries-by/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "@stdlib/array/base/group-entries-by",
+ "version": "0.0.0",
+ "description": "Group element entries according to an indicator function.",
+ "license": "Apache-2.0",
+ "author": {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ },
+ "contributors": [
+ {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ }
+ ],
+ "main": "./lib",
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "lib": "./lib",
+ "test": "./test"
+ },
+ "types": "./docs/types",
+ "scripts": {},
+ "homepage": "https://github.com/stdlib-js/stdlib",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stdlib-js/stdlib.git"
+ },
+ "bugs": {
+ "url": "https://github.com/stdlib-js/stdlib/issues"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.10.0",
+ "npm": ">2.7.0"
+ },
+ "os": [
+ "aix",
+ "darwin",
+ "freebsd",
+ "linux",
+ "macos",
+ "openbsd",
+ "sunos",
+ "win32",
+ "windows"
+ ],
+ "keywords": [
+ "stdlib",
+ "stdtypes",
+ "types",
+ "data",
+ "structure",
+ "array",
+ "base",
+ "group",
+ "groupby",
+ "group-by",
+ "aggregate",
+ "summarize",
+ "partition",
+ "split",
+ "entries",
+ "indices"
+ ]
+}
diff --git a/base/group-entries-by/test/test.js b/base/group-entries-by/test/test.js
new file mode 100644
index 00000000..4c2c7f77
--- /dev/null
+++ b/base/group-entries-by/test/test.js
@@ -0,0 +1,166 @@
+/**
+* @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';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var toAccessorArray = require( './../../../base/to-accessor-array' );
+var Float64Array = require( './../../../float64' );
+var groupEntriesBy = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof groupEntriesBy, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function groups array element entries according to an indicator function', function test( t ) {
+ var expected;
+ var out;
+ var x;
+
+ x = [ 'beep', 'boop', 'foo', 'bar' ];
+
+ expected = {
+ 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ],
+ 'f': [ [ 2, 'foo' ] ]
+ };
+ out = groupEntriesBy( x, indicator );
+
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+
+ function indicator( v ) {
+ return v[ 0 ];
+ }
+});
+
+tape( 'the function groups array element entries according to an indicator function (typed arrays)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+
+ x = new Float64Array( [ 3.14, 4.2, -1.0, -10.2 ] );
+
+ expected = {
+ '1': [ [ 2, -1.0 ], [ 3, -10.2 ] ],
+ '2': [ [ 0, 3.14 ], [ 1, 4.2 ] ]
+ };
+ out = groupEntriesBy( x, indicator );
+
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+
+ function indicator( v, i ) {
+ if ( i < 2 ) {
+ return 2;
+ }
+ return 1;
+ }
+});
+
+tape( 'the function groups array element entries according to an indicator function (array-like objects)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+
+ x = {
+ 'length': 4,
+ '0': 'beep',
+ '1': 'boop',
+ '2': 'foo',
+ '3': 'bar'
+ };
+
+ expected = {
+ 'be': [ [ 0, 'beep' ] ],
+ 'bo': [ [ 1, 'boop' ] ],
+ 'fo': [ [ 2, 'foo' ] ],
+ 'ba': [ [ 3, 'bar' ] ]
+ };
+ out = groupEntriesBy( x, indicator );
+
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+
+ function indicator( v ) {
+ return v.slice( 0, 2 );
+ }
+});
+
+tape( 'the function groups array element entries according to an indicator function (accessor arrays)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+
+ x = toAccessorArray( [ 'beep', 'boop', 'foo', 'bar' ] );
+
+ expected = {
+ 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ],
+ 'f': [ [ 2, 'foo' ] ]
+ };
+ out = groupEntriesBy( x, indicator );
+
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+
+ function indicator( v ) {
+ return v[ 0 ];
+ }
+});
+
+tape( 'the function groups array element entries according to an indicator function (string serialization)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+
+ x = [ 'beep', 'boop', 'foo', 'bar' ];
+
+ expected = {
+ '[object Object]': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 2, 'foo' ], [ 3, 'bar' ] ]
+ };
+ out = groupEntriesBy( x, indicator );
+
+ t.deepEqual( out, expected, 'returns expected groups' );
+ t.end();
+
+ function indicator() {
+ return {};
+ }
+});
+
+tape( 'the function returns an empty object if provided an empty array', function test( t ) {
+ var expected;
+ var actual;
+
+ expected = {};
+ actual = groupEntriesBy( [], indicator );
+
+ t.deepEqual( actual, expected, 'returns expected value' );
+ t.end();
+
+ function indicator( v ) {
+ t.fail( 'should not be called' );
+ return v;
+ }
+});
diff --git a/base/lib/index.js b/base/lib/index.js
index 082dd62a..4e9eb89b 100644
--- a/base/lib/index.js
+++ b/base/lib/index.js
@@ -630,6 +630,15 @@ setReadOnly( ns, 'getter', require( './../../base/getter' ) );
*/
setReadOnly( ns, 'groupEntries', require( './../../base/group-entries' ) );
+/**
+* @name groupEntriesBy
+* @memberof ns
+* @readonly
+* @type {Function}
+* @see {@link module:@stdlib/array/base/group-entries-by}
+*/
+setReadOnly( ns, 'groupEntriesBy', require( './../../base/group-entries-by' ) );
+
/**
* @name groupIndices
* @memberof ns
diff --git a/dist/index.js b/dist/index.js
index 3257ebaa..dd2976a8 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,4 +1,4 @@
-"use strict";var l=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var bi=l(function(QO,wi){"use strict";var xi="function";function C2(r){return typeof r.get===xi&&typeof r.set===xi}wi.exports=C2});var Q=l(function(rL,Ei){"use strict";var F2=bi();Ei.exports=F2});var Ai=l(function(eL,Ti){"use strict";var Si={float64:z2,float32:O2,int32:L2,int16:R2,int8:B2,uint32:M2,uint16:N2,uint8:I2,uint8c:P2,generic:U2,default:G2};function z2(r,e){return r[e]}function O2(r,e){return r[e]}function L2(r,e){return r[e]}function R2(r,e){return r[e]}function B2(r,e){return r[e]}function M2(r,e){return r[e]}function N2(r,e){return r[e]}function I2(r,e){return r[e]}function P2(r,e){return r[e]}function U2(r,e){return r[e]}function G2(r,e){return r[e]}function D2(r){var e=Si[r];return typeof e=="function"?e:Si.default}Ti.exports=D2});var ar=l(function(tL,_i){"use strict";var Y2=Ai();_i.exports=Y2});var ji=l(function(iL,ki){"use strict";var Vi={float64:W2,float32:Z2,int32:K2,int16:X2,int8:H2,uint32:J2,uint16:$2,uint8:Q2,uint8c:rx,generic:ex,default:tx};function W2(r,e,t){r[e]=t}function Z2(r,e,t){r[e]=t}function K2(r,e,t){r[e]=t}function X2(r,e,t){r[e]=t}function H2(r,e,t){r[e]=t}function J2(r,e,t){r[e]=t}function $2(r,e,t){r[e]=t}function Q2(r,e,t){r[e]=t}function rx(r,e,t){r[e]=t}function ex(r,e,t){r[e]=t}function tx(r,e,t){r[e]=t}function ix(r){var e=Vi[r];return typeof e=="function"?e:Vi.default}ki.exports=ix});var fe=l(function(aL,Ci){"use strict";var ax=ji();Ci.exports=ax});var Oi=l(function(nL,zi){"use strict";var Fi={complex128:nx,complex64:ux,default:ox};function nx(r,e){return r.get(e)}function ux(r,e){return r.get(e)}function ox(r,e){return r.get(e)}function vx(r){var e=Fi[r];return typeof e=="function"?e:Fi.default}zi.exports=vx});var rr=l(function(uL,Li){"use strict";var sx=Oi();Li.exports=sx});var Mi=l(function(oL,Bi){"use strict";var Ri={complex128:fx,complex64:lx,default:cx};function fx(r,e,t){r.set(t,e)}function lx(r,e,t){r.set(t,e)}function cx(r,e,t){r.set(t,e)}function mx(r){var e=Ri[r];return typeof e=="function"?e:Ri.default}Bi.exports=mx});var le=l(function(vL,Ni){"use strict";var px=Mi();Ni.exports=px});var Pi=l(function(sL,Ii){"use strict";var gx={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128"};Ii.exports=gx});var Gi=l(function(fL,Ui){"use strict";var yx=typeof Float64Array=="function"?Float64Array:void 0;Ui.exports=yx});var Yi=l(function(lL,Di){"use strict";function dx(){throw new Error("not implemented")}Di.exports=dx});var qr=l(function(cL,Wi){"use strict";var hx=require("@stdlib/assert/has-float64array-support"),qx=Gi(),xx=Yi(),Ke;hx()?Ke=qx:Ke=xx;Wi.exports=Ke});var Ki=l(function(mL,Zi){"use strict";var wx=typeof Float32Array=="function"?Float32Array:void 0;Zi.exports=wx});var Hi=l(function(pL,Xi){"use strict";function bx(){throw new Error("not implemented")}Xi.exports=bx});var xr=l(function(gL,Ji){"use strict";var Ex=require("@stdlib/assert/has-float32array-support"),Sx=Ki(),Tx=Hi(),Xe;Ex()?Xe=Sx:Xe=Tx;Ji.exports=Xe});var Qi=l(function(yL,$i){"use strict";var Ax=typeof Uint32Array=="function"?Uint32Array:void 0;$i.exports=Ax});var ea=l(function(dL,ra){"use strict";function _x(){throw new Error("not implemented")}ra.exports=_x});var br=l(function(hL,ta){"use strict";var Vx=require("@stdlib/assert/has-uint32array-support"),kx=Qi(),jx=ea(),He;Vx()?He=kx:He=jx;ta.exports=He});var aa=l(function(qL,ia){"use strict";var Cx=typeof Int32Array=="function"?Int32Array:void 0;ia.exports=Cx});var ua=l(function(xL,na){"use strict";function Fx(){throw new Error("not implemented")}na.exports=Fx});var Er=l(function(wL,oa){"use strict";var zx=require("@stdlib/assert/has-int32array-support"),Ox=aa(),Lx=ua(),Je;zx()?Je=Ox:Je=Lx;oa.exports=Je});var sa=l(function(bL,va){"use strict";var Rx=typeof Uint16Array=="function"?Uint16Array:void 0;va.exports=Rx});var la=l(function(EL,fa){"use strict";function Bx(){throw new Error("not implemented")}fa.exports=Bx});var Sr=l(function(SL,ca){"use strict";var Mx=require("@stdlib/assert/has-uint16array-support"),Nx=sa(),Ix=la(),$e;Mx()?$e=Nx:$e=Ix;ca.exports=$e});var pa=l(function(TL,ma){"use strict";var Px=typeof Int16Array=="function"?Int16Array:void 0;ma.exports=Px});var ya=l(function(AL,ga){"use strict";function Ux(){throw new Error("not implemented")}ga.exports=Ux});var Tr=l(function(_L,da){"use strict";var Gx=require("@stdlib/assert/has-int16array-support"),Dx=pa(),Yx=ya(),Qe;Gx()?Qe=Dx:Qe=Yx;da.exports=Qe});var qa=l(function(VL,ha){"use strict";var Wx=typeof Uint8Array=="function"?Uint8Array:void 0;ha.exports=Wx});var wa=l(function(kL,xa){"use strict";function Zx(){throw new Error("not implemented")}xa.exports=Zx});var Ar=l(function(jL,ba){"use strict";var Kx=require("@stdlib/assert/has-uint8array-support"),Xx=qa(),Hx=wa(),rt;Kx()?rt=Xx:rt=Hx;ba.exports=rt});var Sa=l(function(CL,Ea){"use strict";var Jx=typeof Uint8ClampedArray=="function"?Uint8ClampedArray:void 0;Ea.exports=Jx});var Aa=l(function(FL,Ta){"use strict";function $x(){throw new Error("not implemented")}Ta.exports=$x});var _r=l(function(zL,_a){"use strict";var Qx=require("@stdlib/assert/has-uint8clampedarray-support"),rw=Sa(),ew=Aa(),et;Qx()?et=rw:et=ew;_a.exports=et});var ka=l(function(OL,Va){"use strict";var tw=typeof Int8Array=="function"?Int8Array:void 0;Va.exports=tw});var Ca=l(function(LL,ja){"use strict";function iw(){throw new Error("not implemented")}ja.exports=iw});var Vr=l(function(RL,Fa){"use strict";var aw=require("@stdlib/assert/has-int8array-support"),nw=ka(),uw=Ca(),tt;aw()?tt=nw:tt=uw;Fa.exports=tt});var Oa=l(function(BL,za){"use strict";var ow=require("@stdlib/assert/is-array-like-object"),vw=require("@stdlib/assert/is-complex-like"),sw=require("@stdlib/complex/realf"),fw=require("@stdlib/complex/imagf"),lw=require("@stdlib/string/format");function cw(r){var e,t,i;for(e=[];t=r.next(),!t.done;)if(i=t.value,ow(i)&&i.length>=2)e.push(i[0],i[1]);else if(vw(i))e.push(sw(i),fw(i));else return new TypeError(lw("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));return e}za.exports=cw});var Ra=l(function(ML,La){"use strict";var mw=require("@stdlib/assert/is-array-like-object"),pw=require("@stdlib/assert/is-complex-like"),gw=require("@stdlib/complex/realf"),yw=require("@stdlib/complex/imagf"),dw=require("@stdlib/string/format");function hw(r,e,t){var i,a,n,o;for(i=[],o=-1;a=r.next(),!a.done;)if(o+=1,n=e.call(t,a.value,o),mw(n)&&n.length>=2)i.push(n[0],n[1]);else if(pw(n))i.push(gw(n),yw(n));else return new TypeError(dw("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));return i}La.exports=hw});var Ma=l(function(NL,Ba){"use strict";var qw=require("@stdlib/assert/is-complex-like"),xw=require("@stdlib/complex/realf"),ww=require("@stdlib/complex/imagf");function bw(r,e){var t,i,a,n;for(t=e.length,n=0,a=0;at.byteLength-r)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",i*nr));t=new fr(t,r,i*2)}}return D(this,"_buffer",t),D(this,"_length",t.length/2),this}D(M,"BYTES_PER_ELEMENT",nr);D(M,"name","Complex64Array");D(M,"from",function(e){var t,i,a,n,o,u,v,s,f,c,m,p;if(!er(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Da(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(i=arguments.length,i>1){if(a=arguments[1],!er(a))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",a));i>2&&(t=arguments[2])}if(Z(e)){if(s=e.length,a){for(n=new this(s),o=n._buffer,p=0,m=0;m=2)o[p]=c[0],o[p+1]=c[1];else throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));p+=2}return n}return new this(e)}if(at(e)){if(a){for(s=e.length,e.get&&e.set?v=kw("default"):v=Vw("default"),m=0;m=2)o[p]=c[0],o[p+1]=c[1];else throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));p+=2}return n}return new this(e)}if(Ia(e)&&Ga&&er(e[Wr])){if(o=e[Wr](),!er(o.next))throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if(a?u=jw(o,a,t):u=Ua(o),u instanceof Error)throw u;for(s=u.length/2,n=new this(s),o=n._buffer,m=0;m=this._length))return or(this._buffer,e)});me(M.prototype,"buffer",function(){return this._buffer.buffer});me(M.prototype,"byteLength",function(){return this._buffer.byteLength});me(M.prototype,"byteOffset",function(){return this._buffer.byteOffset});D(M.prototype,"BYTES_PER_ELEMENT",M.BYTES_PER_ELEMENT);D(M.prototype,"copyWithin",function(e,t){if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return arguments.length===2?this._buffer.copyWithin(e*2,t*2):this._buffer.copyWithin(e*2,t*2,arguments[2]*2),this});D(M.prototype,"entries",function(){var e,t,i,a,n,o,u;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._buffer,a=this._length,o=-1,u=-2,i={},D(i,"next",v),D(i,"return",s),Wr&&D(i,Wr,f),i;function v(){var c;return o+=1,n||o>=a?{done:!0}:(u+=2,c=new Pa(e[u],e[u+1]),{value:[o,c],done:!1})}function s(c){return n=!0,arguments.length?{value:c,done:!0}:{done:!0}}function f(){return t.entries()}});D(M.prototype,"every",function(e,t){var i,a;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!er(e))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=0;a1){if(!cr(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=n,t<0&&(t=0)),arguments.length>2){if(!cr(i))throw new TypeError(L("invalid argument. Third argument must be an integer. Value: `%s`.",i));i<0&&(i+=n,i<0&&(i=0)),i>n&&(i=n)}else i=n}else t=0,i=n;for(u=kr(e),v=jr(e),s=t;s=0;a--)if(n=or(i,a),e.call(t,n,a,this))return n});D(M.prototype,"findLastIndex",function(e,t){var i,a,n;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!er(e))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=this._length-1;a>=0;a--)if(n=or(i,a),e.call(t,n,a,this))return a;return-1});D(M.prototype,"forEach",function(e,t){var i,a,n;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!er(e))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=0;a=this._length))return or(this._buffer,e)});D(M.prototype,"includes",function(e,t){var i,a,n,o,u;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!lr(e))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!cr(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=kr(e),o=jr(e),i=this._buffer,u=t;u1){if(!cr(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=kr(e),o=jr(e),i=this._buffer,u=t;u1){if(!cr(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(n=kr(e),o=jr(e),i=this._buffer,u=t;u>=0;u--)if(a=2*u,n===i[a]&&o===i[a+1])return u;return-1});me(M.prototype,"length",function(){return this._length});D(M.prototype,"map",function(e,t){var i,a,n,o,u;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!er(e))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",e));for(a=this._buffer,n=new this.constructor(this._length),i=n._buffer,o=0;o1){if(i=arguments[1],!re(i))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",i))}else i=0;if(lr(e)){if(i>=this._length)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",i));i*=2,a[i]=kr(e),a[i+1]=jr(e);return}if(Z(e)){if(u=e._length,i+u>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e._buffer,f=a.byteOffset+i*nr,t.buffer===a.buffer&&t.byteOffsetf){for(n=new fr(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e,f=a.byteOffset+i*nr,t.buffer===a.buffer&&t.byteOffsetf){for(n=new fr(u),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(i*=2,s=0;sn&&(t=n)}}return e>=n?(n=0,i=a.byteLength):e>=t?(n=0,i=a.byteOffset+e*nr):(n=t-e,i=a.byteOffset+e*nr),new this.constructor(a.buffer,i,n<0?0:n)});D(M.prototype,"toString",function(){var e,t,i;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=[],t=this._buffer,i=0;i=n)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",e));if(!lr(t))throw new TypeError(L("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return a=new this.constructor(this._buffer),i=a._buffer,i[2*e]=kr(t),i[2*e+1]=jr(t),a});Ya.exports=M});var zr=l(function(PL,Za){"use strict";var Ow=Wa();Za.exports=Ow});var Xa=l(function(UL,Ka){"use strict";var Lw=require("@stdlib/assert/is-array-like-object"),Rw=require("@stdlib/assert/is-complex-like"),Bw=require("@stdlib/string/format"),Mw=require("@stdlib/complex/real"),Nw=require("@stdlib/complex/imag");function Iw(r){var e,t,i;for(e=[];t=r.next(),!t.done;)if(i=t.value,Lw(i)&&i.length>=2)e.push(i[0],i[1]);else if(Rw(i))e.push(Mw(i),Nw(i));else return new TypeError(Bw("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));return e}Ka.exports=Iw});var Ja=l(function(GL,Ha){"use strict";var Pw=require("@stdlib/assert/is-array-like-object"),Uw=require("@stdlib/assert/is-complex-like"),Gw=require("@stdlib/string/format"),Dw=require("@stdlib/complex/real"),Yw=require("@stdlib/complex/imag");function Ww(r,e,t){var i,a,n,o;for(i=[],o=-1;a=r.next(),!a.done;)if(o+=1,n=e.call(t,a.value,o),Pw(n)&&n.length>=2)i.push(n[0],n[1]);else if(Uw(n))i.push(Dw(n),Yw(n));else return new TypeError(Gw("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));return i}Ha.exports=Ww});var Qa=l(function(DL,$a){"use strict";var Zw=require("@stdlib/assert/is-complex-like"),Kw=require("@stdlib/complex/real"),Xw=require("@stdlib/complex/imag");function Hw(r,e){var t,i,a,n;for(t=e.length,n=0,a=0;at.byteLength-r)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",i*ur));t=new mr(t,r,i*2)}}return W(this,"_buffer",t),W(this,"_length",t.length/2),this}W(N,"BYTES_PER_ELEMENT",ur);W(N,"name","Complex128Array");W(N,"from",function(e){var t,i,a,n,o,u,v,s,f,c,m,p;if(!tr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!un(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(i=arguments.length,i>1){if(a=arguments[1],!tr(a))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",a));i>2&&(t=arguments[2])}if(H(e)){if(s=e.length,a){for(n=new this(s),o=n._buffer,p=0,m=0;m=2)o[p]=c[0],o[p+1]=c[1];else throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));p+=2}return n}return new this(e)}if(ut(e)){if(a){for(s=e.length,e.get&&e.set?v=tb("default"):v=eb("default"),m=0;m=2)o[p]=c[0],o[p+1]=c[1];else throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));p+=2}return n}return new this(e)}if(en(e)&&nn&&tr(e[Zr])){if(o=e[Zr](),!tr(o.next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if(a?u=ib(o,a,t):u=an(o),u instanceof Error)throw u;for(s=u.length/2,n=new this(s),o=n._buffer,m=0;m=this._length))return pr(this._buffer,e)});ge(N.prototype,"buffer",function(){return this._buffer.buffer});ge(N.prototype,"byteLength",function(){return this._buffer.byteLength});ge(N.prototype,"byteOffset",function(){return this._buffer.byteOffset});W(N.prototype,"BYTES_PER_ELEMENT",N.BYTES_PER_ELEMENT);W(N.prototype,"copyWithin",function(e,t){if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return arguments.length===2?this._buffer.copyWithin(e*2,t*2):this._buffer.copyWithin(e*2,t*2,arguments[2]*2),this});W(N.prototype,"entries",function(){var e,t,i,a,n,o,u;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._buffer,a=this._length,o=-1,u=-2,i={},W(i,"next",v),W(i,"return",s),Zr&&W(i,Zr,f),i;function v(){var c;return o+=1,n||o>=a?{done:!0}:(u+=2,c=new tn(e[u],e[u+1]),{value:[o,c],done:!1})}function s(c){return n=!0,arguments.length?{value:c,done:!0}:{done:!0}}function f(){return t.entries()}});W(N.prototype,"every",function(e,t){var i,a;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!tr(e))throw new TypeError(B("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=0;a=0;a--)if(n=pr(i,a),e.call(t,n,a,this))return n});W(N.prototype,"findLastIndex",function(e,t){var i,a,n;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!tr(e))throw new TypeError(B("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=this._length-1;a>=0;a--)if(n=pr(i,a),e.call(t,n,a,this))return a;return-1});W(N.prototype,"forEach",function(e,t){var i,a,n;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!tr(e))throw new TypeError(B("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=0;a=this._length))return pr(this._buffer,e)});ge(N.prototype,"length",function(){return this._length});W(N.prototype,"includes",function(e,t){var i,a,n,o,u;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Cr(e))throw new TypeError(B("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!Or(t))throw new TypeError(B("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=Mr(e),o=Nr(e),i=this._buffer,u=t;u1){if(!Or(t))throw new TypeError(B("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=Mr(e),o=Nr(e),i=this._buffer,u=t;u1){if(!Or(t))throw new TypeError(B("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(n=Mr(e),o=Nr(e),i=this._buffer,u=t;u>=0;u--)if(a=2*u,n===i[a]&&o===i[a+1])return u;return-1});W(N.prototype,"map",function(e,t){var i,a,n,o,u;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!tr(e))throw new TypeError(B("invalid argument. First argument must be a function. Value: `%s`.",e));for(a=this._buffer,n=new this.constructor(this._length),i=n._buffer,o=0;o1){if(i=arguments[1],!ee(i))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",i))}else i=0;if(Cr(e)){if(i>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",i));i*=2,a[i]=Mr(e),a[i+1]=Nr(e);return}if(H(e)){if(u=e._length,i+u>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e._buffer,f=a.byteOffset+i*ur,t.buffer===a.buffer&&t.byteOffsetf){for(n=new mr(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e,f=a.byteOffset+i*ur,t.buffer===a.buffer&&t.byteOffsetf){for(n=new mr(u),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(i*=2,s=0;sn&&(t=n)}}return e>=n?(n=0,i=a.byteLength):e>=t?(n=0,i=a.byteOffset+e*ur):(n=t-e,i=a.byteOffset+e*ur),new this.constructor(a.buffer,i,n<0?0:n)});W(N.prototype,"toString",function(){var e,t,i;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=[],t=this._buffer,i=0;i=0;s--)if(f=u-o+s,!(f<0)){if(v=e[f],a=t[s],a!==0&&a=0;s--)u=f%o,f-=u,f/=o,a[s]=u;for(i=[],s=0;s=0;n--)i.push(t[n]);e.push(i)}return e}tf.exports=uS});var ht=l(function(cM,nf){"use strict";var oS=af();nf.exports=oS});var of=l(function(mM,uf){"use strict";var vS=ht();function sS(r){var e,t;for(e=[],t=0;t=0;t--)e.push(r[t]);return e}yf.exports=dS});var wt=l(function(xM,hf){"use strict";var hS=df();hf.exports=hS});var xf=l(function(wM,qf){"use strict";var qS=wt();function xS(r){var e,t;for(e=[],t=0;t=0;a--)if(Se(r[a]))return a;return-1}for(a=t;a>=0;a--)if(e===r[a])return a;return-1}function f8(r,e,t,i){var a,n,o;if(a=r.data,n=r.accessors[0],i&&Se(e)){for(o=t;o>=0;o--)if(Se(n(a,o)))return o;return-1}for(o=t;o>=0;o--)if(e===n(a,o))return o;return-1}function l8(r,e,t,i){var a;if(v8(r,"lastIndexOf")&&i===!1)return r.lastIndexOf(e,t);if(t<0){if(t+=r.length,t<0)return-1}else t>r.length&&(t=r.length-1);return a=o8(r),a.accessorProtocol?f8(a,e,t,i):s8(r,e,t,i)}cl.exports=l8});var gl=l(function(WM,pl){"use strict";var c8=ml();pl.exports=c8});var dl=l(function(ZM,yl){"use strict";function m8(r,e,t){var i,a,n,o;if(t===0)return[];for(a=t-1,n=(e-r)/a,i=[r],o=1;o=0;m--)f=p%i[m],p-=f,p/=i[m],v[m]=f;for(o=[],m=0;m4&&(a=arguments[4]),c=r[0],m=r[1],v=0;v2){if(arguments.length===3?$0(t)?a=t:(n=t,o=!1):(a=i,n=t),n===0)return[];if(!OA(n)||n<0)throw new TypeError(Ur("invalid argument. Length must be a positive integer. Value: `%s`.",n));if(o){if(!$0(a))throw new TypeError(Ur("invalid argument. Options argument must be an object. Value: `%s`.",a));if(zA(a,"round")){if(!LA(a.round))throw new TypeError(Ur("invalid option. `%s` option must be a string. Option: `%s`.","round",a.round));if(Q0.indexOf(a.round)===-1)throw new Error(Ur('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"round",Q0.join('", "'),a.round))}}}switch(a.round){case"round":s=BA;break;case"ceil":s=MA;break;case"floor":default:s=RA;break}for(v=n-1,c=(e.getTime()-r.getTime())/v,u=new Array(n),f=r,u[0]=f,f=f.getTime(),m=1;m1?i=arguments[1]:i="float64",i==="generic")return l_(r);if(e=c_(i),e===null)throw new TypeError(qg("invalid argument. Second argument must be a supported data type. Value: `%s`.",i));return a=f_(i),u=e*r,i==="complex128"&&(u+=8),n=s_(u),t=n.byteOffset,i==="complex128"&&(hg(t/e)||(t+=8)),o=new a(n.buffer,t,r),o}xg.exports=m_});var Sg=l(function(qP,Eg){"use strict";var p_=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,g_=Pr(),y_=Rr(),bg=require("@stdlib/string/format");function d_(r){var e,t;if(!p_(r))throw new TypeError(bg("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(arguments.length>1?e=arguments[1]:e="float64",e==="generic")return y_(r);if(t=g_(e),t===null)throw new TypeError(bg("invalid argument. Second argument must be a recognized data type. Value: `%s`.",e));return new t(r)}Eg.exports=d_});var Te=l(function(xP,Tg){"use strict";var h_=Sg();Tg.exports=h_});var Vg=l(function(wP,_g){"use strict";var Ag=Te();function q_(r){return arguments.length>1?Ag(r,arguments[1]):Ag(r)}_g.exports=q_});var Bt=l(function(bP,kg){"use strict";var x_=cg(),w_=wg(),b_=Vg(),Rt;x_()?Rt=w_:Rt=b_;kg.exports=Rt});var Cg=l(function(EP,jg){"use strict";var E_=K(),S_=Bt(),T_=require("@stdlib/string/format");function A_(r){var e=E_(r);if(e===null)throw new TypeError(T_("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(e=arguments[1]),S_(r.length,e)}jg.exports=A_});var zg=l(function(SP,Fg){"use strict";var __=Cg();Fg.exports=__});var Ng=l(function(TP,Mg){"use strict";var V_=require("@stdlib/assert/is-string").isPrimitive,Og=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,Lg=require("@stdlib/assert/is-collection"),Mt=require("@stdlib/assert/is-arraybuffer"),Rg=require("@stdlib/assert/is-object"),Ae=require("@stdlib/assert/is-function"),k_=Pr(),j_=require("@stdlib/blas/ext/base/gfill"),C_=wr(),F_=require("@stdlib/assert/has-iterator-symbol-support"),_e=require("@stdlib/symbol/iterator"),z_=require("@stdlib/iter/length"),Fr=require("@stdlib/string/format"),Bg=F_();function O_(r,e){var t,i;for(t=[];i=r.next(),!i.done;)t.push(e);return t}function L_(r,e){var t;for(t=0;t=0&&V_(arguments[e])?(t=arguments[e],e-=1):t="float64",i=k_(t),i===null)throw new TypeError(Fr("invalid argument. Must provide a recognized data type. Value: `%s`.",t));if(t==="generic"){if(e<=0)return[];if(r=arguments[0],o=arguments[1],e===1){if(Og(o)?n=o:Lg(o)&&(n=o.length),n!==void 0)return C_(r,n);if(Mt(o))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(Rg(o)){if(Bg===!1)throw new TypeError(Fr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",o));if(!Ae(o[_e]))throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));if(o=o[_e](),!Ae(o.next))throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));return O_(o,r)}throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o))}else if(Mt(o))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o))}if(e<=0)return new i(0);if(e===1)if(o=arguments[1],Lg(o))a=new i(o.length);else if(Mt(o))a=new i(o);else if(Og(o))a=new i(o);else if(Rg(o)){if(Bg===!1)throw new TypeError(Fr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",o));if(!Ae(o[_e]))throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));if(o=o[_e](),!Ae(o.next))throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));a=new i(z_(o))}else throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));else e===2?a=new i(arguments[1],arguments[2]):a=new i(arguments[1],arguments[2],arguments[3]);return a.length>0&&(/^complex/.test(t)?L_(a,arguments[0]):j_(a.length,arguments[0],a,1)),a}Mg.exports=R_});var Pg=l(function(AP,Ig){"use strict";var B_=Ng();Ig.exports=B_});var Xg=l(function(_P,Kg){"use strict";var Ug=require("@stdlib/assert/is-string").isPrimitive,Gg=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,Dg=require("@stdlib/assert/is-collection"),Nt=require("@stdlib/assert/is-arraybuffer"),Yg=require("@stdlib/assert/is-object"),Gr=require("@stdlib/assert/is-function"),It=Pr(),M_=require("@stdlib/blas/ext/base/gfill-by"),N_=mt(),I_=require("@stdlib/assert/has-iterator-symbol-support"),Ve=require("@stdlib/symbol/iterator"),P_=require("@stdlib/iter/length"),gr=require("@stdlib/string/format"),Wg=I_(),Zg="float64";function U_(r,e,t){var i,a,n;for(i=[],a=-1;n=r.next(),!n.done;)a+=1,i.push(e.call(t,a));return i}function G_(r,e,t){var i;for(i=0;i1)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(a=It(t),a===null)throw new TypeError(gr("invalid argument. Must provide a recognized data type. Value: `%s`.",t));return new a(0)}if(e<2)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(e-=1,Gr(arguments[e]))if(Gr(arguments[e-1])){if(r=arguments[e],e-=1,i=arguments[e],e===0)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.")}else i=arguments[e];else if(e>=2){if(r=arguments[e],e-=1,i=arguments[e],!Gr(i))throw new TypeError(gr("invalid argument. Callback argument must be a function. Value: `%s`.",i))}else throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(e-=1,e>=0&&Ug(arguments[e])?(t=arguments[e],e-=1):t=Zg,a=It(t),a===null)throw new TypeError(gr("invalid argument. Must provide a recognized data type. Value: `%s`.",t));if(t==="generic"){if(u=arguments[0],e===0){if(Gg(u)?o=u:Dg(u)&&(o=u.length),o!==void 0)return N_(o,i,r);if(Nt(u))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(Yg(u)){if(Wg===!1)throw new TypeError(gr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",u));if(!Gr(u[Ve]))throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(u=u[Ve](),!Gr(u.next))throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));return U_(u,i,r)}throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u))}else if(Nt(u))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u))}if(e===0)if(u=arguments[0],Dg(u))n=new a(u.length);else if(Nt(u))n=new a(u);else if(Gg(u))n=new a(u);else if(Yg(u)){if(Wg===!1)throw new TypeError(gr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",u));if(!Gr(u[Ve]))throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(u=u[Ve](),!Gr(u.next))throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));n=new a(P_(u))}else throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));else e===1?n=new a(arguments[0],arguments[1]):n=new a(arguments[0],arguments[1],arguments[2]);return n.length>0&&(/^complex/.test(t)?G_(n,i,r):M_(n.length,n,1,v)),n;function v(s,f){return i.call(r,f)}}Kg.exports=D_});var Jg=l(function(VP,Hg){"use strict";var Y_=Xg();Hg.exports=Y_});var ry=l(function(kP,Qg){"use strict";var $g=require("@stdlib/assert/is-function"),W_=require("@stdlib/assert/is-collection"),Z_=require("@stdlib/assert/is-iterator-like"),K_=Q(),X_=le(),H_=fe(),J_=K(),Pt=require("@stdlib/string/format");function $_(){var r,e,t,i,a,n,o,u,v;if(r=arguments[0],arguments.length>1)if(W_(arguments[1])){if(i=arguments[1],arguments.length>2){if(t=arguments[2],!$g(t))throw new TypeError(Pt("invalid argument. Callback argument must be a function. Value: `%s`.",t));e=arguments[3]}}else{if(t=arguments[1],!$g(t))throw new TypeError(Pt("invalid argument. Callback argument must be a function. Value: `%s`.",t));e=arguments[2]}if(!Z_(r))throw new TypeError(Pt("invalid argument. Iterator argument must be an iterator protocol-compliant object. Value: `%s`.",r));if(u=-1,i===void 0){if(i=[],t){for(;u+=1,v=r.next(),!v.done;)i.push(t.call(e,v.value,u));return i}for(;v=r.next(),!v.done;)i.push(v.value);return i}if(a=i.length,o=J_(i),K_(i)?n=X_(o):n=H_(o),t){for(;u2?t=arguments[2]:t="float64",t==="generic")return tV(e,r);if(i=eV(t),i===null)throw new TypeError(iy("invalid argument. Third argument must be a recognized data type. Value: `%s`.",t));return a=new i(r),iV(r,e,a,1),a}ay.exports=aV});var Dr=l(function(FP,uy){"use strict";var nV=ny();uy.exports=nV});var vy=l(function(zP,oy){"use strict";var uV=require("@stdlib/string/format"),oV=K(),vV=Dr(),sV=require("@stdlib/complex/float64"),fV=require("@stdlib/complex/float32");function lV(r,e){var t,i;if(t=oV(r),t===null)throw new TypeError(uV("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>2&&(t=arguments[2]),typeof e=="number"?t==="complex128"?i=new sV(e,0):t==="complex64"?i=new fV(e,0):i=e:i=e,vV(r.length,i,t)}oy.exports=lV});var fy=l(function(OP,sy){"use strict";var cV=vy();sy.exports=cV});var cy=l(function(LP,ly){"use strict";var mV=require("@stdlib/math/base/special/ceil"),Ut=require("@stdlib/assert/is-number").isPrimitive,Gt=require("@stdlib/math/base/assert/is-nan"),Dt=require("@stdlib/string/format"),pV=require("@stdlib/constants/uint32/max"),gV=St();function yV(r,e,t){var i,a;if(!Ut(r)||Gt(r))throw new TypeError(Dt("invalid argument. Start must be numeric. Value: `%s`.",r));if(!Ut(e)||Gt(e))throw new TypeError(Dt("invalid argument. Stop must be numeric. Value: `%s`.",e));if(arguments.length<3)a=1;else if(a=t,!Ut(a)||Gt(a))throw new TypeError(Dt("invalid argument. Increment must be numeric. Value: `%s`.",a));if(i=mV((e-r)/a),i>pV)throw new RangeError("invalid arguments. Generated array exceeds maximum array length.");return gV(r,e,a)}ly.exports=yV});var py=l(function(RP,my){"use strict";var dV=cy();my.exports=dV});var yy=l(function(BP,gy){"use strict";var hV=qr(),qV=xr(),xV=Lr(),wV=zr(),bV={float64:hV,float32:qV,complex128:xV,complex64:wV};gy.exports=bV});var hy=l(function(MP,dy){"use strict";var EV=yy();function SV(r){return EV[r]||null}dy.exports=SV});var Yt=l(function(NP,qy){"use strict";var TV=hy();qy.exports=TV});var wy=l(function(IP,xy){"use strict";function AV(r,e,t,i){var a,n,o,u;if(t===0)return[];if(t===1)return i?[e]:[r];for(a=[r],i?n=t-1:n=t,o=(e-r)/n,u=1;u3&&(n=DV(i,arguments[3]),n))throw n;if(i.dtype==="generic")return s?UV(u,r,v,e,t,i.endpoint):PV(r,e,t,i.endpoint);if(a=MV(i.dtype),a===null)throw new TypeError(Hr('invalid option. `%s` option must be a real or complex floating-point data type or "generic". Option: `%s`.',"dtype",i.dtype));if(o=new a(t),i.dtype==="complex64")return Iy(NV(o,0),u,r,v,e,t,i.endpoint),o;if(i.dtype==="complex128")return Iy(IV(o,0),u,r,v,e,t,i.endpoint),o;if(s)throw new TypeError('invalid arguments. If either of the first two arguments are complex numbers, the output array data type must be a complex number data type or "generic".');return GV(o,r,e,t,i.endpoint)}Py.exports=WV});var Ky=l(function(ZP,Zy){"use strict";var ZV=require("@stdlib/complex/float32"),KV=require("@stdlib/complex/float64"),Gy=require("@stdlib/complex/real"),Dy=require("@stdlib/complex/imag"),Yy=require("@stdlib/complex/realf"),Wy=require("@stdlib/complex/imagf");function XV(r,e,t,i,a,n,o){var u,v,s,f,c,m,p,g,y,d,h,q,b,E;if(n===0)return r;if(v=0,e==="float64"?(s=t,c=0):e==="complex64"?(v+=1,s=Yy(t),c=Wy(t)):(s=Gy(t),c=Dy(t)),i==="float64"?(f=a,m=0):i==="complex64"?(v+=1,f=Yy(a),m=Wy(a)):(f=Gy(a),m=Dy(a)),v===2?u=ZV:u=KV,g=r.data,p=r.accessors[1],n===1)return o?p(g,0,new u(f,m)):p(g,0,new u(s,c)),r;for(p(g,0,new u(s,c)),o?b=n-1:b=n,h=(f-s)/b,q=(m-c)/b,E=1;E3&&(a=ak(i,arguments[3]),a))throw a;if(v=$V(t),v===null&&(v="generic"),v==="complex64")return t1(QV(t,0),n,r,o,e,t.length,i.endpoint),t;if(v==="complex128")return t1(rk(t,0),n,r,o,e,t.length,i.endpoint),t;if(u){if(v==="generic")return s=e1(t),ek(s,n,r,o,e,t.length,i.endpoint),t;throw new TypeError('invalid arguments. If either of the first two arguments are complex numbers, the output array must be a complex number array or a "generic" array-like object.')}return s=e1(t),s.accessorProtocol?(tk(s,r,e,t.length,i.endpoint),t):(ik(t,r,e,t.length,i.endpoint),t)}i1.exports=uk});var o1=l(function(HP,u1){"use strict";var ok=require("@stdlib/utils/define-nonenumerable-read-only-property"),n1=Uy(),vk=a1();ok(n1,"assign",vk);u1.exports=n1});var l1=l(function(JP,f1){"use strict";var v1=require("@stdlib/assert/is-number").isPrimitive,sk=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,Jt=require("@stdlib/string/format"),s1=require("@stdlib/math/base/assert/is-nan"),fk=At();function lk(r,e,t){if(!v1(r)||s1(r))throw new TypeError(Jt("invalid argument. Exponent of start value must be numeric. Value: `%s`.",r));if(!v1(e)||s1(e))throw new TypeError(Jt("invalid argument. Exponent of stop value must be numeric. Value: `%s`.",e));if(arguments.length<3)t=10;else if(!sk(t))throw new TypeError(Jt("invalid argument. Length must be a nonnegative integer. Value: `%s`.",t));return fk(r,e,t)}f1.exports=lk});var m1=l(function($P,c1){"use strict";var ck=l1();c1.exports=ck});var q1=l(function(QP,h1){"use strict";var g1=require("@stdlib/math/base/assert/is-integer"),mk=require("@stdlib/math/base/assert/is-negative-zero"),pk=require("@stdlib/assert/is-complex-like"),y1=require("@stdlib/constants/float64/pinf"),d1=require("@stdlib/constants/float64/ninf"),ke=require("@stdlib/constants/float32/smallest-subnormal"),gk=require("@stdlib/constants/float32/max-safe-integer"),yk=require("@stdlib/constants/float32/min-safe-integer"),dk=require("@stdlib/constants/int8/min"),hk=require("@stdlib/constants/int16/min"),qk=require("@stdlib/constants/int32/min"),xk=require("@stdlib/constants/uint8/max"),wk=require("@stdlib/constants/uint16/max"),bk=require("@stdlib/constants/uint32/max");function p1(r){return r!==r||r===y1||r===d1?"float32":g1(r)?r>=yk&&r<=gk?"float32":"float64":r>-ke&&r=dk?"int8":r>=hk?"int16":r>=qk?"int32":"float64":r<=xk?"uint8":r<=wk?"uint16":r<=bk?"uint32":"float64":r>-ke&&r1){if(e=arguments[1],b1.indexOf(e)===-1)throw new TypeError(Vk('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',b1.join('", "'),e))}else e="float64";return e==="complex128"?t=kk:e==="complex64"?t=jk:t=NaN,_k(r,t,e)}E1.exports=Ck});var A1=l(function(tU,T1){"use strict";var Fk=S1();T1.exports=Fk});var V1=l(function(iU,_1){"use strict";var zk=K(),Ok=Dr(),Lk=require("@stdlib/complex/float64"),Rk=require("@stdlib/complex/float32"),$t=require("@stdlib/string/format"),Bk=new Lk(NaN,NaN),Mk=new Rk(NaN,NaN),je=["float64","float32","complex128","complex64","generic"];function Nk(r){var e,t;if(e=zk(r),e===null)throw new TypeError($t("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));if(arguments.length>1){if(e=arguments[1],je.indexOf(e)===-1)throw new TypeError($t('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',je.join('", "'),e))}else if(je.indexOf(e)===-1)throw new TypeError($t('invalid argument. First argument must be one of the following data types: "%s". Value: `%s`.',je.join('", "'),e));return e==="complex128"?t=Bk:e==="complex64"?t=Mk:t=NaN,Ok(r.length,t,e)}_1.exports=Nk});var j1=l(function(aU,k1){"use strict";var Ik=V1();k1.exports=Ik});var C1=l(function(nU,Pk){Pk.exports={float64:-1,float32:"float64",int32:-1,int16:"int32",int8:"int16",uint32:-1,uint16:"uint32",uint8:"uint16",uint8c:"uint16",generic:-1,complex64:"complex128",complex128:-1}});var z1=l(function(uU,F1){"use strict";var Uk=require("@stdlib/utils/keys"),Gk=require("@stdlib/assert/has-own-property"),Ce=C1();function Dk(){var r,e,t,i;for(t={},r=Uk(Ce),e=r.length,i=0;i1?e=arguments[1]:e="float64",e==="complex128"?t=Hk:e==="complex64"?t=Jk:t=1,Xk(r,t,e)}R1.exports=$k});var N1=l(function(sU,M1){"use strict";var Qk=B1();M1.exports=Qk});var P1=l(function(fU,I1){"use strict";var rj=K(),ej=Dr(),tj=require("@stdlib/complex/float64"),ij=require("@stdlib/complex/float32"),aj=require("@stdlib/string/format"),nj=new tj(1,0),uj=new ij(1,0);function oj(r){var e,t;if(e=rj(r),e===null)throw new TypeError(aj("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(e=arguments[1]),e==="complex128"?t=nj:e==="complex64"?t=uj:t=1,ej(r.length,t,e)}I1.exports=oj});var G1=l(function(lU,U1){"use strict";var vj=P1();U1.exports=vj});var Y1=l(function(cU,D1){"use strict";function sj(){return{highWaterMark:9007199254740992}}D1.exports=sj});var K1=l(function(mU,Z1){"use strict";var fj=require("@stdlib/assert/is-plain-object"),lj=require("@stdlib/assert/has-own-property"),cj=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,W1=require("@stdlib/string/format");function mj(r,e){return fj(e)?lj(e,"highWaterMark")&&(r.highWaterMark=e.highWaterMark,!cj(r.highWaterMark))?new TypeError(W1("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","highWaterMark",r.highWaterMark)):null:new TypeError(W1("invalid argument. Options argument must be an object. Value: `%s`.",e))}Z1.exports=mj});var H1=l(function(pU,X1){"use strict";function pj(r){var e,t;for(e=[],t=0;ti.highWaterMark?null:(p=new Tj(m),e+=m,p)}function u(m,p,g){var y;return p===0?new m(0):(y=o(Vj(p)*zj[g]),y===null?y:new m(y,0,p))}function v(){var m,p,g,y,d,h,q,b,E;if(m=arguments.length,m&&yj(arguments[m-1])?(m-=1,p=arguments[m]):p="float64",g=ei(p),g===null)throw new TypeError(Qt("invalid argument. Must provide a recognized data type. Value: `%s`.",p));if(m<=0)return new g(0);if(dj(arguments[0]))return u(g,arguments[0],p);if(hj(arguments[0])){if(y=arguments[0],b=y.length,bj(y)?y=Q1(y,0):wj(y)?y=$1(y,0):/^complex/.test(p)&&(b/=2),d=u(g,b,p),d===null)return d;if(td(d)||ed(d))return d.set(y),d;for(q=rd(Sj(y)).accessors[0],h=rd(p).accessors[1],E=0;E0){for(p=_j(ri(m.byteLength)),p=kj(t.length-1,p),g=t[p],y=0;y1&&(e.length=Od(t,e,1,r,t>2)),e}Ld.exports=wC});var Md=l(function(FU,Bd){"use strict";var bC=Rd();Bd.exports=bC});var Id=l(function(zU,Nd){"use strict";var EC=typeof SharedArrayBuffer=="function"?SharedArrayBuffer:null;Nd.exports=EC});var Ud=l(function(OU,Pd){"use strict";function SC(r){throw new Error("not supported. The current environment does not support SharedArrayBuffers, and, unfortunately, SharedArrayBuffers cannot be polyfilled. For shared memory applications, upgrade your runtime environment to one which supports SharedArrayBuffers.")}Pd.exports=SC});var Dd=l(function(LU,Gd){"use strict";var TC=require("@stdlib/assert/has-sharedarraybuffer-support"),AC=Id(),_C=Ud(),ai;TC()?ai=AC:ai=_C;Gd.exports=ai});var Xd=l(function(RU,Kd){"use strict";var Jr=require("@stdlib/utils/define-nonenumerable-read-only-property"),Yd=require("@stdlib/assert/has-own-property"),Wd=require("@stdlib/assert/is-function"),VC=require("@stdlib/assert/is-collection"),kC=require("@stdlib/assert/is-plain-object"),jC=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,CC=Q(),Zd=require("@stdlib/symbol/iterator"),FC=rr(),zC=ar(),OC=K(),ve=require("@stdlib/string/format");function ni(r){var e,t,i,a,n,o,u,v,s,f;if(!VC(r))throw new TypeError(ve("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(a={iter:1e308,dir:1},arguments.length>1)if(kC(arguments[1])){if(t=arguments[1],arguments.length>2){if(u=arguments[2],!Wd(u))throw new TypeError(ve("invalid argument. Callback argument must be a function. Value: `%s`.",u));e=arguments[3]}if(Yd(t,"iter")&&(a.iter=t.iter,!jC(t.iter)))throw new TypeError(ve("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","iter",t.iter));if(Yd(t,"dir")&&(a.dir=t.dir,t.dir!==1&&t.dir!==-1))throw new TypeError(ve("invalid option. `%s` option must be either `1` or `-1`. Option: `%s`.","dir",t.dir))}else{if(u=arguments[1],!Wd(u))throw new TypeError(ve("invalid argument. Second argument must be either a function or an options object. Value: `%s`.",u));e=arguments[2]}return i=0,n={},u?a.dir===1?(f=-1,Jr(n,"next",c)):(f=r.length,Jr(n,"next",m)):a.dir===1?(f=-1,Jr(n,"next",p)):(f=r.length,Jr(n,"next",g)),Jr(n,"return",y),Zd&&Jr(n,Zd,d),s=OC(r),CC(r)?v=FC(s):v=zC(s),n;function c(){return f=(f+1)%r.length,i+=1,o||i>a.iter||r.length===0?{done:!0}:{value:u.call(e,v(r,f),f,i,r),done:!1}}function m(){return f-=1,f<0&&(f+=r.length),i+=1,o||i>a.iter||r.length===0?{done:!0}:{value:u.call(e,v(r,f),f,i,r),done:!1}}function p(){return f=(f+1)%r.length,i+=1,o||i>a.iter||r.length===0?{done:!0}:{value:v(r,f),done:!1}}function g(){return f-=1,f<0&&(f+=r.length),i+=1,o||i>a.iter||r.length===0?{done:!0}:{value:v(r,f),done:!1}}function y(h){return o=!0,arguments.length?{value:h,done:!0}:{done:!0}}function d(){return u?ni(r,a,u,e):ni(r,a)}}Kd.exports=ni});var Jd=l(function(BU,Hd){"use strict";var LC=Xd();Hd.exports=LC});var eh=l(function(MU,rh){"use strict";var Be=require("@stdlib/utils/define-nonenumerable-read-only-property"),RC=require("@stdlib/assert/is-function"),BC=require("@stdlib/assert/is-collection"),MC=Q(),$d=require("@stdlib/symbol/iterator"),NC=rr(),IC=ar(),PC=K(),Qd=require("@stdlib/string/format");function ui(r){var e,t,i,a,n,o,u;if(!BC(r))throw new TypeError(Qd("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(a=arguments[1],!RC(a))throw new TypeError(Qd("invalid argument. Second argument must be a function. Value: `%s`.",a));e=arguments[2]}return u=-1,t={},a?Be(t,"next",v):Be(t,"next",s),Be(t,"return",f),$d&&Be(t,$d,c),o=PC(r),MC(r)?n=NC(o):n=IC(o),t;function v(){return u+=1,i||u>=r.length?{done:!0}:{value:a.call(e,n(r,u),u,r),done:!1}}function s(){return u+=1,i||u>=r.length?{done:!0}:{value:n(r,u),done:!1}}function f(m){return i=!0,arguments.length?{value:m,done:!0}:{done:!0}}function c(){return a?ui(r,a,e):ui(r)}}rh.exports=ui});var ih=l(function(NU,th){"use strict";var UC=eh();th.exports=UC});var oh=l(function(IU,uh){"use strict";var Me=require("@stdlib/utils/define-nonenumerable-read-only-property"),GC=require("@stdlib/assert/is-function"),DC=require("@stdlib/assert/is-collection"),YC=Q(),ah=require("@stdlib/symbol/iterator"),WC=rr(),ZC=ar(),KC=K(),nh=require("@stdlib/string/format");function oi(r){var e,t,i,a,n,o,u,v;if(!DC(r))throw new TypeError(nh("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(a=arguments[1],!GC(a))throw new TypeError(nh("invalid argument. Second argument must be a function. Value: `%s`.",a));e=arguments[2]}return n=r.length,v=n,t={},a?Me(t,"next",s):Me(t,"next",f),Me(t,"return",c),ah&&Me(t,ah,m),u=KC(r),YC(r)?o=WC(u):o=ZC(u),t;function s(){return v+=r.length-n-1,n=r.length,i||v<0?(i=!0,{done:!0}):{value:a.call(e,o(r,v),v,r),done:!1}}function f(){return v+=r.length-n-1,n=r.length,i||v<0?(i=!0,{done:!0}):{value:o(r,v),done:!1}}function c(p){return i=!0,arguments.length?{value:p,done:!0}:{done:!0}}function m(){return a?oi(r,a,e):oi(r)}}uh.exports=oi});var sh=l(function(PU,vh){"use strict";var XC=oh();vh.exports=XC});var lh=l(function(UU,fh){"use strict";var HC=Vr(),JC=Ar(),$C=_r(),QC=Tr(),rF=Sr(),eF=Er(),tF=br(),iF=xr(),aF=qr(),nF=zr(),uF=Lr(),oF=[[aF,"Float64Array"],[iF,"Float32Array"],[eF,"Int32Array"],[tF,"Uint32Array"],[QC,"Int16Array"],[rF,"Uint16Array"],[HC,"Int8Array"],[JC,"Uint8Array"],[$C,"Uint8ClampedArray"],[nF,"Complex64Array"],[uF,"Complex128Array"]];fh.exports=oF});var mh=l(function(GU,ch){"use strict";var vF=require("@stdlib/assert/instance-of"),sF=require("@stdlib/utils/constructor-name"),fF=require("@stdlib/utils/get-prototype-of"),$r=lh();function lF(r){var e,t;for(t=0;t<$r.length;t++)if(vF(r,$r[t][0]))return $r[t][1];for(;r;){for(e=sF(r),t=0;t<$r.length;t++)if(e===$r[t][1])return $r[t][1];r=fF(r)}}ch.exports=lF});var gh=l(function(DU,ph){"use strict";var cF=require("@stdlib/assert/is-typed-array"),mF=require("@stdlib/assert/is-complex-typed-array"),pF=require("@stdlib/strided/base/reinterpret-complex64"),gF=require("@stdlib/strided/base/reinterpret-complex128"),yF=require("@stdlib/string/format"),dF=mh();function hF(r){var e,t,i;if(cF(r))e=r;else if(mF(r))r.BYTES_PER_ELEMENT===8?e=pF(r,0):e=gF(r,0);else throw new TypeError(yF("invalid argument. Must provide a typed array. Value: `%s`.",r));for(t={type:dF(r),data:[]},i=0;i1){if(a=arguments[1],!xF(a))throw new TypeError(qh("invalid argument. Second argument must be a function. Value: `%s`.",a));e=arguments[2]}return u=-1,t={},a?Ne(t,"next",v):Ne(t,"next",s),Ne(t,"return",f),hh&&Ne(t,hh,c),o=TF(r),bF(r)?n=EF(o):n=SF(o),t;function v(){var m;if(i)return{done:!0};for(m=r.length,u+=1;u=m?(i=!0,{done:!0}):{value:a.call(e,n(r,u),u,r),done:!1}}function s(){var m;if(i)return{done:!0};for(m=r.length,u+=1;u=m?(i=!0,{done:!0}):{value:n(r,u),done:!1}}function f(m){return i=!0,arguments.length?{value:m,done:!0}:{done:!0}}function c(){return a?vi(r,a,e):vi(r)}}xh.exports=vi});var Eh=l(function(ZU,bh){"use strict";var AF=wh();bh.exports=AF});var _h=l(function(KU,Ah){"use strict";var Ie=require("@stdlib/utils/define-nonenumerable-read-only-property"),_F=require("@stdlib/assert/is-function"),VF=require("@stdlib/assert/is-collection"),kF=Q(),Sh=require("@stdlib/symbol/iterator"),jF=rr(),CF=ar(),FF=K(),Th=require("@stdlib/string/format");function si(r){var e,t,i,a,n,o,u,v;if(!VF(r))throw new TypeError(Th("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(a=arguments[1],!_F(a))throw new TypeError(Th("invalid argument. Second argument must be a function. Value: `%s`.",a));e=arguments[2]}return n=r.length,v=n,t={},a?Ie(t,"next",s):Ie(t,"next",f),Ie(t,"return",c),Sh&&Ie(t,Sh,m),u=FF(r),kF(r)?o=jF(u):o=CF(u),t;function s(){if(i)return{done:!0};for(v+=r.length-n-1,n=r.length;v>=0&&o(r,v)===void 0;)v-=1;return v<0?(i=!0,{done:!0}):{value:a.call(e,o(r,v),v,r),done:!1}}function f(){if(i)return{done:!0};for(v+=r.length-n-1,n=r.length;v>=0&&o(r,v)===void 0;)v-=1;return v<0?(i=!0,{done:!0}):{value:o(r,v),done:!1}}function c(p){return i=!0,arguments.length?{value:p,done:!0}:{done:!0}}function m(){return a?si(r,a,e):si(r)}}Ah.exports=si});var kh=l(function(XU,Vh){"use strict";var zF=_h();Vh.exports=zF});var zh=l(function(HU,Fh){"use strict";var Pe=require("@stdlib/utils/define-nonenumerable-read-only-property"),OF=require("@stdlib/assert/is-function"),LF=require("@stdlib/assert/is-collection"),jh=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,RF=require("@stdlib/assert/is-integer").isPrimitive,BF=Q(),Ch=require("@stdlib/symbol/iterator"),MF=rr(),NF=ar(),IF=K(),se=require("@stdlib/string/format");function fi(r,e,t,i){var a,n,o,u,v,s,f,c;if(!jh(r))throw new TypeError(se("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(!LF(e))throw new TypeError(se("invalid argument. Second argument must be an array-like object. Value: `%s`.",e));if(!RF(t))throw new TypeError(se("invalid argument. Third argument must be an integer. Value: `%s`.",t));if(!jh(i))throw new TypeError(se("invalid argument. Fourth argument must be a nonnegative integer. Value: `%s`.",i));if(arguments.length>4){if(u=arguments[4],!OF(u))throw new TypeError(se("invalid argument. Fifth argument must be a function. Value: `%s`.",u));a=arguments[5]}return v=i,c=-1,n={},u?Pe(n,"next",m):Pe(n,"next",p),Pe(n,"return",g),Ch&&Pe(n,Ch,y),f=IF(e),BF(e)?s=MF(f):s=NF(f),n;function m(){var d;return c+=1,o||c>=r?{done:!0}:(d=u.call(a,s(e,v),v,c,e),v+=t,{value:d,done:!1})}function p(){var d;return c+=1,o||c>=r?{done:!0}:(d=s(e,v),v+=t,{value:d,done:!1})}function g(d){return o=!0,arguments.length?{value:d,done:!0}:{done:!0}}function y(){return u?fi(r,e,t,i,u,a):fi(r,e,t,i)}}Fh.exports=fi});var Lh=l(function(JU,Oh){"use strict";var PF=zh();Oh.exports=PF});var Nh=l(function($U,Mh){"use strict";var Ue=require("@stdlib/utils/define-nonenumerable-read-only-property"),Ge=require("@stdlib/assert/is-function"),UF=require("@stdlib/assert/is-collection"),Rh=require("@stdlib/assert/is-integer").isPrimitive,GF=Q(),Bh=require("@stdlib/symbol/iterator"),DF=rr(),YF=ar(),WF=K(),De=require("@stdlib/string/format");function li(r){var e,t,i,a,n,o,u,v,s,f;if(!UF(r))throw new TypeError(De("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(i=arguments.length,i===1)t=0,u=r.length;else if(i===2)Ge(arguments[1])?(t=0,o=arguments[1]):t=arguments[1],u=r.length;else if(i===3)Ge(arguments[1])?(t=0,u=r.length,o=arguments[1],e=arguments[2]):Ge(arguments[2])?(t=arguments[1],u=r.length,o=arguments[2]):(t=arguments[1],u=arguments[2]);else{if(t=arguments[1],u=arguments[2],o=arguments[3],!Ge(o))throw new TypeError(De("invalid argument. Fourth argument must be a function. Value: `%s`.",o));e=arguments[4]}if(!Rh(t))throw new TypeError(De("invalid argument. Second argument must be either an integer (starting index) or a function. Value: `%s`.",t));if(!Rh(u))throw new TypeError(De("invalid argument. Third argument must be either an integer (ending index) or a function. Value: `%s`.",u));return u<0?(u=r.length+u,u<0&&(u=0)):u>r.length&&(u=r.length),t<0&&(t=r.length+t,t<0&&(t=0)),f=t-1,a={},o?Ue(a,"next",c):Ue(a,"next",m),Ue(a,"return",p),Bh&&Ue(a,Bh,g),s=WF(r),GF(r)?v=DF(s):v=YF(s),a;function c(){return f+=1,n||f>=u?{done:!0}:{value:o.call(e,v(r,f),f,f-t,r),done:!1}}function m(){return f+=1,n||f>=u?{done:!0}:{value:v(r,f),done:!1}}function p(y){return n=!0,arguments.length?{value:y,done:!0}:{done:!0}}function g(){return o?li(r,t,u,o,e):li(r,t,u)}}Mh.exports=li});var Ph=l(function(QU,Ih){"use strict";var ZF=Nh();Ih.exports=ZF});var Yh=l(function(rG,Dh){"use strict";var Ye=require("@stdlib/utils/define-nonenumerable-read-only-property"),We=require("@stdlib/assert/is-function"),KF=require("@stdlib/assert/is-collection"),Uh=require("@stdlib/assert/is-integer").isPrimitive,XF=Q(),Gh=require("@stdlib/symbol/iterator"),HF=rr(),JF=ar(),$F=K(),Ze=require("@stdlib/string/format");function ci(r){var e,t,i,a,n,o,u,v,s,f;if(!KF(r))throw new TypeError(Ze("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(i=arguments.length,i===1)t=0,u=r.length;else if(i===2)We(arguments[1])?(t=0,o=arguments[1]):t=arguments[1],u=r.length;else if(i===3)We(arguments[1])?(t=0,u=r.length,o=arguments[1],e=arguments[2]):We(arguments[2])?(t=arguments[1],u=r.length,o=arguments[2]):(t=arguments[1],u=arguments[2]);else{if(t=arguments[1],u=arguments[2],o=arguments[3],!We(o))throw new TypeError(Ze("invalid argument. Fourth argument must be a function. Value: `%s`.",o));e=arguments[4]}if(!Uh(t))throw new TypeError(Ze("invalid argument. Second argument must be either an integer (starting view index) or a function. Value: `%s`.",t));if(!Uh(u))throw new TypeError(Ze("invalid argument. Third argument must be either an integer (ending view index) or a function. Value: `%s`.",u));return u<0?(u=r.length+u,u<0&&(u=0)):u>r.length&&(u=r.length),t<0&&(t=r.length+t,t<0&&(t=0)),f=u,a={},o?Ye(a,"next",c):Ye(a,"next",m),Ye(a,"return",p),Gh&&Ye(a,Gh,g),s=$F(r),XF(r)?v=HF(s):v=JF(s),a;function c(){return f-=1,n||f1&&(e=arguments[1]),XO(r.length,e)}_2.exports=HO});var j2=l(function(JG,k2){"use strict";var JO=V2();k2.exports=JO});var _=require("@stdlib/utils/define-read-only-property"),A={};_(A,"base",_0());_(A,"ArrayBuffer",kt());_(A,"Complex64Array",zr());_(A,"Complex128Array",Lr());_(A,"convertArray",Ot());_(A,"convertArraySame",Y0());_(A,"arrayCtors",Pr());_(A,"DataView",J0());_(A,"datespace",ag());_(A,"arrayDataType",K());_(A,"arrayDataTypes",fg());_(A,"aempty",Bt());_(A,"aemptyLike",zg());_(A,"filledarray",Pg());_(A,"filledarrayBy",Jg());_(A,"Float32Array",xr());_(A,"Float64Array",qr());_(A,"iterator2array",ty());_(A,"afull",Dr());_(A,"afullLike",fy());_(A,"incrspace",py());_(A,"Int8Array",Vr());_(A,"Int16Array",Tr());_(A,"Int32Array",Er());_(A,"linspace",o1());_(A,"logspace",m1());_(A,"arrayMinDataType",w1());_(A,"anans",A1());_(A,"anansLike",j1());_(A,"arrayNextDataType",L1());_(A,"aones",N1());_(A,"aonesLike",G1());_(A,"typedarraypool",vd());_(A,"arrayPromotionRules",pd());_(A,"reviveTypedArray",xd());_(A,"arraySafeCasts",Ad());_(A,"arraySameKindCasts",Fd());_(A,"arrayShape",Md());_(A,"SharedArrayBuffer",Dd());_(A,"circarray2iterator",Jd());_(A,"array2iterator",ih());_(A,"array2iteratorRight",sh());_(A,"typedarray2json",dh());_(A,"sparsearray2iterator",Eh());_(A,"sparsearray2iteratorRight",kh());_(A,"stridedarray2iterator",Lh());_(A,"arrayview2iterator",Ph());_(A,"arrayview2iteratorRight",Zh());_(A,"typedarray",Jh());_(A,"complexarray",uq());_(A,"complexarrayCtors",pi());_(A,"complexarrayDataTypes",lq());_(A,"typedarrayCtors",Xr());_(A,"typedarrayDataTypes",yq());_(A,"floatarrayCtors",Yt());_(A,"floatarrayDataTypes",wq());_(A,"intarrayCtors",_q());_(A,"intarrayDataTypes",Fq());_(A,"realarray",Rq());_(A,"realarrayCtors",Uq());_(A,"realarrayDataTypes",Zq());_(A,"realarrayFloatCtors",Qq());_(A,"realarrayFloatDataTypes",a2());_(A,"intarraySignedCtors",f2());_(A,"intarraySignedDataTypes",g2());_(A,"intarrayUnsignedCtors",w2());_(A,"intarrayUnsignedDataTypes",A2());_(A,"Uint8Array",Ar());_(A,"Uint8ClampedArray",_r());_(A,"Uint16Array",Sr());_(A,"Uint32Array",br());_(A,"azeros",Te());_(A,"azerosLike",j2());_(A,"constants",require("@stdlib/constants/array"));module.exports=A;
+"use strict";var l=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var bi=l(function(oL,wi){"use strict";var xi="function";function L2(r){return typeof r.get===xi&&typeof r.set===xi}wi.exports=L2});var Q=l(function(vL,Ei){"use strict";var R2=bi();Ei.exports=R2});var Ai=l(function(sL,Ti){"use strict";var Si={float64:B2,float32:M2,int32:N2,int16:I2,int8:P2,uint32:U2,uint16:G2,uint8:D2,uint8c:Y2,generic:W2,default:Z2};function B2(r,e){return r[e]}function M2(r,e){return r[e]}function N2(r,e){return r[e]}function I2(r,e){return r[e]}function P2(r,e){return r[e]}function U2(r,e){return r[e]}function G2(r,e){return r[e]}function D2(r,e){return r[e]}function Y2(r,e){return r[e]}function W2(r,e){return r[e]}function Z2(r,e){return r[e]}function K2(r){var e=Si[r];return typeof e=="function"?e:Si.default}Ti.exports=K2});var ar=l(function(fL,_i){"use strict";var X2=Ai();_i.exports=X2});var ji=l(function(lL,ki){"use strict";var Vi={float64:H2,float32:J2,int32:$2,int16:Q2,int8:rx,uint32:ex,uint16:tx,uint8:ix,uint8c:ax,generic:nx,default:ux};function H2(r,e,t){r[e]=t}function J2(r,e,t){r[e]=t}function $2(r,e,t){r[e]=t}function Q2(r,e,t){r[e]=t}function rx(r,e,t){r[e]=t}function ex(r,e,t){r[e]=t}function tx(r,e,t){r[e]=t}function ix(r,e,t){r[e]=t}function ax(r,e,t){r[e]=t}function nx(r,e,t){r[e]=t}function ux(r,e,t){r[e]=t}function ox(r){var e=Vi[r];return typeof e=="function"?e:Vi.default}ki.exports=ox});var fe=l(function(cL,Ci){"use strict";var vx=ji();Ci.exports=vx});var Oi=l(function(mL,zi){"use strict";var Fi={complex128:sx,complex64:fx,default:lx};function sx(r,e){return r.get(e)}function fx(r,e){return r.get(e)}function lx(r,e){return r.get(e)}function cx(r){var e=Fi[r];return typeof e=="function"?e:Fi.default}zi.exports=cx});var rr=l(function(pL,Li){"use strict";var mx=Oi();Li.exports=mx});var Mi=l(function(gL,Bi){"use strict";var Ri={complex128:px,complex64:gx,default:yx};function px(r,e,t){r.set(t,e)}function gx(r,e,t){r.set(t,e)}function yx(r,e,t){r.set(t,e)}function dx(r){var e=Ri[r];return typeof e=="function"?e:Ri.default}Bi.exports=dx});var le=l(function(yL,Ni){"use strict";var hx=Mi();Ni.exports=hx});var Pi=l(function(dL,Ii){"use strict";var qx={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128"};Ii.exports=qx});var Gi=l(function(hL,Ui){"use strict";var xx=typeof Float64Array=="function"?Float64Array:void 0;Ui.exports=xx});var Yi=l(function(qL,Di){"use strict";function wx(){throw new Error("not implemented")}Di.exports=wx});var qr=l(function(xL,Wi){"use strict";var bx=require("@stdlib/assert/has-float64array-support"),Ex=Gi(),Sx=Yi(),Ke;bx()?Ke=Ex:Ke=Sx;Wi.exports=Ke});var Ki=l(function(wL,Zi){"use strict";var Tx=typeof Float32Array=="function"?Float32Array:void 0;Zi.exports=Tx});var Hi=l(function(bL,Xi){"use strict";function Ax(){throw new Error("not implemented")}Xi.exports=Ax});var xr=l(function(EL,Ji){"use strict";var _x=require("@stdlib/assert/has-float32array-support"),Vx=Ki(),kx=Hi(),Xe;_x()?Xe=Vx:Xe=kx;Ji.exports=Xe});var Qi=l(function(SL,$i){"use strict";var jx=typeof Uint32Array=="function"?Uint32Array:void 0;$i.exports=jx});var ea=l(function(TL,ra){"use strict";function Cx(){throw new Error("not implemented")}ra.exports=Cx});var br=l(function(AL,ta){"use strict";var Fx=require("@stdlib/assert/has-uint32array-support"),zx=Qi(),Ox=ea(),He;Fx()?He=zx:He=Ox;ta.exports=He});var aa=l(function(_L,ia){"use strict";var Lx=typeof Int32Array=="function"?Int32Array:void 0;ia.exports=Lx});var ua=l(function(VL,na){"use strict";function Rx(){throw new Error("not implemented")}na.exports=Rx});var Er=l(function(kL,oa){"use strict";var Bx=require("@stdlib/assert/has-int32array-support"),Mx=aa(),Nx=ua(),Je;Bx()?Je=Mx:Je=Nx;oa.exports=Je});var sa=l(function(jL,va){"use strict";var Ix=typeof Uint16Array=="function"?Uint16Array:void 0;va.exports=Ix});var la=l(function(CL,fa){"use strict";function Px(){throw new Error("not implemented")}fa.exports=Px});var Sr=l(function(FL,ca){"use strict";var Ux=require("@stdlib/assert/has-uint16array-support"),Gx=sa(),Dx=la(),$e;Ux()?$e=Gx:$e=Dx;ca.exports=$e});var pa=l(function(zL,ma){"use strict";var Yx=typeof Int16Array=="function"?Int16Array:void 0;ma.exports=Yx});var ya=l(function(OL,ga){"use strict";function Wx(){throw new Error("not implemented")}ga.exports=Wx});var Tr=l(function(LL,da){"use strict";var Zx=require("@stdlib/assert/has-int16array-support"),Kx=pa(),Xx=ya(),Qe;Zx()?Qe=Kx:Qe=Xx;da.exports=Qe});var qa=l(function(RL,ha){"use strict";var Hx=typeof Uint8Array=="function"?Uint8Array:void 0;ha.exports=Hx});var wa=l(function(BL,xa){"use strict";function Jx(){throw new Error("not implemented")}xa.exports=Jx});var Ar=l(function(ML,ba){"use strict";var $x=require("@stdlib/assert/has-uint8array-support"),Qx=qa(),rw=wa(),rt;$x()?rt=Qx:rt=rw;ba.exports=rt});var Sa=l(function(NL,Ea){"use strict";var ew=typeof Uint8ClampedArray=="function"?Uint8ClampedArray:void 0;Ea.exports=ew});var Aa=l(function(IL,Ta){"use strict";function tw(){throw new Error("not implemented")}Ta.exports=tw});var _r=l(function(PL,_a){"use strict";var iw=require("@stdlib/assert/has-uint8clampedarray-support"),aw=Sa(),nw=Aa(),et;iw()?et=aw:et=nw;_a.exports=et});var ka=l(function(UL,Va){"use strict";var uw=typeof Int8Array=="function"?Int8Array:void 0;Va.exports=uw});var Ca=l(function(GL,ja){"use strict";function ow(){throw new Error("not implemented")}ja.exports=ow});var Vr=l(function(DL,Fa){"use strict";var vw=require("@stdlib/assert/has-int8array-support"),sw=ka(),fw=Ca(),tt;vw()?tt=sw:tt=fw;Fa.exports=tt});var Oa=l(function(YL,za){"use strict";var lw=require("@stdlib/assert/is-array-like-object"),cw=require("@stdlib/assert/is-complex-like"),mw=require("@stdlib/complex/realf"),pw=require("@stdlib/complex/imagf"),gw=require("@stdlib/string/format");function yw(r){var e,t,i;for(e=[];t=r.next(),!t.done;)if(i=t.value,lw(i)&&i.length>=2)e.push(i[0],i[1]);else if(cw(i))e.push(mw(i),pw(i));else return new TypeError(gw("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));return e}za.exports=yw});var Ra=l(function(WL,La){"use strict";var dw=require("@stdlib/assert/is-array-like-object"),hw=require("@stdlib/assert/is-complex-like"),qw=require("@stdlib/complex/realf"),xw=require("@stdlib/complex/imagf"),ww=require("@stdlib/string/format");function bw(r,e,t){var i,a,n,o;for(i=[],o=-1;a=r.next(),!a.done;)if(o+=1,n=e.call(t,a.value,o),dw(n)&&n.length>=2)i.push(n[0],n[1]);else if(hw(n))i.push(qw(n),xw(n));else return new TypeError(ww("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));return i}La.exports=bw});var Ma=l(function(ZL,Ba){"use strict";var Ew=require("@stdlib/assert/is-complex-like"),Sw=require("@stdlib/complex/realf"),Tw=require("@stdlib/complex/imagf");function Aw(r,e){var t,i,a,n;for(t=e.length,n=0,a=0;at.byteLength-r)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",i*nr));t=new fr(t,r,i*2)}}return D(this,"_buffer",t),D(this,"_length",t.length/2),this}D(M,"BYTES_PER_ELEMENT",nr);D(M,"name","Complex64Array");D(M,"from",function(e){var t,i,a,n,o,u,v,s,f,c,m,p;if(!er(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Da(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(i=arguments.length,i>1){if(a=arguments[1],!er(a))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",a));i>2&&(t=arguments[2])}if(Z(e)){if(s=e.length,a){for(n=new this(s),o=n._buffer,p=0,m=0;m=2)o[p]=c[0],o[p+1]=c[1];else throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));p+=2}return n}return new this(e)}if(at(e)){if(a){for(s=e.length,e.get&&e.set?v=zw("default"):v=Fw("default"),m=0;m=2)o[p]=c[0],o[p+1]=c[1];else throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));p+=2}return n}return new this(e)}if(Ia(e)&&Ga&&er(e[Wr])){if(o=e[Wr](),!er(o.next))throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if(a?u=Ow(o,a,t):u=Ua(o),u instanceof Error)throw u;for(s=u.length/2,n=new this(s),o=n._buffer,m=0;m=this._length))return or(this._buffer,e)});me(M.prototype,"buffer",function(){return this._buffer.buffer});me(M.prototype,"byteLength",function(){return this._buffer.byteLength});me(M.prototype,"byteOffset",function(){return this._buffer.byteOffset});D(M.prototype,"BYTES_PER_ELEMENT",M.BYTES_PER_ELEMENT);D(M.prototype,"copyWithin",function(e,t){if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return arguments.length===2?this._buffer.copyWithin(e*2,t*2):this._buffer.copyWithin(e*2,t*2,arguments[2]*2),this});D(M.prototype,"entries",function(){var e,t,i,a,n,o,u;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._buffer,a=this._length,o=-1,u=-2,i={},D(i,"next",v),D(i,"return",s),Wr&&D(i,Wr,f),i;function v(){var c;return o+=1,n||o>=a?{done:!0}:(u+=2,c=new Pa(e[u],e[u+1]),{value:[o,c],done:!1})}function s(c){return n=!0,arguments.length?{value:c,done:!0}:{done:!0}}function f(){return t.entries()}});D(M.prototype,"every",function(e,t){var i,a;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!er(e))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=0;a1){if(!cr(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=n,t<0&&(t=0)),arguments.length>2){if(!cr(i))throw new TypeError(L("invalid argument. Third argument must be an integer. Value: `%s`.",i));i<0&&(i+=n,i<0&&(i=0)),i>n&&(i=n)}else i=n}else t=0,i=n;for(u=kr(e),v=jr(e),s=t;s=0;a--)if(n=or(i,a),e.call(t,n,a,this))return n});D(M.prototype,"findLastIndex",function(e,t){var i,a,n;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!er(e))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=this._length-1;a>=0;a--)if(n=or(i,a),e.call(t,n,a,this))return a;return-1});D(M.prototype,"forEach",function(e,t){var i,a,n;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!er(e))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=0;a=this._length))return or(this._buffer,e)});D(M.prototype,"includes",function(e,t){var i,a,n,o,u;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!lr(e))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!cr(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=kr(e),o=jr(e),i=this._buffer,u=t;u1){if(!cr(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=kr(e),o=jr(e),i=this._buffer,u=t;u1){if(!cr(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(n=kr(e),o=jr(e),i=this._buffer,u=t;u>=0;u--)if(a=2*u,n===i[a]&&o===i[a+1])return u;return-1});me(M.prototype,"length",function(){return this._length});D(M.prototype,"map",function(e,t){var i,a,n,o,u;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!er(e))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",e));for(a=this._buffer,n=new this.constructor(this._length),i=n._buffer,o=0;o1){if(i=arguments[1],!re(i))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",i))}else i=0;if(lr(e)){if(i>=this._length)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",i));i*=2,a[i]=kr(e),a[i+1]=jr(e);return}if(Z(e)){if(u=e._length,i+u>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e._buffer,f=a.byteOffset+i*nr,t.buffer===a.buffer&&t.byteOffsetf){for(n=new fr(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e,f=a.byteOffset+i*nr,t.buffer===a.buffer&&t.byteOffsetf){for(n=new fr(u),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(i*=2,s=0;sn&&(t=n)}}return e>=n?(n=0,i=a.byteLength):e>=t?(n=0,i=a.byteOffset+e*nr):(n=t-e,i=a.byteOffset+e*nr),new this.constructor(a.buffer,i,n<0?0:n)});D(M.prototype,"toString",function(){var e,t,i;if(!Z(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=[],t=this._buffer,i=0;i=n)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",e));if(!lr(t))throw new TypeError(L("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return a=new this.constructor(this._buffer),i=a._buffer,i[2*e]=kr(t),i[2*e+1]=jr(t),a});Ya.exports=M});var zr=l(function(XL,Za){"use strict";var Mw=Wa();Za.exports=Mw});var Xa=l(function(HL,Ka){"use strict";var Nw=require("@stdlib/assert/is-array-like-object"),Iw=require("@stdlib/assert/is-complex-like"),Pw=require("@stdlib/string/format"),Uw=require("@stdlib/complex/real"),Gw=require("@stdlib/complex/imag");function Dw(r){var e,t,i;for(e=[];t=r.next(),!t.done;)if(i=t.value,Nw(i)&&i.length>=2)e.push(i[0],i[1]);else if(Iw(i))e.push(Uw(i),Gw(i));else return new TypeError(Pw("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));return e}Ka.exports=Dw});var Ja=l(function(JL,Ha){"use strict";var Yw=require("@stdlib/assert/is-array-like-object"),Ww=require("@stdlib/assert/is-complex-like"),Zw=require("@stdlib/string/format"),Kw=require("@stdlib/complex/real"),Xw=require("@stdlib/complex/imag");function Hw(r,e,t){var i,a,n,o;for(i=[],o=-1;a=r.next(),!a.done;)if(o+=1,n=e.call(t,a.value,o),Yw(n)&&n.length>=2)i.push(n[0],n[1]);else if(Ww(n))i.push(Kw(n),Xw(n));else return new TypeError(Zw("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));return i}Ha.exports=Hw});var Qa=l(function($L,$a){"use strict";var Jw=require("@stdlib/assert/is-complex-like"),$w=require("@stdlib/complex/real"),Qw=require("@stdlib/complex/imag");function rb(r,e){var t,i,a,n;for(t=e.length,n=0,a=0;at.byteLength-r)throw new RangeError(B("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",i*ur));t=new mr(t,r,i*2)}}return W(this,"_buffer",t),W(this,"_length",t.length/2),this}W(N,"BYTES_PER_ELEMENT",ur);W(N,"name","Complex128Array");W(N,"from",function(e){var t,i,a,n,o,u,v,s,f,c,m,p;if(!tr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!un(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(i=arguments.length,i>1){if(a=arguments[1],!tr(a))throw new TypeError(B("invalid argument. Second argument must be a function. Value: `%s`.",a));i>2&&(t=arguments[2])}if(H(e)){if(s=e.length,a){for(n=new this(s),o=n._buffer,p=0,m=0;m=2)o[p]=c[0],o[p+1]=c[1];else throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));p+=2}return n}return new this(e)}if(ut(e)){if(a){for(s=e.length,e.get&&e.set?v=ub("default"):v=nb("default"),m=0;m=2)o[p]=c[0],o[p+1]=c[1];else throw new TypeError(B("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));p+=2}return n}return new this(e)}if(en(e)&&nn&&tr(e[Zr])){if(o=e[Zr](),!tr(o.next))throw new TypeError(B("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if(a?u=ob(o,a,t):u=an(o),u instanceof Error)throw u;for(s=u.length/2,n=new this(s),o=n._buffer,m=0;m=this._length))return pr(this._buffer,e)});ge(N.prototype,"buffer",function(){return this._buffer.buffer});ge(N.prototype,"byteLength",function(){return this._buffer.byteLength});ge(N.prototype,"byteOffset",function(){return this._buffer.byteOffset});W(N.prototype,"BYTES_PER_ELEMENT",N.BYTES_PER_ELEMENT);W(N.prototype,"copyWithin",function(e,t){if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return arguments.length===2?this._buffer.copyWithin(e*2,t*2):this._buffer.copyWithin(e*2,t*2,arguments[2]*2),this});W(N.prototype,"entries",function(){var e,t,i,a,n,o,u;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,e=this._buffer,a=this._length,o=-1,u=-2,i={},W(i,"next",v),W(i,"return",s),Zr&&W(i,Zr,f),i;function v(){var c;return o+=1,n||o>=a?{done:!0}:(u+=2,c=new tn(e[u],e[u+1]),{value:[o,c],done:!1})}function s(c){return n=!0,arguments.length?{value:c,done:!0}:{done:!0}}function f(){return t.entries()}});W(N.prototype,"every",function(e,t){var i,a;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!tr(e))throw new TypeError(B("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=0;a=0;a--)if(n=pr(i,a),e.call(t,n,a,this))return n});W(N.prototype,"findLastIndex",function(e,t){var i,a,n;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!tr(e))throw new TypeError(B("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=this._length-1;a>=0;a--)if(n=pr(i,a),e.call(t,n,a,this))return a;return-1});W(N.prototype,"forEach",function(e,t){var i,a,n;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!tr(e))throw new TypeError(B("invalid argument. First argument must be a function. Value: `%s`.",e));for(i=this._buffer,a=0;a=this._length))return pr(this._buffer,e)});ge(N.prototype,"length",function(){return this._length});W(N.prototype,"includes",function(e,t){var i,a,n,o,u;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Cr(e))throw new TypeError(B("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!Or(t))throw new TypeError(B("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=Mr(e),o=Nr(e),i=this._buffer,u=t;u1){if(!Or(t))throw new TypeError(B("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length,t<0&&(t=0))}else t=0;for(n=Mr(e),o=Nr(e),i=this._buffer,u=t;u1){if(!Or(t))throw new TypeError(B("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(n=Mr(e),o=Nr(e),i=this._buffer,u=t;u>=0;u--)if(a=2*u,n===i[a]&&o===i[a+1])return u;return-1});W(N.prototype,"map",function(e,t){var i,a,n,o,u;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!tr(e))throw new TypeError(B("invalid argument. First argument must be a function. Value: `%s`.",e));for(a=this._buffer,n=new this.constructor(this._length),i=n._buffer,o=0;o1){if(i=arguments[1],!ee(i))throw new TypeError(B("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",i))}else i=0;if(Cr(e)){if(i>=this._length)throw new RangeError(B("invalid argument. Index argument is out-of-bounds. Value: `%u`.",i));i*=2,a[i]=Mr(e),a[i+1]=Nr(e);return}if(H(e)){if(u=e._length,i+u>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e._buffer,f=a.byteOffset+i*ur,t.buffer===a.buffer&&t.byteOffsetf){for(n=new mr(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=e,f=a.byteOffset+i*ur,t.buffer===a.buffer&&t.byteOffsetf){for(n=new mr(u),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(i*=2,s=0;sn&&(t=n)}}return e>=n?(n=0,i=a.byteLength):e>=t?(n=0,i=a.byteOffset+e*ur):(n=t-e,i=a.byteOffset+e*ur),new this.constructor(a.buffer,i,n<0?0:n)});W(N.prototype,"toString",function(){var e,t,i;if(!H(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=[],t=this._buffer,i=0;i=0;s--)if(f=u-o+s,!(f<0)){if(v=e[f],a=t[s],a!==0&&a=0;s--)u=f%o,f-=u,f/=o,a[s]=u;for(i=[],s=0;s=0;n--)i.push(t[n]);e.push(i)}return e}tf.exports=fS});var ht=l(function(xM,nf){"use strict";var lS=af();nf.exports=lS});var of=l(function(wM,uf){"use strict";var cS=ht();function mS(r){var e,t;for(e=[],t=0;t=0;t--)e.push(r[t]);return e}yf.exports=wS});var wt=l(function(VM,hf){"use strict";var bS=df();hf.exports=bS});var xf=l(function(kM,qf){"use strict";var ES=wt();function SS(r){var e,t;for(e=[],t=0;t=0;a--)if(Se(r[a]))return a;return-1}for(a=t;a>=0;a--)if(e===r[a])return a;return-1}function h8(r,e,t,i){var a,n,o;if(a=r.data,n=r.accessors[0],i&&Se(e)){for(o=t;o>=0;o--)if(Se(n(a,o)))return o;return-1}for(o=t;o>=0;o--)if(e===n(a,o))return o;return-1}function q8(r,e,t,i){var a;if(y8(r,"lastIndexOf")&&i===!1)return r.lastIndexOf(e,t);if(t<0){if(t+=r.length,t<0)return-1}else t>r.length&&(t=r.length-1);return a=g8(r),a.accessorProtocol?h8(a,e,t,i):d8(r,e,t,i)}yl.exports=q8});var ql=l(function(tN,hl){"use strict";var x8=dl();hl.exports=x8});var wl=l(function(iN,xl){"use strict";function w8(r,e,t){var i,a,n,o;if(t===0)return[];for(a=t-1,n=(e-r)/a,i=[r],o=1;o=0;m--)f=p%i[m],p-=f,p/=i[m],v[m]=f;for(o=[],m=0;m4&&(a=arguments[4]),c=r[0],m=r[1],v=0;v2){if(arguments.length===3?tg(t)?a=t:(n=t,o=!1):(a=i,n=t),n===0)return[];if(!UA(n)||n<0)throw new TypeError(Ur("invalid argument. Length must be a positive integer. Value: `%s`.",n));if(o){if(!tg(a))throw new TypeError(Ur("invalid argument. Options argument must be an object. Value: `%s`.",a));if(PA(a,"round")){if(!GA(a.round))throw new TypeError(Ur("invalid option. `%s` option must be a string. Option: `%s`.","round",a.round));if(ig.indexOf(a.round)===-1)throw new Error(Ur('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"round",ig.join('", "'),a.round))}}}switch(a.round){case"round":s=YA;break;case"ceil":s=WA;break;case"floor":default:s=DA;break}for(v=n-1,c=(e.getTime()-r.getTime())/v,u=new Array(n),f=r,u[0]=f,f=f.getTime(),m=1;m1?i=arguments[1]:i="float64",i==="generic")return q_(r);if(e=x_(i),e===null)throw new TypeError(Eg("invalid argument. Second argument must be a supported data type. Value: `%s`.",i));return a=h_(i),u=e*r,i==="complex128"&&(u+=8),n=d_(u),t=n.byteOffset,i==="complex128"&&(bg(t/e)||(t+=8)),o=new a(n.buffer,t,r),o}Sg.exports=w_});var Vg=l(function(kP,_g){"use strict";var b_=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,E_=Pr(),S_=Rr(),Ag=require("@stdlib/string/format");function T_(r){var e,t;if(!b_(r))throw new TypeError(Ag("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(arguments.length>1?e=arguments[1]:e="float64",e==="generic")return S_(r);if(t=E_(e),t===null)throw new TypeError(Ag("invalid argument. Second argument must be a recognized data type. Value: `%s`.",e));return new t(r)}_g.exports=T_});var Te=l(function(jP,kg){"use strict";var A_=Vg();kg.exports=A_});var Fg=l(function(CP,Cg){"use strict";var jg=Te();function __(r){return arguments.length>1?jg(r,arguments[1]):jg(r)}Cg.exports=__});var Bt=l(function(FP,zg){"use strict";var V_=yg(),k_=Tg(),j_=Fg(),Rt;V_()?Rt=k_:Rt=j_;zg.exports=Rt});var Lg=l(function(zP,Og){"use strict";var C_=K(),F_=Bt(),z_=require("@stdlib/string/format");function O_(r){var e=C_(r);if(e===null)throw new TypeError(z_("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(e=arguments[1]),F_(r.length,e)}Og.exports=O_});var Bg=l(function(OP,Rg){"use strict";var L_=Lg();Rg.exports=L_});var Gg=l(function(LP,Ug){"use strict";var R_=require("@stdlib/assert/is-string").isPrimitive,Mg=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,Ng=require("@stdlib/assert/is-collection"),Mt=require("@stdlib/assert/is-arraybuffer"),Ig=require("@stdlib/assert/is-object"),Ae=require("@stdlib/assert/is-function"),B_=Pr(),M_=require("@stdlib/blas/ext/base/gfill"),N_=wr(),I_=require("@stdlib/assert/has-iterator-symbol-support"),_e=require("@stdlib/symbol/iterator"),P_=require("@stdlib/iter/length"),Fr=require("@stdlib/string/format"),Pg=I_();function U_(r,e){var t,i;for(t=[];i=r.next(),!i.done;)t.push(e);return t}function G_(r,e){var t;for(t=0;t=0&&R_(arguments[e])?(t=arguments[e],e-=1):t="float64",i=B_(t),i===null)throw new TypeError(Fr("invalid argument. Must provide a recognized data type. Value: `%s`.",t));if(t==="generic"){if(e<=0)return[];if(r=arguments[0],o=arguments[1],e===1){if(Mg(o)?n=o:Ng(o)&&(n=o.length),n!==void 0)return N_(r,n);if(Mt(o))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(Ig(o)){if(Pg===!1)throw new TypeError(Fr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",o));if(!Ae(o[_e]))throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));if(o=o[_e](),!Ae(o.next))throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));return U_(o,r)}throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o))}else if(Mt(o))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o))}if(e<=0)return new i(0);if(e===1)if(o=arguments[1],Ng(o))a=new i(o.length);else if(Mt(o))a=new i(o);else if(Mg(o))a=new i(o);else if(Ig(o)){if(Pg===!1)throw new TypeError(Fr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",o));if(!Ae(o[_e]))throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));if(o=o[_e](),!Ae(o.next))throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));a=new i(P_(o))}else throw new TypeError(Fr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",o));else e===2?a=new i(arguments[1],arguments[2]):a=new i(arguments[1],arguments[2],arguments[3]);return a.length>0&&(/^complex/.test(t)?G_(a,arguments[0]):M_(a.length,arguments[0],a,1)),a}Ug.exports=D_});var Yg=l(function(RP,Dg){"use strict";var Y_=Gg();Dg.exports=Y_});var Qg=l(function(BP,$g){"use strict";var Wg=require("@stdlib/assert/is-string").isPrimitive,Zg=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,Kg=require("@stdlib/assert/is-collection"),Nt=require("@stdlib/assert/is-arraybuffer"),Xg=require("@stdlib/assert/is-object"),Gr=require("@stdlib/assert/is-function"),It=Pr(),W_=require("@stdlib/blas/ext/base/gfill-by"),Z_=mt(),K_=require("@stdlib/assert/has-iterator-symbol-support"),Ve=require("@stdlib/symbol/iterator"),X_=require("@stdlib/iter/length"),gr=require("@stdlib/string/format"),Hg=K_(),Jg="float64";function H_(r,e,t){var i,a,n;for(i=[],a=-1;n=r.next(),!n.done;)a+=1,i.push(e.call(t,a));return i}function J_(r,e,t){var i;for(i=0;i1)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(a=It(t),a===null)throw new TypeError(gr("invalid argument. Must provide a recognized data type. Value: `%s`.",t));return new a(0)}if(e<2)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(e-=1,Gr(arguments[e]))if(Gr(arguments[e-1])){if(r=arguments[e],e-=1,i=arguments[e],e===0)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.")}else i=arguments[e];else if(e>=2){if(r=arguments[e],e-=1,i=arguments[e],!Gr(i))throw new TypeError(gr("invalid argument. Callback argument must be a function. Value: `%s`.",i))}else throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(e-=1,e>=0&&Wg(arguments[e])?(t=arguments[e],e-=1):t=Jg,a=It(t),a===null)throw new TypeError(gr("invalid argument. Must provide a recognized data type. Value: `%s`.",t));if(t==="generic"){if(u=arguments[0],e===0){if(Zg(u)?o=u:Kg(u)&&(o=u.length),o!==void 0)return Z_(o,i,r);if(Nt(u))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(Xg(u)){if(Hg===!1)throw new TypeError(gr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",u));if(!Gr(u[Ve]))throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(u=u[Ve](),!Gr(u.next))throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));return H_(u,i,r)}throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u))}else if(Nt(u))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u))}if(e===0)if(u=arguments[0],Kg(u))n=new a(u.length);else if(Nt(u))n=new a(u);else if(Zg(u))n=new a(u);else if(Xg(u)){if(Hg===!1)throw new TypeError(gr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",u));if(!Gr(u[Ve]))throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(u=u[Ve](),!Gr(u.next))throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));n=new a(X_(u))}else throw new TypeError(gr("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));else e===1?n=new a(arguments[0],arguments[1]):n=new a(arguments[0],arguments[1],arguments[2]);return n.length>0&&(/^complex/.test(t)?J_(n,i,r):W_(n.length,n,1,v)),n;function v(s,f){return i.call(r,f)}}$g.exports=$_});var ey=l(function(MP,ry){"use strict";var Q_=Qg();ry.exports=Q_});var ay=l(function(NP,iy){"use strict";var ty=require("@stdlib/assert/is-function"),rV=require("@stdlib/assert/is-collection"),eV=require("@stdlib/assert/is-iterator-like"),tV=Q(),iV=le(),aV=fe(),nV=K(),Pt=require("@stdlib/string/format");function uV(){var r,e,t,i,a,n,o,u,v;if(r=arguments[0],arguments.length>1)if(rV(arguments[1])){if(i=arguments[1],arguments.length>2){if(t=arguments[2],!ty(t))throw new TypeError(Pt("invalid argument. Callback argument must be a function. Value: `%s`.",t));e=arguments[3]}}else{if(t=arguments[1],!ty(t))throw new TypeError(Pt("invalid argument. Callback argument must be a function. Value: `%s`.",t));e=arguments[2]}if(!eV(r))throw new TypeError(Pt("invalid argument. Iterator argument must be an iterator protocol-compliant object. Value: `%s`.",r));if(u=-1,i===void 0){if(i=[],t){for(;u+=1,v=r.next(),!v.done;)i.push(t.call(e,v.value,u));return i}for(;v=r.next(),!v.done;)i.push(v.value);return i}if(a=i.length,o=nV(i),tV(i)?n=iV(o):n=aV(o),t){for(;u2?t=arguments[2]:t="float64",t==="generic")return fV(e,r);if(i=sV(t),i===null)throw new TypeError(oy("invalid argument. Third argument must be a recognized data type. Value: `%s`.",t));return a=new i(r),lV(r,e,a,1),a}vy.exports=cV});var Dr=l(function(UP,fy){"use strict";var mV=sy();fy.exports=mV});var cy=l(function(GP,ly){"use strict";var pV=require("@stdlib/string/format"),gV=K(),yV=Dr(),dV=require("@stdlib/complex/float64"),hV=require("@stdlib/complex/float32");function qV(r,e){var t,i;if(t=gV(r),t===null)throw new TypeError(pV("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>2&&(t=arguments[2]),typeof e=="number"?t==="complex128"?i=new dV(e,0):t==="complex64"?i=new hV(e,0):i=e:i=e,yV(r.length,i,t)}ly.exports=qV});var py=l(function(DP,my){"use strict";var xV=cy();my.exports=xV});var yy=l(function(YP,gy){"use strict";var wV=require("@stdlib/math/base/special/ceil"),Ut=require("@stdlib/assert/is-number").isPrimitive,Gt=require("@stdlib/math/base/assert/is-nan"),Dt=require("@stdlib/string/format"),bV=require("@stdlib/constants/uint32/max"),EV=St();function SV(r,e,t){var i,a;if(!Ut(r)||Gt(r))throw new TypeError(Dt("invalid argument. Start must be numeric. Value: `%s`.",r));if(!Ut(e)||Gt(e))throw new TypeError(Dt("invalid argument. Stop must be numeric. Value: `%s`.",e));if(arguments.length<3)a=1;else if(a=t,!Ut(a)||Gt(a))throw new TypeError(Dt("invalid argument. Increment must be numeric. Value: `%s`.",a));if(i=wV((e-r)/a),i>bV)throw new RangeError("invalid arguments. Generated array exceeds maximum array length.");return EV(r,e,a)}gy.exports=SV});var hy=l(function(WP,dy){"use strict";var TV=yy();dy.exports=TV});var xy=l(function(ZP,qy){"use strict";var AV=qr(),_V=xr(),VV=Lr(),kV=zr(),jV={float64:AV,float32:_V,complex128:VV,complex64:kV};qy.exports=jV});var by=l(function(KP,wy){"use strict";var CV=xy();function FV(r){return CV[r]||null}wy.exports=FV});var Yt=l(function(XP,Ey){"use strict";var zV=by();Ey.exports=zV});var Ty=l(function(HP,Sy){"use strict";function OV(r,e,t,i){var a,n,o,u;if(t===0)return[];if(t===1)return i?[e]:[r];for(a=[r],i?n=t-1:n=t,o=(e-r)/n,u=1;u3&&(n=$V(i,arguments[3]),n))throw n;if(i.dtype==="generic")return s?HV(u,r,v,e,t,i.endpoint):XV(r,e,t,i.endpoint);if(a=WV(i.dtype),a===null)throw new TypeError(Hr('invalid option. `%s` option must be a real or complex floating-point data type or "generic". Option: `%s`.',"dtype",i.dtype));if(o=new a(t),i.dtype==="complex64")return Dy(ZV(o,0),u,r,v,e,t,i.endpoint),o;if(i.dtype==="complex128")return Dy(KV(o,0),u,r,v,e,t,i.endpoint),o;if(s)throw new TypeError('invalid arguments. If either of the first two arguments are complex numbers, the output array data type must be a complex number data type or "generic".');return JV(o,r,e,t,i.endpoint)}Yy.exports=rk});var $y=l(function(iU,Jy){"use strict";var ek=require("@stdlib/complex/float32"),tk=require("@stdlib/complex/float64"),Zy=require("@stdlib/complex/real"),Ky=require("@stdlib/complex/imag"),Xy=require("@stdlib/complex/realf"),Hy=require("@stdlib/complex/imagf");function ik(r,e,t,i,a,n,o){var u,v,s,f,c,m,p,g,y,d,h,q,b,E;if(n===0)return r;if(v=0,e==="float64"?(s=t,c=0):e==="complex64"?(v+=1,s=Xy(t),c=Hy(t)):(s=Zy(t),c=Ky(t)),i==="float64"?(f=a,m=0):i==="complex64"?(v+=1,f=Xy(a),m=Hy(a)):(f=Zy(a),m=Ky(a)),v===2?u=ek:u=tk,g=r.data,p=r.accessors[1],n===1)return o?p(g,0,new u(f,m)):p(g,0,new u(s,c)),r;for(p(g,0,new u(s,c)),o?b=n-1:b=n,h=(f-s)/b,q=(m-c)/b,E=1;E3&&(a=ck(i,arguments[3]),a))throw a;if(v=uk(t),v===null&&(v="generic"),v==="complex64")return u1(ok(t,0),n,r,o,e,t.length,i.endpoint),t;if(v==="complex128")return u1(vk(t,0),n,r,o,e,t.length,i.endpoint),t;if(u){if(v==="generic")return s=n1(t),sk(s,n,r,o,e,t.length,i.endpoint),t;throw new TypeError('invalid arguments. If either of the first two arguments are complex numbers, the output array must be a complex number array or a "generic" array-like object.')}return s=n1(t),s.accessorProtocol?(fk(s,r,e,t.length,i.endpoint),t):(lk(t,r,e,t.length,i.endpoint),t)}o1.exports=pk});var l1=l(function(uU,f1){"use strict";var gk=require("@stdlib/utils/define-nonenumerable-read-only-property"),s1=Wy(),yk=v1();gk(s1,"assign",yk);f1.exports=s1});var g1=l(function(oU,p1){"use strict";var c1=require("@stdlib/assert/is-number").isPrimitive,dk=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,Jt=require("@stdlib/string/format"),m1=require("@stdlib/math/base/assert/is-nan"),hk=At();function qk(r,e,t){if(!c1(r)||m1(r))throw new TypeError(Jt("invalid argument. Exponent of start value must be numeric. Value: `%s`.",r));if(!c1(e)||m1(e))throw new TypeError(Jt("invalid argument. Exponent of stop value must be numeric. Value: `%s`.",e));if(arguments.length<3)t=10;else if(!dk(t))throw new TypeError(Jt("invalid argument. Length must be a nonnegative integer. Value: `%s`.",t));return hk(r,e,t)}p1.exports=qk});var d1=l(function(vU,y1){"use strict";var xk=g1();y1.exports=xk});var E1=l(function(sU,b1){"use strict";var q1=require("@stdlib/math/base/assert/is-integer"),wk=require("@stdlib/math/base/assert/is-negative-zero"),bk=require("@stdlib/assert/is-complex-like"),x1=require("@stdlib/constants/float64/pinf"),w1=require("@stdlib/constants/float64/ninf"),ke=require("@stdlib/constants/float32/smallest-subnormal"),Ek=require("@stdlib/constants/float32/max-safe-integer"),Sk=require("@stdlib/constants/float32/min-safe-integer"),Tk=require("@stdlib/constants/int8/min"),Ak=require("@stdlib/constants/int16/min"),_k=require("@stdlib/constants/int32/min"),Vk=require("@stdlib/constants/uint8/max"),kk=require("@stdlib/constants/uint16/max"),jk=require("@stdlib/constants/uint32/max");function h1(r){return r!==r||r===x1||r===w1?"float32":q1(r)?r>=Sk&&r<=Ek?"float32":"float64":r>-ke&&r=Tk?"int8":r>=Ak?"int16":r>=_k?"int32":"float64":r<=Vk?"uint8":r<=kk?"uint16":r<=jk?"uint32":"float64":r>-ke&&r1){if(e=arguments[1],A1.indexOf(e)===-1)throw new TypeError(Rk('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',A1.join('", "'),e))}else e="float64";return e==="complex128"?t=Bk:e==="complex64"?t=Mk:t=NaN,Lk(r,t,e)}_1.exports=Nk});var j1=l(function(cU,k1){"use strict";var Ik=V1();k1.exports=Ik});var F1=l(function(mU,C1){"use strict";var Pk=K(),Uk=Dr(),Gk=require("@stdlib/complex/float64"),Dk=require("@stdlib/complex/float32"),$t=require("@stdlib/string/format"),Yk=new Gk(NaN,NaN),Wk=new Dk(NaN,NaN),je=["float64","float32","complex128","complex64","generic"];function Zk(r){var e,t;if(e=Pk(r),e===null)throw new TypeError($t("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));if(arguments.length>1){if(e=arguments[1],je.indexOf(e)===-1)throw new TypeError($t('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',je.join('", "'),e))}else if(je.indexOf(e)===-1)throw new TypeError($t('invalid argument. First argument must be one of the following data types: "%s". Value: `%s`.',je.join('", "'),e));return e==="complex128"?t=Yk:e==="complex64"?t=Wk:t=NaN,Uk(r.length,t,e)}C1.exports=Zk});var O1=l(function(pU,z1){"use strict";var Kk=F1();z1.exports=Kk});var L1=l(function(gU,Xk){Xk.exports={float64:-1,float32:"float64",int32:-1,int16:"int32",int8:"int16",uint32:-1,uint16:"uint32",uint8:"uint16",uint8c:"uint16",generic:-1,complex64:"complex128",complex128:-1}});var B1=l(function(yU,R1){"use strict";var Hk=require("@stdlib/utils/keys"),Jk=require("@stdlib/assert/has-own-property"),Ce=L1();function $k(){var r,e,t,i;for(t={},r=Hk(Ce),e=r.length,i=0;i1?e=arguments[1]:e="float64",e==="complex128"?t=aj:e==="complex64"?t=nj:t=1,ij(r,t,e)}I1.exports=uj});var G1=l(function(qU,U1){"use strict";var oj=P1();U1.exports=oj});var Y1=l(function(xU,D1){"use strict";var vj=K(),sj=Dr(),fj=require("@stdlib/complex/float64"),lj=require("@stdlib/complex/float32"),cj=require("@stdlib/string/format"),mj=new fj(1,0),pj=new lj(1,0);function gj(r){var e,t;if(e=vj(r),e===null)throw new TypeError(cj("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(e=arguments[1]),e==="complex128"?t=mj:e==="complex64"?t=pj:t=1,sj(r.length,t,e)}D1.exports=gj});var Z1=l(function(wU,W1){"use strict";var yj=Y1();W1.exports=yj});var X1=l(function(bU,K1){"use strict";function dj(){return{highWaterMark:9007199254740992}}K1.exports=dj});var $1=l(function(EU,J1){"use strict";var hj=require("@stdlib/assert/is-plain-object"),qj=require("@stdlib/assert/has-own-property"),xj=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,H1=require("@stdlib/string/format");function wj(r,e){return hj(e)?qj(e,"highWaterMark")&&(r.highWaterMark=e.highWaterMark,!xj(r.highWaterMark))?new TypeError(H1("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","highWaterMark",r.highWaterMark)):null:new TypeError(H1("invalid argument. Options argument must be an object. Value: `%s`.",e))}J1.exports=wj});var rd=l(function(SU,Q1){"use strict";function bj(r){var e,t;for(e=[],t=0;ti.highWaterMark?null:(p=new zj(m),e+=m,p)}function u(m,p,g){var y;return p===0?new m(0):(y=o(Rj(p)*Pj[g]),y===null?y:new m(y,0,p))}function v(){var m,p,g,y,d,h,q,b,E;if(m=arguments.length,m&&Sj(arguments[m-1])?(m-=1,p=arguments[m]):p="float64",g=ei(p),g===null)throw new TypeError(Qt("invalid argument. Must provide a recognized data type. Value: `%s`.",p));if(m<=0)return new g(0);if(Tj(arguments[0]))return u(g,arguments[0],p);if(Aj(arguments[0])){if(y=arguments[0],b=y.length,jj(y)?y=id(y,0):kj(y)?y=td(y,0):/^complex/.test(p)&&(b/=2),d=u(g,b,p),d===null)return d;if(ud(d)||nd(d))return d.set(y),d;for(q=ad(Fj(y)).accessors[0],h=ad(p).accessors[1],E=0;E0){for(p=Lj(ri(m.byteLength)),p=Bj(t.length-1,p),g=t[p],y=0;y1&&(e.length=Md(t,e,1,r,t>2)),e}Nd.exports=kC});var Ud=l(function(UU,Pd){"use strict";var jC=Id();Pd.exports=jC});var Dd=l(function(GU,Gd){"use strict";var CC=typeof SharedArrayBuffer=="function"?SharedArrayBuffer:null;Gd.exports=CC});var Wd=l(function(DU,Yd){"use strict";function FC(r){throw new Error("not supported. The current environment does not support SharedArrayBuffers, and, unfortunately, SharedArrayBuffers cannot be polyfilled. For shared memory applications, upgrade your runtime environment to one which supports SharedArrayBuffers.")}Yd.exports=FC});var Kd=l(function(YU,Zd){"use strict";var zC=require("@stdlib/assert/has-sharedarraybuffer-support"),OC=Dd(),LC=Wd(),ai;zC()?ai=OC:ai=LC;Zd.exports=ai});var Qd=l(function(WU,$d){"use strict";var Jr=require("@stdlib/utils/define-nonenumerable-read-only-property"),Xd=require("@stdlib/assert/has-own-property"),Hd=require("@stdlib/assert/is-function"),RC=require("@stdlib/assert/is-collection"),BC=require("@stdlib/assert/is-plain-object"),MC=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,NC=Q(),Jd=require("@stdlib/symbol/iterator"),IC=rr(),PC=ar(),UC=K(),ve=require("@stdlib/string/format");function ni(r){var e,t,i,a,n,o,u,v,s,f;if(!RC(r))throw new TypeError(ve("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(a={iter:1e308,dir:1},arguments.length>1)if(BC(arguments[1])){if(t=arguments[1],arguments.length>2){if(u=arguments[2],!Hd(u))throw new TypeError(ve("invalid argument. Callback argument must be a function. Value: `%s`.",u));e=arguments[3]}if(Xd(t,"iter")&&(a.iter=t.iter,!MC(t.iter)))throw new TypeError(ve("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","iter",t.iter));if(Xd(t,"dir")&&(a.dir=t.dir,t.dir!==1&&t.dir!==-1))throw new TypeError(ve("invalid option. `%s` option must be either `1` or `-1`. Option: `%s`.","dir",t.dir))}else{if(u=arguments[1],!Hd(u))throw new TypeError(ve("invalid argument. Second argument must be either a function or an options object. Value: `%s`.",u));e=arguments[2]}return i=0,n={},u?a.dir===1?(f=-1,Jr(n,"next",c)):(f=r.length,Jr(n,"next",m)):a.dir===1?(f=-1,Jr(n,"next",p)):(f=r.length,Jr(n,"next",g)),Jr(n,"return",y),Jd&&Jr(n,Jd,d),s=UC(r),NC(r)?v=IC(s):v=PC(s),n;function c(){return f=(f+1)%r.length,i+=1,o||i>a.iter||r.length===0?{done:!0}:{value:u.call(e,v(r,f),f,i,r),done:!1}}function m(){return f-=1,f<0&&(f+=r.length),i+=1,o||i>a.iter||r.length===0?{done:!0}:{value:u.call(e,v(r,f),f,i,r),done:!1}}function p(){return f=(f+1)%r.length,i+=1,o||i>a.iter||r.length===0?{done:!0}:{value:v(r,f),done:!1}}function g(){return f-=1,f<0&&(f+=r.length),i+=1,o||i>a.iter||r.length===0?{done:!0}:{value:v(r,f),done:!1}}function y(h){return o=!0,arguments.length?{value:h,done:!0}:{done:!0}}function d(){return u?ni(r,a,u,e):ni(r,a)}}$d.exports=ni});var eh=l(function(ZU,rh){"use strict";var GC=Qd();rh.exports=GC});var nh=l(function(KU,ah){"use strict";var Be=require("@stdlib/utils/define-nonenumerable-read-only-property"),DC=require("@stdlib/assert/is-function"),YC=require("@stdlib/assert/is-collection"),WC=Q(),th=require("@stdlib/symbol/iterator"),ZC=rr(),KC=ar(),XC=K(),ih=require("@stdlib/string/format");function ui(r){var e,t,i,a,n,o,u;if(!YC(r))throw new TypeError(ih("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(a=arguments[1],!DC(a))throw new TypeError(ih("invalid argument. Second argument must be a function. Value: `%s`.",a));e=arguments[2]}return u=-1,t={},a?Be(t,"next",v):Be(t,"next",s),Be(t,"return",f),th&&Be(t,th,c),o=XC(r),WC(r)?n=ZC(o):n=KC(o),t;function v(){return u+=1,i||u>=r.length?{done:!0}:{value:a.call(e,n(r,u),u,r),done:!1}}function s(){return u+=1,i||u>=r.length?{done:!0}:{value:n(r,u),done:!1}}function f(m){return i=!0,arguments.length?{value:m,done:!0}:{done:!0}}function c(){return a?ui(r,a,e):ui(r)}}ah.exports=ui});var oh=l(function(XU,uh){"use strict";var HC=nh();uh.exports=HC});var lh=l(function(HU,fh){"use strict";var Me=require("@stdlib/utils/define-nonenumerable-read-only-property"),JC=require("@stdlib/assert/is-function"),$C=require("@stdlib/assert/is-collection"),QC=Q(),vh=require("@stdlib/symbol/iterator"),rF=rr(),eF=ar(),tF=K(),sh=require("@stdlib/string/format");function oi(r){var e,t,i,a,n,o,u,v;if(!$C(r))throw new TypeError(sh("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(a=arguments[1],!JC(a))throw new TypeError(sh("invalid argument. Second argument must be a function. Value: `%s`.",a));e=arguments[2]}return n=r.length,v=n,t={},a?Me(t,"next",s):Me(t,"next",f),Me(t,"return",c),vh&&Me(t,vh,m),u=tF(r),QC(r)?o=rF(u):o=eF(u),t;function s(){return v+=r.length-n-1,n=r.length,i||v<0?(i=!0,{done:!0}):{value:a.call(e,o(r,v),v,r),done:!1}}function f(){return v+=r.length-n-1,n=r.length,i||v<0?(i=!0,{done:!0}):{value:o(r,v),done:!1}}function c(p){return i=!0,arguments.length?{value:p,done:!0}:{done:!0}}function m(){return a?oi(r,a,e):oi(r)}}fh.exports=oi});var mh=l(function(JU,ch){"use strict";var iF=lh();ch.exports=iF});var gh=l(function($U,ph){"use strict";var aF=Vr(),nF=Ar(),uF=_r(),oF=Tr(),vF=Sr(),sF=Er(),fF=br(),lF=xr(),cF=qr(),mF=zr(),pF=Lr(),gF=[[cF,"Float64Array"],[lF,"Float32Array"],[sF,"Int32Array"],[fF,"Uint32Array"],[oF,"Int16Array"],[vF,"Uint16Array"],[aF,"Int8Array"],[nF,"Uint8Array"],[uF,"Uint8ClampedArray"],[mF,"Complex64Array"],[pF,"Complex128Array"]];ph.exports=gF});var dh=l(function(QU,yh){"use strict";var yF=require("@stdlib/assert/instance-of"),dF=require("@stdlib/utils/constructor-name"),hF=require("@stdlib/utils/get-prototype-of"),$r=gh();function qF(r){var e,t;for(t=0;t<$r.length;t++)if(yF(r,$r[t][0]))return $r[t][1];for(;r;){for(e=dF(r),t=0;t<$r.length;t++)if(e===$r[t][1])return $r[t][1];r=hF(r)}}yh.exports=qF});var qh=l(function(rG,hh){"use strict";var xF=require("@stdlib/assert/is-typed-array"),wF=require("@stdlib/assert/is-complex-typed-array"),bF=require("@stdlib/strided/base/reinterpret-complex64"),EF=require("@stdlib/strided/base/reinterpret-complex128"),SF=require("@stdlib/string/format"),TF=dh();function AF(r){var e,t,i;if(xF(r))e=r;else if(wF(r))r.BYTES_PER_ELEMENT===8?e=bF(r,0):e=EF(r,0);else throw new TypeError(SF("invalid argument. Must provide a typed array. Value: `%s`.",r));for(t={type:TF(r),data:[]},i=0;i1){if(a=arguments[1],!VF(a))throw new TypeError(Eh("invalid argument. Second argument must be a function. Value: `%s`.",a));e=arguments[2]}return u=-1,t={},a?Ne(t,"next",v):Ne(t,"next",s),Ne(t,"return",f),bh&&Ne(t,bh,c),o=zF(r),jF(r)?n=CF(o):n=FF(o),t;function v(){var m;if(i)return{done:!0};for(m=r.length,u+=1;u=m?(i=!0,{done:!0}):{value:a.call(e,n(r,u),u,r),done:!1}}function s(){var m;if(i)return{done:!0};for(m=r.length,u+=1;u=m?(i=!0,{done:!0}):{value:n(r,u),done:!1}}function f(m){return i=!0,arguments.length?{value:m,done:!0}:{done:!0}}function c(){return a?vi(r,a,e):vi(r)}}Sh.exports=vi});var _h=l(function(iG,Ah){"use strict";var OF=Th();Ah.exports=OF});var Ch=l(function(aG,jh){"use strict";var Ie=require("@stdlib/utils/define-nonenumerable-read-only-property"),LF=require("@stdlib/assert/is-function"),RF=require("@stdlib/assert/is-collection"),BF=Q(),Vh=require("@stdlib/symbol/iterator"),MF=rr(),NF=ar(),IF=K(),kh=require("@stdlib/string/format");function si(r){var e,t,i,a,n,o,u,v;if(!RF(r))throw new TypeError(kh("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(a=arguments[1],!LF(a))throw new TypeError(kh("invalid argument. Second argument must be a function. Value: `%s`.",a));e=arguments[2]}return n=r.length,v=n,t={},a?Ie(t,"next",s):Ie(t,"next",f),Ie(t,"return",c),Vh&&Ie(t,Vh,m),u=IF(r),BF(r)?o=MF(u):o=NF(u),t;function s(){if(i)return{done:!0};for(v+=r.length-n-1,n=r.length;v>=0&&o(r,v)===void 0;)v-=1;return v<0?(i=!0,{done:!0}):{value:a.call(e,o(r,v),v,r),done:!1}}function f(){if(i)return{done:!0};for(v+=r.length-n-1,n=r.length;v>=0&&o(r,v)===void 0;)v-=1;return v<0?(i=!0,{done:!0}):{value:o(r,v),done:!1}}function c(p){return i=!0,arguments.length?{value:p,done:!0}:{done:!0}}function m(){return a?si(r,a,e):si(r)}}jh.exports=si});var zh=l(function(nG,Fh){"use strict";var PF=Ch();Fh.exports=PF});var Bh=l(function(uG,Rh){"use strict";var Pe=require("@stdlib/utils/define-nonenumerable-read-only-property"),UF=require("@stdlib/assert/is-function"),GF=require("@stdlib/assert/is-collection"),Oh=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,DF=require("@stdlib/assert/is-integer").isPrimitive,YF=Q(),Lh=require("@stdlib/symbol/iterator"),WF=rr(),ZF=ar(),KF=K(),se=require("@stdlib/string/format");function fi(r,e,t,i){var a,n,o,u,v,s,f,c;if(!Oh(r))throw new TypeError(se("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(!GF(e))throw new TypeError(se("invalid argument. Second argument must be an array-like object. Value: `%s`.",e));if(!DF(t))throw new TypeError(se("invalid argument. Third argument must be an integer. Value: `%s`.",t));if(!Oh(i))throw new TypeError(se("invalid argument. Fourth argument must be a nonnegative integer. Value: `%s`.",i));if(arguments.length>4){if(u=arguments[4],!UF(u))throw new TypeError(se("invalid argument. Fifth argument must be a function. Value: `%s`.",u));a=arguments[5]}return v=i,c=-1,n={},u?Pe(n,"next",m):Pe(n,"next",p),Pe(n,"return",g),Lh&&Pe(n,Lh,y),f=KF(e),YF(e)?s=WF(f):s=ZF(f),n;function m(){var d;return c+=1,o||c>=r?{done:!0}:(d=u.call(a,s(e,v),v,c,e),v+=t,{value:d,done:!1})}function p(){var d;return c+=1,o||c>=r?{done:!0}:(d=s(e,v),v+=t,{value:d,done:!1})}function g(d){return o=!0,arguments.length?{value:d,done:!0}:{done:!0}}function y(){return u?fi(r,e,t,i,u,a):fi(r,e,t,i)}}Rh.exports=fi});var Nh=l(function(oG,Mh){"use strict";var XF=Bh();Mh.exports=XF});var Gh=l(function(vG,Uh){"use strict";var Ue=require("@stdlib/utils/define-nonenumerable-read-only-property"),Ge=require("@stdlib/assert/is-function"),HF=require("@stdlib/assert/is-collection"),Ih=require("@stdlib/assert/is-integer").isPrimitive,JF=Q(),Ph=require("@stdlib/symbol/iterator"),$F=rr(),QF=ar(),rz=K(),De=require("@stdlib/string/format");function li(r){var e,t,i,a,n,o,u,v,s,f;if(!HF(r))throw new TypeError(De("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(i=arguments.length,i===1)t=0,u=r.length;else if(i===2)Ge(arguments[1])?(t=0,o=arguments[1]):t=arguments[1],u=r.length;else if(i===3)Ge(arguments[1])?(t=0,u=r.length,o=arguments[1],e=arguments[2]):Ge(arguments[2])?(t=arguments[1],u=r.length,o=arguments[2]):(t=arguments[1],u=arguments[2]);else{if(t=arguments[1],u=arguments[2],o=arguments[3],!Ge(o))throw new TypeError(De("invalid argument. Fourth argument must be a function. Value: `%s`.",o));e=arguments[4]}if(!Ih(t))throw new TypeError(De("invalid argument. Second argument must be either an integer (starting index) or a function. Value: `%s`.",t));if(!Ih(u))throw new TypeError(De("invalid argument. Third argument must be either an integer (ending index) or a function. Value: `%s`.",u));return u<0?(u=r.length+u,u<0&&(u=0)):u>r.length&&(u=r.length),t<0&&(t=r.length+t,t<0&&(t=0)),f=t-1,a={},o?Ue(a,"next",c):Ue(a,"next",m),Ue(a,"return",p),Ph&&Ue(a,Ph,g),s=rz(r),JF(r)?v=$F(s):v=QF(s),a;function c(){return f+=1,n||f>=u?{done:!0}:{value:o.call(e,v(r,f),f,f-t,r),done:!1}}function m(){return f+=1,n||f>=u?{done:!0}:{value:v(r,f),done:!1}}function p(y){return n=!0,arguments.length?{value:y,done:!0}:{done:!0}}function g(){return o?li(r,t,u,o,e):li(r,t,u)}}Uh.exports=li});var Yh=l(function(sG,Dh){"use strict";var ez=Gh();Dh.exports=ez});var Xh=l(function(fG,Kh){"use strict";var Ye=require("@stdlib/utils/define-nonenumerable-read-only-property"),We=require("@stdlib/assert/is-function"),tz=require("@stdlib/assert/is-collection"),Wh=require("@stdlib/assert/is-integer").isPrimitive,iz=Q(),Zh=require("@stdlib/symbol/iterator"),az=rr(),nz=ar(),uz=K(),Ze=require("@stdlib/string/format");function ci(r){var e,t,i,a,n,o,u,v,s,f;if(!tz(r))throw new TypeError(Ze("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(i=arguments.length,i===1)t=0,u=r.length;else if(i===2)We(arguments[1])?(t=0,o=arguments[1]):t=arguments[1],u=r.length;else if(i===3)We(arguments[1])?(t=0,u=r.length,o=arguments[1],e=arguments[2]):We(arguments[2])?(t=arguments[1],u=r.length,o=arguments[2]):(t=arguments[1],u=arguments[2]);else{if(t=arguments[1],u=arguments[2],o=arguments[3],!We(o))throw new TypeError(Ze("invalid argument. Fourth argument must be a function. Value: `%s`.",o));e=arguments[4]}if(!Wh(t))throw new TypeError(Ze("invalid argument. Second argument must be either an integer (starting view index) or a function. Value: `%s`.",t));if(!Wh(u))throw new TypeError(Ze("invalid argument. Third argument must be either an integer (ending view index) or a function. Value: `%s`.",u));return u<0?(u=r.length+u,u<0&&(u=0)):u>r.length&&(u=r.length),t<0&&(t=r.length+t,t<0&&(t=0)),f=u,a={},o?Ye(a,"next",c):Ye(a,"next",m),Ye(a,"return",p),Zh&&Ye(a,Zh,g),s=uz(r),iz(r)?v=az(s):v=nz(s),a;function c(){return f-=1,n||f1&&(e=arguments[1]),iL(r.length,e)}C2.exports=aL});var O2=l(function(oD,z2){"use strict";var nL=F2();z2.exports=nL});var _=require("@stdlib/utils/define-read-only-property"),A={};_(A,"base",C0());_(A,"ArrayBuffer",kt());_(A,"Complex64Array",zr());_(A,"Complex128Array",Lr());_(A,"convertArray",Ot());_(A,"convertArraySame",X0());_(A,"arrayCtors",Pr());_(A,"DataView",eg());_(A,"datespace",vg());_(A,"arrayDataType",K());_(A,"arrayDataTypes",pg());_(A,"aempty",Bt());_(A,"aemptyLike",Bg());_(A,"filledarray",Yg());_(A,"filledarrayBy",ey());_(A,"Float32Array",xr());_(A,"Float64Array",qr());_(A,"iterator2array",uy());_(A,"afull",Dr());_(A,"afullLike",py());_(A,"incrspace",hy());_(A,"Int8Array",Vr());_(A,"Int16Array",Tr());_(A,"Int32Array",Er());_(A,"linspace",l1());_(A,"logspace",d1());_(A,"arrayMinDataType",T1());_(A,"anans",j1());_(A,"anansLike",O1());_(A,"arrayNextDataType",N1());_(A,"aones",G1());_(A,"aonesLike",Z1());_(A,"typedarraypool",cd());_(A,"arrayPromotionRules",hd());_(A,"reviveTypedArray",Sd());_(A,"arraySafeCasts",jd());_(A,"arraySameKindCasts",Rd());_(A,"arrayShape",Ud());_(A,"SharedArrayBuffer",Kd());_(A,"circarray2iterator",eh());_(A,"array2iterator",oh());_(A,"array2iteratorRight",mh());_(A,"typedarray2json",wh());_(A,"sparsearray2iterator",_h());_(A,"sparsearray2iteratorRight",zh());_(A,"stridedarray2iterator",Nh());_(A,"arrayview2iterator",Yh());_(A,"arrayview2iteratorRight",Jh());_(A,"typedarray",eq());_(A,"complexarray",fq());_(A,"complexarrayCtors",pi());_(A,"complexarrayDataTypes",gq());_(A,"typedarrayCtors",Xr());_(A,"typedarrayDataTypes",xq());_(A,"floatarrayCtors",Yt());_(A,"floatarrayDataTypes",Tq());_(A,"intarrayCtors",Cq());_(A,"intarrayDataTypes",Rq());_(A,"realarray",Iq());_(A,"realarrayCtors",Wq());_(A,"realarrayDataTypes",Jq());_(A,"realarrayFloatCtors",i2());_(A,"realarrayFloatDataTypes",v2());_(A,"intarraySignedCtors",p2());_(A,"intarraySignedDataTypes",q2());_(A,"intarrayUnsignedCtors",T2());_(A,"intarrayUnsignedDataTypes",j2());_(A,"Uint8Array",Ar());_(A,"Uint8ClampedArray",_r());_(A,"Uint16Array",Sr());_(A,"Uint32Array",br());_(A,"azeros",Te());_(A,"azerosLike",O2());_(A,"constants",require("@stdlib/constants/array"));module.exports=A;
/**
* @license Apache-2.0
*
diff --git a/dist/index.js.map b/dist/index.js.map
index fe50eeb9..798c3302 100644
--- a/dist/index.js.map
+++ b/dist/index.js.map
@@ -1,7 +1,7 @@
{
"version": 3,
- "sources": ["../base/assert/is-accessor-array/lib/main.js", "../base/assert/is-accessor-array/lib/index.js", "../base/getter/lib/main.js", "../base/getter/lib/index.js", "../base/setter/lib/main.js", "../base/setter/lib/index.js", "../base/accessor-getter/lib/main.js", "../base/accessor-getter/lib/index.js", "../base/accessor-setter/lib/main.js", "../base/accessor-setter/lib/index.js", "../dtype/lib/ctor2dtype.js", "../float64/lib/main.js", "../float64/lib/polyfill.js", "../float64/lib/index.js", "../float32/lib/main.js", "../float32/lib/polyfill.js", "../float32/lib/index.js", "../uint32/lib/main.js", "../uint32/lib/polyfill.js", "../uint32/lib/index.js", "../int32/lib/main.js", "../int32/lib/polyfill.js", "../int32/lib/index.js", "../uint16/lib/main.js", "../uint16/lib/polyfill.js", "../uint16/lib/index.js", "../int16/lib/main.js", "../int16/lib/polyfill.js", "../int16/lib/index.js", "../uint8/lib/main.js", "../uint8/lib/polyfill.js", "../uint8/lib/index.js", "../uint8c/lib/main.js", "../uint8c/lib/polyfill.js", "../uint8c/lib/index.js", "../int8/lib/main.js", "../int8/lib/polyfill.js", "../int8/lib/index.js", "../complex64/lib/from_iterator.js", "../complex64/lib/from_iterator_map.js", "../complex64/lib/from_array.js", "../complex64/lib/main.js", "../complex64/lib/index.js", "../complex128/lib/from_iterator.js", "../complex128/lib/from_iterator_map.js", "../complex128/lib/from_array.js", "../complex128/lib/main.js", "../complex128/lib/index.js", "../dtype/lib/ctors.js", "../dtype/lib/dtypes.js", "../dtype/lib/main.js", "../dtype/lib/index.js", "../base/accessors/lib/main.js", "../base/accessors/lib/index.js", "../base/accessor/lib/main.js", "../base/accessor/lib/index.js", "../base/arraylike2object/lib/main.js", "../base/arraylike2object/lib/index.js", "../base/assert/contains/lib/main.js", "../base/assert/contains/lib/factory.js", "../base/assert/contains/lib/index.js", "../base/assert/lib/index.js", "../base/resolve-getter/lib/main.js", "../base/resolve-getter/lib/index.js", "../base/bifurcate-entries/lib/main.js", "../base/bifurcate-entries/lib/index.js", "../base/bifurcate-indices/lib/main.js", "../base/bifurcate-indices/lib/index.js", "../base/bifurcate-values/lib/main.js", "../base/bifurcate-values/lib/index.js", "../base/binary2d/lib/main.js", "../base/binary2d/lib/index.js", "../base/binary3d/lib/main.js", "../base/binary3d/lib/index.js", "../base/binary4d/lib/main.js", "../base/binary4d/lib/index.js", "../base/binary5d/lib/main.js", "../base/binary5d/lib/index.js", "../base/binarynd/lib/main.js", "../base/binarynd/lib/index.js", "../base/copy-indexed/lib/main.js", "../base/copy-indexed/lib/index.js", "../base/filled/lib/main.js", "../base/filled/lib/index.js", "../base/zeros/lib/main.js", "../base/zeros/lib/index.js", "../base/broadcast-array/lib/main.js", "../base/broadcast-array/lib/index.js", "../base/broadcasted-binary2d/lib/main.js", "../base/broadcasted-binary2d/lib/index.js", "../base/broadcasted-binary3d/lib/main.js", "../base/broadcasted-binary3d/lib/index.js", "../base/broadcasted-binary4d/lib/main.js", "../base/broadcasted-binary4d/lib/index.js", "../base/broadcasted-binary5d/lib/main.js", "../base/broadcasted-binary5d/lib/index.js", "../base/broadcasted-quaternary2d/lib/main.js", "../base/broadcasted-quaternary2d/lib/index.js", "../base/broadcasted-quinary2d/lib/main.js", "../base/broadcasted-quinary2d/lib/index.js", "../base/broadcasted-ternary2d/lib/main.js", "../base/broadcasted-ternary2d/lib/index.js", "../base/broadcasted-unary2d/lib/main.js", "../base/broadcasted-unary2d/lib/index.js", "../base/broadcasted-unary3d/lib/main.js", "../base/broadcasted-unary3d/lib/index.js", "../base/broadcasted-unary4d/lib/main.js", "../base/broadcasted-unary4d/lib/index.js", "../base/broadcasted-unary5d/lib/main.js", "../base/broadcasted-unary5d/lib/index.js", "../base/cartesian-power/lib/main.js", "../base/cartesian-power/lib/index.js", "../base/cartesian-product/lib/main.js", "../base/cartesian-product/lib/index.js", "../base/cartesian-square/lib/main.js", "../base/cartesian-square/lib/index.js", "../base/copy/lib/main.js", "../base/copy/lib/index.js", "../base/dedupe/lib/main.js", "../base/dedupe/lib/index.js", "../base/filled-by/lib/main.js", "../base/filled-by/lib/index.js", "../base/filled2d/lib/main.js", "../base/filled2d/lib/index.js", "../base/filled2d-by/lib/main.js", "../base/filled2d-by/lib/index.js", "../base/filled3d/lib/main.js", "../base/filled3d/lib/index.js", "../base/filled3d-by/lib/main.js", "../base/filled3d-by/lib/index.js", "../base/filled4d/lib/main.js", "../base/filled4d/lib/index.js", "../base/filled4d-by/lib/main.js", "../base/filled4d-by/lib/index.js", "../base/filled5d/lib/main.js", "../base/filled5d/lib/index.js", "../base/filled5d-by/lib/main.js", "../base/filled5d-by/lib/index.js", "../base/fillednd/lib/main.js", "../base/fillednd/lib/index.js", "../base/fillednd-by/lib/main.js", "../base/fillednd-by/lib/index.js", "../base/first/lib/main.js", "../base/first/lib/index.js", "../base/flatten/lib/assign.js", "../base/flatten/lib/main.js", "../base/flatten/lib/index.js", "../base/flatten-by/lib/assign.js", "../base/flatten-by/lib/main.js", "../base/flatten-by/lib/index.js", "../base/flatten2d/lib/main.js", "../base/flatten2d/lib/assign.js", "../base/flatten2d/lib/index.js", "../base/flatten2d-by/lib/main.js", "../base/flatten2d-by/lib/assign.js", "../base/flatten2d-by/lib/index.js", "../base/flatten3d/lib/main.js", "../base/flatten3d/lib/assign.js", "../base/flatten3d/lib/index.js", "../base/flatten3d-by/lib/main.js", "../base/flatten3d-by/lib/assign.js", "../base/flatten3d-by/lib/index.js", "../base/flatten4d/lib/main.js", "../base/flatten4d/lib/assign.js", "../base/flatten4d/lib/index.js", "../base/flatten4d-by/lib/main.js", "../base/flatten4d-by/lib/assign.js", "../base/flatten4d-by/lib/index.js", "../base/flatten5d/lib/main.js", "../base/flatten5d/lib/assign.js", "../base/flatten5d/lib/index.js", "../base/flatten5d-by/lib/main.js", "../base/flatten5d-by/lib/assign.js", "../base/flatten5d-by/lib/index.js", "../base/fliplr2d/lib/main.js", "../base/fliplr2d/lib/index.js", "../base/fliplr3d/lib/main.js", "../base/fliplr3d/lib/index.js", "../base/fliplr4d/lib/main.js", "../base/fliplr4d/lib/index.js", "../base/fliplr5d/lib/main.js", "../base/fliplr5d/lib/index.js", "../base/flipud2d/lib/main.js", "../base/flipud2d/lib/index.js", "../base/flipud3d/lib/main.js", "../base/flipud3d/lib/index.js", "../base/flipud4d/lib/main.js", "../base/flipud4d/lib/index.js", "../base/flipud5d/lib/main.js", "../base/flipud5d/lib/index.js", "../base/from-strided/lib/main.js", "../base/from-strided/lib/index.js", "../base/group-entries/lib/main.js", "../base/group-entries/lib/index.js", "../base/group-indices/lib/main.js", "../base/group-indices/lib/index.js", "../base/group-indices-by/lib/main.js", "../base/group-indices-by/lib/index.js", "../base/group-values/lib/main.js", "../base/group-values/lib/index.js", "../base/group-values-by/lib/main.js", "../base/group-values-by/lib/index.js", "../base/incrspace/lib/main.js", "../base/incrspace/lib/index.js", "../base/index-of/lib/main.js", "../base/index-of/lib/index.js", "../base/last/lib/main.js", "../base/last/lib/index.js", "../base/last-index-of/lib/main.js", "../base/last-index-of/lib/index.js", "../base/linspace/lib/main.js", "../base/linspace/lib/index.js", "../base/logspace/lib/main.js", "../base/logspace/lib/index.js", "../base/map2d/lib/main.js", "../base/map2d/lib/assign.js", "../base/map2d/lib/index.js", "../base/map3d/lib/main.js", "../base/map3d/lib/assign.js", "../base/map3d/lib/index.js", "../base/map4d/lib/main.js", "../base/map4d/lib/assign.js", "../base/map4d/lib/index.js", "../base/map5d/lib/main.js", "../base/map5d/lib/assign.js", "../base/map5d/lib/index.js", "../base/mskbinary2d/lib/main.js", "../base/mskbinary2d/lib/index.js", "../base/mskunary2d/lib/main.js", "../base/mskunary2d/lib/index.js", "../base/mskunary3d/lib/main.js", "../base/mskunary3d/lib/index.js", "../base/n-cartesian-product/lib/main.js", "../base/n-cartesian-product/lib/index.js", "../base/one-to/lib/main.js", "../base/one-to/lib/index.js", "../base/ones/lib/main.js", "../base/ones/lib/index.js", "../base/ones2d/lib/main.js", "../base/ones2d/lib/index.js", "../base/ones3d/lib/main.js", "../base/ones3d/lib/index.js", "../base/ones4d/lib/main.js", "../base/ones4d/lib/index.js", "../base/ones5d/lib/main.js", "../base/ones5d/lib/index.js", "../base/onesnd/lib/main.js", "../base/onesnd/lib/index.js", "../base/quaternary2d/lib/main.js", "../base/quaternary2d/lib/index.js", "../base/quaternary3d/lib/main.js", "../base/quaternary3d/lib/index.js", "../base/quaternary4d/lib/main.js", "../base/quaternary4d/lib/index.js", "../base/quaternary5d/lib/main.js", "../base/quaternary5d/lib/index.js", "../base/quinary2d/lib/main.js", "../base/quinary2d/lib/index.js", "../base/quinary3d/lib/main.js", "../base/quinary3d/lib/index.js", "../base/quinary4d/lib/main.js", "../base/quinary4d/lib/index.js", "../base/quinary5d/lib/main.js", "../base/quinary5d/lib/index.js", "../base/slice/lib/main.js", "../base/slice/lib/index.js", "../base/strided2array2d/lib/main.js", "../base/strided2array2d/lib/index.js", "../base/strided2array3d/lib/main.js", "../base/strided2array3d/lib/index.js", "../base/strided2array4d/lib/main.js", "../base/strided2array4d/lib/index.js", "../base/strided2array5d/lib/main.js", "../base/strided2array5d/lib/index.js", "../base/take/lib/main.js", "../base/take/lib/index.js", "../base/take-indexed/lib/main.js", "../base/take-indexed/lib/index.js", "../base/take2d/lib/main.js", "../base/take2d/lib/index.js", "../base/take3d/lib/main.js", "../base/take3d/lib/index.js", "../base/ternary2d/lib/main.js", "../base/ternary2d/lib/index.js", "../base/ternary3d/lib/main.js", "../base/ternary3d/lib/index.js", "../base/ternary4d/lib/main.js", "../base/ternary4d/lib/index.js", "../base/ternary5d/lib/main.js", "../base/ternary5d/lib/index.js", "../base/to-accessor-array/lib/main.js", "../base/to-accessor-array/lib/index.js", "../base/to-deduped/lib/main.js", "../base/to-deduped/lib/index.js", "../base/unary2d/lib/main.js", "../base/unary2d/lib/index.js", "../base/unary2d-by/lib/main.js", "../base/unary2d-by/lib/index.js", "../base/unary3d/lib/main.js", "../base/unary3d/lib/index.js", "../base/unary4d/lib/main.js", "../base/unary4d/lib/index.js", "../base/unary5d/lib/main.js", "../base/unary5d/lib/index.js", "../base/unarynd/lib/main.js", "../base/unarynd/lib/index.js", "../base/unitspace/lib/main.js", "../base/unitspace/lib/index.js", "../base/zero-to/lib/main.js", "../base/zero-to/lib/index.js", "../base/zeros2d/lib/main.js", "../base/zeros2d/lib/index.js", "../base/zeros3d/lib/main.js", "../base/zeros3d/lib/index.js", "../base/zeros4d/lib/main.js", "../base/zeros4d/lib/index.js", "../base/zeros5d/lib/main.js", "../base/zeros5d/lib/index.js", "../base/zerosnd/lib/main.js", "../base/zerosnd/lib/index.js", "../base/lib/index.js", "../buffer/lib/main.js", "../buffer/lib/polyfill.js", "../buffer/lib/index.js", "../ctors/lib/ctors.js", "../ctors/lib/main.js", "../ctors/lib/index.js", "../convert/lib/main.js", "../convert/lib/index.js", "../convert-same/lib/main.js", "../convert-same/lib/index.js", "../dataview/lib/main.js", "../dataview/lib/polyfill.js", "../dataview/lib/index.js", "../datespace/lib/main.js", "../datespace/lib/index.js", "../dtypes/lib/dtypes.json", "../dtypes/lib/main.js", "../dtypes/lib/index.js", "../empty/lib/is_buffer_uint8array.js", "../typed-ctors/lib/ctors.js", "../typed-ctors/lib/main.js", "../typed-ctors/lib/index.js", "../empty/lib/main.js", "../zeros/lib/main.js", "../zeros/lib/index.js", "../empty/lib/polyfill.js", "../empty/lib/index.js", "../empty-like/lib/main.js", "../empty-like/lib/index.js", "../filled/lib/main.js", "../filled/lib/index.js", "../filled-by/lib/main.js", "../filled-by/lib/index.js", "../from-iterator/lib/main.js", "../from-iterator/lib/index.js", "../full/lib/main.js", "../full/lib/index.js", "../full-like/lib/main.js", "../full-like/lib/index.js", "../incrspace/lib/main.js", "../incrspace/lib/index.js", "../typed-float-ctors/lib/ctors.js", "../typed-float-ctors/lib/main.js", "../typed-float-ctors/lib/index.js", "../linspace/lib/generic_real.js", "../linspace/lib/generic_complex.js", "../linspace/lib/typed_real.js", "../linspace/lib/typed_complex.js", "../linspace/lib/validate.js", "../linspace/lib/defaults.json", "../linspace/lib/main.js", "../linspace/lib/accessors_complex.js", "../linspace/lib/accessors_real.js", "../linspace/lib/assign.js", "../linspace/lib/index.js", "../logspace/lib/main.js", "../logspace/lib/index.js", "../min-dtype/lib/main.js", "../min-dtype/lib/index.js", "../nans/lib/main.js", "../nans/lib/index.js", "../nans-like/lib/main.js", "../nans-like/lib/index.js", "../next-dtype/lib/next_dtypes.json", "../next-dtype/lib/main.js", "../next-dtype/lib/index.js", "../ones/lib/main.js", "../ones/lib/index.js", "../ones-like/lib/main.js", "../ones-like/lib/index.js", "../pool/lib/defaults.js", "../pool/lib/validate.js", "../pool/lib/pool.js", "../pool/lib/bytes_per_element.json", "../pool/lib/factory.js", "../pool/lib/main.js", "../pool/lib/index.js", "../promotion-rules/lib/promotion_rules.json", "../promotion-rules/lib/main.js", "../promotion-rules/lib/index.js", "../reviver/lib/ctors.js", "../reviver/lib/main.js", "../reviver/lib/index.js", "../safe-casts/lib/safe_casts.json", "../safe-casts/lib/main.js", "../safe-casts/lib/index.js", "../same-kind-casts/lib/same_kind_casts.json", "../same-kind-casts/lib/main.js", "../same-kind-casts/lib/index.js", "../shape/lib/main.js", "../shape/lib/index.js", "../shared-buffer/lib/main.js", "../shared-buffer/lib/polyfill.js", "../shared-buffer/lib/index.js", "../to-circular-iterator/lib/main.js", "../to-circular-iterator/lib/index.js", "../to-iterator/lib/main.js", "../to-iterator/lib/index.js", "../to-iterator-right/lib/main.js", "../to-iterator-right/lib/index.js", "../to-json/lib/ctors.js", "../to-json/lib/type.js", "../to-json/lib/main.js", "../to-json/lib/index.js", "../to-sparse-iterator/lib/main.js", "../to-sparse-iterator/lib/index.js", "../to-sparse-iterator-right/lib/main.js", "../to-sparse-iterator-right/lib/index.js", "../to-strided-iterator/lib/main.js", "../to-strided-iterator/lib/index.js", "../to-view-iterator/lib/main.js", "../to-view-iterator/lib/index.js", "../to-view-iterator-right/lib/main.js", "../to-view-iterator-right/lib/index.js", "../typed/lib/main.js", "../typed/lib/index.js", "../typed-complex-ctors/lib/ctors.js", "../typed-complex-ctors/lib/main.js", "../typed-complex-ctors/lib/index.js", "../typed-complex/lib/main.js", "../typed-complex/lib/index.js", "../typed-complex-dtypes/lib/dtypes.json", "../typed-complex-dtypes/lib/main.js", "../typed-complex-dtypes/lib/index.js", "../typed-dtypes/lib/dtypes.json", "../typed-dtypes/lib/main.js", "../typed-dtypes/lib/index.js", "../typed-float-dtypes/lib/dtypes.json", "../typed-float-dtypes/lib/main.js", "../typed-float-dtypes/lib/index.js", "../typed-integer-ctors/lib/ctors.js", "../typed-integer-ctors/lib/main.js", "../typed-integer-ctors/lib/index.js", "../typed-integer-dtypes/lib/dtypes.json", "../typed-integer-dtypes/lib/main.js", "../typed-integer-dtypes/lib/index.js", "../typed-real/lib/main.js", "../typed-real/lib/index.js", "../typed-real-ctors/lib/ctors.js", "../typed-real-ctors/lib/main.js", "../typed-real-ctors/lib/index.js", "../typed-real-dtypes/lib/dtypes.json", "../typed-real-dtypes/lib/main.js", "../typed-real-dtypes/lib/index.js", "../typed-real-float-ctors/lib/ctors.js", "../typed-real-float-ctors/lib/main.js", "../typed-real-float-ctors/lib/index.js", "../typed-real-float-dtypes/lib/dtypes.json", "../typed-real-float-dtypes/lib/main.js", "../typed-real-float-dtypes/lib/index.js", "../typed-signed-integer-ctors/lib/ctors.js", "../typed-signed-integer-ctors/lib/main.js", "../typed-signed-integer-ctors/lib/index.js", "../typed-signed-integer-dtypes/lib/dtypes.json", "../typed-signed-integer-dtypes/lib/main.js", "../typed-signed-integer-dtypes/lib/index.js", "../typed-unsigned-integer-ctors/lib/ctors.js", "../typed-unsigned-integer-ctors/lib/main.js", "../typed-unsigned-integer-ctors/lib/index.js", "../typed-unsigned-integer-dtypes/lib/dtypes.json", "../typed-unsigned-integer-dtypes/lib/main.js", "../typed-unsigned-integer-dtypes/lib/index.js", "../zeros-like/lib/main.js", "../zeros-like/lib/index.js", "../lib/index.js"],
- "sourcesContent": ["/**\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// VARIABLES //\n\nvar TYPE = 'function';\n\n\n// MAIN //\n\n/**\n* Tests if an array-like object supports the accessor (get/set) protocol.\n*\n* @param {Object} value - value to test\n* @returns {boolean} boolean indicating whether a value is an accessor array\n*\n* @example\n* var Complex128Array = require( '@stdlib/array/complex128' );\n*\n* var bool = isAccessorArray( new Complex128Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isAccessorArray( [] );\n* // returns false\n*/\nfunction isAccessorArray( value ) {\n\treturn ( typeof value.get === TYPE && typeof value.set === TYPE ); // eslint-disable-line valid-typeof\n}\n\n\n// EXPORTS //\n\nmodule.exports = isAccessorArray;\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/**\n* Test if an array-like object supports the accessor (get/set) protocol.\n*\n* @module @stdlib/array/base/assert/is-accessor-array\n*\n* @example\n* var Complex128Array = require( '@stdlib/array/complex128array' );\n* var isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );\n*\n* var bool = isAccessorArray( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isAccessorArray( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Int32Array = require( '@stdlib/array/int32' );\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Int16Array = require( '@stdlib/array/int16' );\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Int8Array = require( '@stdlib/array/int8' );\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Uint32Array = require( '@stdlib/array/uint32' );\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Uint16Array = require( '@stdlib/array/uint16' );\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Uint8Array = require( '@stdlib/array/uint8' );\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Uint8ClampedArray = require( '@stdlib/array/uint8c' );\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* var dtype = require( '@stdlib/array/dtype' );\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nmodule.exports = getter;\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/**\n* Return an accessor function for retrieving an element from an indexed array-like object.\n*\n* @module @stdlib/array/base/getter\n*\n* @example\n* var dtype = require( '@stdlib/array/dtype' );\n* var getter = require( '@stdlib/array/base/getter' );\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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// VARIABLES //\n\nvar SETTERS = {\n\t'float64': setFloat64,\n\t'float32': setFloat32,\n\t'int32': setInt32,\n\t'int16': setInt16,\n\t'int8': setInt8,\n\t'uint32': setUint32,\n\t'uint16': setUint16,\n\t'uint8': setUint8,\n\t'uint8c': setUint8c,\n\t'generic': setGeneric,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var arr = new Float64Array( 4 );\n*\n* setFloat64( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat64( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var arr = new Float32Array( 4 );\n*\n* setFloat32( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Int32Array = require( '@stdlib/array/int32' );\n*\n* var arr = new Int32Array( 4 );\n*\n* setInt32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Int16Array = require( '@stdlib/array/int16' );\n*\n* var arr = new Int16Array( 4 );\n*\n* setInt16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Int8Array = require( '@stdlib/array/int8' );\n*\n* var arr = new Int8Array( 4 );\n*\n* setInt8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Uint32Array = require( '@stdlib/array/uint32' );\n*\n* var arr = new Uint32Array( 4 );\n*\n* setUint32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Uint16Array = require( '@stdlib/array/uint16' );\n*\n* var arr = new Uint16Array( 4 );\n*\n* setUint16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Uint8Array = require( '@stdlib/array/uint8' );\n*\n* var arr = new Uint8Array( 4 );\n*\n* setUint8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* var Uint8ClampedArray = require( '@stdlib/array/uint8c' );\n*\n* var arr = new Uint8ClampedArray( 4 );\n*\n* setUint8c( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8c( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setGeneric( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setGeneric( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setArrayLike( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* var dtype = require( '@stdlib/array/dtype' );\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nmodule.exports = setter;\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/**\n* Return an accessor function for setting an element in an indexed array-like object.\n*\n* @module @stdlib/array/base/setter\n*\n* @example\n* var dtype = require( '@stdlib/array/dtype' );\n* var set = require( '@stdlib/array/base/setter' );\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 2, 10 );\n*\n* var v = arr[ 2 ];\n* // returns 10\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Complex128Array = require( '@stdlib/array/complex128' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var dtype = require( '@stdlib/array/dtype' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nmodule.exports = getter;\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/**\n* Return an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @module @stdlib/array/base/accessor-getter\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var dtype = require( '@stdlib/array/dtype' );\n* var getter = require( '@stdlib/array/base/accessor-getter' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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// VARIABLES //\n\nvar SETTERS = {\n\t'complex128': setComplex128,\n\t'complex64': setComplex64,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* var Complex128Array = require( '@stdlib/array/complex128' );\n* var Complex128 = require( '@stdlib/complex/float64' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex128( arr, 1, new Complex128( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns 11.0\n*/\nfunction setComplex128( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex64( arr, 1, new Complex64( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setComplex64( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* setArrayLike( arr, 2, 10 );\n*\n* var v = arr[ 2 ];\n* // returns 10\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var dtype = require( '@stdlib/array/dtype' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 1, new Complex64( 10.0, 11.0 ) );\n*\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nmodule.exports = setter;\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/**\n* Return an accessor function for setting an element in an array-like object supporting the get/set protocol.\n*\n* @module @stdlib/array/base/accessor-setter\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var dtype = require( '@stdlib/array/dtype' );\n* var setter = require( '@stdlib/array/base/accessor-setter' );\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 1, new Complex64( 10.0, 11.0 ) );\n*\n* var v = arr.get( 1 );\n* // returns \n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// Mapping from array constructors to data types...\nvar ctor2dtypes = {\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128'\n};\n\n\n// EXPORTS //\n\nmodule.exports = ctor2dtypes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array/float64\n*\n* @example\n* var ctor = require( '@stdlib/array/float64' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasFloat64ArraySupport = require( '@stdlib/assert/has-float64array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of single-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array/float32\n*\n* @example\n* var ctor = require( '@stdlib/array/float32' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasFloat32ArraySupport = require( '@stdlib/assert/has-float32array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array/uint32\n*\n* @example\n* var ctor = require( '@stdlib/array/uint32' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint32ArraySupport = require( '@stdlib/assert/has-uint32array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array/int32\n*\n* @example\n* var ctor = require( '@stdlib/array/int32' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasInt32ArraySupport = require( '@stdlib/assert/has-int32array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array/uint16\n*\n* @example\n* var ctor = require( '@stdlib/array/uint16' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint16ArraySupport = require( '@stdlib/assert/has-uint16array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array/int16\n*\n* @example\n* var ctor = require( '@stdlib/array/int16' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasInt16ArraySupport = require( '@stdlib/assert/has-int16array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array/uint8\n*\n* @example\n* var ctor = require( '@stdlib/array/uint8' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint8ArraySupport = require( '@stdlib/assert/has-uint8array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order clamped to 0-255.\n*\n* @module @stdlib/array/uint8c\n*\n* @example\n* var ctor = require( '@stdlib/array/uint8c' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasUint8ClampedArraySupport = require( '@stdlib/assert/has-uint8clampedarray-support' ); // eslint-disable-line id-length\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Typed array constructor which returns a typed array representing an array of twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array/int8\n*\n* @example\n* var ctor = require( '@stdlib/array/int8' );\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nvar hasInt8ArraySupport = require( '@stdlib/assert/has-int8array-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar realf = require( '@stdlib/complex/realf' );\nvar imagf = require( '@stdlib/complex/imagf' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIterator;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar realf = require( '@stdlib/complex/realf' );\nvar imagf = require( '@stdlib/complex/imagf' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIteratorMap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar realf = require( '@stdlib/complex/realf' );\nvar imagf = require( '@stdlib/complex/imagf' );\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromArray;\n", "/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isArrayBuffer = require( '@stdlib/assert/is-arraybuffer' );\nvar isObject = require( '@stdlib/assert/is-object' );\nvar isArray = require( '@stdlib/assert/is-array' );\nvar isString = require( '@stdlib/assert/is-string' ).isPrimitive;\nvar isFunction = require( '@stdlib/assert/is-function' );\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar isEven = require( '@stdlib/math/base/assert/is-even' );\nvar isInteger = require( '@stdlib/math/base/assert/is-integer' );\nvar hasIteratorSymbolSupport = require( '@stdlib/assert/has-iterator-symbol-support' );\nvar ITERATOR_SYMBOL = require( '@stdlib/symbol/iterator' );\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' );\nvar Float32Array = require( './../../float32' );\nvar Complex64 = require( '@stdlib/complex/float32' );\nvar format = require( '@stdlib/string/format' );\nvar realf = require( '@stdlib/complex/realf' );\nvar imagf = require( '@stdlib/complex/imagf' );\nvar reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );\nvar reinterpret128 = require( '@stdlib/strided/base/reinterpret-complex128' );\nvar getter = require( './../../base/getter' );\nvar accessorGetter = require( './../../base/accessor-getter' );\nvar fromIterator = require( './from_iterator.js' );\nvar fromIteratorMap = require( './from_iterator_map.js' );\nvar fromArray = require( './from_array.js' );\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) { // TODO: move to array/base/assert/is-complex64-array\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) { // TODO: move to array/base/assert/is-complex128-array\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nmodule.exports = Complex64Array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* 64-bit complex number array.\n*\n* @module @stdlib/array/complex64\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n*\n* var arr = new Complex64Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n*\n* var arr = new Complex64Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n*\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar format = require( '@stdlib/string/format' );\nvar real = require( '@stdlib/complex/real' );\nvar imag = require( '@stdlib/complex/imag' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIterator;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar format = require( '@stdlib/string/format' );\nvar real = require( '@stdlib/complex/real' );\nvar imag = require( '@stdlib/complex/imag' );\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromIteratorMap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar real = require( '@stdlib/complex/real' );\nvar imag = require( '@stdlib/complex/imag' );\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromArray;\n", "/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isArrayBuffer = require( '@stdlib/assert/is-arraybuffer' );\nvar isObject = require( '@stdlib/assert/is-object' );\nvar isArray = require( '@stdlib/assert/is-array' );\nvar isFunction = require( '@stdlib/assert/is-function' );\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar isEven = require( '@stdlib/math/base/assert/is-even' );\nvar isInteger = require( '@stdlib/math/base/assert/is-integer' );\nvar hasIteratorSymbolSupport = require( '@stdlib/assert/has-iterator-symbol-support' );\nvar ITERATOR_SYMBOL = require( '@stdlib/symbol/iterator' );\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' );\nvar Float64Array = require( './../../float64' );\nvar Complex128 = require( '@stdlib/complex/float64' );\nvar real = require( '@stdlib/complex/real' );\nvar imag = require( '@stdlib/complex/imag' );\nvar reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );\nvar reinterpret128 = require( '@stdlib/strided/base/reinterpret-complex128' );\nvar getter = require( './../../base/getter' );\nvar accessorGetter = require( './../../base/accessor-getter' );\nvar format = require( '@stdlib/string/format' );\nvar fromIterator = require( './from_iterator.js' );\nvar fromIteratorMap = require( './from_iterator_map.js' );\nvar fromArray = require( './from_array.js' );\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*/\nfunction isComplex64Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT/2\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*/\nfunction isComplex128Array( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var Complex128 = require( '@stdlib/complex/float64' );\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var Complex128 = require( '@stdlib/complex/float64' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns \n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns \n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* var Complex128 = require( '@stdlib/complex/float64' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* var Complex128 = require( '@stdlib/complex/float64' );\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, ]\n*\n* v = it.next().value;\n* // returns [ 1, ]\n*\n* v = it.next().value;\n* // returns [ 2, ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns \n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* var Complex128 = require( '@stdlib/complex/float64' );\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* var Complex128 = require( '@stdlib/complex/float64' );\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var Complex128 = require( '@stdlib/complex/float64' );\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var Complex128 = require( '@stdlib/complex/float64' );\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var Complex128 = require( '@stdlib/complex/float64' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns \n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns \n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns \n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n\n// EXPORTS //\n\nmodule.exports = Complex128Array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* 128-bit complex number array.\n*\n* @module @stdlib/array/complex128\n*\n* @example\n* var Complex128Array = require( '@stdlib/array/complex128' );\n*\n* var arr = new Complex128Array();\n* // returns \n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var Complex128Array = require( '@stdlib/array/complex128' );\n*\n* var arr = new Complex128Array( 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var Complex128Array = require( '@stdlib/array/complex128' );\n*\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns \n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n* var Complex128Array = require( '@stdlib/array/complex128' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n* var Complex128Array = require( '@stdlib/array/complex128' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n* var Complex128Array = require( '@stdlib/array/complex128' );\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns \n*\n* var len = arr.length;\n* // returns 2\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 Float64Array = require( './../../float64' );\nvar Float32Array = require( './../../float32' );\nvar Uint32Array = require( './../../uint32' );\nvar Int32Array = require( './../../int32' );\nvar Uint16Array = require( './../../uint16' );\nvar Int16Array = require( './../../int16' );\nvar Uint8Array = require( './../../uint8' );\nvar Uint8ClampedArray = require( './../../uint8c' );\nvar Int8Array = require( './../../int8' );\nvar Complex64Array = require( './../../complex64' );\nvar Complex128Array = require( './../../complex128' );\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array\n];\n\n\n// EXPORTS //\n\nmodule.exports = CTORS;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128'\n];\n\n\n// EXPORTS //\n\nmodule.exports = DTYPES;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 isBuffer = require( '@stdlib/assert/is-buffer' );\nvar isArray = require( '@stdlib/assert/is-array' );\nvar constructorName = require( '@stdlib/utils/constructor-name' );\nvar ctor2dtype = require( './ctor2dtype.js' );\nvar CTORS = require( './ctors.js' );\nvar DTYPES = require( './dtypes.js' );\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an array.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn null;\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Return the data type of an array.\n*\n* @module @stdlib/array/dtype\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dtype = require( '@stdlib/array/dtype' );\n*\n* var arr = new Float64Array( 10 );\n*\n* var dt = dtype( arr );\n* // returns 'float64'\n*\n* dt = dtype( {} );\n* // returns null\n*\n* dt = dtype( 'beep' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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 isAccessorArray = require( './../../../base/assert/is-accessor-array' );\nvar getter = require( './../../../base/getter' );\nvar setter = require( './../../../base/setter' );\nvar accessorGetter = require( './../../../base/accessor-getter' );\nvar accessorSetter = require( './../../../base/accessor-setter' );\nvar dtype = require( './../../../dtype' );\n\n\n// MAIN //\n\n/**\n* Returns element accessors for a provided array-like object.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **accessorProtocol**: `boolean` indicating whether the provided array-like object supports the get/set protocol (i.e., uses accessors for getting and setting elements).\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an array element and whose second element is an accessor for setting an array element.\n*\n* @param {Collection} x - array-like object\n* @returns {Object} object containing accessor data\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n* var obj = accessors( x );\n* // returns {...}\n*\n* var bool = obj.accessorProtocol;\n* // returns false\n*\n* var fcns = obj.accessors;\n* // returns [ , ]\n*\n* var v = fcns[ 0 ]( x, 2 );\n* // returns 3\n*/\nfunction accessors( x ) {\n\tvar dt = dtype( x );\n\tif ( isAccessorArray( x ) ) {\n\t\treturn {\n\t\t\t'accessorProtocol': true,\n\t\t\t'accessors': [\n\t\t\t\taccessorGetter( dt ),\n\t\t\t\taccessorSetter( dt )\n\t\t\t]\n\t\t};\n\t}\n\treturn {\n\t\t'accessorProtocol': false,\n\t\t'accessors': [\n\t\t\tgetter( dt ),\n\t\t\tsetter( dt )\n\t\t]\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = accessors;\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/**\n* Return element accessors for a provided array-like object.\n*\n* @module @stdlib/array/base/accessors\n*\n* @example\n* var accessors = require( '@stdlib/array/base/accessors' );\n*\n* var x = [ 1, 2, 3, 4 ];\n* var obj = accessors( x );\n* // returns {...}\n*\n* var bool = obj.accessorProtocol;\n* // returns false\n*\n* var fcns = obj.accessors;\n* // returns [ , ]\n*\n* var v = fcns[ 0 ]( x, 2 );\n* // returns 3\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar setReadWriteAccessor = require( '@stdlib/utils/define-nonenumerable-read-write-accessor' );\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar accessors = require( './../../../base/accessors' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar format = require( '@stdlib/string/format' );\n\n\n// FUNCTIONS //\n\n/**\n* Sets the length of an array-like object.\n*\n* @private\n* @param {NonNegativeInteger} len - length\n*/\nfunction setLength( len ) {\n\tthis._buffer.length = len;\n}\n\n/**\n* Returns the length of an array-like object.\n*\n* @private\n* @returns {NonNegativeInteger} length\n*/\nfunction getLength() {\n\treturn this._buffer.length;\n}\n\n\n// MAIN //\n\n/**\n* Creates a minimal array-like object supporting the accessor protocol from another array-like object.\n*\n* @constructor\n* @param {Collection} arr - input array\n* @throws {TypeError} must provide an array-like object\n* @returns {AccessorArray} accessor array instance\n*\n* @example\n* var arr = new AccessorArray( [ 1, 2, 3 ] );\n* // returns \n*\n* var v = arr.get( 0 );\n* // returns 1\n*/\nfunction AccessorArray( arr ) {\n\tvar o;\n\tif ( !(this instanceof AccessorArray) ) {\n\t\treturn new AccessorArray( arr );\n\t}\n\tif ( !isCollection( arr ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an array-like object. Value: `%s`.', arr ) );\n\t}\n\to = accessors( arr );\n\tthis._buffer = arr;\n\tthis._getter = o.accessors[ 0 ];\n\tthis._setter = o.accessors[ 1 ];\n\treturn this;\n}\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof AccessorArray\n* @readonly\n* @type {string}\n* @default 'AccessorArray'\n*\n* @example\n* var name = AccessorArray.name;\n* // returns 'AccessorArray'\n*/\nsetReadOnly( AccessorArray, 'name', 'AccessorArray' );\n\n/**\n* Read/write accessor for getting/setting the number of elements.\n*\n* @name length\n* @memberof AccessorArray.prototype\n* @type {NonNegativeInteger}\n*/\nsetReadWriteAccessor( AccessorArray.prototype, 'length', getLength, setLength );\n\n/**\n* Returns an element.\n*\n* @name get\n* @memberof AccessorArray.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @returns {*} element\n*\n* @example\n* var arr = new AccessorArray( [ 1, 2, 3 ] );\n* // returns \n*\n* var v = arr.get( 0 );\n* // returns 1\n*/\nsetReadOnly( AccessorArray.prototype, 'get', function get( idx ) {\n\treturn this._getter( this._buffer, idx );\n});\n\n/**\n* Sets one or more elements.\n*\n* @name set\n* @memberof AccessorArray.prototype\n* @type {Function}\n* @param {*} value - value to set\n* @param {integer} [idx] - element index\n* @returns {void}\n*\n* @example\n* var arr = new AccessorArray( [ 1, 2, 3 ] );\n* // returns \n*\n* var v = arr.get( 0 );\n* // returns 1\n*\n* arr.set( 5, 0 );\n*\n* v = arr.get( 0 );\n* // returns 5\n*/\nsetReadOnly( AccessorArray.prototype, 'set', function set( value, idx ) {\n\tif ( arguments.length < 2 ) {\n\t\tthis._setter( this._buffer, 0, value );\n\t\treturn;\n\t}\n\tthis._setter( this._buffer, idx, value );\n});\n\n\n// EXPORTS //\n\nmodule.exports = AccessorArray;\n", "/**\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/**\n* Create a minimal array-like object supporting the accessor protocol from another array-like object.\n*\n* @module @stdlib/array/base/accessor\n*\n* @example\n* var AccessorArray = require( '@stdlib/array/base/accessor' );\n*\n* var arr = new AccessorArray( [ 1, 2, 3 ] );\n* // returns \n*\n* var v = arr.get( 0 );\n* // returns 1\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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 accessors = require( './../../../base/accessors' );\n\n\n// MAIN //\n\n/**\n* Converts an array-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding array meta data to ensure that internal functions operating on arrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **data**: reference to the input array.\n* - **accessorProtocol**: `boolean` indicating whether the input array uses accessors for getting and setting elements.\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an array element and whose second element is an accessor for setting an array element.\n*\n* @param {Collection} x - array-like object\n* @returns {Object} object containing array meta data\n*\n* @example\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\nfunction arraylike2object( x ) {\n\tvar o = accessors( x );\n\treturn {\n\t\t'data': x,\n\t\t'accessorProtocol': o.accessorProtocol,\n\t\t'accessors': o.accessors\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = arraylike2object;\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/**\n* Convert an array-like object to an object likely to have the same \"shape\".\n*\n* @module @stdlib/array/base/arraylike2object\n*\n* @example\n* var arraylike2object = require( '@stdlib/array/base/arraylike2object' );\n*\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar isAccessorArray = require( './../../../../base/assert/is-accessor-array' );\nvar accessorGetter = require( './../../../../base/accessor-getter' );\nvar getter = require( './../../../../base/getter' );\nvar dtype = require( './../../../../dtype' );\n\n\n// MAIN //\n\n/**\n* Tests if an array contains a provided search value.\n*\n* @param {Collection} x - input array\n* @param {*} value - search value\n* @returns {boolean} boolean indicating if an array contains a search value\n*\n* @example\n* var out = contains( [ 1, 2, 3 ], 2 );\n* // returns true\n*/\nfunction contains( x, value ) {\n\tvar len;\n\tvar get;\n\tvar dt;\n\tvar i;\n\n\t// Resolve the input array data type:\n\tdt = dtype( x );\n\n\t// Resolve an accessor for retrieving input array elements:\n\tif ( isAccessorArray( x ) ) {\n\t\tget = accessorGetter( dt );\n\t} else {\n\t\tget = getter( dt );\n\t}\n\t// Get the number of elements over which to iterate:\n\tlen = x.length;\n\n\t// Loop over the elements...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( get( x, i ) === value ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = contains;\n", "/**\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// MODULES //\n\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isAccessorArray = require( './../../../../base/assert/is-accessor-array' );\nvar accessorGetter = require( './../../../../base/accessor-getter' );\nvar dtype = require( './../../../../dtype' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns a function to tests if an array contains a provided search value.\n*\n* @param {Collection} x - input array\n* @throws {TypeError} must provide an array-like object\n* @returns {Function} function to test if an array contains a search value\n*\n* @example\n* var contains = factory( [ 1, 2, 3 ] );\n* // returns \n*\n* var bool = contains( 2 );\n* // returns true\n*/\nfunction factory( x ) {\n\tvar get;\n\tvar len;\n\tvar dt;\n\n\tif ( !isCollection( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an array-like object. Value: `%s`.', x ) );\n\t}\n\t// Resolve the input array data type:\n\tdt = dtype( x );\n\n\t// Resolve an accessor for retrieving input array elements:\n\tif ( isAccessorArray( x ) ) {\n\t\tget = accessorGetter( dt );\n\t}\n\t// Get the number of elements over which to iterate:\n\tlen = x.length;\n\n\treturn ( get === void 0 ) ? contains : accessors;\n\t/**\n\t* Tests if an array contains a provided search value.\n\t*\n\t* @private\n\t* @param {*} value - search value\n\t* @returns {boolean} boolean indicating if an array contains a search value\n\t*\n\t* @example\n\t* var out = contains( [ 1, 2, 3 ], 2 );\n\t* // returns true\n\t*/\n\tfunction contains( value ) {\n\t\tvar i;\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( x[ i ] === value ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Tests if an array contains a provided search value.\n\t*\n\t* @private\n\t* @param {*} value - search value\n\t* @returns {boolean} boolean indicating if an array contains a search value\n\t*/\n\tfunction accessors( value ) {\n\t\tvar i;\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( get( x, i ) === value ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\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/**\n* Test if an array contains a provided search value.\n*\n* @module @stdlib/array/base/assert/contains\n*\n* @example\n* var contains = require( '@stdlib/array/base/assert/contains' );\n*\n* var out = contains( [ 1, 2, 3 ], 2 );\n* // returns true\n*/\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n\n// exports: { \"factory\": \"main.factory\" }\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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name contains\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/contains}\n*/\nsetReadOnly( ns, 'contains', require( './../../../base/assert/contains' ) );\n\n/**\n* @name isAccessorArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/array/base/assert/is-accessor-array}\n*/\nsetReadOnly( ns, 'isAccessorArray', require( './../../../base/assert/is-accessor-array' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n", "/**\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// MODULES //\n\nvar isAccessorArray = require( './../../../base/assert/is-accessor-array' );\nvar accessorGetter = require( './../../../base/accessor-getter' );\nvar getter = require( './../../../base/getter' );\nvar dtype = require( './../../../dtype' );\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object.\n*\n* @param {Collection} x - input array\n* @returns {Function} accessor\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = resolveGetter( arr );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction resolveGetter( x ) {\n\tvar dt = dtype( x );\n\tif ( isAccessorArray( x ) ) {\n\t\treturn accessorGetter( dt );\n\t}\n\treturn getter( dt );\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolveGetter;\n", "/**\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/**\n* Return an accessor function for retrieving an element from an array-like object.\n*\n* @module @stdlib/array/base/resolve-getter\n*\n* @example\n* var resolveGetter = require( '@stdlib/array/base/resolve-getter' );\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = resolveGetter( arr );\n* var v = get( arr, 2 );\n* // returns 3\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar resolveGetter = require( './../../../base/resolve-getter' );\n\n\n// MAIN //\n\n/**\n* Splits array element entries into two groups.\n*\n* @param {Collection} x - input array\n* @param {Collection} filter - array indicating which group an element in the input array belongs to\n* @throws {RangeError} must provide arrays having the same length\n* @returns {ArrayArray} results\n*\n* @example\n* var x = [ 'beep', 'boop', 'foo', 'bar' ];\n* var filter = [ true, true, false, true ];\n*\n* var out = bifurcateEntries( x, filter );\n* // returns [ [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], [ [ 2, 'foo' ] ] ]\n*/\nfunction bifurcateEntries( x, filter ) {\n\tvar xget;\n\tvar gget;\n\tvar len;\n\tvar out;\n\tvar g;\n\tvar v;\n\tvar i;\n\n\t// Get the number of elements to group:\n\tlen = x.length;\n\tif ( filter.length !== len ) {\n\t\tthrow new RangeError( 'invalid argument. The first and second arguments must have the same length.' );\n\t}\n\tif ( len === 0 ) {\n\t\treturn [];\n\t}\n\t// Resolve accessors for retrieving array elements:\n\txget = resolveGetter( x );\n\tgget = resolveGetter( filter );\n\n\t// Loop over the elements and assign each to a group...\n\tout = [ [], [] ];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = xget( x, i );\n\t\tg = gget( filter, i );\n\t\tif ( g ) {\n\t\t\tout[ 0 ].push( [ i, v ] );\n\t\t} else {\n\t\t\tout[ 1 ].push( [ i, v ] );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = bifurcateEntries;\n", "/**\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/**\n* Split array element entries into two groups.\n*\n* @module @stdlib/array/base/bifurcate-entries\n*\n* @example\n* var bifurcateEntries = require( '@stdlib/array/base/bifurcate-entries' );\n*\n* var x = [ 'beep', 'boop', 'foo', 'bar' ];\n* var filter = [ true, true, false, true ];\n*\n* var out = bifurcateEntries( x, filter );\n* // returns [ [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], [ [ 2, 'foo' ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar resolveGetter = require( './../../../base/resolve-getter' );\n\n\n// MAIN //\n\n/**\n* Splits array element indices into two groups.\n*\n* @param {Collection} x - input array\n* @param {Collection} filter - array indicating which group an element in the input array belongs to\n* @throws {RangeError} must provide arrays having the same length\n* @returns {ArrayArray} results\n*\n* @example\n* var x = [ 'beep', 'boop', 'foo', 'bar' ];\n* var filter = [ true, true, false, true ];\n*\n* var out = bifurcateIndices( x, filter );\n* // returns [ [ 0, 1, 3 ], [ 2 ] ]\n*/\nfunction bifurcateIndices( x, filter ) {\n\tvar gget;\n\tvar len;\n\tvar out;\n\tvar g;\n\tvar i;\n\n\t// Get the number of elements to group:\n\tlen = x.length;\n\tif ( filter.length !== len ) {\n\t\tthrow new RangeError( 'invalid argument. The first and second arguments must have the same length.' );\n\t}\n\tif ( len === 0 ) {\n\t\treturn [];\n\t}\n\t// Resolve accessors for retrieving array elements:\n\tgget = resolveGetter( filter );\n\n\t// Loop over the elements and assign each to a group...\n\tout = [ [], [] ];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tg = gget( filter, i );\n\t\tif ( g ) {\n\t\t\tout[ 0 ].push( i );\n\t\t} else {\n\t\t\tout[ 1 ].push( i );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = bifurcateIndices;\n", "/**\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/**\n* Split array element indices into two groups.\n*\n* @module @stdlib/array/base/bifurcate-indices\n*\n* @example\n* var bifurcateIndices = require( '@stdlib/array/base/bifurcate-indices' );\n*\n* var x = [ 'beep', 'boop', 'foo', 'bar' ];\n* var filter = [ true, true, false, true ];\n*\n* var out = bifurcateIndices( x, filter );\n* // returns [ [ 0, 1, 3 ], [ 2 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar resolveGetter = require( './../../../base/resolve-getter' );\n\n\n// MAIN //\n\n/**\n* Splits array element values into two groups.\n*\n* @param {Collection} x - input array\n* @param {Collection} filter - array indicating which group an element in the input array belongs to\n* @throws {RangeError} must provide arrays having the same length\n* @returns {ArrayArray} results\n*\n* @example\n* var x = [ 'beep', 'boop', 'foo', 'bar' ];\n* var filter = [ true, true, false, true ];\n*\n* var out = bifurcateValues( x, filter );\n* // returns [ [ 'beep', 'boop', 'bar' ], [ 'foo' ] ]\n*/\nfunction bifurcateValues( x, filter ) {\n\tvar xget;\n\tvar gget;\n\tvar len;\n\tvar out;\n\tvar g;\n\tvar v;\n\tvar i;\n\n\t// Get the number of elements to group:\n\tlen = x.length;\n\tif ( filter.length !== len ) {\n\t\tthrow new RangeError( 'invalid argument. The first and second arguments must have the same length.' );\n\t}\n\tif ( len === 0 ) {\n\t\treturn [];\n\t}\n\t// Resolve accessors for retrieving array elements:\n\txget = resolveGetter( x );\n\tgget = resolveGetter( filter );\n\n\t// Loop over the elements and assign each to a group...\n\tout = [ [], [] ];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = xget( x, i );\n\t\tg = gget( filter, i );\n\t\tif ( g ) {\n\t\t\tout[ 0 ].push( v );\n\t\t} else {\n\t\t\tout[ 1 ].push( v );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = bifurcateValues;\n", "/**\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/**\n* Split array element values into two groups.\n*\n* @module @stdlib/array/base/bifurcate-values\n*\n* @example\n* var bifurcateValues = require( '@stdlib/array/base/bifurcate-values' );\n*\n* var x = [ 'beep', 'boop', 'foo', 'bar' ];\n* var filter = [ true, true, false, true ];\n*\n* var out = bifurcateValues( x, filter );\n* // returns [ [ 'beep', 'boop', 'bar' ], [ 'foo' ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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 binary callback to elements in two two-dimensional nested input arrays and assigns results to elements in a two-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>} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n*\n* var shape = [ 2, 2 ];\n*\n* var x = ones2d( shape );\n* var y = ones2d( shape );\n* var z = zeros2d( shape );\n*\n* binary2d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ]\n*/\nfunction binary2d( arrays, shape, fcn ) {\n\tvar S0;\n\tvar S1;\n\tvar i0;\n\tvar i1;\n\tvar x0;\n\tvar y0;\n\tvar z0;\n\tvar x;\n\tvar y;\n\tvar z;\n\n\tS0 = shape[ 1 ];\n\tS1 = shape[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 ) {\n\t\treturn;\n\t}\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tx0 = x[ i1 ];\n\t\ty0 = y[ i1 ];\n\t\tz0 = z[ i1 ];\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tz0[ i0 ] = fcn( x0[ i0 ], y0[ i0 ] );\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = binary2d;\n", "/**\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/**\n* Apply a binary callback to elements in two two-dimensional nested input arrays and assign results to elements in a two-dimensional nested output array.\n*\n* @module @stdlib/array/base/binary2d\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n* var binary2d = require( '@stdlib/array/base/binary2d' );\n*\n* var shape = [ 2, 2 ];\n*\n* var x = ones2d( shape );\n* var y = ones2d( shape );\n* var z = zeros2d( shape );\n*\n* binary2d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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 binary callback to elements in two three-dimensional nested input arrays and assigns results to elements in a three-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} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones3d = require( '@stdlib/array/base/ones3d' );\n* var zeros3d = require( '@stdlib/array/base/zeros3d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n*\n* var shape = [ 2, 2, 2 ];\n*\n* var x = ones3d( shape );\n* var y = ones3d( shape );\n* var z = zeros3d( shape );\n*\n* binary3d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ]\n*/\nfunction binary3d( arrays, shape, fcn ) {\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar x0;\n\tvar x1;\n\tvar y0;\n\tvar y1;\n\tvar z0;\n\tvar z1;\n\tvar x;\n\tvar y;\n\tvar z;\n\n\tS0 = shape[ 2 ];\n\tS1 = shape[ 1 ];\n\tS2 = shape[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 || S2 <= 0 ) {\n\t\treturn;\n\t}\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tx1 = x[ i2 ];\n\t\ty1 = y[ i2 ];\n\t\tz1 = z[ i2 ];\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tx0 = x1[ i1 ];\n\t\t\ty0 = y1[ i1 ];\n\t\t\tz0 = z1[ i1 ];\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tz0[ i0 ] = fcn( x0[ i0 ], y0[ i0 ] );\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = binary3d;\n", "/**\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/**\n* Apply a binary callback to elements in two three-dimensional nested input arrays and assign results to elements in a three-dimensional nested output array.\n*\n* @module @stdlib/array/base/binary3d\n*\n* @example\n* var ones3d = require( '@stdlib/array/base/ones3d' );\n* var zeros3d = require( '@stdlib/array/base/zeros3d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n* var binary3d = require( '@stdlib/array/base/binary3d' );\n*\n* var shape = [ 2, 2, 2 ];\n*\n* var x = ones3d( shape );\n* var y = ones3d( shape );\n* var z = zeros3d( shape );\n*\n* binary3d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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 binary callback to elements in two four-dimensional nested input arrays and assigns results to elements in a four-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>} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones4d = require( '@stdlib/array/base/ones4d' );\n* var zeros4d = require( '@stdlib/array/base/zeros4d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n*\n* var shape = [ 1, 2, 2, 2 ];\n*\n* var x = ones4d( shape );\n* var y = ones4d( shape );\n* var z = zeros4d( shape );\n*\n* binary4d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ]\n*/\nfunction binary4d( arrays, shape, fcn ) {\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar x0;\n\tvar x1;\n\tvar x2;\n\tvar y0;\n\tvar y1;\n\tvar y2;\n\tvar z0;\n\tvar z1;\n\tvar z2;\n\tvar x;\n\tvar y;\n\tvar z;\n\n\tS0 = shape[ 3 ];\n\tS1 = shape[ 2 ];\n\tS2 = shape[ 1 ];\n\tS3 = shape[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 || S2 <= 0 || S3 <= 0 ) {\n\t\treturn;\n\t}\n\tx = arrays[ 0 ];\n\ty = arrays[ 1 ];\n\tz = arrays[ 2 ];\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tx2 = x[ i3 ];\n\t\ty2 = y[ i3 ];\n\t\tz2 = z[ i3 ];\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tx1 = x2[ i2 ];\n\t\t\ty1 = y2[ i2 ];\n\t\t\tz1 = z2[ i2 ];\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tx0 = x1[ i1 ];\n\t\t\t\ty0 = y1[ i1 ];\n\t\t\t\tz0 = z1[ i1 ];\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tz0[ i0 ] = fcn( x0[ i0 ], y0[ i0 ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = binary4d;\n", "/**\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/**\n* Apply a binary callback to elements in two four-dimensional nested input arrays and assign results to elements in a four-dimensional nested output array.\n*\n* @module @stdlib/array/base/binary4d\n*\n* @example\n* var ones4d = require( '@stdlib/array/base/ones4d' );\n* var zeros4d = require( '@stdlib/array/base/zeros4d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n* var binary4d = require( '@stdlib/array/base/binary4d' );\n*\n* var shape = [ 1, 2, 2, 2 ];\n*\n* var x = ones4d( shape );\n* var y = ones4d( shape );\n* var z = zeros4d( shape );\n*\n* binary4d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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 binary callback to elements in two 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>} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones5d = require( '@stdlib/array/base/ones5d' );\n* var zeros5d = require( '@stdlib/array/base/zeros5d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n*\n* var shape = [ 1, 1, 2, 2, 2 ];\n*\n* var x = ones5d( shape );\n* var y = ones5d( shape );\n* var z = zeros5d( shape );\n*\n* binary5d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] ]\n*/\nfunction binary5d( 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 x1;\n\tvar x2;\n\tvar x3;\n\tvar y0;\n\tvar y1;\n\tvar y2;\n\tvar y3;\n\tvar z0;\n\tvar z1;\n\tvar z2;\n\tvar z3;\n\tvar x;\n\tvar y;\n\tvar z;\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\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tx3 = x[ i4 ];\n\t\ty3 = y[ i4 ];\n\t\tz3 = z[ 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\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\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\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tz0[ i0 ] = fcn( x0[ i0 ], y0[ i0 ] );\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\nmodule.exports = binary5d;\n", "/**\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/**\n* Apply a binary callback to elements in two five-dimensional nested input arrays and assign results to elements in a five-dimensional nested output array.\n*\n* @module @stdlib/array/base/binary5d\n*\n* @example\n* var ones5d = require( '@stdlib/array/base/ones5d' );\n* var zeros5d = require( '@stdlib/array/base/zeros5d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n* var binary5d = require( '@stdlib/array/base/binary5d' );\n*\n* var shape = [ 1, 1, 2, 2, 2 ];\n*\n* var x = ones5d( shape );\n* var y = ones5d( shape );\n* var z = zeros5d( shape );\n*\n* binary5d( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// FUNCTIONS //\n\n/**\n* Recursively applies a binary callback.\n*\n* @private\n* @param {ArrayLikeObject} x - input array\n* @param {ArrayLikeObject} y - input array\n* @param {ArrayLikeObject} z - output array\n* @param {NonNegativeInteger} ndims - number of dimensions\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {NonNegativeInteger} dim - dimension index\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*/\nfunction recurse( x, y, z, ndims, shape, dim, fcn ) {\n\tvar S;\n\tvar d;\n\tvar i;\n\n\tS = shape[ dim ];\n\n\t// Check whether we've reached the innermost dimension:\n\td = dim + 1;\n\n\tif ( d === ndims ) {\n\t\t// Apply the provided callback...\n\t\tfor ( i = 0; i < S; i++ ) {\n\t\t\tz[ i ] = fcn( x[ i ], y[ i ] );\n\t\t}\n\t\treturn;\n\t}\n\t// Continue recursing into the nested arrays...\n\tfor ( i = 0; i < S; i++ ) {\n\t\trecurse( x[ i ], y[ i ], z[ i ], ndims, shape, d, fcn );\n\t}\n}\n\n\n// MAIN //\n\n/**\n* Applies a binary callback to elements in two n-dimensional nested input arrays and assigns results to elements in an n-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} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var add = require( '@stdlib/math/base/ops/add' );\n* var onesnd = require( '@stdlib/array/base/onesnd' );\n* var zerosnd = require( '@stdlib/array/base/zerosnd' );\n*\n* var shape = [ 2, 2 ];\n*\n* var x = onesnd( shape );\n* var y = onesnd( shape );\n* var z = zerosnd( shape );\n*\n* binarynd( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ]\n*/\nfunction binarynd( arrays, shape, fcn ) {\n\treturn recurse( arrays[ 0 ], arrays[ 1 ], arrays[ 2 ], shape.length, shape, 0, fcn ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = binarynd;\n", "/**\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/**\n* 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.\n*\n* @module @stdlib/array/base/binarynd\n*\n* @example\n* var add = require( '@stdlib/math/base/ops/add' );\n* var onesnd = require( '@stdlib/array/base/onesnd' );\n* var zerosnd = require( '@stdlib/array/base/zerosnd' );\n* var binarynd = require( '@stdlib/array/base/binarynd' );\n*\n* var shape = [ 2, 2 ];\n*\n* var x = onesnd( shape );\n* var y = onesnd( shape );\n* var z = zerosnd( shape );\n*\n* binarynd( [ x, y, z ], shape, add );\n*\n* console.log( z );\n* // => [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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* Copies the elements of an indexed array-like object to a new \"generic\" array.\n*\n* @param {Collection} x - input array\n* @returns {Array} output array\n*\n* @example\n* var out = copy( [ 1, 2, 3 ] );\n* // returns [ 1, 2, 3 ]\n*/\nfunction copy( x ) {\n\tvar out;\n\tvar len;\n\tvar i;\n\n\tlen = x.length;\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( x[ i ] ); // use `Array#push` to ensure \"fast\" elements\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = copy;\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/**\n* Copy the elements of an indexed array-like object to a new \"generic\" array.\n*\n* @module @stdlib/array/base/copy-indexed\n*\n* @example\n* var copy = require( '@stdlib/array/base/copy-indexed' );\n*\n* var out = copy( [ 1, 2, 3 ] );\n* // returns [ 1, 2, 3 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Returns a filled \"generic\" array.\n*\n* @param {*} value - fill value\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} filled array\n*\n* @example\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\nfunction filled( value, len ) {\n\tvar arr;\n\tvar i;\n\n\t// Manually push elements in order to ensure \"fast\" elements...\n\tarr = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nmodule.exports = filled;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Create a filled \"generic\" array.\n*\n* @module @stdlib/array/base/filled\n*\n* @example\n* var filled = require( '@stdlib/array/base/filled' );\n*\n* var out = filled( 0.0, 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*\n* @example\n* var filled = require( '@stdlib/array/base/filled' );\n*\n* var out = filled( 'beep', 3 );\n* // returns [ 'beep', 'beep', 'beep' ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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 filled = require( './../../../base/filled' );\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled \"generic\" array.\n*\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction zeros( len ) {\n\treturn filled( 0.0, len );\n}\n\n\n// EXPORTS //\n\nmodule.exports = zeros;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Create a zero-filled \"generic\" array.\n*\n* @module @stdlib/array/base/zeros\n*\n* @example\n* var zeros = require( '@stdlib/array/base/zeros' );\n*\n* var out = zeros( 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar copy = require( './../../../base/copy-indexed' );\nvar zeros = require( './../../../base/zeros' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Broadcasts an array to a specified shape.\n*\n* @param {Collection} x - input array\n* @param {NonNegativeIntegerArray} inShape - input array shape\n* @param {NonNegativeIntegerArray} outShape - output array shape\n* @throws {Error} input array cannot have more dimensions than the desired shape\n* @throws {Error} input array dimension sizes must be `1` or equal to the corresponding dimension in the provided output shape\n* @throws {Error} input array and desired shape must be broadcast compatible\n* @returns {Object} broadcast object\n*\n* @example\n* var x = [ 1, 2 ];\n*\n* var out = broadcastArray( x, [ 2 ], [ 2, 2 ] );\n* // returns {...}\n*\n* var shape = out.shape;\n* // returns [ 2, 2 ]\n*\n* var strides = out.strides;\n* // returns [ 0, 1 ]\n*\n* var ref = out.ref;\n* // returns [ 1, 2 ]\n*\n* var bool = ( x === ref );\n* // returns true\n*\n* var data = out.data;\n* // returns [ [ 1, 2 ] ]\n*\n* @example\n* var x = [ 1, 2 ];\n*\n* var out = broadcastArray( x, [ 2 ], [ 2, 1, 2 ] );\n* // returns {...}\n*\n* var data = out.data;\n* // returns [ [ [ 1, 2 ] ] ]\n*\n* var strides = out.strides;\n* // returns [ 0, 0, 1 ]\n*\n* @example\n* var x = [ [ 1 ], [ 2 ] ];\n*\n* var out = broadcastArray( x, [ 2, 1 ], [ 3, 2, 2 ] );\n* // returns {...}\n*\n* var data = out.data;\n* // returns [ [ [ 1 ], [ 2 ] ] ]\n*\n* var strides = out.strides;\n* // returns [ 0, 1, 0 ]\n*/\nfunction broadcastArray( x, inShape, outShape ) {\n\tvar data;\n\tvar dim;\n\tvar st;\n\tvar N;\n\tvar M;\n\tvar d;\n\tvar i;\n\tvar j;\n\n\tN = outShape.length;\n\tM = inShape.length;\n\tif ( N < M ) {\n\t\tthrow new Error( 'invalid argument. Cannot broadcast an array to a shape having fewer dimensions. Arrays can only be broadcasted to shapes having the same or more dimensions.' );\n\t}\n\t// Prepend additional dimensions...\n\tdata = x;\n\tfor ( i = M; i < N; i++ ) {\n\t\tdata = [ data ];\n\t}\n\n\t// Initialize a strides array:\n\tst = zeros( N );\n\n\t// Determine the output array strides...\n\tfor ( i = N-1; i >= 0; i-- ) {\n\t\tj = M - N + i;\n\t\tif ( j < 0 ) {\n\t\t\t// Prepended singleton dimension; stride is zero...\n\t\t\tcontinue;\n\t\t}\n\t\td = inShape[ j ];\n\t\tdim = outShape[ i ];\n\t\tif ( dim !== 0 && dim < d ) {\n\t\t\tthrow new Error( format( 'invalid argument. Input array cannot be broadcast to the specified shape, as the specified shape has a dimension whose size is less than the size of the corresponding dimension in the input array. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( inShape ).join( ', ' ), copy( outShape ).join( ', ' ), i ) );\n\t\t}\n\t\tif ( d === dim ) {\n\t\t\t// As the dimension sizes are equal, the stride is one, meaning that each element in the array should be iterated over as normal...\n\t\t\tst[ i ] = 1;\n\t\t} else if ( d === 1 ) {\n\t\t\t// In order to broadcast a dimension, we set the stride for that dimension to zero...\n\t\t\tst[ i ] = 0;\n\t\t} else {\n\t\t\t// At this point, we know that `dim > d` and that `d` does not equal `1` (e.g., `dim=3` and `d=2`); in which case, the shapes are considered incompatible (even for desired shapes which are multiples of array dimensions, as might be desired when \"tiling\" an array; e.g., `dim=4` and `d=2`)...\n\t\t\tthrow new Error( format( 'invalid argument. Input array and the specified shape are broadcast incompatible. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( inShape ).join( ', ' ), copy( outShape ).join( ', ' ), i ) );\n\t\t}\n\t}\n\t// Return broadcast results:\n\treturn {\n\t\t'ref': x, // reference to the original input array\n\t\t'data': data, // broadcasted array\n\t\t'shape': copy( outShape ), // copy in order to prevent mutation\n\t\t'strides': st\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = broadcastArray;\n", "/**\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/**\n* Broadcast an array to a specified shape.\n*\n* @module @stdlib/array/base/broadcast-array\n*\n* @example\n* var broadcastArray = require( '@stdlib/array/base/broadcast-array' );\n*\n* var x = [ 1, 2 ];\n*\n* var out = broadcastArray( x, [ 2 ], [ 2, 2 ] );\n* // returns {...}\n*\n* var shape = out.shape;\n* // returns [ 2, 2 ]\n*\n* var strides = out.strides;\n* // returns [ 0, 1 ]\n*\n* var ref = out.ref;\n* // returns [ 1, 2 ]\n*\n* var bool = ( x === ref );\n* // returns true\n*\n* var data = out.data;\n* // returns [ [ 1, 2 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar broadcastArray = require( './../../../base/broadcast-array' );\n\n\n// MAIN //\n\n/**\n* Applies a binary callback to elements in two broadcasted input arrays and assigns results to elements in a two-dimensional nested output array.\n*\n* @param {ArrayLikeObject>} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {ArrayLikeObject} shapes - array shapes\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 1 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = ones2d( shapes[ 1 ] );\n* var z = zeros2d( shapes[ 2 ] );\n*\n* bbinary2d( [ x, y, z ], shapes, add );\n*\n* console.log( z );\n* // => [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ]\n*/\nfunction bbinary2d( arrays, shapes, fcn ) {\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar S0;\n\tvar S1;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar k0;\n\tvar k1;\n\tvar x0;\n\tvar y0;\n\tvar z0;\n\tvar sh;\n\tvar st;\n\tvar o;\n\tvar x;\n\tvar y;\n\tvar z;\n\n\tsh = shapes[ 2 ];\n\tS0 = sh[ 1 ];\n\tS1 = sh[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 ) {\n\t\treturn;\n\t}\n\to = broadcastArray( arrays[ 0 ], shapes[ 0 ], sh );\n\tx = o.data;\n\tst = o.strides;\n\tdx0 = st[ 1 ];\n\tdx1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 1 ], shapes[ 1 ], sh );\n\ty = o.data;\n\tst = o.strides;\n\tdy0 = st[ 1 ];\n\tdy1 = st[ 0 ];\n\n\tz = arrays[ 2 ];\n\n\tj1 = 0;\n\tk1 = 0;\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tj0 = 0;\n\t\tk0 = 0;\n\t\tx0 = x[ j1 ];\n\t\ty0 = y[ k1 ];\n\t\tz0 = z[ i1 ];\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tz0[ i0 ] = fcn( x0[ j0 ], y0[ k0 ] );\n\t\t\tj0 += dx0;\n\t\t\tk0 += dy0;\n\t\t}\n\t\tj1 += dx1;\n\t\tk1 += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = bbinary2d;\n", "/**\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/**\n* Apply a binary callback to elements in two broadcasted input arrays and assign results to elements in a two-dimensional nested output array.\n*\n* @module @stdlib/array/base/broadcasted-binary2d\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n* var bbinary2d = require( '@stdlib/array/base/broadcasted-binary2d' );\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 1 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = ones2d( shapes[ 1 ] );\n* var z = zeros2d( shapes[ 2 ] );\n*\n* bbinary2d( [ x, y, z ], shapes, add );\n*\n* console.log( z );\n* // => [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar broadcastArray = require( './../../../base/broadcast-array' );\n\n\n// MAIN //\n\n/**\n* Applies a binary callback to elements in two broadcasted input arrays and assigns results to elements in a three-dimensional nested output array.\n*\n* @param {ArrayLikeObject} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {ArrayLikeObject} shapes - array shapes\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones3d = require( '@stdlib/array/base/ones3d' );\n* var zeros3d = require( '@stdlib/array/base/zeros3d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n*\n* var shapes = [\n* [ 1, 1, 2 ],\n* [ 2, 1, 1 ],\n* [ 2, 2, 2 ]\n* ];\n*\n* var x = ones3d( shapes[ 0 ] );\n* var y = ones3d( shapes[ 1 ] );\n* var z = zeros3d( shapes[ 2 ] );\n*\n* bbinary3d( [ x, y, z ], shapes, add );\n*\n* console.log( z );\n* // => [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ]\n*/\nfunction bbinary3d( arrays, shapes, fcn ) {\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar k0;\n\tvar k1;\n\tvar k2;\n\tvar x0;\n\tvar x1;\n\tvar y0;\n\tvar y1;\n\tvar z0;\n\tvar z1;\n\tvar sh;\n\tvar st;\n\tvar o;\n\tvar x;\n\tvar y;\n\tvar z;\n\n\tsh = shapes[ 2 ];\n\tS0 = sh[ 2 ];\n\tS1 = sh[ 1 ];\n\tS2 = sh[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 || S2 <= 0 ) {\n\t\treturn;\n\t}\n\to = broadcastArray( arrays[ 0 ], shapes[ 0 ], sh );\n\tx = o.data;\n\tst = o.strides;\n\tdx0 = st[ 2 ];\n\tdx1 = st[ 1 ];\n\tdx2 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 1 ], shapes[ 1 ], sh );\n\ty = o.data;\n\tst = o.strides;\n\tdy0 = st[ 2 ];\n\tdy1 = st[ 1 ];\n\tdy2 = st[ 0 ];\n\n\tz = arrays[ 2 ];\n\n\tj2 = 0;\n\tk2 = 0;\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tj1 = 0;\n\t\tk1 = 0;\n\t\tx1 = x[ j2 ];\n\t\ty1 = y[ k2 ];\n\t\tz1 = z[ i2 ];\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tj0 = 0;\n\t\t\tk0 = 0;\n\t\t\tx0 = x1[ j1 ];\n\t\t\ty0 = y1[ k1 ];\n\t\t\tz0 = z1[ i1 ];\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tz0[ i0 ] = fcn( x0[ j0 ], y0[ k0 ] );\n\t\t\t\tj0 += dx0;\n\t\t\t\tk0 += dy0;\n\t\t\t}\n\t\t\tj1 += dx1;\n\t\t\tk1 += dy1;\n\t\t}\n\t\tj2 += dx2;\n\t\tk2 += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = bbinary3d;\n", "/**\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/**\n* Apply a binary callback to elements in two broadcasted input arrays and assign results to elements in a three-dimensional nested output array.\n*\n* @module @stdlib/array/base/broadcasted-binary3d\n*\n* @example\n* var ones3d = require( '@stdlib/array/base/ones3d' );\n* var zeros3d = require( '@stdlib/array/base/zeros3d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n* var bbinary3d = require( '@stdlib/array/base/broadcasted-binary3d' );\n*\n* var shapes = [\n* [ 1, 1, 2 ],\n* [ 2, 1, 1 ],\n* [ 2, 2, 2 ]\n* ];\n*\n* var x = ones3d( shapes[ 0 ] );\n* var y = ones3d( shapes[ 1 ] );\n* var z = zeros3d( shapes[ 2 ] );\n*\n* bbinary3d( [ x, y, z ], shapes, add );\n*\n* console.log( z );\n* // => [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar broadcastArray = require( './../../../base/broadcast-array' );\n\n\n// MAIN //\n\n/**\n* Applies a binary callback to elements in two broadcasted input arrays and assigns results to elements in a four-dimensional nested output array.\n*\n* @param {ArrayLikeObject} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {ArrayLikeObject} shapes - array shapes\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones4d = require( '@stdlib/array/base/ones4d' );\n* var zeros4d = require( '@stdlib/array/base/zeros4d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n*\n* var shapes = [\n* [ 1, 1, 1, 2 ],\n* [ 1, 2, 1, 1 ],\n* [ 1, 2, 2, 2 ]\n* ];\n*\n* var x = ones4d( shapes[ 0 ] );\n* var y = ones4d( shapes[ 1 ] );\n* var z = zeros4d( shapes[ 2 ] );\n*\n* bbinary4d( [ x, y, z ], shapes, add );\n*\n* console.log( z );\n* // => [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ]\n*/\nfunction bbinary4d( arrays, shapes, fcn ) {\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar k0;\n\tvar k1;\n\tvar k2;\n\tvar k3;\n\tvar x0;\n\tvar x1;\n\tvar x2;\n\tvar y0;\n\tvar y1;\n\tvar y2;\n\tvar z0;\n\tvar z1;\n\tvar z2;\n\tvar sh;\n\tvar st;\n\tvar o;\n\tvar x;\n\tvar y;\n\tvar z;\n\n\tsh = shapes[ 2 ];\n\tS0 = sh[ 3 ];\n\tS1 = sh[ 2 ];\n\tS2 = sh[ 1 ];\n\tS3 = sh[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 || S2 <= 0 || S3 <= 0 ) {\n\t\treturn;\n\t}\n\to = broadcastArray( arrays[ 0 ], shapes[ 0 ], sh );\n\tx = o.data;\n\tst = o.strides;\n\tdx0 = st[ 3 ];\n\tdx1 = st[ 2 ];\n\tdx2 = st[ 1 ];\n\tdx3 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 1 ], shapes[ 1 ], sh );\n\ty = o.data;\n\tst = o.strides;\n\tdy0 = st[ 3 ];\n\tdy1 = st[ 2 ];\n\tdy2 = st[ 1 ];\n\tdy3 = st[ 0 ];\n\n\tz = arrays[ 2 ];\n\n\tj3 = 0;\n\tk3 = 0;\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tj2 = 0;\n\t\tk2 = 0;\n\t\tx2 = x[ j3 ];\n\t\ty2 = y[ k3 ];\n\t\tz2 = z[ i3 ];\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tj1 = 0;\n\t\t\tk1 = 0;\n\t\t\tx1 = x2[ j2 ];\n\t\t\ty1 = y2[ k2 ];\n\t\t\tz1 = z2[ i2 ];\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tj0 = 0;\n\t\t\t\tk0 = 0;\n\t\t\t\tx0 = x1[ j1 ];\n\t\t\t\ty0 = y1[ k1 ];\n\t\t\t\tz0 = z1[ i1 ];\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tz0[ i0 ] = fcn( x0[ j0 ], y0[ k0 ] );\n\t\t\t\t\tj0 += dx0;\n\t\t\t\t\tk0 += dy0;\n\t\t\t\t}\n\t\t\t\tj1 += dx1;\n\t\t\t\tk1 += dy1;\n\t\t\t}\n\t\t\tj2 += dx2;\n\t\t\tk2 += dy2;\n\t\t}\n\t\tj3 += dx3;\n\t\tk3 += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = bbinary4d;\n", "/**\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/**\n* Apply a binary callback to elements in two broadcasted input arrays and assign results to elements in a four-dimensional nested output array.\n*\n* @module @stdlib/array/base/broadcasted-binary4d\n*\n* @example\n* var ones4d = require( '@stdlib/array/base/ones4d' );\n* var zeros4d = require( '@stdlib/array/base/zeros4d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n* var bbinary4d = require( '@stdlib/array/base/broadcasted-binary4d' );\n*\n* var shapes = [\n* [ 1, 1, 1, 2 ],\n* [ 1, 2, 1, 1 ],\n* [ 1, 2, 2, 2 ]\n* ];\n*\n* var x = ones4d( shapes[ 0 ] );\n* var y = ones4d( shapes[ 1 ] );\n* var z = zeros4d( shapes[ 2 ] );\n*\n* bbinary4d( [ x, y, z ], shapes, add );\n*\n* console.log( z );\n* // => [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar broadcastArray = require( './../../../base/broadcast-array' );\n\n\n// MAIN //\n\n/**\n* Applies a binary callback to elements in two broadcasted input arrays and assigns results to elements in a five-dimensional nested output array.\n*\n* @param {ArrayLikeObject} arrays - array-like object containing two input nested arrays and one output nested array\n* @param {ArrayLikeObject} shapes - array shapes\n* @param {Callback} fcn - binary callback\n* @returns {void}\n*\n* @example\n* var ones5d = require( '@stdlib/array/base/ones5d' );\n* var zeros5d = require( '@stdlib/array/base/zeros5d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n*\n* var shapes = [\n* [ 1, 1, 1, 1, 2 ],\n* [ 1, 1, 2, 1, 1 ],\n* [ 1, 1, 2, 2, 2 ]\n* ];\n*\n* var x = ones5d( shapes[ 0 ] );\n* var y = ones5d( shapes[ 1 ] );\n* var z = zeros5d( shapes[ 2 ] );\n*\n* bbinary5d( [ x, y, z ], shapes, add );\n*\n* console.log( z );\n* // => [ [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] ]\n*/\nfunction bbinary5d( arrays, shapes, fcn ) { // eslint-disable-line max-statements\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\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 j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar k0;\n\tvar k1;\n\tvar k2;\n\tvar k3;\n\tvar k4;\n\tvar x0;\n\tvar x1;\n\tvar x2;\n\tvar x3;\n\tvar y0;\n\tvar y1;\n\tvar y2;\n\tvar y3;\n\tvar z0;\n\tvar z1;\n\tvar z2;\n\tvar z3;\n\tvar sh;\n\tvar st;\n\tvar o;\n\tvar x;\n\tvar y;\n\tvar z;\n\n\tsh = shapes[ 2 ];\n\tS0 = sh[ 4 ];\n\tS1 = sh[ 3 ];\n\tS2 = sh[ 2 ];\n\tS3 = sh[ 1 ];\n\tS4 = sh[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 || S2 <= 0 || S3 <= 0 || S4 <= 0 ) {\n\t\treturn;\n\t}\n\to = broadcastArray( arrays[ 0 ], shapes[ 0 ], sh );\n\tx = o.data;\n\tst = o.strides;\n\tdx0 = st[ 4 ];\n\tdx1 = st[ 3 ];\n\tdx2 = st[ 2 ];\n\tdx3 = st[ 1 ];\n\tdx4 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 1 ], shapes[ 1 ], sh );\n\ty = o.data;\n\tst = o.strides;\n\tdy0 = st[ 4 ];\n\tdy1 = st[ 3 ];\n\tdy2 = st[ 2 ];\n\tdy3 = st[ 1 ];\n\tdy4 = st[ 0 ];\n\n\tz = arrays[ 2 ];\n\n\tj4 = 0;\n\tk4 = 0;\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tj3 = 0;\n\t\tk3 = 0;\n\t\tx3 = x[ j4 ];\n\t\ty3 = y[ k4 ];\n\t\tz3 = z[ i4 ];\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tj2 = 0;\n\t\t\tk2 = 0;\n\t\t\tx2 = x3[ j3 ];\n\t\t\ty2 = y3[ k3 ];\n\t\t\tz2 = z3[ i3 ];\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tj1 = 0;\n\t\t\t\tk1 = 0;\n\t\t\t\tx1 = x2[ j2 ];\n\t\t\t\ty1 = y2[ k2 ];\n\t\t\t\tz1 = z2[ i2 ];\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tj0 = 0;\n\t\t\t\t\tk0 = 0;\n\t\t\t\t\tx0 = x1[ j1 ];\n\t\t\t\t\ty0 = y1[ k1 ];\n\t\t\t\t\tz0 = z1[ i1 ];\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tz0[ i0 ] = fcn( x0[ j0 ], y0[ k0 ] );\n\t\t\t\t\t\tj0 += dx0;\n\t\t\t\t\t\tk0 += dy0;\n\t\t\t\t\t}\n\t\t\t\t\tj1 += dx1;\n\t\t\t\t\tk1 += dy1;\n\t\t\t\t}\n\t\t\t\tj2 += dx2;\n\t\t\t\tk2 += dy2;\n\t\t\t}\n\t\t\tj3 += dx3;\n\t\t\tk3 += dy3;\n\t\t}\n\t\tj4 += dx4;\n\t\tk4 += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = bbinary5d;\n", "/**\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/**\n* Apply a binary callback to elements in two broadcasted input arrays and assign results to elements in a five-dimensional nested output array.\n*\n* @module @stdlib/array/base/broadcasted-binary5d\n*\n* @example\n* var ones5d = require( '@stdlib/array/base/ones5d' );\n* var zeros5d = require( '@stdlib/array/base/zeros5d' );\n* var add = require( '@stdlib/math/base/ops/add' );\n* var bbinary5d = require( '@stdlib/array/base/broadcasted-binary5d' );\n*\n* var shapes = [\n* [ 1, 1, 1, 1, 2 ],\n* [ 1, 1, 2, 1, 1 ],\n* [ 1, 1, 2, 2, 2 ]\n* ];\n*\n* var x = ones5d( shapes[ 0 ] );\n* var y = ones5d( shapes[ 1 ] );\n* var z = zeros5d( shapes[ 2 ] );\n*\n* bbinary5d( [ x, y, z ], shapes, add );\n*\n* console.log( z );\n* // => [ [ [ [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ], [ [ 2.0, 2.0 ], [ 2.0, 2.0 ] ] ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar broadcastArray = require( './../../../base/broadcast-array' );\n\n\n// MAIN //\n\n/**\n* Applies a quaternary callback to elements in four broadcasted input arrays and assigns results to elements in a two-dimensional nested output array.\n*\n* @param {ArrayLikeObject>} arrays - array-like object containing four input nested arrays and one output nested array\n* @param {ArrayLikeObject} shapes - array shapes\n* @param {Callback} fcn - quaternary callback\n* @returns {void}\n*\n* @example\n* var add = require( '@stdlib/math/base/ops/add4' );\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 1 ],\n* [ 1, 1 ],\n* [ 2, 2 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = ones2d( shapes[ 1 ] );\n* var z = ones2d( shapes[ 2 ] );\n* var w = ones2d( shapes[ 3 ] );\n* var out = zeros2d( shapes[ 4 ] );\n*\n* bquaternary2d( [ x, y, z, w, out ], shapes, add );\n*\n* console.log( out );\n* // => [ [ 4.0, 4.0 ], [ 4.0, 4.0 ] ]\n*/\nfunction bquaternary2d( arrays, shapes, fcn ) {\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar dz0;\n\tvar dz1;\n\tvar dw0;\n\tvar dw1;\n\tvar S0;\n\tvar S1;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar k0;\n\tvar k1;\n\tvar m0;\n\tvar m1;\n\tvar n0;\n\tvar n1;\n\tvar x0;\n\tvar y0;\n\tvar z0;\n\tvar w0;\n\tvar u0;\n\tvar sh;\n\tvar st;\n\tvar o;\n\tvar x;\n\tvar y;\n\tvar z;\n\tvar w;\n\tvar u;\n\n\tsh = shapes[ 4 ];\n\tS0 = sh[ 1 ];\n\tS1 = sh[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 ) {\n\t\treturn;\n\t}\n\to = broadcastArray( arrays[ 0 ], shapes[ 0 ], sh );\n\tx = o.data;\n\tst = o.strides;\n\tdx0 = st[ 1 ];\n\tdx1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 1 ], shapes[ 1 ], sh );\n\ty = o.data;\n\tst = o.strides;\n\tdy0 = st[ 1 ];\n\tdy1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 2 ], shapes[ 2 ], sh );\n\tz = o.data;\n\tst = o.strides;\n\tdz0 = st[ 1 ];\n\tdz1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 3 ], shapes[ 3 ], sh );\n\tw = o.data;\n\tst = o.strides;\n\tdw0 = st[ 1 ];\n\tdw1 = st[ 0 ];\n\n\tu = arrays[ 4 ];\n\n\tj1 = 0;\n\tk1 = 0;\n\tm1 = 0;\n\tn1 = 0;\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tj0 = 0;\n\t\tk0 = 0;\n\t\tm0 = 0;\n\t\tn0 = 0;\n\t\tx0 = x[ j1 ];\n\t\ty0 = y[ k1 ];\n\t\tz0 = z[ m1 ];\n\t\tw0 = w[ n1 ];\n\t\tu0 = u[ i1 ];\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tu0[ i0 ] = fcn( x0[ j0 ], y0[ k0 ], z0[ m0 ], w0[ n0 ] );\n\t\t\tj0 += dx0;\n\t\t\tk0 += dy0;\n\t\t\tm0 += dz0;\n\t\t\tn0 += dw0;\n\t\t}\n\t\tj1 += dx1;\n\t\tk1 += dy1;\n\t\tm1 += dz1;\n\t\tn1 += dw1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = bquaternary2d;\n", "/**\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/**\n* Apply a quaternary callback to elements in four broadcasted input arrays and assign results to elements in a two-dimensional nested output array.\n*\n* @module @stdlib/array/base/broadcasted-quaternary2d\n*\n* @example\n* var add = require( '@stdlib/math/base/ops/add4' );\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n* var bquaternary2d = require( '@stdlib/array/base/broadcasted-quaternary2d' );\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 1 ],\n* [ 1, 1 ],\n* [ 2, 2 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = ones2d( shapes[ 1 ] );\n* var z = ones2d( shapes[ 2 ] );\n* var w = ones2d( shapes[ 3 ] );\n* var out = zeros2d( shapes[ 4 ] );\n*\n* bquaternary2d( [ x, y, z, w, out ], shapes, add );\n*\n* console.log( out );\n* // => [ [ 4.0, 4.0 ], [ 4.0, 4.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar broadcastArray = require( './../../../base/broadcast-array' );\n\n\n// MAIN //\n\n/**\n* Applies a quinary callback to elements in five broadcasted input arrays and assigns results to elements in a two-dimensional nested output array.\n*\n* @param {ArrayLikeObject>} arrays - array-like object containing five input nested arrays and one output nested array\n* @param {ArrayLikeObject} shapes - array shapes\n* @param {Callback} fcn - quinary callback\n* @returns {void}\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n*\n* function add( x, y, z, w, v ) {\n* return x + y + z + w + v;\n* }\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 1 ],\n* [ 1, 1 ],\n* [ 2, 2 ],\n* [ 1, 1 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = ones2d( shapes[ 1 ] );\n* var z = ones2d( shapes[ 2 ] );\n* var w = ones2d( shapes[ 3 ] );\n* var v = ones2d( shapes[ 4 ] );\n* var out = zeros2d( shapes[ 5 ] );\n*\n* bquinary2d( [ x, y, z, w, v, out ], shapes, add );\n*\n* console.log( out );\n* // => [ [ 5.0, 5.0 ], [ 5.0, 5.0 ] ]\n*/\nfunction bquinary2d( arrays, shapes, fcn ) {\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar dz0;\n\tvar dz1;\n\tvar dw0;\n\tvar dw1;\n\tvar du0;\n\tvar du1;\n\tvar S0;\n\tvar S1;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar k0;\n\tvar k1;\n\tvar m0;\n\tvar m1;\n\tvar n0;\n\tvar n1;\n\tvar p0;\n\tvar p1;\n\tvar x0;\n\tvar y0;\n\tvar z0;\n\tvar w0;\n\tvar u0;\n\tvar v0;\n\tvar sh;\n\tvar st;\n\tvar o;\n\tvar x;\n\tvar y;\n\tvar z;\n\tvar w;\n\tvar u;\n\tvar v;\n\n\tsh = shapes[ 5 ];\n\tS0 = sh[ 1 ];\n\tS1 = sh[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 ) {\n\t\treturn;\n\t}\n\to = broadcastArray( arrays[ 0 ], shapes[ 0 ], sh );\n\tx = o.data;\n\tst = o.strides;\n\tdx0 = st[ 1 ];\n\tdx1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 1 ], shapes[ 1 ], sh );\n\ty = o.data;\n\tst = o.strides;\n\tdy0 = st[ 1 ];\n\tdy1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 2 ], shapes[ 2 ], sh );\n\tz = o.data;\n\tst = o.strides;\n\tdz0 = st[ 1 ];\n\tdz1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 3 ], shapes[ 3 ], sh );\n\tw = o.data;\n\tst = o.strides;\n\tdw0 = st[ 1 ];\n\tdw1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 4 ], shapes[ 4 ], sh );\n\tu = o.data;\n\tst = o.strides;\n\tdu0 = st[ 1 ];\n\tdu1 = st[ 0 ];\n\n\tv = arrays[ 5 ];\n\n\tj1 = 0;\n\tk1 = 0;\n\tm1 = 0;\n\tn1 = 0;\n\tp1 = 0;\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tj0 = 0;\n\t\tk0 = 0;\n\t\tm0 = 0;\n\t\tn0 = 0;\n\t\tp0 = 0;\n\t\tx0 = x[ j1 ];\n\t\ty0 = y[ k1 ];\n\t\tz0 = z[ m1 ];\n\t\tw0 = w[ n1 ];\n\t\tu0 = u[ p1 ];\n\t\tv0 = v[ i1 ];\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tv0[ i0 ] = fcn( x0[ j0 ], y0[ k0 ], z0[ m0 ], w0[ n0 ], u0[ p0 ] );\n\t\t\tj0 += dx0;\n\t\t\tk0 += dy0;\n\t\t\tm0 += dz0;\n\t\t\tn0 += dw0;\n\t\t\tp0 += du0;\n\t\t}\n\t\tj1 += dx1;\n\t\tk1 += dy1;\n\t\tm1 += dz1;\n\t\tn1 += dw1;\n\t\tp1 += du1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = bquinary2d;\n", "/**\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/**\n* Apply a quinary callback to elements in five broadcasted input arrays and assign results to elements in a two-dimensional nested output array.\n*\n* @module @stdlib/array/base/broadcasted-quinary2d\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n* var bquinary2d = require( '@stdlib/array/base/broadcasted-quinary2d' );\n*\n* function add( x, y, z, w, v ) {\n* return x + y + z + w + v;\n* }\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 1 ],\n* [ 1, 1 ],\n* [ 2, 2 ],\n* [ 1, 1 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = ones2d( shapes[ 1 ] );\n* var z = ones2d( shapes[ 2 ] );\n* var w = ones2d( shapes[ 3 ] );\n* var v = ones2d( shapes[ 4 ] );\n* var out = zeros2d( shapes[ 5 ] );\n*\n* bquinary2d( [ x, y, z, w, v, out ], shapes, add );\n*\n* console.log( out );\n* // => [ [ 5.0, 5.0 ], [ 5.0, 5.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar broadcastArray = require( './../../../base/broadcast-array' );\n\n\n// MAIN //\n\n/**\n* Applies a ternary callback to elements in three broadcasted input arrays and assigns results to elements in a two-dimensional nested output array.\n*\n* @param {ArrayLikeObject>} arrays - array-like object containing three input nested arrays and one output nested array\n* @param {ArrayLikeObject} shapes - array shapes\n* @param {Callback} fcn - ternary callback\n* @returns {void}\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n* var add = require( '@stdlib/math/base/ops/add3' );\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 1 ],\n* [ 1, 1 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = ones2d( shapes[ 1 ] );\n* var z = ones2d( shapes[ 2 ] );\n* var out = zeros2d( shapes[ 3 ] );\n*\n* bternary2d( [ x, y, z, out ], shapes, add );\n*\n* console.log( out );\n* // => [ [ 3.0, 3.0 ], [ 3.0, 3.0 ] ]\n*/\nfunction bternary2d( arrays, shapes, fcn ) {\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar dz0;\n\tvar dz1;\n\tvar S0;\n\tvar S1;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar k0;\n\tvar k1;\n\tvar m0;\n\tvar m1;\n\tvar x0;\n\tvar y0;\n\tvar z0;\n\tvar w0;\n\tvar sh;\n\tvar st;\n\tvar o;\n\tvar x;\n\tvar y;\n\tvar z;\n\tvar w;\n\n\tsh = shapes[ 3 ];\n\tS0 = sh[ 1 ];\n\tS1 = sh[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 ) {\n\t\treturn;\n\t}\n\to = broadcastArray( arrays[ 0 ], shapes[ 0 ], sh );\n\tx = o.data;\n\tst = o.strides;\n\tdx0 = st[ 1 ];\n\tdx1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 1 ], shapes[ 1 ], sh );\n\ty = o.data;\n\tst = o.strides;\n\tdy0 = st[ 1 ];\n\tdy1 = st[ 0 ];\n\n\to = broadcastArray( arrays[ 2 ], shapes[ 2 ], sh );\n\tz = o.data;\n\tst = o.strides;\n\tdz0 = st[ 1 ];\n\tdz1 = st[ 0 ];\n\n\tw = arrays[ 3 ];\n\n\tj1 = 0;\n\tk1 = 0;\n\tm1 = 0;\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tj0 = 0;\n\t\tk0 = 0;\n\t\tm0 = 0;\n\t\tx0 = x[ j1 ];\n\t\ty0 = y[ k1 ];\n\t\tz0 = z[ m1 ];\n\t\tw0 = w[ i1 ];\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tw0[ i0 ] = fcn( x0[ j0 ], y0[ k0 ], z0[ m0 ] );\n\t\t\tj0 += dx0;\n\t\t\tk0 += dy0;\n\t\t\tm0 += dz0;\n\t\t}\n\t\tj1 += dx1;\n\t\tk1 += dy1;\n\t\tm1 += dz1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = bternary2d;\n", "/**\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/**\n* Apply a ternary callback to elements in three broadcasted input arrays and assign results to elements in a two-dimensional nested output array.\n*\n* @module @stdlib/array/base/broadcasted-ternary2d\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n* var add = require( '@stdlib/math/base/ops/add3' );\n* var bternary2d = require( '@stdlib/array/base/broadcasted-ternary2d' );\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 1 ],\n* [ 1, 1 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = ones2d( shapes[ 1 ] );\n* var z = ones2d( shapes[ 2 ] );\n* var out = zeros2d( shapes[ 3 ] );\n*\n* bternary2d( [ x, y, z, out ], shapes, add );\n*\n* console.log( out );\n* // => [ [ 3.0, 3.0 ], [ 3.0, 3.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar broadcastArray = require( './../../../base/broadcast-array' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a broadcasted nested input array and assigns results to elements in a two-dimensional nested output array.\n*\n* @param {ArrayLikeObject>} arrays - array-like object containing one input nested array and one output nested array\n* @param {ArrayLikeObject} shapes - array shapes\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = zeros2d( shapes[ 1 ] );\n*\n* bunary2d( [ x, y ], shapes, scale );\n*\n* console.log( y );\n* // => [ [ 10.0, 10.0 ], [ 10.0, 10.0 ] ]\n*/\nfunction bunary2d( arrays, shapes, fcn ) {\n\tvar dx0;\n\tvar dx1;\n\tvar S0;\n\tvar S1;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar x0;\n\tvar y0;\n\tvar sh;\n\tvar st;\n\tvar o;\n\tvar x;\n\tvar y;\n\n\tsh = shapes[ 1 ];\n\tS0 = sh[ 1 ];\n\tS1 = sh[ 0 ];\n\tif ( S0 <= 0 || S1 <= 0 ) {\n\t\treturn;\n\t}\n\to = broadcastArray( arrays[ 0 ], shapes[ 0 ], sh );\n\tx = o.data;\n\tst = o.strides;\n\tdx0 = st[ 1 ];\n\tdx1 = st[ 0 ];\n\n\ty = arrays[ 1 ];\n\n\tj1 = 0;\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tj0 = 0;\n\t\tx0 = x[ j1 ];\n\t\ty0 = y[ i1 ];\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\ty0[ i0 ] = fcn( x0[ j0 ] );\n\t\t\tj0 += dx0;\n\t\t}\n\t\tj1 += dx1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = bunary2d;\n", "/**\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/**\n* Apply a unary callback to elements in a broadcasted nested input array and assign results to elements in a two-dimensional nested output array.\n*\n* @module @stdlib/array/base/broadcasted-unary2d\n*\n* @example\n* var ones2d = require( '@stdlib/array/base/ones2d' );\n* var zeros2d = require( '@stdlib/array/base/zeros2d' );\n* var bunary2d = require( '@stdlib/array/base/broadcasted-unary2d' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* var shapes = [\n* [ 1, 2 ],\n* [ 2, 2 ]\n* ];\n*\n* var x = ones2d( shapes[ 0 ] );\n* var y = zeros2d( shapes[ 1 ] );\n*\n* bunary2d( [ x, y ], shapes, scale );\n*\n* console.log( y );\n* // => [ [ 10.0, 10.0 ], [ 10.0, 10.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\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// MODULES //\n\nvar broadcastArray = require( './../../../base/broadcast-array' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a broadcasted nested input array and assigns results to elements in a three-dimensional nested output array.\n*\n* @param {ArrayLikeObject