diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0779e8a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 3fa50dd..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/map) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1636208..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/map) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2021 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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 04b6598..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '38 2 * * 0' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n +``` -```javascript -var map = require( '@stdlib/ndarray-map' ); +If no recognized module system is present, access bundle contents via the global scope: + +```html + ``` #### map( x\[, options], fcn\[, thisArg] ) @@ -237,13 +243,18 @@ The callback function is provided the following arguments: -```javascript -var discreteUniform = require( '@stdlib/random-array-discrete-uniform' ); -var abs = require( '@stdlib/math-base-special-abs' ); -var ndarray2array = require( '@stdlib/ndarray-to-array' ); -var naryFunction = require( '@stdlib/utils-nary-function' ); -var ndarray = require( '@stdlib/ndarray-ctor' ); -var map = require( '@stdlib/ndarray-map' ); +```html + + + + + + + + + + + + ```
@@ -349,21 +365,21 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/ndarray-map/main/LICENSE -[@stdlib/ndarray/ctor]: https://github.com/stdlib-js/ndarray-ctor +[@stdlib/ndarray/ctor]: https://github.com/stdlib-js/ndarray-ctor/tree/umd -[@stdlib/ndarray/dtypes]: https://github.com/stdlib-js/ndarray-dtypes +[@stdlib/ndarray/dtypes]: https://github.com/stdlib-js/ndarray-dtypes/tree/umd -[@stdlib/ndarray/orders]: https://github.com/stdlib-js/ndarray-orders +[@stdlib/ndarray/orders]: https://github.com/stdlib-js/ndarray-orders/tree/umd -[@stdlib/ndarray/filter]: https://github.com/stdlib-js/ndarray-filter +[@stdlib/ndarray/filter]: https://github.com/stdlib-js/ndarray-filter/tree/umd -[@stdlib/ndarray/filter-map]: https://github.com/stdlib-js/ndarray-filter-map +[@stdlib/ndarray/filter-map]: https://github.com/stdlib-js/ndarray-filter-map/tree/umd -[@stdlib/ndarray/for-each]: https://github.com/stdlib-js/ndarray-for-each +[@stdlib/ndarray/for-each]: https://github.com/stdlib-js/ndarray-for-each/tree/umd -[@stdlib/ndarray/slice]: https://github.com/stdlib-js/ndarray-slice +[@stdlib/ndarray/slice]: https://github.com/stdlib-js/ndarray-slice/tree/umd diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/benchmark/benchmark.1d.js b/benchmark/benchmark.1d.js deleted file mode 100644 index a75e2c0..0000000 --- a/benchmark/benchmark.1d.js +++ /dev/null @@ -1,138 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 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-harness' ); -var isnan = require( '@stdlib/math-base-assert-is-nan' ); -var pow = require( '@stdlib/math-base-special-pow' ); -var isndarrayLike = require( '@stdlib/assert-is-ndarray-like' ); -var identity = require( '@stdlib/math-base-special-identity' ); -var discreteUniform = require( '@stdlib/random-array-discrete-uniform' ); -var shape2strides = require( '@stdlib/ndarray-base-shape2strides' ); -var ndarray = require( '@stdlib/ndarray-ctor' ); -var pkg = require( './../package.json' ).name; -var map = require( './../lib' ); - - -// VARIABLES // - -var xtypes = [ 'generic' ]; -var ytypes = [ 'float64' ]; -var orders = [ 'row-major', 'column-major' ]; - - -// FUNCTIONS // - -/** -* Creates a benchmark function. -* -* @private -* @param {PositiveInteger} len - array length -* @param {NonNegativeIntegerArray} shape - ndarray shape -* @param {string} xtype - input ndarray data type -* @param {string} ytype - output ndarray data type -* @param {string} order - ndarray memory layout -* @returns {Function} benchmark function -*/ -function createBenchmark( len, shape, xtype, ytype, order ) { - var strides; - var opts; - var xbuf; - var x; - - xbuf = discreteUniform( len, -100, 100, { - 'dtype': xtype - }); - strides = shape2strides( shape, order ); - x = ndarray( xtype, xbuf, shape, strides, 0, order ); - opts = { - 'dtype': ytype - }; - - return benchmark; - - /** - * Benchmark function. - * - * @private - * @param {Benchmark} b - benchmark instance - */ - function benchmark( b ) { - var y; - var i; - - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - y = map( x, opts, identity ); - if ( isnan( y.data[ i%len ] ) ) { - b.fail( 'should not return NaN' ); - } - } - b.toc(); - if ( !isndarrayLike( y ) ) { - b.fail( 'should return an ndarray' ); - } - b.pass( 'benchmark finished' ); - b.end(); - } -} - - -// MAIN // - -/** -* Main execution sequence. -* -* @private -*/ -function main() { - var len; - var min; - var max; - var ord; - var sh; - var t1; - var t2; - var f; - var i; - var j; - var k; - - min = 1; // 10^min - max = 6; // 10^max - - for ( k = 0; k < orders.length; k++ ) { - ord = orders[ k ]; - for ( j = 0; j < xtypes.length; j++ ) { - t1 = xtypes[ j ]; - t2 = ytypes[ j ]; - for ( i = min; i <= max; i++ ) { - len = pow( 10, i ); - - sh = [ len ]; - f = createBenchmark( len, sh, t1, t2, ord ); - bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+ord+',yorder='+ord+',xtype='+t1+',ytype='+t2, f ); - } - } - } -} - -main(); diff --git a/benchmark/benchmark.2d.js b/benchmark/benchmark.2d.js deleted file mode 100644 index 38d6d0b..0000000 --- a/benchmark/benchmark.2d.js +++ /dev/null @@ -1,148 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 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-harness' ); -var isnan = require( '@stdlib/math-base-assert-is-nan' ); -var pow = require( '@stdlib/math-base-special-pow' ); -var sqrt = require( '@stdlib/math-base-special-sqrt' ); -var floor = require( '@stdlib/math-base-special-floor' ); -var identity = require( '@stdlib/math-base-special-identity' ); -var discreteUniform = require( '@stdlib/random-array-discrete-uniform' ); -var shape2strides = require( '@stdlib/ndarray-base-shape2strides' ); -var ndarray = require( '@stdlib/ndarray-ctor' ); -var pkg = require( './../package.json' ).name; -var map = require( './../lib' ); - - -// VARIABLES // - -var xtypes = [ 'generic' ]; -var ytypes = [ 'float64' ]; -var orders = [ 'row-major', 'column-major' ]; - - -// FUNCTIONS // - -/** -* Creates a benchmark function. -* -* @private -* @param {PositiveInteger} len - ndarray length -* @param {NonNegativeIntegerArray} shape - ndarray shape -* @param {string} xtype - input ndarray data type -* @param {string} ytype - output ndarray data type -* @param {string} order - ndarray memory layout -* @returns {Function} benchmark function -*/ -function createBenchmark( len, shape, xtype, ytype, order ) { - var strides; - var opts; - var xbuf; - var x; - var y; - - xbuf = discreteUniform( len, -100, 100, { - 'dtype': xtype - }); - strides = shape2strides( shape, order ); - x = ndarray( xtype, xbuf, shape, strides, 0, order ); - opts = { - 'dtype': ytype - }; - return benchmark; - - /** - * Benchmark function. - * - * @private - * @param {Benchmark} b - benchmark instance - */ - function benchmark( b ) { - var i; - - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - y = map( x, opts, identity ); - if ( isnan( y.data[ i%len ] ) ) { - b.fail( 'should not return NaN' ); - } - } - b.toc(); - if ( isnan( y.data[ i%len ] ) ) { - b.fail( 'should not return NaN' ); - } - b.pass( 'benchmark finished' ); - b.end(); - } -} - - -// MAIN // - -/** -* Main execution sequence. -* -* @private -*/ -function main() { - var len; - var min; - var max; - var ord; - var sh; - var t1; - var t2; - var f; - var i; - var j; - var k; - - min = 1; // 10^min - max = 6; // 10^max - - for ( k = 0; k < orders.length; k++ ) { - ord = orders[ k ]; - for ( j = 0; j < xtypes.length; j++ ) { - t1 = xtypes[ j ]; - t2 = ytypes[ j ]; - for ( i = min; i <= max; i++ ) { - len = pow( 10, i ); - - sh = [ len/2, 2 ]; - f = createBenchmark( len, sh, t1, t2, ord ); - bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+ord+',yorder='+ord+',xtype='+t1+',ytype='+t2, f ); - - sh = [ 2, len/2 ]; - f = createBenchmark( len, sh, t1, t2, ord ); - bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+ord+',yorder='+ord+',xtype='+t1+',ytype='+t2, f ); - - len = floor( sqrt( len ) ); - sh = [ len, len ]; - len *= len; - f = createBenchmark( len, sh, t1, t2, ord ); - bench( pkg+':ndims='+sh.length+',len='+len+',shape=['+sh.join(',')+'],xorder='+ord+',yorder='+ord+',xtype='+t1+',ytype='+t2, f ); - } - } - } -} - -main(); diff --git a/branches.md b/branches.md deleted file mode 100644 index 532d223..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/map" -%% click B href "https://github.com/stdlib-js/ndarray-map/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-map/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-map/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-map/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-map/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/map -[production-url]: https://github.com/stdlib-js/ndarray-map/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-map/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-map/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-map/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-map/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-map/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-map/blob/esm/README.md \ No newline at end of file diff --git a/browser.js b/browser.js new file mode 100644 index 0000000..0e77bfb --- /dev/null +++ b/browser.js @@ -0,0 +1,3 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).map=r()}(this,(function(){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function r(){return t&&"symbol"==typeof Symbol.toStringTag}var e=Object.prototype.toString;var n=Object.prototype.hasOwnProperty;function o(t,r){return null!=t&&n.call(t,r)}var i="function"==typeof Symbol?Symbol:void 0,a="function"==typeof i?i.toStringTag:"";var f=r()?function(t){var r,n,i;if(null==t)return e.call(t);n=t[a],r=o(t,a);try{t[a]=void 0}catch(r){return e.call(t)}return i=e.call(t),r?t[a]=n:delete t[a],i}:function(t){return e.call(t)};var s=Array.isArray?Array.isArray:function(t){return"[object Array]"===f(t)};function u(t){return"object"==typeof t&&null!==t&&!s(t)}var l=/./,c="function"==typeof Object.defineProperty?Object.defineProperty:null;var h=Object.defineProperty;function p(t){return"number"==typeof t}function g(t){var r,e="";for(r=0;r0&&(r-=1),e=n.toExponential(r)):e=n.toPrecision(t.precision),t.alternate||(e=E.call(e,V,"$1e"),e=E.call(e,O,"e"),e=E.call(e,j,""));break;default:throw new Error("invalid double notation. Value: "+t.specifier)}return e=E.call(e,T,"e+0$1"),e=E.call(e,x,"e-0$1"),t.alternate&&(e=E.call(e,A,"$1."),e=E.call(e,R,"$1.e")),n>=0&&t.sign&&(e=t.sign+e),e=t.specifier===_.call(t.specifier)?_.call(e):b.call(e)}function I(t){var r,e="";for(r=0;r127)throw new Error("invalid character code. Value: "+n.arg);n.arg=U(i)?String(n.arg):B(i)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(n.precision=6),n.arg=S(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=d(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(l=n.arg,c=n.width,h=n.padRight,p=void 0,(p=c-l.length)<0?l:l=h?l+I(p):I(p)+l)),a+=n.arg||"",f+=1}return a}var F=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function C(t){var r={mapping:t[1]?parseInt(t[1],10):void 0,flags:t[2],width:t[3],precision:t[5],specifier:t[6]};return"."===t[4]&&void 0===t[5]&&(r.precision="1"),r}function N(t){var r,e,n,o;for(e=[],o=0,n=F.exec(t);n;)(r=t.slice(o,F.lastIndex-n[0].length)).length&&e.push(r),e.push(C(n)),o=F.lastIndex,n=F.exec(t);return(r=t.slice(o)).length&&e.push(r),e}function k(t){var r,e;if("string"!=typeof t)throw new TypeError(k("invalid argument. First argument must be a string. Value: `%s`.",t));for(r=[N(t)],e=1;eo&&(n=!1),!n&&!r)return 0;o=i}return n&&r?3:n?1:2}function St(t,r){return r&&(2===t||3===t)}function It(t,r){return r&&(1===t||3===t)}function Bt(t,r,e){var n,o,i,a,f;for(n=t.length,o=e,i=e,f=0;f0?i+=a*(t[f]-1):a<0&&(o+=a*(t[f]-1))}return[o,i]}function Pt(t){return t.re}function Ut(t){return t.im}function Lt(t){return"string"==typeof t}X(Bt,"assign",(function(t,r,e,n){var o,i,a,f,s;for(o=t.length,i=e,a=e,s=0;s0?a+=f*(t[s]-1):f<0&&(i+=f*(t[s]-1))}return n[0]=i,n[1]=a,n}));var Mt=String.prototype.valueOf;var Ft=r();function Ct(t){return"object"==typeof t&&(t instanceof String||(Ft?function(t){try{return Mt.call(t),!0}catch(t){return!1}}(t):"[object String]"===f(t)))}function Nt(t){return Lt(t)||Ct(t)}X(Nt,"isPrimitive",Lt),X(Nt,"isObject",Ct);var kt=/[-\/\\^$*+?.()|[\]{}]/g;var Yt=RegExp.prototype.exec;var Dt=r();function zt(t){return"object"==typeof t&&(t instanceof RegExp||(Dt?function(t){try{return Yt.call(t),!0}catch(t){return!1}}(t):"[object RegExp]"===f(t)))}function Wt(t,r,e){return t.replace(r,e)}function Gt(t,r,e){if(!Lt(t))throw new TypeError(k("invalid argument. First argument must be a string. Value: `%s`.",t));if(Lt(r))r=new RegExp(function(t){var r,e;if(!Lt(t))throw new TypeError(k("invalid argument. Must provide a regular expression string. Value: `%s`.",t));if("/"===t[0])for(e=t.length-1;e>=0&&"/"!==t[e];e--);return void 0===e||e<=0?t.replace(kt,"\\$&"):(r=(r=t.substring(1,e)).replace(kt,"\\$&"),t=t[0]+r+t.substring(e))}(r),"g");else if(!zt(r))throw new TypeError(k("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",r));if(!Lt(e)&&!yt(e))throw new TypeError(k("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",e));return Wt(t,r,e)}var Jt={int8:"new Int8Array( [ {{data}} ] )",uint8:"new Uint8Array( [ {{data}} ] )",uint8c:"new Uint8ClampedArray( [ {{data}} ] )",int16:"new Int16Array( [ {{data}} ] )",uint16:"new Uint16Array( [ {{data}} ] )",int32:"new Int32Array( [ {{data}} ] )",uint32:"new Uint32Array( [ {{data}} ] )",float32:"new Float32Array( [ {{data}} ] )",float64:"new Float64Array( [ {{data}} ] )",generic:"[ {{data}} ]",binary:"new Buffer( [ {{data}} ] )",complex64:"new Complex64Array( [ {{data}} ] )",complex128:"new Complex128Array( [ {{data}} ] )"};var $t="function"==typeof Uint8Array;var Zt="function"==typeof Uint8Array?Uint8Array:null;var Xt,Kt="function"==typeof Uint8Array?Uint8Array:void 0;Xt=function(){var t,r,e;if("function"!=typeof Zt)return!1;try{r=new Zt(r=[1,3.14,-3.14,256,257]),e=r,t=($t&&e instanceof Uint8Array||"[object Uint8Array]"===f(e))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?Kt:function(){throw new Error("not implemented")};var qt=Xt,Ht="function"==typeof Uint16Array;var Qt="function"==typeof Uint16Array?Uint16Array:null;var tr,rr="function"==typeof Uint16Array?Uint16Array:void 0;tr=function(){var t,r,e;if("function"!=typeof Qt)return!1;try{r=new Qt(r=[1,3.14,-3.14,65536,65537]),e=r,t=(Ht&&e instanceof Uint16Array||"[object Uint16Array]"===f(e))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?rr:function(){throw new Error("not implemented")};var er,nr=tr,or={uint16:nr,uint8:qt};(er=new or.uint16(1))[0]=4660;var ir=52===new or.uint8(er.buffer)[0],ar="function"==typeof ArrayBuffer;function fr(t){return ar&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===f(t)}var sr="function"==typeof Float64Array;var ur="function"==typeof Float64Array?Float64Array:null;var lr,cr="function"==typeof Float64Array?Float64Array:void 0;lr=function(){var t,r,e;if("function"!=typeof ur)return!1;try{r=new ur([1,3.14,-3.14,NaN]),e=r,t=(sr&&e instanceof Float64Array||"[object Float64Array]"===f(e))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}()?cr:function(){throw new Error("not implemented")};var hr=lr,pr="function"==typeof ArrayBuffer?ArrayBuffer:null;var gr,dr="function"==typeof ArrayBuffer?ArrayBuffer:void 0;gr=function(){var t,r,e;if("function"!=typeof pr)return!1;try{(t=fr(e=new pr(16))&&"function"==typeof pr.isView)&&((r=new hr(e))[0]=-3.14,r[1]=NaN,t=t&&pr.isView(r)&&16===e.byteLength&&-3.14===r[0]&&r[1]!=r[1])}catch(r){t=!1}return t}()?dr:function(){throw new Error("not implemented")};var yr=gr,mr="function"==typeof DataView;var wr="function"==typeof DataView?DataView:null;var vr,br="function"==typeof DataView?DataView:void 0;vr=function(){var t,r,e,n;if("function"!=typeof wr)return!1;try{e=new yr(24),r=new wr(e,8),n=r,(t=(mr&&n instanceof DataView||"[object DataView]"===f(n))&&"function"==typeof r.getFloat64&&"function"==typeof r.setFloat64)&&(r.setFloat64(0,-3.14),r.setFloat64(8,NaN),t=t&&r.buffer===e&&16===r.byteLength&&8===r.byteOffset&&-3.14===r.getFloat64(0)&&r.getFloat64(8)!=r.getFloat64(8))}catch(r){t=!1}return t}()?br:function(){throw new Error("not implemented")};var _r=vr,Er="function"==typeof BigInt?BigInt:void 0,Tr={all:["binary","bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["binary","bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"]},xr=/_and_generic$/;function Ar(){var t,r,e;return 0===arguments.length?Tr.all.slice():(e=!1,t=arguments[0],xr.test(t)&&"all"!==(t=Wt(t,xr,""))&&(e=!0),r=(r=Tr[t])?r.slice():[],e&&r.length>0&&r.push("generic"),r)}function Rr(){return{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256}}function jr(t,r,e){Z(t,r,{configurable:!1,enumerable:!0,writable:!1,value:e})}function Or(t){return Object.keys(Object(t))}var Vr,Sr=void 0!==Object.keys;function Ir(t){return"[object Arguments]"===f(t)}Vr=function(){return Ir(arguments)}();var Br=Vr;function Pr(t){return"number"==typeof t}var Ur=Number,Lr=Ur.prototype.toString;var Mr=r();function Fr(t){return"object"==typeof t&&(t instanceof Ur||(Mr?function(t){try{return Lr.call(t),!0}catch(t){return!1}}(t):"[object Number]"===f(t)))}function Cr(t){return Pr(t)||Fr(t)}function Nr(t){return t!=t}function kr(t){return Pr(t)&&Nr(t)}function Yr(t){return Fr(t)&&Nr(t.valueOf())}function Dr(t){return kr(t)||Yr(t)}X(Cr,"isPrimitive",Pr),X(Cr,"isObject",Fr),X(Dr,"isPrimitive",kr),X(Dr,"isObject",Yr);var zr=Number.POSITIVE_INFINITY,Wr=Ur.NEGATIVE_INFINITY,Gr=Math.floor;function Jr(t){return Gr(t)===t}function $r(t){return tWr&&Jr(t)}function Zr(t){return Pr(t)&&$r(t)}function Xr(t){return Fr(t)&&$r(t.valueOf())}function Kr(t){return Zr(t)||Xr(t)}X(Kr,"isPrimitive",Zr),X(Kr,"isObject",Xr);var qr=Object.prototype.propertyIsEnumerable;var Hr=!qr.call("beep","0");function Qr(t,r){var e;return null!=t&&(!(e=qr.call(t,r))&&Hr&&Nt(t)?!kr(r=+r)&&Zr(r)&&r>=0&&r=0&&t.length<=te&&o(t,"callee")&&!Qr(t,"callee")},ee=Array.prototype.slice;var ne=Qr((function(){}),"prototype"),oe=!Qr({toString:null},"toString"),ie=9007199254740991;function ae(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Jr(t.length)&&t.length>=0&&t.length<=ie}function fe(t,r,e){var n,o;if(!ae(t)&&!Lt(t))throw new TypeError(k("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(0===(n=t.length))return-1;if(3===arguments.length){if(!Zr(e))throw new TypeError(k("invalid argument. Third argument must be an integer. Value: `%s`.",e));if(e>=0){if(e>=n)return-1;o=e}else(o=n+e)<0&&(o=0)}else o=0;if(Dr(r)){for(;o0&&!o(t,"0"))for(s=0;s>>0,o=Gr(t/Ve),ir?(Ie.setUint32(0,i,ir),Ie.setUint32(4,o,ir)):(Ie.setUint32(0,o,ir),Ie.setUint32(4,i,ir)),a=0;a>>0,n=Gr(t/4294967296),e=new _r(r.buffer),ir?(e.setUint32(0,o,ir),e.setUint32(4,n,ir)):(e.setUint32(0,n,ir),e.setUint32(4,o,ir))),r}),"assign",Be);var Pe={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256},Ue=_e(),Le={throw:1,clamp:2,wrap:3,normalize:4};function Me(t,r,e,n,o,i){var a,f,s,u,l;if(!(this instanceof Me))return new Me(t,r,e,n,o,i);for(u=1,l=0;l=0}function Ne(t){return Xr(t)&&t.valueOf()>=0}function ke(t){return Ce(t)||Ne(t)}X(Me,"name","ndarray"),xt(Me.prototype,"byteLength",(function(){return this._byteLength})),xt(Me.prototype,"BYTES_PER_ELEMENT",(function(){return this._bytesPerElement})),xt(Me.prototype,"data",(function(){return this._buffer})),xt(Me.prototype,"dtype",(function(){return this._dtype})),xt(Me.prototype,"flags",(function(){return{ROW_MAJOR_CONTIGUOUS:(t=this._flags).ROW_MAJOR_CONTIGUOUS,COLUMN_MAJOR_CONTIGUOUS:t.COLUMN_MAJOR_CONTIGUOUS,READONLY:t.READONLY};var t})),xt(Me.prototype,"length",(function(){return this._length})),xt(Me.prototype,"ndims",(function(){return this._ndims})),xt(Me.prototype,"offset",(function(){return this._offset})),xt(Me.prototype,"order",(function(){return this._order})),xt(Me.prototype,"shape",(function(){return this._shape.slice()})),xt(Me.prototype,"strides",(function(){return this._strides.slice()})),X(Me.prototype,"get",(function(){var t,r;for(t=this._offset,r=0;r=0;a--)t-=i=t%e[a],t/=e[a],o+=i*r[a];return this._accessors?this._buffer.get(o):this._buffer[o]})),X(Me.prototype,"set",(function(){var t,r;for(t=this._offset,r=0;r=0;f--)t-=a=t%n[f],t/=n[f],i+=a*e[f];return this._accessors?this._buffer.set(r,i):this._buffer[i]=r,this})),X(Me.prototype,"toString",(function(){var t,r,e,n,o,i;if(r=this._shape.length,e="ndarray( '"+(n=this._dtype)+"', ",t="",this._length<=100)if("complex64"===n||"complex128"===n)for(i=0;i=0;i--)t+=Pt(o=this.iget(this._length-1-i))+", "+Ut(o),i>0&&(t+=", ");else for(i=2;i>=0;i--)t+=this.iget(this._length-1-i),i>0&&(t+=", ")}if(e+=Gt(Jt[this.dtype],"{{data}}",t),e+=", ",e+=0===r?"[]":"[ "+this._shape.join(", ")+" ]",e+=", ",e+="[ ",0===r)e+="0";else for(i=0;i=0&&t.length<=Ye}(r))return!1;if(e=r.length,0===e)return!1;for(n=0;n=0;o--)e[o]=n,n*=t[o];return e}(t)}function $e(t,r){var e,n,o;for(n=t.length,e=0,o=0;o=0;n--)r[n]=e,e*=t[n];return r}(t,e)}));var Xe="function";function Ke(t){return typeof t.get===Xe&&typeof t.set===Xe}var qe={complex128:function(t,r){return t.get(r)},complex64:function(t,r){return t.get(r)},default:function(t,r){return t.get(r)}};function He(t){var r=qe[t];return"function"==typeof r?r:qe.default}var Qe={float64:function(t,r){return t[r]},float32:function(t,r){return t[r]},int32:function(t,r){return t[r]},int16:function(t,r){return t[r]},int8:function(t,r){return t[r]},uint32:function(t,r){return t[r]},uint16:function(t,r){return t[r]},uint8:function(t,r){return t[r]},uint8c:function(t,r){return t[r]},generic:function(t,r){return t[r]},default:function(t,r){return t[r]}};function tn(t){var r=Qe[t];return"function"==typeof r?r:Qe.default}var rn={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128"},en="function"==typeof Float32Array;var nn="function"==typeof Float32Array?Float32Array:null;var on,an="function"==typeof Float32Array?Float32Array:void 0;on=function(){var t,r,e;if("function"!=typeof nn)return!1;try{r=new nn([1,3.14,-3.14,5e40]),e=r,t=(en&&e instanceof Float32Array||"[object Float32Array]"===f(e))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===zr}catch(r){t=!1}return t}()?an:function(){throw new Error("not implemented")};var fn=on,sn="function"==typeof Uint32Array;var un="function"==typeof Uint32Array?Uint32Array:null;var ln,cn="function"==typeof Uint32Array?Uint32Array:void 0;ln=function(){var t,r,e;if("function"!=typeof un)return!1;try{r=new un(r=[1,3.14,-3.14,4294967296,4294967297]),e=r,t=(sn&&e instanceof Uint32Array||"[object Uint32Array]"===f(e))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}()?cn:function(){throw new Error("not implemented")};var hn=ln,pn="function"==typeof Int32Array;var gn="function"==typeof Int32Array?Int32Array:null;var dn,yn="function"==typeof Int32Array?Int32Array:void 0;dn=function(){var t,r,e;if("function"!=typeof gn)return!1;try{r=new gn([1,3.14,-3.14,2147483648]),e=r,t=(pn&&e instanceof Int32Array||"[object Int32Array]"===f(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){t=!1}return t}()?yn:function(){throw new Error("not implemented")};var mn=dn,wn="function"==typeof Int16Array;var vn="function"==typeof Int16Array?Int16Array:null;var bn,_n="function"==typeof Int16Array?Int16Array:void 0;bn=function(){var t,r,e;if("function"!=typeof vn)return!1;try{r=new vn([1,3.14,-3.14,32768]),e=r,t=(wn&&e instanceof Int16Array||"[object Int16Array]"===f(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){t=!1}return t}()?_n:function(){throw new Error("not implemented")};var En=bn,Tn="function"==typeof Uint8ClampedArray;var xn="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var An,Rn="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;An=function(){var t,r,e;if("function"!=typeof xn)return!1;try{r=new xn([-1,0,1,3.14,4.99,255,256]),e=r,t=(Tn&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===f(e))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){t=!1}return t}()?Rn:function(){throw new Error("not implemented")};var jn=An,On="function"==typeof Int8Array;var Vn="function"==typeof Int8Array?Int8Array:null;var Sn,In="function"==typeof Int8Array?Int8Array:void 0;Sn=function(){var t,r,e;if("function"!=typeof Vn)return!1;try{r=new Vn([1,3.14,-3.14,128]),e=r,t=(On&&e instanceof Int8Array||"[object Int8Array]"===f(e))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){t=!1}return t}()?In:function(){throw new Error("not implemented")};var Bn=Sn;function Pn(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Jr(t.length)&&t.length>=0&&t.length<=Ye}function Un(t,r){if(!(this instanceof Un))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Pr(t))throw new TypeError(k("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Pr(r))throw new TypeError(k("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return Z(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:t}),Z(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:r}),this}X(Un,"BYTES_PER_ELEMENT",8),X(Un.prototype,"BYTES_PER_ELEMENT",8),X(Un.prototype,"byteLength",16),X(Un.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),X(Un.prototype,"toJSON",(function(){var t={type:"Complex128"};return t.re=this.re,t.im=this.im,t}));var Ln="function"==typeof Math.fround?Math.fround:null,Mn=new fn(1);var Fn="function"==typeof Ln?Ln:function(t){return Mn[0]=t,Mn[0]};function Cn(t,r){if(!(this instanceof Cn))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Pr(t))throw new TypeError(k("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Pr(r))throw new TypeError(k("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return Z(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Fn(t)}),Z(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Fn(r)}),this}function Nn(t){return t instanceof Un||t instanceof Cn||"object"==typeof t&&null!==t&&"number"==typeof t.re&&"number"==typeof t.im}function kn(t){return Jr(t/2)}X(Cn,"BYTES_PER_ELEMENT",4),X(Cn.prototype,"BYTES_PER_ELEMENT",4),X(Cn.prototype,"byteLength",8),X(Cn.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),X(Cn.prototype,"toJSON",(function(){var t={type:"Complex64"};return t.re=this.re,t.im=this.im,t}));var Yn=8;function Dn(t){return"object"==typeof t&&null!==t&&"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===Yn}var zn=16;function Wn(t){return"object"==typeof t&&null!==t&&"Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===zn}function Gn(){return"function"==typeof i&&"symbol"==typeof i("foo")&&o(i,"iterator")&&"symbol"==typeof i.iterator}var Jn=Gn()?Symbol.iterator:null;function $n(t,r){if(!(this instanceof $n))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Pr(t))throw new TypeError(k("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Pr(r))throw new TypeError(k("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return Z(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Fn(t)}),Z(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Fn(r)}),this}function Zn(t){return t.re}function Xn(t){return t.im}function Kn(t,r){return new fn(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*r,2*(t.length-r))}function qn(t,r){return new hr(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*r,2*(t.length-r))}function Hn(t){var r,e,n;for(r=[];!(e=t.next()).done;)if(Pn(n=e.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!Nn(n))return new TypeError(k("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Zn(n),Xn(n))}return r}X($n,"BYTES_PER_ELEMENT",4),X($n.prototype,"BYTES_PER_ELEMENT",4),X($n.prototype,"byteLength",8),X($n.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),X($n.prototype,"toJSON",(function(){var t={type:"Complex64"};return t.re=this.re,t.im=this.im,t}));var Qn=2*fn.BYTES_PER_ELEMENT,to=Gn();function ro(t){return t instanceof oo||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function eo(t){return t===oo||"Complex128Array"===t.name}function no(t,r){return new $n(t[r*=2],t[r+1])}function oo(){var t,r,e,n;if(r=arguments.length,!(this instanceof oo))return 0===r?new oo:1===r?new oo(arguments[0]):2===r?new oo(arguments[0],arguments[1]):new oo(arguments[0],arguments[1],arguments[2]);if(0===r)e=new fn(0);else if(1===r)if(Ce(arguments[0]))e=new fn(2*arguments[0]);else if(ae(arguments[0]))if((n=(e=arguments[0]).length)&&s(e)&&Nn(e[0])){if(e=function(t,r){var e,n,o,i;for(e=r.length,i=0,o=0;oe.byteLength-t)throw new RangeError(k("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Qn));e=new fn(e,t,2*n)}}return X(this,"_buffer",e),X(this,"_length",e.length/2),this}function io(t,r){if(!(this instanceof io))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Pr(t))throw new TypeError(k("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Pr(r))throw new TypeError(k("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return Z(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:t}),Z(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:r}),this}function ao(t){return t.re}function fo(t){return t.im}function so(t){var r,e,n;for(r=[];!(e=t.next()).done;)if(Pn(n=e.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!Nn(n))return new TypeError(k("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(ao(n),fo(n))}return r}X(oo,"BYTES_PER_ELEMENT",Qn),X(oo,"name","Complex64Array"),X(oo,"from",(function(t){var r,e,n,o,i,a,f,s,l,c,h,p;if(!yt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!eo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!yt(n=arguments[1]))throw new TypeError(k("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(ro(t)){if(s=t.length,n){for(i=(o=new this(s))._buffer,p=0,h=0;h=2))throw new TypeError(k("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));i[p]=c[0],i[p+1]=c[1]}p+=2}return o}return new this(t)}if(ae(t)){if(n){for(s=t.length,f=t.get&&t.set?He("default"):tn("default"),h=0;h=2))throw new TypeError(k("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));i[p]=c[0],i[p+1]=c[1]}p+=2}return o}return new this(t)}if(u(t)&&to&&yt(t[Jn])){if(!yt((i=t[Jn]()).next))throw new TypeError(k("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=n?function(t,r,e){var n,o,i,a;for(n=[],a=-1;!(o=t.next()).done;)if(a+=1,Pn(i=r.call(e,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!Nn(i))return new TypeError(k("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));n.push(Zn(i),Xn(i))}return n}(i,n,r):Hn(i),a instanceof Error)throw a;for(i=(o=new this(s=a.length/2))._buffer,h=0;h=this._length))return no(this._buffer,t)})),xt(oo.prototype,"buffer",(function(){return this._buffer.buffer})),xt(oo.prototype,"byteLength",(function(){return this._buffer.byteLength})),xt(oo.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),X(oo.prototype,"BYTES_PER_ELEMENT",oo.BYTES_PER_ELEMENT),X(oo.prototype,"copyWithin",(function(t,r){if(!ro(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*t,2*r):this._buffer.copyWithin(2*t,2*r,2*arguments[2]),this})),X(oo.prototype,"entries",(function(){var t,r,e,n,o,i,a;if(!ro(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,t=this._buffer,n=this._length,i=-1,a=-2,X(e={},"next",(function(){var r;if(i+=1,o||i>=n)return{done:!0};return r=new $n(t[a+=2],t[a+1]),{value:[i,r],done:!1}})),X(e,"return",(function(t){if(o=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),Jn&&X(e,Jn,(function(){return r.entries()})),e})),X(oo.prototype,"every",(function(t,r){var e,n;if(!ro(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yt(t))throw new TypeError(k("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n1){if(!Jr(r))throw new TypeError(k("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=o)<0&&(r=0),arguments.length>2){if(!Jr(e))throw new TypeError(k("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=o)<0&&(e=0),e>o&&(e=o)}else e=o}else r=0,e=o;for(a=Zn(t),f=Xn(t),s=r;s=0;n--)if(o=no(e,n),t.call(r,o,n,this))return o})),X(oo.prototype,"findLastIndex",(function(t,r){var e,n,o;if(!ro(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yt(t))throw new TypeError(k("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(o=no(e,n),t.call(r,o,n,this))return n;return-1})),X(oo.prototype,"forEach",(function(t,r){var e,n,o;if(!ro(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yt(t))throw new TypeError(k("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n=this._length))return no(this._buffer,t)})),X(oo.prototype,"includes",(function(t,r){var e,n,o,i,a;if(!ro(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nn(t))throw new TypeError(k("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Jr(r))throw new TypeError(k("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(o=Zn(t),i=Xn(t),e=this._buffer,a=r;a1){if(!Jr(r))throw new TypeError(k("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(o=Zn(t),i=Xn(t),e=this._buffer,a=r;a1){if(!Jr(r))throw new TypeError(k("invalid argument. Second argument must be an integer. Value: `%s`.",r));r>=this._length?r=this._length-1:r<0&&(r+=this._length)}else r=this._length-1;for(o=Zn(t),i=Xn(t),e=this._buffer,a=r;a>=0;a--)if(o===e[n=2*a]&&i===e[n+1])return a;return-1})),xt(oo.prototype,"length",(function(){return this._length})),X(oo.prototype,"map",(function(t,r){var e,n,o,i,a;if(!ro(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yt(t))throw new TypeError(k("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,e=(o=new this.constructor(this._length))._buffer,i=0;i1)n=r,i=0;else{if(0===o)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=no(e,0),i=1}for(;i1){if(!Ce(e=arguments[1]))throw new TypeError(k("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Nn(t)){if(e>=this._length)throw new RangeError(k("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=Zn(t),void(n[e+1]=Xn(t))}if(ro(t)){if(e+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=t._buffer,u=n.byteOffset+e*Qn,r.buffer===n.buffer&&r.byteOffsetu){for(o=new fn(r.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=t,u=n.byteOffset+e*Qn,r.buffer===n.buffer&&r.byteOffsetu){for(o=new fn(a),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,s=0;sf&&(r=f)}}for(e=to&&(r=o)}}return t>=o?(o=0,e=n.byteLength):t>=r?(o=0,e=n.byteOffset+t*Qn):(o=r-t,e=n.byteOffset+t*Qn),new this.constructor(n.buffer,e,o<0?0:o)})),X(oo.prototype,"toReversed",(function(){var t,r,e,n,o,i;if(!ro(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=new this.constructor(e),n=this._buffer,t=r._buffer,o=0;o=o)throw new RangeError(k("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!Nn(r))throw new TypeError(k("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(e=(n=new this.constructor(this._buffer))._buffer)[2*t]=Zn(r),e[2*t+1]=Xn(r),n})),X(io,"BYTES_PER_ELEMENT",8),X(io.prototype,"BYTES_PER_ELEMENT",8),X(io.prototype,"byteLength",16),X(io.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),X(io.prototype,"toJSON",(function(){var t={type:"Complex128"};return t.re=this.re,t.im=this.im,t}));var uo=2*hr.BYTES_PER_ELEMENT,lo=Gn();function co(t){return t instanceof go||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function ho(t){return t===go||"Complex64Array"===t.name}function po(t,r){return new io(t[r*=2],t[r+1])}function go(){var t,r,e,n;if(r=arguments.length,!(this instanceof go))return 0===r?new go:1===r?new go(arguments[0]):2===r?new go(arguments[0],arguments[1]):new go(arguments[0],arguments[1],arguments[2]);if(0===r)e=new hr(0);else if(1===r)if(Ce(arguments[0]))e=new hr(2*arguments[0]);else if(ae(arguments[0]))if((n=(e=arguments[0]).length)&&s(e)&&Nn(e[0])){if(e=function(t,r){var e,n,o,i;for(e=r.length,i=0,o=0;oe.byteLength-t)throw new RangeError(k("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*uo));e=new hr(e,t,2*n)}}return X(this,"_buffer",e),X(this,"_length",e.length/2),this}X(go,"BYTES_PER_ELEMENT",uo),X(go,"name","Complex128Array"),X(go,"from",(function(t){var r,e,n,o,i,a,f,s,l,c,h,p;if(!yt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ho(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!yt(n=arguments[1]))throw new TypeError(k("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(r=arguments[2])}if(co(t)){if(s=t.length,n){for(i=(o=new this(s))._buffer,p=0,h=0;h=2))throw new TypeError(k("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));i[p]=c[0],i[p+1]=c[1]}p+=2}return o}return new this(t)}if(ae(t)){if(n){for(s=t.length,f=t.get&&t.set?He("default"):tn("default"),h=0;h=2))throw new TypeError(k("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));i[p]=c[0],i[p+1]=c[1]}p+=2}return o}return new this(t)}if(u(t)&&lo&&yt(t[Jn])){if(!yt((i=t[Jn]()).next))throw new TypeError(k("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=n?function(t,r,e){var n,o,i,a;for(n=[],a=-1;!(o=t.next()).done;)if(a+=1,Pn(i=r.call(e,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!Nn(i))return new TypeError(k("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));n.push(ao(i),fo(i))}return n}(i,n,r):so(i),a instanceof Error)throw a;for(i=(o=new this(s=a.length/2))._buffer,h=0;h=this._length))return po(this._buffer,t)})),xt(go.prototype,"buffer",(function(){return this._buffer.buffer})),xt(go.prototype,"byteLength",(function(){return this._buffer.byteLength})),xt(go.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),X(go.prototype,"BYTES_PER_ELEMENT",go.BYTES_PER_ELEMENT),X(go.prototype,"copyWithin",(function(t,r){if(!co(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*t,2*r):this._buffer.copyWithin(2*t,2*r,2*arguments[2]),this})),X(go.prototype,"entries",(function(){var t,r,e,n,o,i,a;if(!co(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,t=this._buffer,n=this._length,i=-1,a=-2,X(e={},"next",(function(){var r;if(i+=1,o||i>=n)return{done:!0};return r=new io(t[a+=2],t[a+1]),{value:[i,r],done:!1}})),X(e,"return",(function(t){if(o=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),Jn&&X(e,Jn,(function(){return r.entries()})),e})),X(go.prototype,"every",(function(t,r){var e,n;if(!co(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yt(t))throw new TypeError(k("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n1){if(!Jr(r))throw new TypeError(k("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=o)<0&&(r=0),arguments.length>2){if(!Jr(e))throw new TypeError(k("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=o)<0&&(e=0),e>o&&(e=o)}else e=o}else r=0,e=o;for(a=ao(t),f=fo(t),s=r;s=0;n--)if(o=po(e,n),t.call(r,o,n,this))return o})),X(go.prototype,"findLastIndex",(function(t,r){var e,n,o;if(!co(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yt(t))throw new TypeError(k("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=this._length-1;n>=0;n--)if(o=po(e,n),t.call(r,o,n,this))return n;return-1})),X(go.prototype,"forEach",(function(t,r){var e,n,o;if(!co(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yt(t))throw new TypeError(k("invalid argument. First argument must be a function. Value: `%s`.",t));for(e=this._buffer,n=0;n=this._length))return po(this._buffer,t)})),xt(go.prototype,"length",(function(){return this._length})),X(go.prototype,"includes",(function(t,r){var e,n,o,i,a;if(!co(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Nn(t))throw new TypeError(k("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Jr(r))throw new TypeError(k("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(o=ao(t),i=fo(t),e=this._buffer,a=r;a1){if(!Jr(r))throw new TypeError(k("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(o=ao(t),i=fo(t),e=this._buffer,a=r;a1){if(!Jr(r))throw new TypeError(k("invalid argument. Second argument must be an integer. Value: `%s`.",r));r>=this._length?r=this._length-1:r<0&&(r+=this._length)}else r=this._length-1;for(o=ao(t),i=fo(t),e=this._buffer,a=r;a>=0;a--)if(o===e[n=2*a]&&i===e[n+1])return a;return-1})),X(go.prototype,"map",(function(t,r){var e,n,o,i,a;if(!co(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yt(t))throw new TypeError(k("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,e=(o=new this.constructor(this._length))._buffer,i=0;i1)n=r,i=0;else{if(0===o)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=po(e,0),i=1}for(;i1){if(!Ce(e=arguments[1]))throw new TypeError(k("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Nn(t)){if(e>=this._length)throw new RangeError(k("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=ao(t),void(n[e+1]=fo(t))}if(co(t)){if(e+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=t._buffer,u=n.byteOffset+e*uo,r.buffer===n.buffer&&r.byteOffsetu){for(o=new hr(r.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=t,u=n.byteOffset+e*uo,r.buffer===n.buffer&&r.byteOffsetu){for(o=new hr(a),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,s=0;sf&&(r=f)}}for(e=to&&(r=o)}}return t>=o?(o=0,e=n.byteLength):t>=r?(o=0,e=n.byteOffset+t*uo):(o=r-t,e=n.byteOffset+t*uo),new this.constructor(n.buffer,e,o<0?0:o)})),X(go.prototype,"toReversed",(function(){var t,r,e,n,o,i;if(!co(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=new this.constructor(e),n=this._buffer,t=r._buffer,o=0;o=o)throw new RangeError(k("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!Nn(r))throw new TypeError(k("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(e=(n=new this.constructor(this._buffer))._buffer)[2*t]=ao(r),e[2*t+1]=fo(r),n}));var yo=[hr,fn,mn,hn,En,nr,Bn,qt,jn,oo,go],mo=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128"],wo=mo.length;function vo(t){var r;if(s(t))return"generic";if(pt(t))return null;for(r=0;rr?r:t}function Yo(t,r){var e=r+1;return t<0?((t+=e)<0&&0!==(t%=e)&&(t+=e),t):t>r?((t-=e)>r&&(t%=e),t):t}function Do(t,r){return t<0?(t+=r+1)<0?-1:t:t>r?-1:t}var zo=bo(Te()),Wo={wrap:Yo,clamp:ko,normalize:function(t,r){var e=Do(t,r);if(e<0||e>r)throw new RangeError(k("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",r,t));return e},throw:function(t,r){if(t<0||t>r)throw new RangeError(k("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",r,t));return t}};function Go(t,r,e){var n;if("clamp"===e)return ko(t,r);if("wrap"===e)return Yo(t,r);if(n=t,"normalize"===e&&(n=Do(n,r)),n<0||n>r)throw new RangeError(k("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",r,t));return n}X(Go,"factory",(function(t){if(!zo(t))throw new TypeError(k("invalid argument. First argument must be a recognized index mode. Value: `%s`.",t));return Wo[t]}));var Jo=Me.prototype.iget;var $o=Me.prototype.iset;function Zo(t,r){var e,n;for(e=[],n=0;n0))throw new TypeError(k("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",e));if((u=e.length)>Xo)throw new RangeError(k("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",Xo,u));if(!So(n))throw new TypeError(k("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",n));if(u>0){if(n.length!==u)throw new RangeError(k("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",u,n.length))}else{if(1!==n.length)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(0!==n[0])throw new RangeError(k("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",n[0]))}if(!Ce(i))throw new TypeError(k("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",i));if(!Ro(a))throw new TypeError(k("invalid argument. Sixth argument must be a supported order. Value: `%s`.",a));if(u>0&&!function(t,r,e,n){var o=Bt(r,e,n);return o[0]>=0&&o[1]0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if((l={}).mode=Ko,l.readonly=qo,arguments.length>6&&(c=function(t,r){var e;if(!Et(r))return new TypeError(k("invalid argument. Options argument must be an object. Value: `%s`.",r));if(o(r,"mode")&&(t.mode=r.mode,!zo(t.mode)))return new TypeError(k("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",t.mode));if(o(r,"submode")){if(t.submode=r.submode,!s(t.submode))return new TypeError(k("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode));if(0===t.submode.length)return new TypeError(k("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode.join(",")));for(e=0;e0){if(!Zr(t))throw new TypeError(k("invalid argument. Index must be an integer. Value: `%s`.",t));return t=Go(t,this._length-1,this._mode),Jo.call(this,t)}return Jo.call(this)})),X(Ho.prototype,"set",(function(){var t,r,e,n;if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(arguments.length!==this._ndims+1)throw new RangeError(k("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,e=this._submode.length,n=0;n0){if(!Zr(t))throw new TypeError(k("invalid argument. Index must be an integer. Value: `%s`.",t));t=Go(t,this._length-1,this._mode),$o.call(this,t,r)}else $o.call(this,t);return this}));var Qo={float64:hr,float32:fn,generic:Array,int16:En,int32:mn,int8:Bn,uint16:nr,uint32:hn,uint8:qt,uint8c:jn,complex64:oo,complex128:go};function ti(t){return function(t,r){var e,n;for(e=[],n=0;n1?arguments[1]:oi))return ti(t);if(e=function(t){return Qo[t]||null}(r),null===e)throw new TypeError(k("invalid argument. Second argument must be a recognized data type. Value: `%s`.",r));return new e(t)}function ai(t){if(t.__esModule)return t;var r=t.default;if("function"==typeof r){var e=function t(){return this instanceof t?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};e.prototype=r.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(t).forEach((function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})})),e}var fi="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},si=[],ui=[],li="undefined"!=typeof Uint8Array?Uint8Array:Array,ci=!1;function hi(){ci=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)si[r]=t[r],ui[t.charCodeAt(r)]=r;ui["-".charCodeAt(0)]=62,ui["_".charCodeAt(0)]=63}function pi(t,r,e){for(var n,o,i=[],a=r;a>18&63]+si[o>>12&63]+si[o>>6&63]+si[63&o]);return i.join("")}function gi(t){var r;ci||hi();for(var e=t.length,n=e%3,o="",i=[],a=16383,f=0,s=e-n;fs?s:f+a));return 1===n?(r=t[e-1],o+=si[r>>2],o+=si[r<<4&63],o+="=="):2===n&&(r=(t[e-2]<<8)+t[e-1],o+=si[r>>10],o+=si[r>>4&63],o+=si[r<<2&63],o+="="),i.push(o),i.join("")}function di(t,r,e,n,o){var i,a,f=8*o-n-1,s=(1<>1,l=-7,c=e?o-1:0,h=e?-1:1,p=t[r+c];for(c+=h,i=p&(1<<-l)-1,p>>=-l,l+=f;l>0;i=256*i+t[r+c],c+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[r+c],c+=h,l-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=u}return(p?-1:1)*a*Math.pow(2,i-n)}function yi(t,r,e,n,o,i){var a,f,s,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,g=n?1:-1,d=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,a=l):(a=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-a))<1&&(a--,s*=2),(r+=a+c>=1?h/s:h*Math.pow(2,1-c))*s>=2&&(a++,s/=2),a+c>=l?(f=0,a=l):a+c>=1?(f=(r*s-1)*Math.pow(2,o),a+=c):(f=r*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;t[e+p]=255&f,p+=g,f/=256,o-=8);for(a=a<0;t[e+p]=255&a,p+=g,a/=256,u-=8);t[e+p-g]|=128*d}var mi={}.toString,wi=Array.isArray||function(t){return"[object Array]"==mi.call(t)};Ei.TYPED_ARRAY_SUPPORT=void 0===fi.TYPED_ARRAY_SUPPORT||fi.TYPED_ARRAY_SUPPORT;var vi=bi();function bi(){return Ei.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _i(t,r){if(bi()=bi())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+bi().toString(16)+" bytes");return 0|t}function Oi(t){return!(null==t||!t._isBuffer)}function Vi(t,r){if(Oi(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return ea(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return na(t).length;default:if(n)return ea(t).length;r=(""+r).toLowerCase(),n=!0}}function Si(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Gi(this,r,e);case"utf8":case"utf-8":return Yi(this,r,e);case"ascii":return zi(this,r,e);case"latin1":case"binary":return Wi(this,r,e);case"base64":return ki(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ji(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Ii(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function Bi(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=Ei.from(r,n)),Oi(r))return 0===r.length?-1:Pi(t,r,e,n,o);if("number"==typeof r)return r&=255,Ei.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):Pi(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function Pi(t,r,e,n,o){var i,a=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;a=2,f/=2,s/=2,e/=2}function u(t,r){return 1===a?t[r]:t.readUInt16BE(r*a)}if(o){var l=-1;for(i=e;if&&(e=f-s),i=e;i>=0;i--){for(var c=!0,h=0;ho&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function ki(t,r,e){return 0===r&&e===t.length?gi(t):gi(t.slice(r,e))}function Yi(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o239?4:u>223?3:u>191?2:1;if(o+c<=e)switch(c){case 1:u<128&&(l=u);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&u)<<6|63&i)>127&&(l=s);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(s=(15&u)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:i=t[o+1],a=t[o+2],f=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&f)&&(s=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&f)>65535&&s<1114112&&(l=s)}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=c}return function(t){var r=t.length;if(r<=Di)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),""},Ei.prototype.compare=function(t,r,e,n,o){if(!Oi(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(e>>>=0)-(r>>>=0),f=Math.min(i,a),s=this.slice(n,o),u=t.slice(r,e),l=0;lo)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return Ui(this,t,r,e);case"utf8":case"utf-8":return Li(this,t,r,e);case"ascii":return Mi(this,t,r,e);case"latin1":case"binary":return Fi(this,t,r,e);case"base64":return Ci(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ni(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Ei.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Di=4096;function zi(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;on)&&(e=n);for(var o="",i=r;ie)throw new RangeError("Trying to access beyond buffer length")}function Zi(t,r,e,n,o,i){if(!Oi(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||rt.length)throw new RangeError("Index out of range")}function Xi(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o>>8*(n?o:1-o)}function Ki(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o>>8*(n?o:3-o)&255}function qi(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Hi(t,r,e,n,o){return o||qi(t,0,e,4),yi(t,r,e,n,23,4),e+4}function Qi(t,r,e,n,o){return o||qi(t,0,e,8),yi(t,r,e,n,52,8),e+8}Ei.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(o*=256);)n+=this[t+--r]*o;return n},Ei.prototype.readUInt8=function(t,r){return r||$i(t,1,this.length),this[t]},Ei.prototype.readUInt16LE=function(t,r){return r||$i(t,2,this.length),this[t]|this[t+1]<<8},Ei.prototype.readUInt16BE=function(t,r){return r||$i(t,2,this.length),this[t]<<8|this[t+1]},Ei.prototype.readUInt32LE=function(t,r){return r||$i(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Ei.prototype.readUInt32BE=function(t,r){return r||$i(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Ei.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||$i(t,r,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*r)),n},Ei.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||$i(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},Ei.prototype.readInt8=function(t,r){return r||$i(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Ei.prototype.readInt16LE=function(t,r){r||$i(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},Ei.prototype.readInt16BE=function(t,r){r||$i(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},Ei.prototype.readInt32LE=function(t,r){return r||$i(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Ei.prototype.readInt32BE=function(t,r){return r||$i(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Ei.prototype.readFloatLE=function(t,r){return r||$i(t,4,this.length),di(this,t,!0,23,4)},Ei.prototype.readFloatBE=function(t,r){return r||$i(t,4,this.length),di(this,t,!1,23,4)},Ei.prototype.readDoubleLE=function(t,r){return r||$i(t,8,this.length),di(this,t,!0,52,8)},Ei.prototype.readDoubleBE=function(t,r){return r||$i(t,8,this.length),di(this,t,!1,52,8)},Ei.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||Zi(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i=0&&(i*=256);)this[r+o]=t/i&255;return r+e},Ei.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,1,255,0),Ei.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},Ei.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,2,65535,0),Ei.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):Xi(this,t,r,!0),r+2},Ei.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,2,65535,0),Ei.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):Xi(this,t,r,!1),r+2},Ei.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,4,4294967295,0),Ei.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):Ki(this,t,r,!0),r+4},Ei.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,4,4294967295,0),Ei.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):Ki(this,t,r,!1),r+4},Ei.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);Zi(this,t,r,e,o-1,-o)}var i=0,a=1,f=0;for(this[r]=255&t;++i>0)-f&255;return r+e},Ei.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);Zi(this,t,r,e,o-1,-o)}var i=e-1,a=1,f=0;for(this[r+i]=255&t;--i>=0&&(a*=256);)t<0&&0===f&&0!==this[r+i+1]&&(f=1),this[r+i]=(t/a>>0)-f&255;return r+e},Ei.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,1,127,-128),Ei.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},Ei.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,2,32767,-32768),Ei.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):Xi(this,t,r,!0),r+2},Ei.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,2,32767,-32768),Ei.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):Xi(this,t,r,!1),r+2},Ei.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,4,2147483647,-2147483648),Ei.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):Ki(this,t,r,!0),r+4},Ei.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||Zi(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Ei.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):Ki(this,t,r,!1),r+4},Ei.prototype.writeFloatLE=function(t,r,e){return Hi(this,t,r,!0,e)},Ei.prototype.writeFloatBE=function(t,r,e){return Hi(this,t,r,!1,e)},Ei.prototype.writeDoubleLE=function(t,r,e){return Qi(this,t,r,!0,e)},Ei.prototype.writeDoubleBE=function(t,r,e){return Qi(this,t,r,!1,e)},Ei.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--o)t[o+r]=this[o+e];else if(i<1e3||!Ei.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function na(t){return function(t){var r,e,n,o,i,a;ci||hi();var f=t.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[f-2]?2:"="===t[f-1]?1:0,a=new li(3*f/4-i),n=i>0?f-4:f;var s=0;for(r=0,e=0;r>16&255,a[s++]=o>>8&255,a[s++]=255&o;return 2===i?(o=ui[t.charCodeAt(r)]<<2|ui[t.charCodeAt(r+1)]>>4,a[s++]=255&o):1===i&&(o=ui[t.charCodeAt(r)]<<10|ui[t.charCodeAt(r+1)]<<4|ui[t.charCodeAt(r+2)]>>2,a[s++]=o>>8&255,a[s++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(ta,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function oa(t,r,e,n){for(var o=0;o=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function ia(t){return null!=t&&(!!t._isBuffer||aa(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&aa(t.slice(0,0))}(t))}function aa(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}ai(Object.freeze({__proto__:null,Buffer:Ei,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),Ei.alloc(+t)},isBuffer:ia,kMaxLength:vi})).Buffer;var fa=function(){throw new Error("not implemented")};var sa=yt(fa.allocUnsafe)?function(t){if(!ke(t))throw new TypeError(k("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return fa.allocUnsafe(t)}:function(t){if(!ke(t))throw new TypeError(k("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return new fa(t)};function ua(t){var r,e,n,i,a,f,s,u;if(!Fe(t))throw new TypeError(k("invalid argument. First argument must be an ndarray-like object. Value: `%s`.",t));if(i={},arguments.length>1){if(!Et(r=arguments[1]))throw new TypeError(k("invalid argument. Options argument must be an object. Value: `%s`.",r));if(e=o(r,"dtype")?r.dtype:Eo(t),o(r,"shape")){if("number"==typeof(u=r.shape)&&(u=[u]),!ze(u))throw new TypeError(k("invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.","shape",u))}else u=To(t);n=o(r,"order")?r.order:Vo(t),o(r,"mode")&&(i.mode=r.mode),o(r,"submode")&&(i.submode=r.submode)}else e=Eo(t),u=To(t),n=Vo(t);return u.length>0?(f=Ze(u),s=Je(u,n)):(f=1,s=[0]),a="binary"===e?sa(f):function(t){return arguments.length>1?ii(t,arguments[1]):ii(t)}(f,e),new Ho(e,a,u,s,$e(u,s),n,i)}var la={complex128:function(t,r,e){t.set(e,r)},complex64:function(t,r,e){t.set(e,r)},default:function(t,r,e){t.set(e,r)}};function ca(t){var r=la[t];return"function"==typeof r?r:la.default}var ha={float64:function(t,r,e){t[r]=e},float32:function(t,r,e){t[r]=e},int32:function(t,r,e){t[r]=e},int16:function(t,r,e){t[r]=e},int8:function(t,r,e){t[r]=e},uint32:function(t,r,e){t[r]=e},uint16:function(t,r,e){t[r]=e},uint8:function(t,r,e){t[r]=e},uint8c:function(t,r,e){t[r]=e},generic:function(t,r,e){t[r]=e},default:function(t,r,e){t[r]=e}};function pa(t){var r=ha[t];return"function"==typeof r?r:ha.default}function ga(t){var r,e,n;for(e=t.length,r=[],n=0;n=0&&a=0&&!(((u=t[i])<0?-u:u)<=e);)t[i+1]=u,r[a+1]=r[a],i-=1,a-=1;t[i+1]=f,r[a+1]=s,n+=1,o+=1}}(r=ga(r),n),{sh:t=Aa(t,n),sx:r,sy:e=Aa(e,n)}}X(Ea,"assign",(function(t,r,e){var n=Ta(t);return n.accessorProtocol?"complex128"===n.dtype?xa(t,qn(t,0),r,e):"complex64"===n.dtype?xa(t,Kn(t,0),r,e):function(t,r,e){var n,o,i,a;for(n=t.data,o=t.accessors[1],a=e,i=0;a>=0&&a=0&&on?ja.BLOCK_SIZE_IN_BYTES/e|0:ja.BLOCK_SIZE_IN_BYTES/n|0}function Va(t){var r;return function(t,r){return"function"==typeof t[r]}(t,"reverse")?t.reverse():(r=Ta(t)).accessorProtocol?function(t){var r,e,n,o,i,a,f,s;for(r=t.data,e=t.accessors[0],n=t.accessors[1],i=Gr(r.length/2),a=r.length-1,f=0;f=f&&(o=f-1);else if("wrap"===i)o<0?(o+=f)<0&&0!==(o%=f)&&(o+=f):o>=f&&(o-=f)>=f&&(o%=f);else if("normalize"===i&&o<0&&(o+=f),o<0||o>=f)throw new RangeError(k("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",f,o));if(s=e,"column-major"===n){for(l=0;l=0;l--)o-=u=o%t[l],o/=t[l],s+=u*r[l];return s}var Ia=Math.ceil;function Ba(t){return t<0?Ia(t):Gr(t)}function Pa(t,r,e,n,o,i,a){var f,s,u,l,c;for(f=t.length,s=1,c=0;c=s&&(o=s-1);else if("wrap"===i)o<0?(o+=s)<0&&0!==(o%=s)&&(o+=s):o>=s&&(o-=s)>=s&&(o%=s);else if("normalize"===i&&o<0&&(o+=s),o<0||o>=s)throw new RangeError(k("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",s,o));if(0===e){if("column-major"===n){for(c=0;c=0;c--)o-=l=o%t[c],o/=t[c],a[c]=l;return a}if("column-major"===n){for(c=f-1;c>=0;c--)(l=r[c])<0?(o-=(u=Ba(o/l))*l,a[c]=t[c]-1+u):(o-=(u=Ba(o/l))*l,a[c]=u);return a}for(c=0;c0;)for(R0;)for(A0;)for(P0;)for(B0;)for(I0;)for(k0;)for(N0;)for(C0;)for(F0;)for($0;)for(J0;)for(G0;)for(W0;)for(z0;)for(tt0;)for(Q0;)for(H0;)for(q0;)for(K0;)for(X0;)for(ft0;)for(at0;)for(it0;)for(ot0;)for(nt0;)for(et0;)for(rt0;)for(gt0;)for(pt0;)for(ht0;)for(ct0;)for(lt0;)for(ut0;)for(st0;)for(ft0;)for(_t0;)for(bt0;)for(vt0;)for(wt0;)for(mt0;)for(yt0;)for(dt0;)for(gt0;)for(pt0;)for(Ot0;)for(jt0;)for(Rt0;)for(At0;)for(xt0;)for(Tt0;)for(Et0;)for(_t0;)for(bt0;)for(vt0;)for(O0;)for(j0;)for(L0;)for(U0;)for(P0;)for(D0;)for(Y0;)for(k0;)for(N0;)for(X0;)for(Z0;)for($0;)for(J0;)for(G0;)for(et0;)for(rt0;)for(tt0;)for(Q0;)for(H0;)for(q0;)for(ut0;)for(st0;)for(ft0;)for(at0;)for(it0;)for(ot0;)for(nt0;)for(yt0;)for(dt0;)for(gt0;)for(pt0;)for(ht0;)for(ct0;)for(lt0;)for(ut0;)for(Tt0;)for(Et0;)for(_t0;)for(bt0;)for(vt0;)for(wt0;)for(mt0;)for(yt0;)for(dt0;)for(St0;)for(Vt0;)for(Ot0;)for(jt0;)for(Rt0;)for(At0;)for(xt0;)for(Tt0;)for(Et0;)for(_t\n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\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/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\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 toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\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// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\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 Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\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\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\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 a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default 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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\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\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\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\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\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\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\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\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default 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/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\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* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\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\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\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\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e' );\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\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// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\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\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating whether a value is `NaN`.\n*\n* @private\n* @param {*} value - input value\n* @returns {boolean} boolean indicating whether a value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 4 );\n* // returns false\n*/\nfunction isnan( value ) { // explicitly define a function here instead of `@stdlib/math/base/assert/is-nan` in order to avoid circular dependencies\n\treturn ( value !== value );\n}\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\ttoken.arg = String( token.arg );\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ? String( token.arg ) : fromCharCode( num ); // eslint-disable-line max-len\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\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 RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\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\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\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/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\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* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\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\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\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\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\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* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\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* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\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// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\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\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\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* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\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 obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\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\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\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\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @private\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\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/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\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\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\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\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\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 regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\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\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\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* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\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* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default 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\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\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\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\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\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\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* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default 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\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\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\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\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\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\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\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\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* Returns an object.\n*\n* @name Object\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {Object} object\n*\n* @example\n* var o = new Object( null );\n* // returns {}\n*\n* @example\n* var o = new Object( 5.0 );\n* // returns \n*\n* @example\n* var o = new Object( 'beep' );\n* // returns \n*\n* @example\n* var o1 = {};\n*\n* var o2 = new Object( o1 );\n* // returns {}\n*\n* var bool = ( o1 === o2 );\n* // returns true\n*/\nvar Obj = Object; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Obj;\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\nimport isFunction from '@stdlib/assert-is-function';\nimport builtin from './native.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar getProto;\nif ( isFunction( Object.getPrototypeOf ) ) {\n\tgetProto = builtin;\n} else {\n\tgetProto = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\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 getProto = Object.getPrototypeOf;\n\n\n// EXPORTS //\n\nexport default getProto;\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\nimport nativeClass from '@stdlib/utils-native-class';\nimport getProto from './proto.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {(Object|null)} prototype\n*/\nfunction getPrototypeOf( obj ) {\n\tvar proto = getProto( obj );\n\tif ( proto || proto === null ) {\n\t\treturn proto;\n\t}\n\tif ( nativeClass( obj.constructor ) === '[object Function]' ) {\n\t\t// May break if the constructor has been tampered with...\n\t\treturn obj.constructor.prototype;\n\t}\n\tif ( obj instanceof Object ) {\n\t\treturn Object.prototype;\n\t}\n\t// Return `null` for objects created via `Object.create( null )`. Also return `null` for cross-realm objects on browsers that lack `__proto__` support, such as IE < 11.\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\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* Returns the value of the `__proto__` property.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {*} value of `__proto__` property\n*/\nfunction getProto( obj ) {\n\t// eslint-disable-next-line no-proto\n\treturn obj.__proto__;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\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\nimport isObject from '@stdlib/assert-is-object';\nimport isFunction from '@stdlib/assert-is-function';\nimport getPrototypeOf from '@stdlib/utils-get-prototype-of';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar objectPrototype = Object.prototype;\n\n\n// FUNCTIONS //\n\n/**\n* Tests that an object only has own properties.\n*\n* @private\n* @param {Object} obj - value to test\n* @returns {boolean} boolean indicating if an object only has own properties\n*/\nfunction ownProps( obj ) {\n\tvar key;\n\n\t// NOTE: possibility of perf boost if key enumeration order is known (see http://stackoverflow.com/questions/18531624/isplainobject-thing).\n\tfor ( key in obj ) {\n\t\tif ( !hasOwnProp( obj, key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n\n// MAIN //\n\n/**\n* Tests if a value is a plain object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a plain object\n*\n* @example\n* var bool = isPlainObject( {} );\n* // returns true\n*\n* @example\n* var bool = isPlainObject( null );\n* // returns false\n*/\nfunction isPlainObject( value ) {\n\tvar proto;\n\n\t// Screen for obvious non-objects...\n\tif ( !isObject( value ) ) {\n\t\treturn false;\n\t}\n\t// Objects with no prototype (e.g., `Object.create( null )`) are plain...\n\tproto = getPrototypeOf( value );\n\tif ( !proto ) {\n\t\treturn true;\n\t}\n\t// Objects having a prototype are plain if and only if they are constructed with a global `Object` function and the prototype points to the prototype of a plain object...\n\treturn (\n\t\t// Cannot have own `constructor` property:\n\t\t!hasOwnProp( value, 'constructor' ) &&\n\n\t\t// Prototype `constructor` property must be a function (see also https://bugs.jquery.com/ticket/9897 and http://stackoverflow.com/questions/18531624/isplainobject-thing):\n\t\thasOwnProp( proto, 'constructor' ) &&\n\t\tisFunction( proto.constructor ) &&\n\t\tnativeClass( proto.constructor ) === '[object Function]' &&\n\n\t\t// Test for object-specific method:\n\t\thasOwnProp( proto, 'isPrototypeOf' ) &&\n\t\tisFunction( proto.isPrototypeOf ) &&\n\n\t\t(\n\t\t\t// Test if the prototype matches the global `Object` prototype (same realm):\n\t\t\tproto === objectPrototype ||\n\n\t\t\t// Test that all properties are own properties (cross-realm; *most* likely a plain object):\n\t\t\townProps( value )\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isPlainObject;\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\nimport Object from '@stdlib/object-ctor';\nimport getProto from './detect.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @param {*} value - input value\n* @returns {(Object|null)} prototype\n*\n* @example\n* var proto = getPrototypeOf( {} );\n* // returns {}\n*/\nfunction getPrototypeOf( value ) {\n\tif (\n\t\tvalue === null ||\n\t\tvalue === void 0\n\t) {\n\t\treturn null;\n\t}\n\t// In order to ensure consistent ES5/ES6 behavior, cast input value to an object (strings, numbers, booleans); ES5 `Object.getPrototypeOf` throws when provided primitives and ES6 `Object.getPrototypeOf` casts:\n\tvalue = Object( value );\n\n\treturn getProto( value );\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\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\nimport getGlobal from '@stdlib/utils-global';\n\n\n// VARIABLES //\n\nvar Global = getGlobal();\n\n\n// MAIN //\n\n/**\n* Tests for native `BigInt` support.\n*\n* @returns {boolean} boolean indicating if an environment has `BigInt` support\n*\n* @example\n* var bool = hasBigIntSupport();\n* // returns \n*/\nfunction hasBigIntSupport() {\n\treturn (\n\t\ttypeof Global.BigInt === 'function' &&\n\t\ttypeof BigInt === 'function' && // eslint-disable-line stdlib/require-globals\n\t\ttypeof Global.BigInt( '1' ) === 'bigint' &&\n\t\ttypeof BigInt( '1' ) === 'bigint' // eslint-disable-line stdlib/require-globals, no-undef\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasBigIntSupport;\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\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\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\nimport BYTES_PER_ELEMENT from './bytes_per_element.json';\n\n\n// MAIN //\n\n/**\n* Returns the number of bytes per element provided an underlying array data type.\n*\n* @param {string} dtype - data type\n* @returns {(NonNegativeInteger|null)} number of bytes per element\n*\n* @example\n* var nbytes = bytesPerElement( 'float64' );\n* // returns 8\n*\n* nbytes = bytesPerElement( 'generic' );\n* // returns null\n*/\nfunction bytesPerElement( dtype ) {\n\treturn BYTES_PER_ELEMENT[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default bytesPerElement;\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/**\n* Returns array iteration order.\n*\n* ## Notes\n*\n* - Return value key:\n*\n* - `0`: unordered (i.e., strides of mixed sign; e.g., `[ 9, -3, 1 ]`)\n* - `1`: ordered left-to-right (i.e., all nonnegative strides)\n* - `-1`: ordered right-to-left (i.e., all negative strides)\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} iteration order\n*\n* @example\n* var o = iterationOrder( [ 2, 1 ] );\n* // returns 1\n*\n* o = iterationOrder( [ -2, 1 ] );\n* // returns 0\n*\n* o = iterationOrder( [ -2, -1 ] );\n* // returns -1\n*/\nfunction iterationOrder( strides ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < strides.length; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\tif ( cnt === 0 ) {\n\t\t// All nonnegative strides:\n\t\treturn 1|0; // asm-type annotation\n\t}\n\tif ( cnt === strides.length ) {\n\t\t// All negative strides:\n\t\treturn -1|0; // asm-type annotation\n\t}\n\t// Strides of mixed signs:\n\treturn 0|0; // asm-type annotation\n}\n\n\n// EXPORTS //\n\nexport default iterationOrder;\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* Computes the absolute value of a double-precision floating-point number `x`.\n*\n* @param {number} x - input value\n* @returns {number} absolute value\n*\n* @example\n* var v = abs( -1.0 );\n* // returns 1.0\n*\n* @example\n* var v = abs( 2.0 );\n* // returns 2.0\n*\n* @example\n* var v = abs( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( -0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( NaN );\n* // returns NaN\n*/\nfunction abs( x ) {\n\treturn Math.abs( x ); // eslint-disable-line stdlib/no-builtin-math\n}\n\n\n// EXPORTS //\n\nexport default abs;\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\nimport abs from '@stdlib/math-base-special-abs';\n\n\n// MAIN //\n\n/**\n* Determines the order of a multidimensional array based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} order\n*\n* @example\n* import strides2order from '@stdlib/ndarray-base-strides2order';\n*\n* var order = strides2order( [ 2, 1 ] );\n* // returns 1\n*\n* order = strides2order( [ 1, 2 ] );\n* // returns 2\n*\n* order = strides2order( [ 1, 1, 1 ] );\n* // returns 3\n*\n* order = strides2order( [ 2, 3, 1 ] );\n* // returns 0\n*/\nfunction strides2order( strides ) {\n\tvar column;\n\tvar ndims;\n\tvar row;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0|0; // 'none'\n\t}\n\tcolumn = true;\n\trow = true;\n\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( column && s2 < s1 ) {\n\t\t\tcolumn = false;\n\t\t} else if ( row && s2 > s1 ) {\n\t\t\trow = false;\n\t\t}\n\t\tif ( row || column ) {\n\t\t\ts1 = s2;\n\t\t} else {\n\t\t\treturn 0|0; // 'none'\n\t\t}\n\t}\n\tif ( row && column ) {\n\t\treturn 3|0; // 'both'\n\t}\n\tif ( row ) {\n\t\treturn 1|0; // 'row-major'\n\t}\n\treturn 2|0; // 'column-major'\n}\n\n\n// EXPORTS //\n\nexport default strides2order;\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/**\n* Determines if an array is column-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is column-major contiguous\n*/\nfunction isColumnMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 2 || order === 3 );\n}\n\n\n// EXPORTS //\n\nexport default isColumnMajorContiguous;\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/**\n* Determines if an array is row-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is row-major contiguous\n*/\nfunction isRowMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 1 || order === 3 );\n}\n\n\n// EXPORTS //\n\nexport default isRowMajorContiguous;\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/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {Array} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn [ offset, offset ];\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\treturn [ min, max ];\n}\n\n\n// EXPORTS //\n\nexport default minmaxViewBufferIndex;\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* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\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* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\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* Compute the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @module @stdlib/ndarray-base-minmax-view-buffer-index\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view and assigns results to a provided output array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset, out ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\tout[ 0 ] = offset;\n\t\t\tout[ 1 ] = offset;\n\t\t\treturn out;\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\tout[ 0 ] = min;\n\tout[ 1 ] = max;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default minmaxViewBufferIndex;\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// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\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\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\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* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar RE_CHARS = /[-\\/\\\\^$*+?.()|[\\]{}]/g; // eslint-disable-line no-useless-escape\n\n\n// MAIN //\n\n/**\n* Escapes a regular expression string.\n*\n* @param {string} str - regular expression string\n* @throws {TypeError} first argument must be a string\n* @returns {string} escaped string\n*\n* @example\n* var str = rescape( '[A-Z]*' );\n* // returns '\\\\[A\\\\-Z\\\\]\\\\*'\n*/\nfunction rescape( str ) {\n\tvar len;\n\tvar s;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a regular expression string. Value: `%s`.', str ) );\n\t}\n\t// Check if the string starts with a forward slash...\n\tif ( str[ 0 ] === '/' ) {\n\t\t// Find the last forward slash...\n\t\tlen = str.length;\n\t\tfor ( i = len-1; i >= 0; i-- ) {\n\t\t\tif ( str[ i ] === '/' ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t// If we searched the string to no avail or if the first letter is not `/`, assume that the string is not of the form `/[...]/[guimy]`:\n\tif ( i === void 0 || i <= 0 ) {\n\t\treturn str.replace( RE_CHARS, '\\\\$&' );\n\t}\n\t// We need to de-construct the string...\n\ts = str.substring( 1, i );\n\n\t// Only escape the characters between the `/`:\n\ts = s.replace( RE_CHARS, '\\\\$&' );\n\n\t// Reassemble:\n\tstr = str[ 0 ] + s + str.substring( i );\n\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default rescape;\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\nvar exec = RegExp.prototype.exec; // non-generic\n\n\n// EXPORTS //\n\nexport default exec;\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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2exec.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a regular expression.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a regular expression\n*\n* @example\n* var bool = isRegExp( /\\.+/ );\n* // returns true\n*\n* @example\n* var bool = isRegExp( {} );\n* // returns false\n*/\nfunction isRegExp( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof RegExp ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object RegExp]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isRegExp;\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\nimport exec from './exec.js';\n\n\n// MAIN //\n\n/**\n* Attempts to call a `RegExp` method.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if able to call a `RegExp` method\n*/\nfunction test( value ) {\n\ttry {\n\t\texec.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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* Replaces search occurrences with a replacement string.\n*\n* @param {string} str - input string\n* @param {RegExp} search - search expression\n* @param {(string|Function)} newval - replacement value or function\n* @returns {string} new string containing replacement(s)\n*\n* @example\n* var str = 'Hello World';\n* var out = replace( str, /world/i, 'Mr. President' );\n* // returns 'Hello Mr. President'\n*\n* @example\n* import capitalize from '@stdlib/string-base-capitalize';\n*\n* var str = 'Oranges and lemons say the bells of St. Clement\\'s';\n*\n* function replacer( match, p1 ) {\n* return capitalize( p1 );\n* }\n*\n* var out = replace( str, /([^\\s]*)/gi, replacer );\n* // returns 'Oranges And Lemons Say The Bells Of St. Clement\\'s'\n*/\nfunction replace( str, search, newval ) {\n\treturn str.replace( search, newval );\n}\n\n\n// EXPORTS //\n\nexport default replace;\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\nimport rescape from '@stdlib/utils-escape-regexp-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isRegExp from '@stdlib/assert-is-regexp';\nimport format from '@stdlib/string-format';\nimport base from '@stdlib/string-base-replace';\n\n\n// MAIN //\n\n/**\n* Replaces search occurrences with a replacement string.\n*\n* @param {string} str - input string\n* @param {(string|RegExp)} search - search expression\n* @param {(string|Function)} newval - replacement value or function\n* @throws {TypeError} first argument must be a string\n* @throws {TypeError} second argument argument must be a string or regular expression\n* @throws {TypeError} third argument must be a string or function\n* @returns {string} new string containing replacement(s)\n*\n* @example\n* var str = 'beep';\n* var out = replace( str, 'e', 'o' );\n* // returns 'boop'\n*\n* @example\n* var str = 'Hello World';\n* var out = replace( str, /world/i, 'Mr. President' );\n* // returns 'Hello Mr. President'\n*\n* @example\n* import capitalize from '@stdlib/string-capitalize';\n*\n* var str = 'Oranges and lemons say the bells of St. Clement\\'s';\n*\n* function replacer( match, p1 ) {\n* return capitalize( p1 );\n* }\n*\n* var out = replace( str, /([^\\s]*)/gi, replacer );\n* // returns 'Oranges And Lemons Say The Bells Of St. Clement\\'s'\n*/\nfunction replace( str, search, newval ) {\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\tif ( isString( search ) ) {\n\t\tsearch = new RegExp( rescape( search ), 'g' );\n\t} else if ( !isRegExp( search ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a string or regular expression. Value: `%s`.', search ) );\n\t}\n\tif ( !isString( newval ) && !isFunction( newval ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Third argument must be a string or replacement function. Value: `%s`.', newval ) );\n\t}\n\treturn base( str, search, newval );\n}\n\n\n// EXPORTS //\n\nexport default replace;\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\nimport replace from '@stdlib/string-replace';\nimport real from '@stdlib/complex-float64-real';\nimport imag from '@stdlib/complex-float64-imag';\n\n\n// VARIABLES //\n\nvar CTORS = {\n\t'int8': 'new Int8Array( [ {{data}} ] )',\n\t'uint8': 'new Uint8Array( [ {{data}} ] )',\n\t'uint8c': 'new Uint8ClampedArray( [ {{data}} ] )',\n\t'int16': 'new Int16Array( [ {{data}} ] )',\n\t'uint16': 'new Uint16Array( [ {{data}} ] )',\n\t'int32': 'new Int32Array( [ {{data}} ] )',\n\t'uint32': 'new Uint32Array( [ {{data}} ] )',\n\t'float32': 'new Float32Array( [ {{data}} ] )',\n\t'float64': 'new Float64Array( [ {{data}} ] )',\n\t'generic': '[ {{data}} ]',\n\t'binary': 'new Buffer( [ {{data}} ] )',\n\t'complex64': 'new Complex64Array( [ {{data}} ] )',\n\t'complex128': 'new Complex128Array( [ {{data}} ] )'\n};\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {string} string representation\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar buffer;\n\tvar ndims;\n\tvar ctor;\n\tvar str;\n\tvar dt;\n\tvar v;\n\tvar i;\n\n\tndims = this._shape.length;\n\tdt = this._dtype;\n\n\t// Function to invoke to create an ndarray:\n\tstr = 'ndarray( \\''+dt+'\\', ';\n\n\t// Data buffer parameter...\n\tbuffer = '';\n\tif ( this._length <= 100 ) {\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// First three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbuffer += ', ..., ';\n\n\t\t// Last three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tv = this.iget( this._length-1-i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tbuffer += this.iget( this._length-1-i );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tctor = CTORS[ this.dtype ];\n\tstr += replace( ctor, '{{data}}', buffer );\n\tstr += ', ';\n\n\t// Array shape...\n\tif ( ndims === 0 ) {\n\t\tstr += '[]';\n\t} else {\n\t\tstr += '[ ' + this._shape.join( ', ' ) + ' ]';\n\t}\n\tstr += ', ';\n\n\t// Stride array...\n\tstr += '[ ';\n\tif ( ndims === 0 ) {\n\t\tstr += '0';\n\t} else {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( this._strides[ i ] < 0 ) {\n\t\t\t\tstr += -this._strides[ i ];\n\t\t\t} else {\n\t\t\t\tstr += this._strides[ i ];\n\t\t\t}\n\t\t\tif ( i < ndims-1 ) {\n\t\t\t\tstr += ', ';\n\t\t\t}\n\t\t}\n\t}\n\tstr += ' ]';\n\tstr += ', ';\n\n\t// Buffer offset:\n\tstr += '0';\n\tstr += ', ';\n\n\t// Order:\n\tstr += '\\'' + this._order + '\\'';\n\n\t// Close the function call:\n\tstr += ' )';\n\treturn str;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default toString;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\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* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\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 main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\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* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\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 main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\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\nexport default 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// MODULES //\n\nimport ctors from './ctors.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if an environment is little endian.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment is little endian\n*\n* @example\n* var bool = isLittleEndian();\n* // returns \n*/\nfunction isLittleEndian() {\n\tvar uint16view;\n\tvar uint8view;\n\n\tuint16view = new ctors[ 'uint16' ]( 1 );\n\n\t/*\n\t* Set the uint16 view to a value having distinguishable lower and higher order words.\n\t*\n\t* 4660 => 0x1234 => 0x12 0x34 => '00010010 00110100' => (0x12,0x34) == (18,52)\n\t*/\n\tuint16view[ 0 ] = 0x1234;\n\n\t// Create a uint8 view on top of the uint16 buffer:\n\tuint8view = new ctors[ 'uint8' ]( uint16view.buffer );\n\n\t// If little endian, the least significant byte will be first...\n\treturn ( uint8view[ 0 ] === 0x34 );\n}\n\n\n// MAIN //\n\nbool = isLittleEndian();\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint16Array from '@stdlib/array-uint16';\n\n\n// MAIN //\n\nvar ctors = {\n\t'uint16': Uint16Array,\n\t'uint8': Uint8Array\n};\n\n\n// EXPORTS //\n\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\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 main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\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\nexport default 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// MAIN //\n\nvar main = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\n* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @module @stdlib/array-buffer\n*\n* @example\n* import ctor from '@stdlib/array-buffer';\n*\n* var buf = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasArrayBufferSupport from '@stdlib/assert-has-arraybuffer-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasArrayBufferSupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default 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\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport Float64Array from '@stdlib/array-float64';\nimport GlobalArrayBuffer from './arraybuffer.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `ArrayBuffer` support.\n*\n* @returns {boolean} boolean indicating if an environment has `ArrayBuffer` support\n*\n* @example\n* var bool = hasArrayBufferSupport();\n* // returns \n*/\nfunction hasArrayBufferSupport() {\n\tvar bool;\n\tvar view;\n\tvar buf;\n\n\tif ( typeof GlobalArrayBuffer !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tbuf = new GlobalArrayBuffer( 16 );\n\t\tbool = ( isArrayBuffer( buf ) && typeof GlobalArrayBuffer.isView === 'function' );\n\t\tif ( bool ) {\n\t\t\tview = new Float64Array( buf );\n\t\t\tview[ 0 ] = -3.14;\n\t\t\tview[ 1 ] = NaN;\n\t\t\tbool = (\n\t\t\t\tbool &&\n\t\t\t\tGlobalArrayBuffer.isView( view ) &&\n\t\t\t\tbuf.byteLength === 16 &&\n\t\t\t\tview[ 0 ] === -3.14 &&\n\t\t\t\tview[ 1 ] !== view[ 1 ]\n\t\t\t);\n\t\t}\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasArrayBufferSupport;\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* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasDataView = ( typeof DataView === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `DataView`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a DataView\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import DataView from '@stdlib/array-dataview';\n*\n* var bool = isDataView( new DataView( new ArrayBuffer( 10 ) ) );\n* // returns true\n*\n* @example\n* var bool = isDataView( [] );\n* // returns false\n*/\nfunction isDataView( value ) {\n\treturn (\n\t\t( hasDataView && value instanceof DataView ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object DataView]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isDataView;\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\nvar main = ( typeof DataView === 'function' ) ? DataView : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof DataView === 'function' ) ? DataView : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\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* Constructor which returns a data view representing a provided array buffer.\n*\n* @module @stdlib/array-dataview\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import DataView from '@stdlib/array-dataview';\n*\n* var buf = new ArrayBuffer( 10 );\n* // returns \n*\n* var dv = new DataView( buf );\n* // returns \n*/\n\n// MODULES //\n\nimport hasDataViewSupport from '@stdlib/assert-has-dataview-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasDataViewSupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\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\nimport isDataView from '@stdlib/assert-is-dataview';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport GlobalDataView from './dataview.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `DataView` support.\n*\n* @returns {boolean} boolean indicating if an environment has `DataView` support\n*\n* @example\n* var bool = hasDataViewSupport();\n* // returns \n*/\nfunction hasDataViewSupport() {\n\tvar bool;\n\tvar view;\n\tvar buf;\n\n\tif ( typeof GlobalDataView !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tbuf = new ArrayBuffer( 24 );\n\t\tview = new GlobalDataView( buf, 8 );\n\t\tbool = ( isDataView( view ) && typeof view.getFloat64 === 'function' && typeof view.setFloat64 === 'function' );\n\t\tif ( bool ) {\n\t\t\tview.setFloat64( 0, -3.14 );\n\t\t\tview.setFloat64( 8, NaN );\n\t\t\tbool = (\n\t\t\t\tbool &&\n\t\t\t\tview.buffer === buf &&\n\t\t\t\tview.byteLength === 16 &&\n\t\t\t\tview.byteOffset === 8 &&\n\t\t\t\tview.getFloat64( 0 ) === -3.14 &&\n\t\t\t\tview.getFloat64( 8 ) !== view.getFloat64( 8 )\n\t\t\t);\n\t\t}\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasDataViewSupport;\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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Constructor which returns a data view representing a provided array buffer.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\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/* global BigInt */\n\n'use strict';\n\n// MAIN //\n\nvar BigInteger = ( typeof BigInt === 'function' ) ? BigInt : void 0; // eslint-disable-line stdlib/require-globals, node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nexport default BigInteger;\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\nimport replace from '@stdlib/string-base-replace';\nimport DTYPES from './dtypes.json';\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of ndarray data types\n*\n* @example\n* var list = dtypes();\n* // returns [...]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default dtypes;\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/* eslint-disable stdlib/empty-line-before-comment */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects. While certain dtypes, such as \"generic\" and \"binary\", have special behavior in JavaScript, they do not have a direct complement in C.\n*\n* @private\n* @returns {Object} object mapping supported dtypes to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `dtypes.h` enumeration!!!!\n\treturn {\n\t\t// Boolean data types:\n\t\t'bool': 0,\n\n\t\t// Integer data types:\n\t\t'int8': 1,\n\t\t'uint8': 2,\n\t\t'uint8c': 3,\n\t\t'int16': 4,\n\t\t'uint16': 5,\n\t\t'int32': 6,\n\t\t'uint32': 7,\n\t\t'int64': 8,\n\t\t'uint64': 9,\n\t\t// 'int128': 10, // uncomment once supported\n\t\t// 'uint128': 11,\n\t\t// 'int256': 12,\n\t\t// 'uint256': 13,\n\n\t\t// Floating-point data types:\n\t\t// 'float16': 14,\n\t\t// 'bfloat16': 15,\n\t\t'float32': 10,\n\t\t'float64': 11,\n\t\t// 'float128': 18, // uncomment once supported\n\n\t\t// Complex floating-point number data types:\n\t\t'complex64': 12,\n\t\t'complex128': 13,\n\n\t\t// Data type for \"binary\" data (i.e., data stored in a Node.js `Buffer` object):\n\t\t'binary': 14,\n\n\t\t// Data type for \"generic\" JavaScript values (objects):\n\t\t'generic': 15,\n\n\t\t// Define a signaling value which is guaranteed not to be a valid type enumeration value:\n\t\t'notype': 17,\n\n\t\t// Indicate the start of user defined type numbers (leaving room for type growth above):\n\t\t'userdefined_type': 256\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumeration;\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\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setReadOnly;\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/**\n* Returns an array of an object's own enumerable property names.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.keys()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\treturn Object.keys( Object( value ) );\n}\n\n\n// EXPORTS //\n\nexport default keys;\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 bool = ( typeof Object.keys !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport isArguments from './main.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment returns the expected internal class of the `arguments` object.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment behaves as expected\n*\n* @example\n* var bool = detect();\n* // returns \n*/\nfunction detect() {\n\treturn isArguments( arguments );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn ( nativeClass( value ) === '[object Arguments]' );\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\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* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\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\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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/**\n* Tests if a double-precision floating-point numeric value is `NaN`.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 7.0 );\n* // returns false\n*/\nfunction isnan( x ) {\n\treturn ( x !== x );\n}\n\n\n// EXPORTS //\n\nexport default isnan;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `NaN` number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `NaN` number primitive\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isnan;\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\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a value of `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a value of `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isnan;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( null );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isnan;\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* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Test if a value is `NaN`.\n*\n* @module @stdlib/assert-is-nan\n*\n* @example\n* import isnan from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns false\n*\n* @example\n* import { isObject as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\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* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\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: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\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\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Tests if an object's own property is enumerable.\n*\n* @private\n* @name isEnumerableProperty\n* @type {Function}\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nvar isEnumerableProperty = Object.prototype.propertyIsEnumerable;\n\n\n// EXPORTS //\n\nexport default isEnumerableProperty;\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\nimport isEnum from './native.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment has a bug where String indices are not detected as \"enumerable\" properties. Observed in Node v0.10.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment has the bug\n*/\nfunction detect() {\n\treturn !isEnum.call( 'beep', '0' );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport isString from '@stdlib/assert-is-string';\nimport { isPrimitive as isnan } from '@stdlib/assert-is-nan';\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport isEnum from './native.js';\nimport hasStringEnumBug from './has_string_enumerability_bug.js';\n\n\n// MAIN //\n\n/**\n* Tests if an object's own property is enumerable.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nfunction isEnumerableProperty( value, property ) {\n\tvar bool;\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\tbool = isEnum.call( value, property );\n\tif ( !bool && hasStringEnumBug && isString( value ) ) {\n\t\t// Note: we only check for indices, as properties attached to a `String` object are properly detected as enumerable above.\n\t\tproperty = +property;\n\t\treturn (\n\t\t\t!isnan( property ) &&\n\t\t\tisInteger( property ) &&\n\t\t\tproperty >= 0 &&\n\t\t\tproperty < value.length\n\t\t);\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default isEnumerableProperty;\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* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\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* Test if a value is an `arguments` object.\n*\n* @module @stdlib/assert-is-arguments\n*\n* @example\n* import isArguments from '@stdlib/assert-is-arguments';\n*\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* bool = isArguments( [] );\n* // returns false\n*/\n\n// MODULES //\n\nimport hasArgumentsClass from './detect.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar isArguments;\nif ( hasArgumentsClass ) {\n\tisArguments = main;\n} else {\n\tisArguments = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\nimport isArray from '@stdlib/assert-is-array';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-uint32-max';\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object' &&\n\t\t!isArray( value ) &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH &&\n\t\thasOwnProp( value, 'callee' ) &&\n\t\t!isEnumerableProperty( value, 'callee' )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\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\nimport isArguments from '@stdlib/assert-is-arguments';\nimport builtin from './builtin.js';\n\n\n// VARIABLES //\n\nvar slice = Array.prototype.slice;\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tif ( isArguments( value ) ) {\n\t\treturn builtin( slice.call( value ) );\n\t}\n\treturn builtin( value );\n}\n\n\n// EXPORTS //\n\nexport default keys;\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\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\nimport noop from '@stdlib/utils-noop';\n\n\n// MAIN //\n\n// Note: certain environments treat an object's prototype as enumerable, which, as a matter of convention, it shouldn't be...\nvar bool = isEnumerableProperty( noop, 'prototype' );\n\n\n// EXPORTS //\n\nexport default bool;\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* No operation.\n*\n* @example\n* noop();\n* // ...does nothing.\n*/\nfunction noop() {\n\t// Empty function...\n}\n\n\n// EXPORTS //\n\nexport default noop;\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\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\n\n\n// VARIABLES //\n\nvar obj = {\n\t'toString': null\n};\n\n\n// MAIN //\n\n// Note: certain environments don't allow enumeration of overwritten properties which are considered non-enumerable...\nvar bool = !isEnumerableProperty( obj, 'toString' );\n\n\n// EXPORTS //\n\nexport default bool;\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* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\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\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\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\nimport isnan from '@stdlib/assert-is-nan';\nimport isCollection from '@stdlib/assert-is-collection';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @param {ArrayLike} arr - array-like object\n* @param {*} searchElement - element to find\n* @param {integer} [fromIndex] - starting index (if negative, the start index is determined relative to last element)\n* @throws {TypeError} must provide an array-like object\n* @throws {TypeError} third argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 3 );\n* // returns 1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 5 );\n* // returns -1\n*\n* @example\n* // Using a `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, 3 );\n* // returns 5\n*\n* @example\n* // `fromIndex` which exceeds `array` length:\n* var arr = [ 1, 2, 3, 4, 2, 5 ];\n* var idx = indexOf( arr, 2, 10 );\n* // returns -1\n*\n* @example\n* // Negative `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6, 2 ];\n* var idx = indexOf( arr, 2, -4 );\n* // returns 5\n*\n* idx = indexOf( arr, 2, -1 );\n* // returns 7\n*\n* @example\n* // Negative `fromIndex` exceeding input `array` length:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, -10 );\n* // returns 1\n*\n* @example\n* // Array-like objects:\n* var str = 'bebop';\n* var idx = indexOf( str, 'o' );\n* // returns 3\n*/\nfunction indexOf( arr, searchElement, fromIndex ) {\n\tvar len;\n\tvar i;\n\tif ( !isCollection( arr ) && !isString( arr ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', arr ) );\n\t}\n\tlen = arr.length;\n\tif ( len === 0 ) {\n\t\treturn -1;\n\t}\n\tif ( arguments.length === 3 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= 0 ) {\n\t\t\tif ( fromIndex >= len ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\ti = fromIndex;\n\t\t} else {\n\t\t\ti = len + fromIndex;\n\t\t\tif ( i < 0 ) {\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\ti = 0;\n\t}\n\t// Check for `NaN`...\n\tif ( isnan( searchElement ) ) {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( isnan( arr[i] ) ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( arr[ i ] === searchElement ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\treturn -1;\n}\n\n\n// EXPORTS //\n\nexport default indexOf;\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/**\n* Tests whether a value equals the prototype of its constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction isConstructorPrototype( value ) {\n\treturn ( value.constructor && value.constructor.prototype === value );\n}\n\n\n// EXPORTS //\n\nexport default isConstructorPrototype;\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 w = ( typeof window === 'undefined' ) ? void 0 : window;\n\n\n// EXPORTS //\n\nexport default w;\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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport indexOf from '@stdlib/utils-index-of';\nimport typeOf from '@stdlib/utils-type-of';\nimport isConstructorPrototype from './is_constructor_prototype.js';\nimport EXCLUDED_KEYS from './excluded_keys.json';\nimport win from './window.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Determines whether an environment throws when comparing to the prototype of a value's constructor (e.g., [IE9][1]).\n*\n* [1]: https://stackoverflow.com/questions/7688070/why-is-comparing-the-constructor-property-of-two-windows-unreliable\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment is buggy\n*/\nfunction check() {\n\tvar k;\n\tif ( typeOf( win ) === 'undefined' ) {\n\t\treturn false;\n\t}\n\tfor ( k in win ) { // eslint-disable-line guard-for-in\n\t\ttry {\n\t\t\tif (\n\t\t\t\tindexOf( EXCLUDED_KEYS, k ) === -1 &&\n\t\t\t\thasOwnProp( win, k ) &&\n\t\t\t\twin[ k ] !== null &&\n\t\t\t\ttypeOf( win[ k ] ) === 'object'\n\t\t\t) {\n\t\t\t\tisConstructorPrototype( win[ k ] );\n\t\t\t}\n\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// MAIN //\n\nbool = check();\n\n\n// EXPORTS //\n\nexport default bool;\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 bool = ( typeof window !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport hasArgumentsBug from './has_arguments_bug.js';\nimport HAS_BUILTIN from './has_builtin.js';\nimport builtin from './builtin.js';\nimport wrapper from './builtin_wrapper.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @name keys\n* @type {Function}\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nvar keys;\nif ( HAS_BUILTIN ) {\n\tif ( hasArgumentsBug() ) {\n\t\tkeys = wrapper;\n\t} else {\n\t\tkeys = builtin;\n\t}\n} else {\n\tkeys = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default keys;\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\nimport keys from './builtin.js';\n\n\n// FUNCTIONS //\n\n/**\n* Tests the built-in `Object.keys()` implementation when provided `arguments`.\n*\n* @private\n* @returns {boolean} boolean indicating whether the built-in implementation returns the expected number of keys\n*/\nfunction test() {\n\treturn ( keys( arguments ) || '' ).length !== 2;\n}\n\n\n// MAIN //\n\n/**\n* Tests whether the built-in `Object.keys()` implementation supports providing `arguments` as an input value.\n*\n* ## Notes\n*\n* - Safari 5.0 does **not** support `arguments` as an input value.\n*\n* @private\n* @returns {boolean} boolean indicating whether a built-in implementation supports `arguments`\n*/\nfunction check() {\n\treturn test( 1, 2 );\n}\n\n\n// EXPORTS //\n\nexport default check;\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\nimport isObjectLike from '@stdlib/assert-is-object-like';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArguments from '@stdlib/assert-is-arguments';\nimport HAS_ENUM_PROTO_BUG from './has_enumerable_prototype_bug.js';\nimport HAS_NON_ENUM_PROPS_BUG from './has_non_enumerable_properties_bug.js';\nimport isConstructorPrototype from './is_constructor_prototype_wrapper.js';\nimport NON_ENUMERABLE from './non_enumerable.json';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tvar skipConstructor;\n\tvar skipPrototype;\n\tvar isFcn;\n\tvar out;\n\tvar k;\n\tvar p;\n\tvar i;\n\n\tout = [];\n\tif ( isArguments( value ) ) {\n\t\t// Account for environments which treat `arguments` differently...\n\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\tout.push( i.toString() );\n\t\t}\n\t\t// Note: yes, we are precluding the `arguments` array-like object from having other enumerable properties; however, this should (1) be very rare and (2) not be encouraged (e.g., doing something like `arguments.a = 'b'`; in certain engines directly manipulating the `arguments` value results in automatic de-optimization).\n\t\treturn out;\n\t}\n\tif ( typeof value === 'string' ) {\n\t\t// Account for environments which do not treat string character indices as \"own\" properties...\n\t\tif ( value.length > 0 && !hasOwnProp( value, '0' ) ) {\n\t\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\t\tout.push( i.toString() );\n\t\t\t}\n\t\t}\n\t} else {\n\t\tisFcn = ( typeof value === 'function' );\n\t\tif ( isFcn === false && !isObjectLike( value ) ) {\n\t\t\treturn out;\n\t\t}\n\t\tskipPrototype = ( HAS_ENUM_PROTO_BUG && isFcn );\n\t}\n\tfor ( k in value ) {\n\t\tif ( !( skipPrototype && k === 'prototype' ) && hasOwnProp( value, k ) ) {\n\t\t\tout.push( String( k ) );\n\t\t}\n\t}\n\tif ( HAS_NON_ENUM_PROPS_BUG ) {\n\t\tskipConstructor = isConstructorPrototype( value );\n\t\tfor ( i = 0; i < NON_ENUMERABLE.length; i++ ) {\n\t\t\tp = NON_ENUMERABLE[ i ];\n\t\t\tif ( !( skipConstructor && p === 'constructor' ) && hasOwnProp( value, p ) ) {\n\t\t\t\tout.push( String( p ) );\n\t\t\t}\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default keys;\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\nimport hasAutomationEqualityBug from './has_automation_equality_bug.js';\nimport isConstructorPrototype from './is_constructor_prototype.js';\nimport HAS_WINDOW from './has_window.js';\n\n\n// MAIN //\n\n/**\n* Wraps the test for constructor prototype equality to accommodate buggy environments (e.g., environments which throw when testing equality).\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction wrapper( value ) {\n\tif ( HAS_WINDOW === false && !hasAutomationEqualityBug ) {\n\t\treturn isConstructorPrototype( value );\n\t}\n\ttry {\n\t\treturn isConstructorPrototype( value );\n\t} catch ( error ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default wrapper;\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 a list of ndarray data types.\n*\n* @module @stdlib/ndarray-dtypes\n*\n* @example\n* import dtypes from '@stdlib/ndarray-dtypes';\n*\n* var list = dtypes();\n* // returns [...]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nexport default 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\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\nimport objectKeys from '@stdlib/utils-keys';\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nexport default assign;\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\nimport ORDERS from './orders.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray orders.\n*\n* @returns {StringArray} list of ndarray orders\n*\n* @example\n* var list = orders();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\nfunction orders() {\n\treturn ORDERS.slice();\n}\n\n\n// EXPORTS //\n\nexport default orders;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 an object mapping supported layouts to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 101`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of array objects.\n*\n* @returns {Object} object mapping supported layouts to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `layouts.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': 101,\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': 102\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 a list of BLAS memory layouts.\n*\n* @module @stdlib/blas-base-layouts\n*\n* @example\n* import layouts from '@stdlib/blas-base-layouts';\n*\n* var list = layouts();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport DATA from './data.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of BLAS memory layouts.\n*\n* @returns {StringArray} list of memory layouts\n*\n* @example\n* var list = layouts();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\nfunction layouts() {\n\treturn DATA.slice();\n}\n\n\n// EXPORTS //\n\nexport default layouts;\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\nimport { enum as layouts } from '@stdlib/blas-base-layouts';\n\n\n// VARIABLES //\n\nvar LAYOUTS = layouts();\n\n\n// MAIN //\n\n/**\n* Returns an object mapping supported orders to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported orders to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `orders.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': LAYOUTS[ 'row-major' ],\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': LAYOUTS[ 'column-major' ]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\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 a list of ndarray orders.\n*\n* @module @stdlib/ndarray-orders\n*\n* @example\n* import orders from '@stdlib/ndarray-orders';\n*\n* var list = orders();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default 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\nimport MODES from './modes.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray index modes.\n*\n* @returns {StringArray} list of ndarray index modes\n*\n* @example\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nexport default modes;\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 an object mapping supported index modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `throw == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported index modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `index_modes.h` enumeration!!!!\n\treturn {\n\t\t'throw': 1,\n\t\t'clamp': 2,\n\t\t'wrap': 3,\n\t\t'normalize': 4\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\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 a list of ndarray index modes.\n*\n* @module @stdlib/ndarray-index-modes\n*\n* @example\n* import modes from '@stdlib/ndarray-index-modes';\n*\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport modes from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default modes;\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\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport DataView from '@stdlib/array-dataview';\nimport BigInt from '@stdlib/bigint-ctor';\nimport { enum as dtypes } from '@stdlib/ndarray-dtypes';\nimport { enum as orders } from '@stdlib/ndarray-orders';\nimport { enum as modes } from '@stdlib/ndarray-index-modes';\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tv.setBigInt64( o, BigInt( N ), IS_LITTLE_ENDIAN );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv.setBigInt64( o, BigInt( sh[i] ), IS_LITTLE_ENDIAN );\n\t\tv.setBigInt64( o+s, BigInt( st[i]*nbytes ), IS_LITTLE_ENDIAN );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tv.setBigInt64( o, BigInt( this._offset*nbytes ), IS_LITTLE_ENDIAN );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tv.setBigInt64( o, BigInt( M ), IS_LITTLE_ENDIAN );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default meta2dataview;\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\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport Uint8Array from '@stdlib/array-uint8';\nimport DataView from '@stdlib/array-dataview';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// VARIABLES //\n\n// 0xFFFFFFFF = 2**32 - 1 => 11111111 11111111 11111111 11111111\nvar LOW_MASK = 0xFFFFFFFF >>> 0;\n\n// 2**32\nvar TWO_32 = 4294967296;\n\n// Byte array workspace:\nvar BYTES = new Uint8Array( 8 );\nvar VIEW = new DataView( BYTES.buffer );\n\n\n// MAIN //\n\n/**\n* Converts an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* ## Notes\n*\n* - This function assumes that the input value is less than the maximum safe double-precision floating-point integer plus one (i.e., `2**53`).\n*\n* @param {number} x - input value\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var out = new Uint8Array( 8 );\n* var bytes = float64ToInt64Bytes( 1.0, out, 1, 0 );\n* // returns \n*/\nfunction float64ToInt64Bytes( x, out, stride, offset ) {\n\tvar hi;\n\tvar lo;\n\tvar i;\n\n\tif ( x === 0 ) {\n\t\tfor ( i = 0; i < BYTES.length; i++ ) {\n\t\t\tout[ offset ] = 0;\n\t\t\toffset += stride;\n\t\t}\n\t\treturn out;\n\t}\n\t// Get the low 32-bit word:\n\tlo = (x&LOW_MASK)>>>0;\n\n\t// Get the high 32-bit word:\n\thi = floor( x/TWO_32 );\n\n\t// Insert the high and low words according to host byte order (endianness):\n\tif ( IS_LITTLE_ENDIAN ) {\n\t\tVIEW.setUint32( 0, lo, IS_LITTLE_ENDIAN );\n\t\tVIEW.setUint32( 4, hi, IS_LITTLE_ENDIAN );\n\t} else {\n\t\tVIEW.setUint32( 0, hi, IS_LITTLE_ENDIAN );\n\t\tVIEW.setUint32( 4, lo, IS_LITTLE_ENDIAN );\n\t}\n\tfor ( i = 0; i < BYTES.length; i++ ) {\n\t\tout[ offset ] = BYTES[ i ];\n\t\toffset += stride;\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default float64ToInt64Bytes;\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* Convert an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* @module @stdlib/number-float64-base-to-int64-bytes\n*\n* @example\n* import float64ToInt64Bytes from '@stdlib/number-float64-base-to-int64-bytes';\n*\n* var bytes = float64ToInt64Bytes( 1.0 );\n* // returns \n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n* import float64ToInt64Bytes from '@stdlib/number-float64-base-to-int64-bytes';\n*\n* var out = new Uint8Array( 8 );\n* var bytes = float64ToInt64Bytes( 1.0, out, 1, 0 );\n* // returns \n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default 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\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport Uint8Array from '@stdlib/array-uint8';\nimport DataView from '@stdlib/array-dataview';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// VARIABLES //\n\n// 0xFFFFFFFF = 2**32 - 1 => 11111111 11111111 11111111 11111111\nvar LOW_MASK = 0xFFFFFFFF >>> 0;\n\n// 2**32\nvar TWO_32 = 4294967296;\n\n\n// MAIN //\n\n/**\n* Converts an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* ## Notes\n*\n* - This function assumes that the input value is less than the maximum safe double-precision floating-point integer plus one (i.e., `2**53`).\n*\n* @param {number} x - input value\n* @returns {Uint8Array} byte array\n*\n* @example\n* var bytes = float64ToInt64Bytes( 1.0 );\n* // returns \n*/\nfunction float64ToInt64Bytes( x ) {\n\tvar bytes;\n\tvar view;\n\tvar hi;\n\tvar lo;\n\n\tbytes = new Uint8Array( 8 );\n\tif ( x === 0 ) {\n\t\treturn bytes;\n\t}\n\t// Get the low 32-bit word:\n\tlo = (x&LOW_MASK)>>>0;\n\n\t// Get the high 32-bit word:\n\thi = floor( x/TWO_32 );\n\n\t// Insert the high and low words according to host byte order (endianness):\n\tview = new DataView( bytes.buffer );\n\tif ( IS_LITTLE_ENDIAN ) {\n\t\tview.setUint32( 0, lo, IS_LITTLE_ENDIAN );\n\t\tview.setUint32( 4, hi, IS_LITTLE_ENDIAN );\n\t} else {\n\t\tview.setUint32( 0, hi, IS_LITTLE_ENDIAN );\n\t\tview.setUint32( 4, lo, IS_LITTLE_ENDIAN );\n\t}\n\treturn bytes;\n}\n\n\n// EXPORTS //\n\nexport default float64ToInt64Bytes;\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\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport DataView from '@stdlib/array-dataview';\nimport Uint8Array from '@stdlib/array-uint8';\nimport { enum as dtypes } from '@stdlib/ndarray-dtypes';\nimport { enum as orders } from '@stdlib/ndarray-orders';\nimport { enum as modes } from '@stdlib/ndarray-index-modes';\nimport { assign as float64ToInt64Bytes } from '@stdlib/number-float64-base-to-int64-bytes';\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar bytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create views for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\tbytes = new Uint8Array( v.buffer );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tfloat64ToInt64Bytes( N, bytes, 1, o );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tfloat64ToInt64Bytes( sh[i], bytes, 1, o );\n\t\tfloat64ToInt64Bytes( st[i]*nbytes, bytes, 1, o+s );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tfloat64ToInt64Bytes( this._offset*nbytes, bytes, 1, o );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tfloat64ToInt64Bytes( M, bytes, 1, o );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default meta2dataview;\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/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport hasBigIntSupport from '@stdlib/assert-has-bigint-support';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport strides2order from '@stdlib/ndarray-base-strides2order';\nimport Boolean from '@stdlib/boolean-ctor';\nimport isColumnMajorContiguous from './is_column_major_contiguous.js';\nimport isRowMajorContiguous from './is_row_major_contiguous.js';\nimport isContiguous from './is_contiguous.js';\nimport copyFlags from './copy_flags.js';\nimport igetValue from './iget.js';\nimport isetValue from './iset.js';\nimport setValue from './set.js';\nimport getValue from './get.js';\nimport toJSON from './tojson.js';\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\nimport meta2dataview from './meta2dataview.js';\nimport meta2dataviewPolyfill from './meta2dataview.polyfill.js';\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* ## Notes\n*\n* - To create a zero-dimensional array,\n*\n* ```javascript\n* var buffer = [ 1 ];\n* var shape = [];\n* var strides = [ 0 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* ```\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {(ArrayLikeObject|TypedArray|Buffer)} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order ) {\n\tvar contiguous;\n\tvar nbytes;\n\tvar ord;\n\tvar len;\n\tvar i;\n\tif ( !(this instanceof ndarray) ) {\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t}\n\t// Compute the number of elements...\n\tlen = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\t// Compute the number of bytes...\n\tif ( buffer.BYTES_PER_ELEMENT ) {\n\t\tnbytes = buffer.BYTES_PER_ELEMENT * len;\n\t} else {\n\t\tnbytes = null;\n\t}\n\t// Set private properties...\n\tthis._byteLength = nbytes;\n\tthis._bytesPerElement = bytesPerElement( dtype );\n\tthis._buffer = buffer;\n\tthis._dtype = dtype;\n\tthis._length = len;\n\tthis._ndims = shape.length;\n\tthis._offset = offset;\n\tthis._order = order;\n\tthis._shape = shape;\n\tthis._strides = strides;\n\tthis._accessors = Boolean( buffer.get && buffer.set );\n\n\tthis._iterationOrder = iterationOrder( strides );\n\n\t// Determine if the array can be stored contiguously:\n\tcontiguous = isContiguous( len, shape, strides, offset, this._iterationOrder ); // eslint-disable-line max-len\n\n\t// Infer the array \"order\" from the stride array (this is supplementary to the `order` parameter):\n\tord = strides2order( strides );\n\n\tthis._flags = {\n\t\t'ROW_MAJOR_CONTIGUOUS': isRowMajorContiguous( ord, contiguous ),\n\t\t'COLUMN_MAJOR_CONTIGUOUS': isColumnMajorContiguous( ord, contiguous ),\n\t\t'READONLY': false\n\t};\n\n\t// Initialize a property for caching serialized meta data:\n\tthis.__meta_dataview__ = null;\n\n\treturn this;\n}\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Size (in bytes) of the array (if known).\n*\n* @name byteLength\n* @memberof ndarray.prototype\n* @type {(NonNegativeInteger|null)}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var byteLength = x.byteLength;\n* // returns 48\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'byteLength', function get() {\n\treturn this._byteLength;\n});\n\n/**\n* Size (in bytes) of each array element (if known).\n*\n* @name BYTES_PER_ELEMENT\n* @memberof ndarray.prototype\n* @type {(PositiveInteger|null)}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var nbytes = x.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'BYTES_PER_ELEMENT', function get() {\n\treturn this._bytesPerElement;\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name data\n* @memberof ndarray.prototype\n* @type {(Array|TypedArray|Buffer)}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var data = x.data;\n* // returns [ 1, 2, 3, 4, 5, 6 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'data', function get() {\n\treturn this._buffer;\n});\n\n/**\n* Underlying data type.\n*\n* @name dtype\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dtype = x.dtype;\n* // returns 'generic'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'dtype', function get() {\n\treturn this._dtype;\n});\n\n/**\n* Meta information, such as information concerning the memory layout of the array.\n*\n* @name flags\n* @memberof ndarray.prototype\n* @type {Object}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var flgs = x.flags;\n* // returns \n*/\nsetReadOnlyAccessor( ndarray.prototype, 'flags', function get() {\n\treturn copyFlags( this._flags );\n});\n\n/**\n* Length of the array.\n*\n* @name length\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var len = x.length;\n* // returns 6\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Number of dimensions.\n*\n* @name ndims\n* @memberof ndarray.prototype\n* @type {PositiveInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var ndims = x.ndims;\n* // returns 2\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'ndims', function get() {\n\treturn this._ndims;\n});\n\n/**\n* Index offset which specifies the buffer index at which to start iterating over array elements.\n*\n* @name offset\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.offset;\n* // returns 0\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'offset', function get() {\n\treturn this._offset;\n});\n\n/**\n* Array order.\n*\n* ## Notes\n*\n* - The array order is either row-major (C-style) or column-major (Fortran-style).\n*\n* @name order\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var order = x.order;\n* // returns 'row-major'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'order', function get() {\n\treturn this._order;\n});\n\n/**\n* Shape of the array.\n*\n* @name shape\n* @memberof ndarray.prototype\n* @type {NonNegativeIntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.shape;\n* // returns [ 3, 2 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'shape', function get() {\n\treturn this._shape.slice();\n});\n\n/**\n* Index strides which specify how to access data along corresponding array dimensions.\n*\n* @name strides\n* @memberof ndarray.prototype\n* @type {IntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.strides;\n* // returns [ 2, 1 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'strides', function get() {\n\treturn this._strides.slice();\n});\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', getValue );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', igetValue );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', setValue );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', isetValue );\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toString\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {string} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var str = x.toString();\n* // returns \"ndarray( 'generic', [ 3, 4, 5, 6, 7, 8 ], [ 3, 2 ], [ 2, 1 ], 0, 'row-major' )\"\n*/\nsetReadOnly( ndarray.prototype, 'toString', toString );\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying an `ndarray` instance.\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toJSON\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {Object} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.toJSON();\n* // e.g., returns { 'type': 'ndarray', 'dtype': 'generic', 'flags': {...}, 'offset': 0, 'order': 'row-major', 'shape': [ 3, 2 ], 'strides': [ 2, 1 ], 'data': [ 3, 4, 5, 6, 7, 8 ] }\n*/\nsetReadOnly( ndarray.prototype, 'toJSON', toJSON );\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - Meta data format:\n*\n* ```text\n* | (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Consumers of this method should treat the returned `DataView` as **immutable**. Otherwise, mutation can invalidate meta data and potentially affect other consumers.\n*\n* @private\n* @name __array_meta_dataview__\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {DataView} serialized meta data\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dv = x.__array_meta_dataview__();\n* // returns \n*/\nsetReadOnly( ndarray.prototype, '__array_meta_dataview__', ( hasBigIntSupport() ) ? meta2dataview : meta2dataviewPolyfill );\n\n\n// EXPORTS //\n\nexport default ndarray;\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\nimport minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n\n\n// MAIN //\n\n/**\n* Determines if an array is contiguous.\n*\n* @private\n* @param {NonNegativeInteger} len - array length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {integer} iterationOrder - iteration order\n* @returns {boolean} boolean indicating if an array is contiguous\n*/\nfunction isContiguous( len, shape, strides, offset, iterationOrder ) {\n\tvar buf;\n\n\t// If an array does not contain any elements, then no data to store, and, if the array is unordered, adjacent array elements are not guaranteed to be stored next to each other.\n\tif ( len === 0 || iterationOrder === 0 ) {\n\t\treturn false;\n\t}\n\t// Ensure that the array is compatible with a single memory segment:\n\tbuf = minmaxViewBufferIndex( shape, strides, offset );\n\treturn ( len === ( buf[1]-buf[0]+1 ) );\n}\n\n\n// EXPORTS //\n\nexport default isContiguous;\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\nimport ndarray from '@stdlib/ndarray-base-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is ndarray-like.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating if a value is ndarray-like\n*\n* @example\n* import ndarray from '@stdlib/ndarray-ctor';\n*\n* var arr = ndarray( 'generic', [ 0, 0, 0, 0 ], [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );\n*\n* var bool = isndarrayLike( arr );\n* // returns true\n*\n* bool = isndarrayLike( [] );\n* // returns false\n*/\nfunction isndarrayLike( v ) {\n\treturn (\n\t\tv instanceof ndarray ||\n\t\t(\n\t\t\tv !== null &&\n\t\t\ttypeof v === 'object' &&\n\t\t\ttypeof v.data === 'object' &&\n\t\t\ttypeof v.shape === 'object' &&\n\t\t\ttypeof v.strides === 'object' &&\n\t\t\ttypeof v.offset === 'number' &&\n\t\t\ttypeof v.order === 'string' &&\n\t\t\ttypeof v.ndims === 'number' &&\n\t\t\ttypeof v.dtype === 'string' &&\n\t\t\ttypeof v.length === 'number' &&\n\t\t\ttypeof v.flags === 'object' &&\n\t\t\ttypeof v.get === 'function' &&\n\t\t\ttypeof v.set === 'function'\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isndarrayLike;\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\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\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\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\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/**\n* Copies ndarray flags.\n*\n* @private\n* @param {Object} flags - flags\n* @returns {Object} copy of input object\n*/\nfunction copyFlags( flags ) {\n\treturn {\n\t\t'ROW_MAJOR_CONTIGUOUS': flags.ROW_MAJOR_CONTIGUOUS,\n\t\t'COLUMN_MAJOR_CONTIGUOUS': flags.COLUMN_MAJOR_CONTIGUOUS,\n\t\t'READONLY': flags.READONLY\n\t};\n}\n\n\n// EXPORTS //\n\nexport default copyFlags;\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/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} idx - indices\n* @returns {*} array element\n*/\nfunction get() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default get;\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/**\n* Returns an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( this._offset );\n\t\t}\n\t\treturn this._buffer[ this._offset ];\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this._offset+idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset+idx ];\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this.offset-idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset-idx ];\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( ind );\n\t\t}\n\t\treturn this._buffer[ ind ];\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( ind );\n\t}\n\treturn this._buffer[ ind ];\n}\n\n\n// EXPORTS //\n\nexport default iget;\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/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default set;\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/**\n* Sets an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( idx, this._offset );\n\t\t} else {\n\t\t\tthis._buffer[ this._offset ] = idx;\n\t\t}\n\t\treturn this;\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset+idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset+idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset-idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset-idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( v, ind );\n\t\t} else {\n\t\t\tthis._buffer[ ind ] = v;\n\t\t}\n\t\treturn this;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( v, ind );\n\t} else {\n\t\tthis._buffer[ ind ] = v;\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default iset;\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\nimport real from '@stdlib/complex-float64-real';\nimport imag from '@stdlib/complex-float64-imag';\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tlen = this._length;\n\n\t// Build an object containing all ndarray properties needed to revive a serialized ndarray...\n\tout = {};\n\tout.type = 'ndarray';\n\tout.dtype = this.dtype;\n\tout.flags = {\n\t\t'READONLY': this._flags.READONLY\n\t};\n\tout.order = this._order;\n\tout.shape = this._shape.slice();\n\tout.strides = this._strides.slice();\n\n\t// Flip the signs of negative strides:\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( out.strides[ i ] < 0 ) {\n\t\t\tout.strides[ i ] *= -1;\n\t\t}\n\t}\n\t// Cast data to generic array...\n\tout.data = [];\n\tif ( out.dtype === 'complex64' || out.dtype === 'complex128' ) {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tv = this.iget( i );\n\t\t\tout.data.push( real( v ), imag( v ) );\n\t\t}\n\t} else {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout.data.push( this.iget( i ) );\n\t\t}\n\t}\n\treturn out;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\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* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\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\nimport isArrayLike from '@stdlib/assert-is-array-like';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array-like object passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array-like object function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arraylikefcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arraylikefcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array-like object passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array-like object for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArrayLike( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arraylikefcn;\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\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is array-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is array-like\n*\n* @example\n* var bool = isArrayLike( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLike( {'length':10} );\n* // returns true\n*/\nfunction isArrayLike( value ) {\n\treturn (\n\t\tvalue !== void 0 &&\n\t\tvalue !== null &&\n\t\ttypeof value !== 'function' &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLike;\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* Test if a value is an array-like object containing only nonnegative integers.\n*\n* @module @stdlib/assert-is-nonnegative-integer-array\n*\n* @example\n* import isNonNegativeIntegerArray from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ 3.0, new Number(3.0) ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 3.0, '3.0' ] );\n* // returns false\n*\n* @example\n* import { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ 1.0, 0.0, 10.0 ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 3.0, new Number(1.0) ] );\n* // returns false\n*\n* @example\n* import { objects as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ new Number(3.0), new Number(1.0) ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 1.0, 0.0, 10.0 ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-like-function';\n\n\n// VARIABLES //\n\nvar isPrimitiveArray = arrayfun( isNonNegativeInteger.isPrimitive );\nvar isObjectArray = arrayfun( isNonNegativeInteger.isObject );\n\n\n// MAIN //\n\nvar isNonNegativeIntegerArray = arrayfun( isNonNegativeInteger );\nsetReadOnly( isNonNegativeIntegerArray, 'primitives', isPrimitiveArray );\nsetReadOnly( isNonNegativeIntegerArray, 'objects', isObjectArray );\n\n\n// EXPORTS //\n\nexport default isNonNegativeIntegerArray;\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// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction rowmajor( shape ) {\n\tvar ndims;\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tout = [];\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tout.push( 0 );\n\t}\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction columnmajor( shape ) {\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tout = [];\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout.push( s );\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {Array} array strides\n*\n* @example\n* var s = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* s = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape );\n\t}\n\treturn rowmajor( shape );\n}\n\n\n// EXPORTS //\n\nexport default shape2strides;\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/**\n* Returns the index offset which specifies the location of the first indexed value in a multidimensional array based on a stride array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @returns {NonNegativeInteger} offset - offset\n*\n* @example\n* var shape = [ 2, 3, 10 ];\n* var strides = [ 30, -10, 1 ];\n*\n* var offset = strides2offset( shape, strides );\n* // returns 20\n*/\nfunction strides2offset( shape, strides ) {\n\tvar offset;\n\tvar ndims;\n\tvar i;\n\n\tndims = shape.length;\n\toffset = 0;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\t// Note that, since the stride is negative, this operation increments, not decrements, the offset...\n\t\t\toffset -= strides[ i ] * ( shape[ i ]-1 );\n\t\t}\n\t}\n\treturn offset;\n}\n\n\n// EXPORTS //\n\nexport default strides2offset;\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/**\n* Returns the number of elements in an array.\n*\n* @param {(NonNegativeIntegerArray|EmptyArray)} shape - array shape\n* @returns {NonNegativeInteger} number of elements\n*\n* @example\n* var n = numel( [ 3, 3, 3 ] );\n* // returns 27\n*/\nfunction numel( shape ) {\n\tvar ndims;\n\tvar n;\n\tvar i;\n\n\tndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0;\n\t}\n\tn = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tn *= shape[ i ];\n\t}\n\treturn n;\n}\n\n\n// EXPORTS //\n\nexport default numel;\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* Generate a stride array from an array shape.\n*\n* @module @stdlib/ndarray-base-shape2strides\n*\n* @example\n* import shape2strides from '@stdlib/ndarray-base-shape2strides';\n*\n* var strides = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* strides = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default 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// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction rowmajor( shape, out ) {\n\tvar ndims;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction columnmajor( shape, out ) {\n\tvar s;\n\tvar i;\n\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*\n* @example\n* var strides = [ 0, 0 ];\n*\n* var out = shape2strides( [ 3, 2 ], 'row-major', strides );\n* // returns [ 2, 1 ]\n*\n* var bool = ( out === strides );\n* // returns true\n*\n* out = shape2strides( [ 3, 2 ], 'column-major', strides );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order, out ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape, out );\n\t}\n\treturn rowmajor( shape, out );\n}\n\n\n// EXPORTS //\n\nexport default shape2strides;\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 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* import Complex128Array from '@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\nexport default 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// 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* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-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* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\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* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@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\nexport default 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// 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* import Float64Array from '@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* import Float32Array from '@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* import Int32Array from '@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* import Int16Array from '@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* import Int8Array from '@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* import Uint32Array from '@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* import Uint16Array from '@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* import Uint8Array from '@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* import Uint8ClampedArray from '@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* import dtype from '@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\nexport default getter;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\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 main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\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 main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\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* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\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 main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\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* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\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* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\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 main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\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* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\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 main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\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* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\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 main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\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* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\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\nexport default 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// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\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* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\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 fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\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\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\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* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\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\nimport Complex128 from '@stdlib/complex-float64-ctor';\nimport Complex64 from '@stdlib/complex-float32-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\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\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\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* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\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// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\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// EXPORTS //\n\nexport default isComplex128Array;\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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\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\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\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* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\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* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\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\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\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\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@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\nexport default 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/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './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* 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* import ArrayBuffer from '@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* import ArrayBuffer from '@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* import ArrayBuffer from '@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* import Complex64 from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import Complex64 from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import Complex64 from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import Complex64 from '@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* import Complex64 from '@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* import Complex64 from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\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.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\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.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\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\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\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 an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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 out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.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 = out.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* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.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 = out.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, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\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\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First 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 === 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 ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\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.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\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\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\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* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@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\nexport default 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// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@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\nexport default fromArray;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\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* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\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* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@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\nexport default 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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@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\nexport default 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/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './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* 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* import ArrayBuffer from '@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* import ArrayBuffer from '@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* import ArrayBuffer from '@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* import Complex128 from '@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* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@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* import Complex128 from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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 modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.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* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\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 = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.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 = real( value );\n\tim = imag( 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 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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import Complex128 from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import Complex128 from '@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* import Complex128 from '@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 a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.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 Complex128Array( 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( Complex128Array.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( getComplex128( 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 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* import Complex128 from '@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* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@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* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\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.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\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.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\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\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\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* import real from '@stdlib/complex-real';\n* import imag from '@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* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\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 an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@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 out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.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 = out.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* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.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 = out.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, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\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\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First 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 === 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 ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\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.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\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\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\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* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.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 {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\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.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.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 ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default 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// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@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\nexport default fromArray;\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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@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\nexport default 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\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int8Array from '@stdlib/array-int8';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-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\nexport default 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\nexport default 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\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport isArray from '@stdlib/assert-is-array';\nimport constructorName from '@stdlib/utils-constructor-name';\nimport ctor2dtype from './ctor2dtype.js';\nimport CTORS from './ctors.js';\nimport DTYPES from './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\nexport default dtype;\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\nimport isCollection from '@stdlib/assert-is-collection';\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport dtype from '@stdlib/array-dtype';\nimport format from '@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\nexport default 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* import contains from '@stdlib/array-base-assert-contains';\n*\n* var out = contains( [ 1, 2, 3 ], 2 );\n* // returns true\n*/\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport factory from './factory.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default main;\n\n// exports: { \"factory\": \"main.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// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport getter from '@stdlib/array-base-getter';\nimport dtype from '@stdlib/array-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\nexport default contains;\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\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport dtypes from '@stdlib/ndarray-dtypes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray data type.\n*\n* @name isDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray data type\n*\n* @example\n* var bool = isDataType( 'binary' );\n* // returns true\n*\n* bool = isDataType( 'float32' );\n* // returns true\n*\n* bool = isDataType( 'float64' );\n* // returns true\n*\n* bool = isDataType( 'generic' );\n* // returns true\n*\n* bool = isDataType( 'int16' );\n* // returns true\n*\n* bool = isDataType( 'int32' );\n* // returns true\n*\n* bool = isDataType( 'int8' );\n* // returns true\n*\n* bool = isDataType( 'uint16' );\n* // returns true\n*\n* bool = isDataType( 'uint32' );\n* // returns true\n*\n* bool = isDataType( 'uint8' );\n* // returns true\n*\n* bool = isDataType( 'uint8c' );\n* // returns true\n*\n* bool = isDataType( 'foo' );\n* // returns false\n*/\nvar isDataType = contains( dtypes() );\n\n\n// EXPORTS //\n\nexport default isDataType;\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\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray having a supported data type\n* @returns {string} data type\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\tvar dt;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tdt = x.dtype;\n\tif ( isDataType( dt ) ) {\n\t\treturn dt;\n\t}\n\t// A data type is essential for interpreting the memory associated with an ndarray object, so no fallbacks or workarounds for data type resolution...\n\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray having a supported data type. Value: `%s`.', dt ) );\n}\n\n\n// EXPORTS //\n\nexport default dtype;\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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x ) {\n\tvar out;\n\tvar sh;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\t// Copy the shape in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < sh.length; i++ ) {\n\t\td = sh[ i ];\n\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default shape;\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\nimport orders from '@stdlib/ndarray-orders';\n\n\n// VARIABLES //\n\nvar ORDERS = orders();\nvar len = ORDERS.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is an ndarray order.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is an ndarray order\n*\n* @example\n* var bool = isOrder( 'row-major' );\n* // returns true\n*\n* bool = isOrder( 'column-major' );\n* // returns true\n*\n* bool = isOrder( 'foo' );\n* // returns false\n*/\nfunction isOrder( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === ORDERS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isOrder;\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\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nimport strides from '@stdlib/ndarray-strides';\nimport ndims from '@stdlib/ndarray-ndims';\nimport strides2order from '@stdlib/ndarray-base-strides2order';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\to = x.order;\n\tif ( isOrder( o ) ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = strides( x );\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( ndims( x ) === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default order;\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\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {IntegerArray} strides\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x ) {\n\tvar out;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tst = x.strides; // TODO: consider whether we want to support ecosystem libraries, such as scijs/ndarray, which name this property `stride`\n\tif ( !isCollection( st ) ) {\n\t\t// WARNING: if no strides array, try to derive the strides from the shape. Note, however, that there is a lot that can go wrong here, as the only thing we are requiring is that the shape is a collection. The main point of going through the effort to compute strides is to support minimal ndarray-esque objects, where the only essential attributes are `shape` and `dtype` and where other attributes can be computed (e.g., `strides`, `offset`, `ndims`, `order`, etc), assuming single-segment contiguous data stored in row-major order...\n\t\tsh = x.shape;\n\t\tif ( !isCollection( sh ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( !isOrder( ord ) ) {\n\t\t\tord = 'row-major';\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\t// Copy the strides in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < st.length; i++ ) {\n\t\td = st[ i ];\n\t\tif ( !isInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default strides;\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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the number of ndarray dimensions.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} number of dimensions\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\nfunction ndims( x ) {\n\tvar sh;\n\tvar n;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.ndims;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\treturn sh.length;\n}\n\n\n// EXPORTS //\n\nexport default ndims;\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* Test if a value is an array-like object containing only integers.\n*\n* @module @stdlib/assert-is-integer-array\n*\n* @example\n* import isIntegerArray from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ -3.0, new Number(0.0), 2.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -3.0, '3.0' ] );\n* // returns false\n*\n* @example\n* import { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ -1.0, 10.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -1.0, 0.0, 5.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -3.0, new Number(-1.0) ] );\n* // returns false\n*\n* @example\n* import { objects as isIntegerArray } from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ new Number(1.0), new Number(3.0) ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -1.0, 0.0, 3.0 ] );\n* // returns false\n*\n* bool = isIntegerArray( [ 3.0, new Number(-1.0) ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport isInteger from '@stdlib/assert-is-integer';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-like-function';\n\n\n// VARIABLES //\n\nvar isPrimitiveArray = arrayfun( isInteger.isPrimitive );\nvar isObjectArray = arrayfun( isInteger.isObject );\n\n\n// MAIN //\n\nvar isIntegerArray = arrayfun( isInteger );\nsetReadOnly( isIntegerArray, 'primitives', isPrimitiveArray );\nsetReadOnly( isIntegerArray, 'objects', isObjectArray );\n\n\n// EXPORTS //\n\nexport default isIntegerArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 default ndarray settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32',\n\t\t\t'boolean': 'bool'\n\t\t},\n\n\t\t// Memory layout:\n\t\t'order': 'row-major',\n\n\t\t// Casting mode:\n\t\t'casting': 'safe',\n\n\t\t// Index mode:\n\t\t'index_mode': 'throw'\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'order': DEFAULTS.order,\n\t'casting': DEFAULTS.casting,\n\t'index_mode': DEFAULTS.index_mode\n};\n\n\n// MAIN //\n\n/**\n* Returns a default ndarray setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\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\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Tests that a value is a valid constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {(Error|null)} error object or null\n*\n* @example\n* var ctor = function ctor() {};\n*\n* var err = validate( ctor );\n* // returns null\n*\n* err = validate( null );\n* // returns \n*/\nfunction validate( value ) {\n\tvar type = typeof value;\n\tif (\n\t\tvalue === null ||\n\t\t(type !== 'object' && type !== 'function')\n\t) {\n\t\treturn new TypeError( format( 'invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.', value ) );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\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 default ndarray settings.\n*\n* @module @stdlib/ndarray-defaults\n*\n* @example\n* import defaults from '@stdlib/ndarray-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default 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// EXPORTS //\n\nexport default Object.create;\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// FUNCTIONS //\n\n/**\n* Dummy constructor.\n*\n* @private\n*/\nfunction Ctor() {\n\t// Empty...\n}\n\n\n// MAIN //\n\n/**\n* An `Object.create` shim for older JavaScript engines.\n*\n* @private\n* @param {Object} proto - prototype\n* @returns {Object} created object\n*\n* @example\n* var obj = createObject( Object.prototype );\n* // returns {}\n*/\nfunction createObject( proto ) {\n\tCtor.prototype = proto;\n\treturn new Ctor();\n}\n\n\n// EXPORTS //\n\nexport default createObject;\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\nimport builtin from './native.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar createObject;\nif ( typeof builtin === 'function' ) {\n\tcreateObject = builtin;\n} else {\n\tcreateObject = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default createObject;\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/**\n* Restricts an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = clampIndex( -1, 10 );\n* // returns 0\n*\n* idx = clampIndex( 15, 10 );\n* // returns 10\n*\n* idx = clampIndex( 5, 10 );\n* // returns 5\n*/\nfunction clampIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\treturn 0;\n\t}\n\tif ( idx > max ) {\n\t\treturn max;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default clampIndex;\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/**\n* Wraps an index on the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = wrapIndex( -1, 10 );\n* // returns 10\n*\n* idx = wrapIndex( 13, 10 );\n* // returns 2\n*\n* idx = wrapIndex( 6, 10 );\n* // returns 6\n*/\nfunction wrapIndex( idx, max ) {\n\tvar mp1 = max + 1;\n\tif ( idx < 0 ) {\n\t\tidx += mp1; // slight optimization to avoid modulo arithmetic when |idx| <= max+1\n\t\tif ( idx < 0 ) {\n\t\t\tidx %= mp1;\n\t\t\tif ( idx !== 0 ) {\n\t\t\t\tidx += mp1;\n\t\t\t}\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\tidx -= mp1; // slight optimization to avoid modulo arithmetic when max+1 < idx <= 2*(max+1)\n\t\tif ( idx > max ) {\n\t\t\tidx %= mp1;\n\t\t}\n\t\treturn idx;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default wrapIndex;\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* Normalizes an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {integer} index\n*\n* @example\n* var idx = normalizeIndex( -2, 10 );\n* // returns 9\n*\n* idx = normalizeIndex( 15, 10 );\n* // returns -1\n*\n* idx = normalizeIndex( 5, 10 );\n* // returns 5\n*/\nfunction normalizeIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\tidx += max + 1;\n\t\tif ( idx < 0 ) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\treturn -1;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default normalizeIndex;\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\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport modes from '@stdlib/ndarray-index-modes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray index mode.\n*\n* @name isIndexMode\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray index mode\n*\n* @example\n* var bool = isIndexMode( 'wrap' );\n* // returns true\n*\n* bool = isIndexMode( 'clamp' );\n* // returns true\n*\n* bool = isIndexMode( 'throw' );\n* // returns true\n*\n* bool = isIndexMode( 'foo' );\n* // returns false\n*/\nvar isIndexMode = contains( modes() );\n\n\n// EXPORTS //\n\nexport default isIndexMode;\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\nimport clampIndex from '@stdlib/ndarray-base-clamp-index';\nimport wrapIndex from '@stdlib/ndarray-base-wrap-index';\nimport normalize from '@stdlib/ndarray-base-normalize-index';\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar TABLE = {\n\t'wrap': wrapIndex,\n\t'clamp': clampIndex,\n\t'normalize': normalizeIndex,\n\t'throw': throwIfOutOfBounds\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an index if within bounds and throw an error otherwise.\n*\n* @private\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = throwIfOutOfBounds( 2, 9 );\n* // returns 2\n*\n* idx = throwIfOutOfBounds( 10, 9 );\n* // throws \n*\n* idx = throwIfOutOfBounds( -1, 9 );\n* // throws \n*/\nfunction throwIfOutOfBounds( idx, max ) {\n\tif ( idx < 0 || idx > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn idx;\n}\n\n/**\n* Normalizes an index before performing a strict bounds check.\n*\n* @private\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = normalizeIndex( 1, 10 );\n* // returns 1\n*\n* idx = normalizeIndex( -4, 10 );\n* // returns 7\n*\n* idx = normalizeIndex( -100, 10 );\n* // throws \n*/\nfunction normalizeIndex( idx, max ) {\n\tvar index = normalize( idx, max );\n\tif ( index < 0 || index > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn index;\n}\n\n\n// MAIN //\n\n/**\n* Returns a function for returning an index according to a provided index mode.\n*\n* @param {string} mode - specifies how to handle an out-of-bounds index\n* @throws {TypeError} first argument must be a recognized index mode\n* @returns {Function} function for returning an index\n*\n* @example\n* var ind = factory( 'clamp' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // returns 9\n*\n* idx = ind( -1, 9 );\n* // returns 0\n*\n* @example\n* var ind = factory( 'wrap' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // returns 0\n*\n* idx = ind( -1, 9 );\n* // returns 9\n*\n* @example\n* var ind = factory( 'throw' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // throws \n*\n* idx = ind( -1, 9 );\n* // throws \n*\n* @example\n* var ind = factory( 'normalize' );\n*\n* var idx = ind( 1, 10 );\n* // returns 1\n*\n* idx = ind( -4, 10 );\n* // returns 7\n*\n* idx = ind( -100, 10 );\n* // throws \n*/\nfunction factory( mode ) {\n\tif ( !isIndexMode( mode ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a recognized index mode. Value: `%s`.', mode ) );\n\t}\n\treturn TABLE[ mode ];\n}\n\n\n// EXPORTS //\n\nexport default factory;\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\nimport clampIndex from '@stdlib/ndarray-base-clamp-index';\nimport wrapIndex from '@stdlib/ndarray-base-wrap-index';\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an index given an index mode.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @param {string} mode - specifies how to handle an index outside the interval `[0,max]`\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = ind( 2, 9, 'clamp' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'clamp' );\n* // returns 9\n*\n* idx = ind( -1, 9, 'clamp' );\n* // returns 0\n*\n* @example\n* var idx = ind( 2, 9, 'wrap' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'wrap' );\n* // returns 0\n*\n* idx = ind( -1, 9, 'wrap' );\n* // returns 9\n*\n* @example\n* var idx = ind( 2, 9, 'throw' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'throw' );\n* // throws \n*\n* idx = ind( -1, 9, 'throw' );\n* // throws \n*\n* @example\n* var idx = ind( 1, 10, 'normalize' );\n* // returns 1\n*\n* idx = ind( -4, 10, 'normalize' );\n* // returns 7\n*\n* idx = ind( -100, 10, 'normalize' );\n* // throws \n*/\nfunction ind( idx, max, mode ) {\n\tvar index;\n\tif ( mode === 'clamp' ) {\n\t\treturn clampIndex( idx, max );\n\t}\n\tif ( mode === 'wrap' ) {\n\t\treturn wrapIndex( idx, max );\n\t}\n\tindex = idx;\n\tif ( mode === 'normalize' ) {\n\t\tindex = normalizeIndex( index, max );\n\t}\n\tif ( index < 0 || index > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn index;\n}\n\n\n// EXPORTS //\n\nexport default ind;\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 an index given an index mode.\n*\n* @module @stdlib/ndarray-base-ind\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( -1, 10, 'wrap' );\n* // returns 10\n*\n* idx = ind( 14, 10, 'wrap' );\n* // returns 3\n*\n* idx = ind( 6, 10, 'wrap' );\n* // returns 6\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( -1, 10, 'clamp' );\n* // returns 0\n*\n* idx = ind( 14, 10, 'clamp' );\n* // returns 10\n*\n* idx = ind( 6, 10, 'clamp' );\n* // returns 6\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( 1, 10, 'throw' );\n* // returns 1\n*\n* idx = ind( 14, 10, 'throw' );\n* // throws \n*\n* idx = ind( -1, 10, 'throw' );\n* // throws \n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( 1, 10, 'normalize' );\n* // returns 1\n*\n* idx = ind( -4, 10, 'normalize' );\n* // returns 7\n*\n* idx = ind( -100, 10, 'normalize' );\n* // throws \n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var fcn = ind.factory( 'clamp' );\n*\n* var idx = fcn( -1, 10 );\n* // returns 0\n*\n* idx = fcn( 14, 10 );\n* // returns 10\n*\n* idx = fcn( 6, 10 );\n* // returns 6\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport factory from './factory.js';\nimport main from './main.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default 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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iget;\n\n\n// MAIN //\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\treturn base.call( this, idx );\n\t}\n\treturn base.call( this );\n}\n\n\n// EXPORTS //\n\nexport default iget;\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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// METHODS //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iset;\n\n\n// MAIN //\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\tbase.call( this, idx, v );\n\t} else {\n\t\tbase.call( this, idx );\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default iset;\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/**\n* Copies the contents of array-like value to a new array.\n*\n* @private\n* @param {ArrayLike} arr - input array\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var arr = [ 1.0, 2.0, 3.0 ];\n*\n* var out = copy( arr, arr.length );\n* // returns [ 1.0, 2.0, 3.0 ]\n*\n* var bool = ( arr === out );\n* // returns false\n*/\nfunction copy( arr, len ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( arr[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default copy;\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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isCollection from '@stdlib/assert-is-collection';\nimport { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nimport numel from '@stdlib/ndarray-base-numel';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport defaults from '@stdlib/ndarray-defaults';\nimport inherit from '@stdlib/utils-inherit';\nimport format from '@stdlib/string-format';\nimport iget from './iget.js';\nimport iset from './iset.js';\nimport get from './get.js';\nimport set from './set.js';\nimport copy from './copy_array.js';\nimport validate from './validate.js';\n\n\n// VARIABLES //\n\n/*\n* See the following references:\n*\n* - https://stackoverflow.com/questions/22747068/is-there-a-max-number-of-arguments-javascript-functions-can-accept\n* - https://bugs.webkit.org/show_bug.cgi?id=80797\n* - https://github.com/numpy/numpy/issues/5744\n*\n* Note that the maximum number of function arguments can vary from engine to engine. Here, we choose something of a lowest common denominator which may **not** be valid everywhere.\n*/\nvar MAX_DIMS = 32767|0;\n\nvar INDEX_MODE = defaults.get( 'index_mode' );\nvar READONLY = false;\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {Collection} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} `dtype` argument must be a supported ndarray data type\n* @throws {TypeError} `buffer` argument must be an array-like object, typed-array-like, or a Buffer\n* @throws {TypeError} `buffer` argument `get` and `set` properties must be functions\n* @throws {TypeError} `shape` argument must be an array-like object containing nonnegative integers\n* @throws {Error} `shape` argument length must equal the number of dimensions\n* @throws {TypeError} `strides` argument must be an array-like object containing integers\n* @throws {Error} `strides` argument length must equal the number of dimensions (except for zero-dimensional arrays; in which case, the `strides` argument length must be equal to `1`)\n* @throws {Error} for zero-dimensional ndarrays, the `strides` argument must contain a single element equal to `0`\n* @throws {TypeError} `offset` argument must be a nonnegative integer\n* @throws {TypeError} `order` argument must be a supported ndarray order\n* @throws {Error} `buffer` argument must be compatible with specified meta data\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} too many dimensions\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order, options ) {\n\tvar ndims;\n\tvar opts;\n\tvar err;\n\tvar sh;\n\tvar st;\n\n\tif ( !(this instanceof ndarray) ) {\n\t\tif ( arguments.length < 7 ) {\n\t\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t\t}\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order, options ); // eslint-disable-line max-len\n\t}\n\tif ( !isDataType( dtype ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a supported ndarray data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( !isCollection( buffer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.', buffer ) );\n\t} else if ( buffer.get && buffer.set && ( !isFunction( buffer.get ) || !isFunction( buffer.set ) ) ) { // eslint-disable-line max-len\n\t\tthrow new TypeError( format( 'invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.', buffer ) );\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tif ( !isCollection( shape) || shape.length > 0 ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t}\n\tndims = shape.length;\n\tif ( ndims > MAX_DIMS ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.', MAX_DIMS, ndims ) );\n\t}\n\tif ( !isIntegerArray( strides ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.', strides ) );\n\t}\n\tif ( ndims > 0 ) {\n\t\tif ( strides.length !== ndims ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.', ndims, strides.length ) );\n\t\t}\n\t} else if ( strides.length !== 1 ) {\n\t\tthrow new RangeError( 'invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.' );\n\t} else if ( strides[ 0 ] !== 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.', strides[ 0 ] ) );\n\t}\n\tif ( !isNonNegativeInteger( offset ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.', offset ) );\n\t}\n\tif ( !isOrder( order ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Sixth argument must be a supported order. Value: `%s`.', order ) );\n\t}\n\tif ( ndims > 0 && !isBufferLengthCompatible( buffer.length, shape, strides, offset ) && numel( shape ) > 0 ) { // eslint-disable-line max-len\n\t\tthrow new Error( 'invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.' );\n\t}\n\topts = {};\n\topts.mode = INDEX_MODE;\n\topts.readonly = READONLY;\n\tif ( arguments.length > 6 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tthis._mode = opts.mode;\n\tif ( opts.submode === void 0 ) {\n\t\topts.submode = [ this._mode ];\n\t}\n\tthis._submode = opts.submode;\n\n\t// Copy `shape` and `strides` to prevent external mutation:\n\tsh = copy( shape, ndims );\n\tst = copy( strides, ndims || 1 );\n\n\t// Call the parent constructor:\n\tparent.call( this, dtype, buffer, sh, st, offset, order );\n\tthis._flags.READONLY = opts.readonly;\n\n\treturn this;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n// Inherit from the parent constructor:\ninherit( ndarray, parent );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', get );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', iget );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', set );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', iset );\n\n\n// EXPORTS //\n\nexport default ndarray;\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\nimport minmax from '@stdlib/ndarray-base-minmax-view-buffer-index';\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data.\n*\n* @param {NonNegativeInteger} len - buffer length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if a buffer length is compatible\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns false\n*/\nfunction isBufferLengthCompatible( len, shape, strides, offset ) {\n\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\tvar buf = minmax( shape, strides, offset );\n\n\t// If the indices are \"inbounds\", then the buffer length is compatible:\n\treturn ( buf[ 0 ] >= 0 && buf[ 1 ] < len );\n}\n\n\n// EXPORTS //\n\nexport default isBufferLengthCompatible;\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\nimport isObject from '@stdlib/assert-is-plain-object';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArray from '@stdlib/assert-is-array';\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.mode] - specifies how to handle indices which exceed array dimensions\n* @param {string} [options.submode] - specifies how to handle subscripts which exceed array dimensions\n* @param {boolean} [options.readonly] - boolean indicating whether an array should be read-only\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'clamp',\n* 'submode': [ 'throw', 'wrap', 'clamp' ]\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tvar i;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isIndexMode( opts.mode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a recognized mode. Option: `%s`.', 'mode', opts.mode ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\topts.submode = options.submode;\n\t\tif ( !isArray( opts.submode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode ) );\n\t\t}\n\t\tif ( opts.submode.length === 0 ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode.join( ',' ) ) );\n\t\t}\n\t\tfor ( i = 0; i < opts.submode.length; i++ ) {\n\t\t\tif ( !isIndexMode( opts.submode[ i ] ) ) {\n\t\t\t\treturn new TypeError( format( 'invalid option. Each submode must be a recognized mode. Option: `%s`.', opts.submode[ i ] ) );\n\t\t\t}\n\t\t}\n\t\topts.submode = opts.submode.slice();\n\t}\n\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\topts.readonly = options.readonly;\n\t\tif ( !isBoolean( opts.readonly ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', opts.readonly ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\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\nimport defineProperty from '@stdlib/utils-define-property';\nimport format from '@stdlib/string-format';\nimport validate from './validate.js';\nimport createObject from './detect.js';\n\n\n// MAIN //\n\n/**\n* Implements prototypical inheritance by replacing the prototype of one constructor with the prototype of another constructor.\n*\n* ## Notes\n*\n* - This implementation is not designed to work with ES2015/ES6 classes. For ES2015/ES6 classes, use `class` with `extends`.\n* - For reference, see [node#3455](https://github.com/nodejs/node/pull/3455), [node#4179](https://github.com/nodejs/node/issues/4179), [node#3452](https://github.com/nodejs/node/issues/3452), and [node commit](https://github.com/nodejs/node/commit/29da8cf8d7ab8f66b9091ab22664067d4468461e#diff-3deb3f32958bb937ae05c6f3e4abbdf5).\n*\n* @param {(Object|Function)} ctor - constructor which will inherit\n* @param {(Object|Function)} superCtor - super (parent) constructor\n* @throws {TypeError} first argument must be either an object or a function which can inherit\n* @throws {TypeError} second argument must be either an object or a function from which a constructor can inherit\n* @throws {TypeError} second argument must have an inheritable prototype\n* @returns {(Object|Function)} child constructor\n*\n* @example\n* function Foo() {\n* return this;\n* }\n* Foo.prototype.beep = function beep() {\n* return 'boop';\n* };\n*\n* function Bar() {\n* Foo.call( this );\n* return this;\n* }\n* inherit( Bar, Foo );\n*\n* var bar = new Bar();\n* var v = bar.beep();\n* // returns 'boop'\n*/\nfunction inherit( ctor, superCtor ) {\n\tvar err = validate( ctor );\n\tif ( err ) {\n\t\tthrow err;\n\t}\n\terr = validate( superCtor );\n\tif ( err ) {\n\t\tthrow err;\n\t}\n\tif ( typeof superCtor.prototype === 'undefined' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.', superCtor.prototype ) );\n\t}\n\t// Create a prototype which inherits from the parent prototype:\n\tctor.prototype = createObject( superCtor.prototype );\n\n\t// Set the constructor to refer to the child constructor:\n\tdefineProperty( ctor.prototype, 'constructor', {\n\t\t'configurable': true,\n\t\t'enumerable': false,\n\t\t'writable': true,\n\t\t'value': ctor\n\t});\n\n\treturn ctor;\n}\n\n\n// EXPORTS //\n\nexport default inherit;\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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {*} array element\n*/\nfunction get() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( arguments.length !== this._ndims ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default get;\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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( arguments.length !== this._ndims+1 ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default set;\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\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\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\nimport filled from '@stdlib/array-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\nexport default 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// 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\nexport default filled;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'boolean': 'bool',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\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 default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default 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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\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\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = require( 'buffer' ).Buffer; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\n* Buffer constructor.\n*\n* @module @stdlib/buffer-ctor\n*\n* @example\n* import ctor from '@stdlib/buffer-ctor';\n*\n* var b = new ctor( [ 1, 2, 3, 4 ] );\n* // returns \n*/\n\n// MODULES //\n\nimport hasNodeBufferSupport from '@stdlib/assert-has-node-buffer-support';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasNodeBufferSupport() ) {\n\tctor = main;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default 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 (browser) polyfill\n\n// MAIN //\n\n/**\n* Buffer constructor.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default 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* Allocate a buffer having a specified number of bytes.\n*\n* @module @stdlib/buffer-alloc-unsafe\n*\n* @example\n* import allocUnsafe from '@stdlib/buffer-alloc-unsafe';\n*\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasAllocUnsafe from './has_alloc_unsafe.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar allocUnsafe;\nif ( hasAllocUnsafe ) {\n\tallocUnsafe = main;\n} else {\n\tallocUnsafe = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\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\nimport isFunction from '@stdlib/assert-is-function';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\nvar bool = isFunction( Buffer.allocUnsafe );\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport format from '@stdlib/string-format';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\n/**\n* Allocates a buffer having a specified number of bytes.\n*\n* ## Notes\n*\n* - The underlying memory of returned `Buffer` instances is not initialized. Memory contents are unknown and may contain sensitive data.\n* - When the size is less than half the pool size (specified on the `Buffer` constructor), memory is allocated from the `Buffer` pool for faster allocation of new `Buffer` instances.\n*\n* @param {NonNegativeInteger} size - number of bytes to allocate\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {Buffer} new `Buffer` instance\n*\n* @example\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\nfunction allocUnsafe( size ) {\n\tif ( !isNonNegativeInteger( size ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', size ) );\n\t}\n\treturn Buffer.allocUnsafe( size );\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\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\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport format from '@stdlib/string-format';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\n/**\n* Allocates a buffer having a specified number of bytes.\n*\n* ## Notes\n*\n* - The underlying memory of returned `Buffer` instances is not initialized. Memory contents are unknown and may contain sensitive data.\n* - When the size is less than half the pool size (specified on the `Buffer` constructor), memory is allocated from the `Buffer` pool for faster allocation of new `Buffer` instances.\n*\n* @param {NonNegativeInteger} size - number of bytes to allocate\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {Buffer} new `Buffer` instance\n*\n* @example\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\nfunction allocUnsafe( size ) {\n\tif ( !isNonNegativeInteger( size ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', size ) );\n\t}\n\treturn new Buffer( size );\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\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\nimport isndarrayLike from '@stdlib/assert-is-ndarray-like';\nimport isPlainObject from '@stdlib/assert-is-plain-object';\nimport { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport strides2offset from '@stdlib/ndarray-base-strides2offset';\nimport numel from '@stdlib/ndarray-base-numel';\nimport getDType from '@stdlib/ndarray-dtype';\nimport getShape from '@stdlib/ndarray-shape';\nimport getOrder from '@stdlib/ndarray-order';\nimport ndarray from '@stdlib/ndarray-ctor';\nimport emptyArray from '@stdlib/array-empty';\nimport allocUnsafe from '@stdlib/buffer-alloc-unsafe';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type (overrides the input array's inferred data type)\n* @param {string} [options.order] - specifies whether the output array should be 'row-major' (C-style) or 'column-major' (Fortran-style) (overrides the input array's inferred order)\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} [options.shape] - output array shape (overrides the input array's inferred shape)\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @throws {TypeError} first argument must have a recognized data type\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a supported ndarray data type\n* @throws {TypeError} `order` option must be a supported order\n* @throws {TypeError} `shape` option must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\nfunction emptyLike( x ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );\n\t}\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = getDType( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'shape' ) ) {\n\t\t\tsh = options.shape;\n\t\t\tif ( typeof sh === 'number' ) {\n\t\t\t\tsh = [ sh ];\n\t\t\t}\n\t\t\tif ( !isNonNegativeIntegerArray( sh ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.', 'shape', sh ) );\n\t\t\t}\n\t\t} else {\n\t\t\tsh = getShape( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = getOrder( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t} else {\n\t\tdtype = getDType( x );\n\t\tsh = getShape( x );\n\t\torder = getOrder( x );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default emptyLike;\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\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\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* import Complex128Array from '@stdlib/array-complex128';\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-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* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\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* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@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\nexport default 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// 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* import Float64Array from '@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* import Float32Array from '@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* import Int32Array from '@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* import Int16Array from '@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* import Int8Array from '@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* import Uint32Array from '@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* import Uint16Array from '@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* import Uint8Array from '@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* import Uint8ClampedArray from '@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* import dtype from '@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\nexport default 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// 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\nexport default copy;\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\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport copyIndexed from '@stdlib/array-base-copy-indexed';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `strides` property\n* @returns {IntegerArray} strides\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x, copy ) {\n\tvar ord;\n\tvar sh;\n\tvar st;\n\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\tsh = x.shape;\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( typeof ord !== 'string' ) {\n\t\t\tord = ROW_MAJOR;\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\tif ( copy ) {\n\t\treturn copyIndexed( st );\n\t}\n\treturn st;\n}\n\n\n// EXPORTS //\n\nexport default strides;\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\nimport strides2offset from '@stdlib/ndarray-base-strides2offset';\n\n\n// MAIN //\n\n/**\n* Returns the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {NonNegativeInteger} index offset\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\nfunction offset( x ) {\n\tvar st;\n\tvar sh;\n\tvar o;\n\n\to = x.offset;\n\tif ( typeof o === 'number' ) {\n\t\treturn o;\n\t}\n\tsh = x.shape;\n\tif ( sh.length === 0 ) {\n\t\treturn 0;\n\t}\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn 0;\n\t}\n\treturn strides2offset( sh, st );\n}\n\n\n// EXPORTS //\n\nexport default offset;\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\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\to = x.order;\n\tif ( typeof o === 'string' ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn ROW_MAJOR; // WARNING: default to row-major for ndarray-like objects lacking strides. This may or may not be accurate, and we're defaulting to row-major here based on the belief that row-major is more likely given that, e.g., JavaScript arrays are similar to C arrays (i.e., stored in row-major order).\n\t}\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( x.shape.length === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default order;\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\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport accessorSetter from '@stdlib/array-base-accessor-setter';\nimport getter from '@stdlib/array-base-getter';\nimport setter from '@stdlib/array-base-setter';\nimport numel from '@stdlib/ndarray-base-numel';\nimport getDType from '@stdlib/ndarray-base-dtype';\nimport getShape from '@stdlib/ndarray-base-shape';\nimport getStrides from '@stdlib/ndarray-base-strides';\nimport getOffset from '@stdlib/ndarray-base-offset';\nimport getOrder from '@stdlib/ndarray-base-order';\nimport getData from '@stdlib/ndarray-base-data-buffer';\n\n\n// MAIN //\n\n/**\n* Converts an ndarray-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 ndarray meta data to ensure that internal functions operating on ndarrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **ref**: reference to the original ndarray-like object.\n* - **dtype**: underlying data type.\n* - **data**: data buffer.\n* - **length**: number of elements.\n* - **shape**: array dimensions.\n* - **strides**: array strides.\n* - **offset**: index offset.\n* - **order**: order.\n* - **accessorProtocol**: `boolean` indicating whether the data buffer 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 ndarray element and whose second element is an accessor for setting an ndarray element.\n*\n* @param {ndarrayLike} x - ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {Object} object containing ndarray meta data\n*\n* @example\n* import array from '@stdlib/ndarray-array';\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n*\n* var obj = ndarraylike2object( x );\n* // returns {...}\n*/\nfunction ndarraylike2object( x ) {\n\tvar xbuf;\n\tvar bool;\n\tvar sh;\n\tvar dt;\n\n\txbuf = getData( x );\n\tsh = getShape( x, true );\n\tdt = getDType( x );\n\n\tbool = isAccessorArray( xbuf );\n\n\treturn {\n\t\t'ref': x,\n\t\t'dtype': dt,\n\t\t'data': xbuf,\n\t\t'length': numel( sh ),\n\t\t'shape': sh,\n\t\t'strides': getStrides( x, true ),\n\t\t'offset': getOffset( x ),\n\t\t'order': getOrder( x ),\n\t\t'accessorProtocol': bool,\n\t\t'accessors': ( bool ) ?\n\t\t\t[ accessorGetter( dt ), accessorSetter( dt ) ] :\n\t\t\t[ getter( dt ), setter( dt ) ]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default ndarraylike2object;\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* Returns the underlying data buffer of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {Collection} underlying data buffer\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\nfunction data( x ) {\n\treturn x.data;\n}\n\n\n// EXPORTS //\n\nexport default data;\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\nimport copyIndexed from '@stdlib/array-base-copy-indexed';\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `shape` property\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x, copy ) {\n\tvar sh = x.shape;\n\tif ( copy ) {\n\t\treturn copyIndexed( sh );\n\t}\n\treturn sh;\n}\n\n\n// EXPORTS //\n\nexport default shape;\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* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {string} data type\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\treturn x.dtype;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\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* Generates a linearly spaced numeric array whose elements increment by 1 starting from zero.\n*\n* @param {number} n - number of elements\n* @returns {Array} linearly spaced numeric array\n*\n* @example\n* var arr = zeroTo( 6 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*/\nfunction zeroTo( n ) {\n\tvar arr;\n\tvar i;\n\n\tarr = [];\n\tif ( n <= 0 ) {\n\t\treturn arr;\n\t}\n\tfor ( i = 0; i < n; i++ ) {\n\t\tarr.push( i );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default zeroTo;\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\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport getter from '@stdlib/array-base-getter';\nimport setter from '@stdlib/array-base-setter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport accessorSetter from '@stdlib/array-base-accessor-setter';\nimport dtype from '@stdlib/array-dtype';\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* - **dtype**: array data type.\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 dt = dtype( x );\n\tif ( isAccessorArray( x ) ) {\n\t\treturn {\n\t\t\t'data': x,\n\t\t\t'dtype': dt,\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'data': x,\n\t\t'dtype': dt,\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\nexport default arraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\n\n\n// FUNCTIONS //\n\n/**\n* Fills an indexed array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = indexed( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = indexed( out, -1, out.length-1 );\n* // returns [ 5, 4, 3, 2, 1, 0 ]\n*/\nfunction indexed( out, stride, offset ) {\n\tvar v;\n\tvar i;\n\n\ti = offset;\n\tv = 0;\n\twhile ( i >= 0 && i < out.length ) {\n\t\tout[ i ] = v;\n\t\ti += stride;\n\t\tv += 1;\n\t}\n\treturn out;\n}\n\n/**\n* Fills a complex number array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {(Complex128Array|Complex64Array)} out - output complex number array\n* @param {(Float64Array|Float32Array)} data - output array data\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {(Complex128Array|Complex64Array)} output array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\n*\n* var out = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n* // returns \n*\n* var data = reinterpret128( out, 0 );\n* // returns [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]\n*\n* var arr = complex( out, data, 1, 0 );\n* // returns \n*\n* var bool = ( arr === out );\n* // returns true\n*\n* data = reinterpret128( out, 0 );\n* returns [ 0.0, 0.0, 1.0, 0.0, 2.0, 0.0 ]\n*/\nfunction complex( out, data, stride, offset ) {\n\tvar v;\n\tvar s;\n\tvar i;\n\n\ts = stride * 2;\n\ti = offset * 2;\n\tv = 0.0;\n\twhile ( i >= 0 && i < data.length ) {\n\t\tdata[ i ] = v; // real component\n\t\tdata[ i+1 ] = 0.0; // imaginary component\n\t\ti += s;\n\t\tv += 1.0;\n\t}\n\treturn out;\n}\n\n/**\n* Fills an accessor array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {Object} out - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n\n* var out = toAccessorArray( [ 0, 0, 0, 0, 0, 0 ] );\n* var arr = accessors( arraylike2object( out ), 1, 0 );\n*\n* var bool = ( arr === out );\n* // returns true\n*\n* var v = out.get( 0 );\n* // returns 0\n*\n* v = out.get( out.length-1 );\n* // returns 5\n*/\nfunction accessors( out, stride, offset ) {\n\tvar data;\n\tvar set;\n\tvar v;\n\tvar i;\n\n\tdata = out.data;\n\tset = out.accessors[ 1 ];\n\n\ti = offset;\n\tv = 0;\n\twhile ( i >= 0 && i < data.length ) {\n\t\tset( data, i, v );\n\t\ti += stride;\n\t\tv += 1;\n\t}\n\treturn data;\n}\n\n\n// MAIN //\n\n/**\n* Fills an array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = assign( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = assign( out, -1, out.length-1 );\n* // returns [ 5, 4, 3, 2, 1, 0 ]\n*/\nfunction assign( out, stride, offset ) {\n\tvar obj = arraylike2object( out );\n\tif ( obj.accessorProtocol ) {\n\t\t// If provided a complex number array, reinterpret as a real typed array and only set the real components...\n\t\tif ( obj.dtype === 'complex128' ) {\n\t\t\treturn complex( out, reinterpret128( out, 0 ), stride, offset );\n\t\t}\n\t\tif ( obj.dtype === 'complex64' ) {\n\t\t\treturn complex( out, reinterpret64( out, 0 ), stride, offset );\n\t\t}\n\t\treturn accessors( obj, stride, offset );\n\t}\n\treturn indexed( out, stride, offset );\n}\n\n\n// EXPORTS //\n\nexport default assign;\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* Takes elements from an indexed array.\n*\n* @param {Collection} x - input array\n* @param {NonNegativeIntegerArray} indices - list of indices\n* @returns {Array} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n* var indices = [ 3, 1, 2, 0 ];\n*\n* var y = take( x, indices );\n* // returns [ 4, 2, 3, 1 ]\n*/\nfunction take( x, indices ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\tout.push( x[ indices[ i ] ] ); // use `Array#push` to ensure \"fast\" elements\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default take;\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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport copy from '@stdlib/array-base-copy-indexed';\nimport take from '@stdlib/array-base-take-indexed';\nimport sort2ins from './sort2ins.js';\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: input ndarray strides sorted in loop order.\n* - **sy**: output ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - input array stride lengths\n* @param {IntegerArray} sy - output array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 6, -2, 1 ]\n*/\nfunction loopOrder( sh, sx, sy ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the input array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape and output array strides based on the sorted input array strides:\n\tsh = take( sh, idx );\n\tsy = take( sy, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'sy': sy\n\t};\n}\n\n\n// EXPORTS //\n\nexport default loopOrder;\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* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default sort2ins;\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* Generate a linearly spaced numeric array whose elements increment by 1 starting from zero.\n*\n* @module @stdlib/array-base-zero-to\n*\n* @example\n* import zeroTo from '@stdlib/array-base-zero-to';\n*\n* var arr = zeroTo( 6 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* import zeroTo from '@stdlib/array-base-zero-to';\n*\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n* var arr = zeroTo.assign( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* var bool = ( out === arr );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default 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\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nexport default defaults;\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\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport defaults from './defaults.js';\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - input array data type\n* @param {string} dtypeY - output array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = unaryBlockSize( 'float64', 'float64' );\n* // returns \n*/\nfunction unaryBlockSize( dtypeX, dtypeY ) {\n\tvar nbx;\n\tvar nby;\n\n\tnbx = bytesPerElement( dtypeX );\n\tnby = bytesPerElement( dtypeY );\n\tif ( nbx === null || nby === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\tif ( nbx > nby ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nby )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nexport default unaryBlockSize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// FUNCTIONS //\n\n/**\n* Tests whether an object has a specified method.\n*\n* @private\n* @param {Object} obj - input object\n* @param {string} method - method name\n* @returns {boolean} boolean indicating whether an object has a specified method\n*\n* @example\n* var bool = hasMethod( [], 'reverse' );\n* // returns true\n*\n* @example\n* var bool = hasMethod( [], 'beep' );\n* // returns false\n*/\nfunction hasMethod( obj, method ) {\n\treturn ( typeof obj[ method ] === 'function' );\n}\n\n/**\n* Reverses an array in-place.\n*\n* @private\n* @param {Collection} x - input array\n* @returns {Collection} input array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = internal( x );\n* // returns [ 4, 3, 2, 1 ]\n*/\nfunction internal( x ) {\n\tvar tmp;\n\tvar N;\n\tvar M;\n\tvar i;\n\tvar j;\n\n\tN = floor( x.length/2 );\n\tM = x.length - 1;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = M - i;\n\t\ttmp = x[ i ];\n\t\tx[ i ] = x[ j ];\n\t\tx[ j ] = tmp;\n\t}\n\treturn x;\n}\n\n/**\n* Reverses an array in-place.\n*\n* @private\n* @param {Object} x - input array object\n* @returns {Collection} input array\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n*\n* var x = toAccessorArray( [ 1, 2, 3, 4 ] );\n*\n* var v = x.get( 0 );\n* // returns 1\n*\n* var out = accessors( arraylike2object( x ) );\n*\n* v = x.get( 0 );\n* // returns 4\n*/\nfunction accessors( x ) {\n\tvar data;\n\tvar get;\n\tvar set;\n\tvar tmp;\n\tvar N;\n\tvar M;\n\tvar i;\n\tvar j;\n\n\tdata = x.data;\n\tget = x.accessors[ 0 ];\n\tset = x.accessors[ 1 ];\n\n\tN = floor( data.length/2 );\n\tM = data.length - 1;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = M - i;\n\t\ttmp = get( data, i );\n\t\tset( data, i, get( data, j ) );\n\t\tset( data, j, tmp );\n\t}\n\treturn data;\n}\n\n\n// MAIN //\n\n/**\n* Reverses an array in-place.\n*\n* @param {Collection} x - input array\n* @returns {Collection} input array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = reverse( x );\n* // returns [ 4, 3, 2, 1 ]\n*\n* var bool = ( out === x );\n* // returns true\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var x = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var out = reverse( x );\n* // returns [ 4, 3, 2, 1 ]\n*\n* var bool = ( out === x );\n* // returns true\n*/\nfunction reverse( x ) {\n\tvar obj;\n\tif ( hasMethod( x, 'reverse' ) ) {\n\t\treturn x.reverse();\n\t}\n\tobj = arraylike2object( x );\n\tif ( obj.accessorProtocol ) {\n\t\treturn accessors( obj );\n\t}\n\treturn internal( x );\n}\n\n\n// EXPORTS //\n\nexport default reverse;\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\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Converts a linear index in an array view to a linear index in an underlying data buffer.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index in an array view\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {NonNegativeInteger} linear index in an underlying data buffer\n*\n* @example\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = vind2bind( shape, strides, offset, order, 1, mode );\n* // returns 7\n*/\nfunction vind2bind( shape, strides, offset, order, idx, mode ) {\n\tvar ndims;\n\tvar len;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ( mode === 'normalize' && idx < 0 ) {\n\t\t\tidx += len;\n\t\t}\n\t\tif ( idx < 0 || idx >= len ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tind = offset;\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\treturn ind;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\treturn ind;\n}\n\n\n// EXPORTS //\n\nexport default vind2bind;\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: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward positive infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = ceil( -4.2 );\n* // returns -4.0\n*\n* @example\n* var v = ceil( 9.99999 );\n* // returns 10.0\n*\n* @example\n* var v = ceil( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = ceil( NaN );\n* // returns NaN\n*/\nvar ceil = Math.ceil; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default ceil;\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\nimport floor from '@stdlib/math-base-special-floor';\nimport ceil from '@stdlib/math-base-special-ceil';\n\n\n// MAIN //\n\n/**\n* Rounds a double-precision floating-point number toward zero.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = trunc( -4.2 );\n* // returns -4.0\n*\n* @example\n* var v = trunc( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = trunc( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = trunc( -0.0 );\n* // returns -0.0\n*\n* @example\n* var v = trunc( NaN );\n* // returns NaN\n*\n* @example\n* var v = trunc( Infinity );\n* // returns Infinity\n*\n* @example\n* var v = trunc( -Infinity );\n* // returns -Infinity\n*/\nfunction trunc( x ) {\n\tif ( x < 0.0 ) {\n\t\treturn ceil( x );\n\t}\n\treturn floor( x );\n}\n\n\n// EXPORTS //\n\nexport default trunc;\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\nimport format from '@stdlib/string-format';\nimport trunc from '@stdlib/math-base-special-trunc';\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @param {(Array|TypedArray|Object)} out - destination object\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {(Array|TypedArray|Object)} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n* var order = 'row-major';\n*\n* var s = [ 0, 0, 0 ];\n* var out = ind2sub( shape, strides, offset, order, 17, 'throw', s );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( out === s );\n* // returns true\n*/\nfunction ind2sub( shape, strides, offset, order, idx, mode, out ) {\n\tvar ndims;\n\tvar len;\n\tvar k;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ( mode === 'normalize' && idx < 0 ) {\n\t\t\tidx += len;\n\t\t}\n\t\tif ( idx < 0 || idx >= len ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t\t}\n\t}\n\tif ( offset === 0 ) {\n\t\tif ( order === 'column-major' ) {\n\t\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\t\ts = idx % shape[ i ];\n\t\t\t\tidx -= s;\n\t\t\t\tidx /= shape[ i ];\n\t\t\t\tout[ i ] = s;\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\t// Case: row-major\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tout[ i ] = s;\n\t\t}\n\t\treturn out;\n\t}\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = strides[ i ];\n\t\t\tif ( s < 0 ) {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tout[ i ] = shape[ i ] - 1 + k;\n\t\t\t} else {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tout[ i ] = k;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\t// Case: row-major\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\ts = strides[ i ];\n\t\tif ( s < 0 ) {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tout[ i ] = shape[ i ] - 1 + k;\n\t\t} else {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tout[ i ] = k;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default ind2sub;\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\nimport zeros from '@stdlib/array-base-zeros';\nimport getSubscripts from './assign.js';\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - **throw**: throw an error when a linear index exceeds array dimensions.\n* - **normalize**: normalize negative indices and throw an error when a linear index exceeds array dimensions.\n* - **wrap**: wrap around a linear index exceeding array dimensions using modulo arithmetic.\n* - **clamp**: set a linear index exceeding array dimensions to either `0` (minimum linear index) or the maximum linear index.\n*\n* - When provided a stride array containing negative strides, if an `offset` is greater than `0`, the function interprets the linear index as an index into the underlying data buffer for the array, thus returning subscripts from the perspective of that buffer. If an `offset` is equal to `0`, the function treats the linear index as an index into an array view, thus returning subscripts from the perspective of that view.\n*\n* ```text\n* Dims: 2x2\n* Buffer: [ 1, 2, 3, 4 ]\n*\n* View = [ a00, a01,\n* a10, a11 ]\n*\n* Strides: 2,1\n* Offset: 0\n*\n* View = [ 1, 2,\n* 3, 4 ]\n*\n* Strides: 2,-1\n* Offset: 1\n*\n* View = [ 2, 1,\n* 4, 3 ]\n*\n* Strides: -2,1\n* Offset: 2\n*\n* View = [ 3, 4,\n* 1, 2 ]\n*\n* Strides: -2,-1\n* Offset: 3\n*\n* View = [ 4, 3,\n* 2, 1 ]\n* ```\n*\n* ```javascript\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ -2, 1 ];\n* var offset = 2;\n* var mode = 'throw';\n*\n* // From the perspective of a view...\n* var s = ind2sub( shape, strides, 0, order, 0, mode );\n* // returns [ 0, 0 ]\n*\n* s = ind2sub( shape, strides, 0, order, 1, mode );\n* // returns [ 0, 1 ]\n*\n* s = ind2sub( shape, strides, 0, order, 2, mode );\n* // returns [ 1, 0 ]\n*\n* s = ind2sub( shape, strides, 0, order, 3, mode );\n* // returns [ 1, 1 ]\n*\n* // From the perspective of an underlying buffer...\n* s = ind2sub( shape, strides, offset, order, 0, mode );\n* // returns [ 1, 0 ]\n*\n* s = ind2sub( shape, strides, offset, order, 1, mode );\n* // returns [ 1, 1 ]\n*\n* s = ind2sub( shape, strides, offset, order, 2, mode );\n* // returns [ 0, 0 ]\n*\n* s = ind2sub( shape, strides, offset, order, 3, mode );\n* // returns [ 0, 1 ]\n* ```\n*\n* In short, from the perspective of a view, view data is always ordered.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {Array} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n* var order = 'row-major';\n*\n* var s = ind2sub( shape, strides, offset, order, 17, 'throw' );\n* // returns [ 1, 2, 2 ]\n*/\nfunction ind2sub( shape, strides, offset, order, idx, mode ) {\n\treturn getSubscripts( shape, strides, offset, order, idx, mode, zeros( shape.length ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default ind2sub;\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* Convert a linear index to an array of subscripts.\n*\n* @module @stdlib/ndarray-base-ind2sub\n*\n* @example\n* import ind2sub from '@stdlib/ndarray-base-ind2sub';\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n*\n* var s = ind2sub( shape, strides, offset, 'row-major', 17, 'throw' );\n* // returns [ 1, 2, 2 ]\n*\n* @example\n* import ind2sub from '@stdlib/ndarray-base-ind2sub';\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n*\n* var s = [ 0, 0, 0 ];\n* var out = ind2sub.assign( shape, strides, offset, 'row-major', 17, 'throw', s );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( out === s );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\nimport ind2sub from '@stdlib/ndarray-base-ind2sub';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an -dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* mapnd( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction mapnd( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar get;\n\tvar set;\n\tvar idx;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tidx = ind2sub( sh, sx, 0, ordx, i, MODE ); // return subscripts from the perspective of the ndarray view\n\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), idx, x.ref ) );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default mapnd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\nimport ind2sub from '@stdlib/ndarray-base-ind2sub';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an n-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* mapnd( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction mapnd( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar idx;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tidx = ind2sub( sh, sx, 0, ordx, i, MODE ); // return subscripts from the perspective of the ndarray view\n\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], idx, x.ref );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default mapnd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport ndarray2object from '@stdlib/ndarray-base-ndarraylike2object';\nimport blockedaccessormap2d from './2d_blocked_accessors.js';\nimport blockedaccessormap3d from './3d_blocked_accessors.js';\nimport blockedaccessormap4d from './4d_blocked_accessors.js';\nimport blockedaccessormap5d from './5d_blocked_accessors.js';\nimport blockedaccessormap6d from './6d_blocked_accessors.js';\nimport blockedaccessormap7d from './7d_blocked_accessors.js';\nimport blockedaccessormap8d from './8d_blocked_accessors.js';\nimport blockedaccessormap9d from './9d_blocked_accessors.js';\nimport blockedaccessormap10d from './10d_blocked_accessors.js';\nimport blockedmap2d from './2d_blocked.js';\nimport blockedmap3d from './3d_blocked.js';\nimport blockedmap4d from './4d_blocked.js';\nimport blockedmap5d from './5d_blocked.js';\nimport blockedmap6d from './6d_blocked.js';\nimport blockedmap7d from './7d_blocked.js';\nimport blockedmap8d from './8d_blocked.js';\nimport blockedmap9d from './9d_blocked.js';\nimport blockedmap10d from './10d_blocked.js';\nimport accessormap0d from './0d_accessors.js';\nimport accessormap1d from './1d_accessors.js';\nimport accessormap2d from './2d_accessors.js';\nimport accessormap3d from './3d_accessors.js';\nimport accessormap4d from './4d_accessors.js';\nimport accessormap5d from './5d_accessors.js';\nimport accessormap6d from './6d_accessors.js';\nimport accessormap7d from './7d_accessors.js';\nimport accessormap8d from './8d_accessors.js';\nimport accessormap9d from './9d_accessors.js';\nimport accessormap10d from './10d_accessors.js';\nimport accessormapnd from './nd_accessors.js';\nimport map0d from './0d.js';\nimport map1d from './1d.js';\nimport map2d from './2d.js';\nimport map3d from './3d.js';\nimport map4d from './4d.js';\nimport map5d from './5d.js';\nimport map6d from './6d.js';\nimport map7d from './7d.js';\nimport map8d from './8d.js';\nimport map9d from './9d.js';\nimport map10d from './10d.js';\nimport mapnd from './nd.js';\n\n\n// VARIABLES //\n\nvar MAP = [\n\tmap0d,\n\tmap1d,\n\tmap2d,\n\tmap3d,\n\tmap4d,\n\tmap5d,\n\tmap6d,\n\tmap7d,\n\tmap8d,\n\tmap9d,\n\tmap10d\n];\nvar ACCESSOR_MAP = [\n\taccessormap0d,\n\taccessormap1d,\n\taccessormap2d,\n\taccessormap3d,\n\taccessormap4d,\n\taccessormap5d,\n\taccessormap6d,\n\taccessormap7d,\n\taccessormap8d,\n\taccessormap9d,\n\taccessormap10d\n];\nvar BLOCKED_MAP = [\n\tblockedmap2d, // 0\n\tblockedmap3d,\n\tblockedmap4d,\n\tblockedmap5d,\n\tblockedmap6d,\n\tblockedmap7d,\n\tblockedmap8d,\n\tblockedmap9d,\n\tblockedmap10d // 8\n];\nvar BLOCKED_ACCESSOR_MAP = [\n\tblockedaccessormap2d, // 0\n\tblockedaccessormap3d,\n\tblockedaccessormap4d,\n\tblockedaccessormap5d,\n\tblockedaccessormap6d,\n\tblockedaccessormap7d,\n\tblockedaccessormap8d,\n\tblockedaccessormap9d,\n\tblockedaccessormap10d // 8\n];\nvar MAX_DIMS = MAP.length -1;\n\n\n// MAIN //\n\n/**\n* Applies a callback function to the elements in an input ndarray and assigns results to the elements in an output ndarray.\n*\n* ## Notes\n*\n* - Each provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array and one output array\n* @param {Callback} fcn - callback function\n* @param {*} [thisArg] - callback execution context\n* @throws {Error} arrays must have the same number of dimensions\n* @throws {Error} arrays must have the same shape\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map( [ x, y ], scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map( arrays, fcn, thisArg ) {\n\tvar ndims;\n\tvar shx;\n\tvar shy;\n\tvar iox;\n\tvar ioy;\n\tvar len;\n\tvar x;\n\tvar y;\n\tvar i;\n\tvar d;\n\n\t// Unpack the ndarrays and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\ty = ndarray2object( arrays[ 1 ] );\n\n\t// Verify that the input and output arrays have the same number of dimensions...\n\tshx = x.shape;\n\tshy = y.shape;\n\tndims = shx.length;\n\tif ( ndims !== shy.length ) {\n\t\tthrow new Error( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == '+ndims+'. ndims(y) == '+shy.length+'.' );\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_MAP[ ndims ]( x, y, fcn, thisArg );\n\t\t}\n\t\treturn MAP[ ndims ]( x, y, fcn, thisArg );\n\t}\n\t// Verify that the input and output arrays have the same dimensions...\n\tlen = 1; // number of elements\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\t\tif ( d !== shy[ i ] ) {\n\t\t\tthrow new Error( 'invalid arguments. Array must have the same shape.' );\n\t\t}\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\t}\n\t// Check whether we were provided empty ndarrays...\n\tif ( len === 0 ) {\n\t\treturn;\n\t}\n\t// Determine whether the ndarrays are one-dimensional and thus readily translate to one-dimensional strided arrays...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_MAP[ ndims ]( x, y, fcn, thisArg );\n\t\t}\n\t\treturn MAP[ ndims ]( x, y, fcn, thisArg );\n\t}\n\t// Determine iteration order:\n\tiox = iterationOrder( x.strides ); // +/-1\n\tioy = iterationOrder( y.strides ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 && ioy !== 0 && iox === ioy ) {\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration for each respective array always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_MAP[ ndims ]( x, y, fcn, thisArg );\n\t\t\t}\n\t\t\treturn MAP[ ndims ]( x, y, fcn, thisArg );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_MAP[ ndims-2 ]( x, y, fcn, thisArg );\n\t\t}\n\t\treturn BLOCKED_MAP[ ndims-2 ]( x, y, fcn, thisArg );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\treturn accessormapnd( x, y, fcn, thisArg );\n\t}\n\tmapnd( x, y, fcn, thisArg );\n}\n\n\n// EXPORTS //\n\nexport default map;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 callback function to elements in a zero-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ){\n* return z * 10.0;\n* }\n*\n* // Create a data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n* var ybuf = new Float64Array( 1 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like object:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* }\n*\n* // Apply the map function:\n* map0d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0 ]\n*/\nfunction map0d( x, y, fcn, thisArg ) {\n\ty.data[ y.offset ] = fcn.call( thisArg, x.data[ x.offset ], [], x.ref );\n}\n\n\n// EXPORTS //\n\nexport default map0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 callback function to elements in a one-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map1d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 40.0, 60.0, 80.0 ]\n*/\nfunction map1d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], [ i0 ], x.ref );\n\t\tix += dx0;\n\t\tiy += dy0;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map2d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction map2d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for the outermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for innermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for outermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for innermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sx[0] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointer to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache the references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map3d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map3d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map4d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map4d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\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 idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map5d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map5d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\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 idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map6d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map6d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map7d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map7d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map8d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map8d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map9d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map9d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map10d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map10d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 callback function to elements in a zero-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n* var ybuf = new Complex64Array( 2 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map0d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 30.0\n*\n* var im = imagf( v );\n* // returns 40.0\n*/\nfunction map0d( x, y, fcn, thisArg ) {\n\ty.accessors[ 1 ]( y.data, y.offset, fcn.call( thisArg, x.accessors[ 0 ]( x.data, x.offset ), [], x.ref ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default map0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 callback function to elements in a one-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map1d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map1d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), [ i0 ], x.ref ) );\n\t\tix += dx0;\n\t\tiy += dy0;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map2d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map2d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for the outermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for innermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for outermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for innermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sx[0] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointer to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache the references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map3d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map3d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar idx;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map4d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map4d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\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 idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map5d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map5d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\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 idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map6d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map6d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map7d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map7d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map8d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map8d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map9d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map9d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map10d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map10d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap2d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction blockedmap2d( x, y, fcn, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar idx;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + (j0*sx[0]);\n\t\t\tiy = oy1 + (j0*sy[0]);\n\n\t\t\t// Compute the loop offset increments...\n\t\t\tdx1 = sx[1] - (s0*sx[0]);\n\t\t\tdy1 = sy[1] - (s0*sy[0]);\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap3d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap3d( x, y, fcn, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar idx;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap4d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap4d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\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 ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar idx;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\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 o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\tS3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\tS3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\tS2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\tS2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\tS1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap5d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap5d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\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 ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar idx;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\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 o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\tS4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\tS4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\tS3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\tS3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\tS2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap6d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap6d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\tS5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\tS5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\tS4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\tS4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\tS3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap7d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap7d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\tS6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\tS6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\tS5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\tS5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\tS4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap8d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap8d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\tS7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\tS7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\tS6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\tS6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\tS5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\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n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap9d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap9d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\tS8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\tS8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\tS7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\tS7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( S7*sx[7] );\n\t\t\tdy8 = sy[8] - ( S7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\tS6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\tS5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 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6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap10d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap10d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\tS9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\tS9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\tS8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\tS8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( S8*sx[8] );\n\t\t\tdy9 = sy[9] - ( S8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\tS7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( S7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( S7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\tS6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\tS5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t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\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap2d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap2d( x, y, fcn, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar idx;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + (j0*sx[0]);\n\t\t\tiy = oy1 + (j0*sy[0]);\n\n\t\t\t// Compute the loop offset increments...\n\t\t\tdx1 = sx[1] - (s0*sx[0]);\n\t\t\tdy1 = sy[1] - (s0*sy[0]);\n\n\t\t\t// Cache accessors:\n\t\t\tget = x.accessors[0];\n\t\t\tset = y.accessors[1];\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap3d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap3d( x, y, fcn, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar idx;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap4d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap4d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\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 ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar idx;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\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 o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\tS3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\tS3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\tS2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\tS2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\tS1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t// Cache accessors:\n\t\t\t\t\tget = x.accessors[ 0 ];\n\t\t\t\t\tset = y.accessors[ 1 ];\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap5d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap5d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\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 ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar idx;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\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 o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\tS4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\tS4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\tS3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\tS3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\tS2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap6d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap6d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar set;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\tS5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\tS5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\tS4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\tS4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\tS3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap7d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap7d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\tS6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\tS6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\tS5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\tS5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\tS4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap8d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap8d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\tS7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\tS7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\tS6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\tS6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\tS5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\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n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap9d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap9d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\tS8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\tS8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\tS7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\tS7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( S7*sx[7] );\n\t\t\tdy8 = sy[8] - ( S7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\tS6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\tS5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap10d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap10d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\tS9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\tS9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\tS8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\tS8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( S8*sx[8] );\n\t\t\tdy9 = sy[9] - ( S8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\tS7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( S7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( S7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\tS6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\tS5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap10d;\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* Formats an error message for production.\n*\n* @param {string} code - error code\n* @param {*} ...args - error message arguments\n* @returns {string} formatted error message\n*\n* @example\n* var msg = fmtprodmsg( '3', 'wrong_type' );\n* // returns 'https://stdlib.io/e/3?&arg[]=wrong_type'\n*/\nfunction fmtprodmsg() {\n\tvar a = arguments;\n\tvar c = a[ 0 ];\n\tvar u = 'https://stdlib.io/e/'+c+'?';\n\tvar i;\n\tfor ( i = 1; i < a.length; i++ ) {\n\t\tu += '&arg[]=' + encodeURIComponent( a[ i ] );\n\t}\n\treturn u;\n}\n\n\n// EXPORTS //\n\nexport default fmtprodmsg;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport isPlainObject from '@stdlib/assert-is-plain-object';\nimport isndarrayLike from '@stdlib/assert-is-ndarray-like';\nimport isFunction from '@stdlib/assert-is-function';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport emptyLike from '@stdlib/ndarray-empty-like';\nimport base from '@stdlib/ndarray-base-map';\nimport format from '@stdlib/error-tools-fmtprodmsg';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.\n*\n* @param {ndarray} x - input ndarray\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type\n* @param {Callback} fcn - callback function\n* @param {*} [thisArg] - callback execution context\n* @throws {TypeError} first argument must be an ndarray-like object\n* @throws {TypeError} callback argument must be a function\n* @throws {TypeError} options argument must be an object\n* @returns {ndarray} output ndarray\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n* import ndarray2array from '@stdlib/ndarray-to-array';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var shape = [ 2, 3 ];\n* var strides = [ 6, 1 ];\n* var offset = 1;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var y = map( x, scale );\n* // returns \n*\n* var arr = ndarray2array( y );\n* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ]\n*/\nfunction map( x, options, fcn, thisArg ) {\n\tvar hasOpts;\n\tvar clbk;\n\tvar opts;\n\tvar ctx;\n\tvar y;\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'null5t', x ) );\n\t}\n\tif ( arguments.length < 3 ) {\n\t\tclbk = options;\n\t} else if ( arguments.length === 3 ) {\n\t\tif ( isFunction( options ) ) {\n\t\t\tclbk = options;\n\t\t\tctx = fcn;\n\t\t} else {\n\t\t\thasOpts = true;\n\t\t\topts = options;\n\t\t\tclbk = fcn;\n\t\t}\n\t} else {\n\t\thasOpts = true;\n\t\topts = options;\n\t\tclbk = fcn;\n\t\tctx = thisArg;\n\t}\n\tif ( !isFunction( clbk ) ) {\n\t\tthrow new TypeError( format( 'null2b', clbk ) );\n\t}\n\tif ( hasOpts ) {\n\t\tif ( !isPlainObject( opts ) ) {\n\t\t\tthrow new TypeError( format( 'null2V', opts ) );\n\t\t}\n\t\tif ( hasOwnProp( opts, 'dtype' ) ) {\n\t\t\t// Delegate `dtype` validation to `emptyLike` during output array creation:\n\t\t\ty = emptyLike( x, {\n\t\t\t\t'dtype': opts.dtype\n\t\t\t});\n\t\t} else {\n\t\t\t// We only support a `dtype` option, so avoid passing along any other options:\n\t\t\ty = emptyLike( x );\n\t\t}\n\t} else {\n\t\ty = emptyLike( x );\n\t}\n\tbase( [ x, y ], clbk, ctx );\n\treturn y;\n}\n\n\n// EXPORTS //\n\nexport default map;\n"],"names":["FLG","Symbol","hasToStringTagSupport","toStringTag","toStr","Object","prototype","toString","has","hasOwnProperty","hasOwnProp","value","property","call","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","out","err","main$f","Array","isArray","isObject","RE","main","defineProperty","isNumber","zeros","n","i","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","precision","padRight","sign","alternate","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isnan","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","isBoolean","Bool","Boolean","test","isPrimitive","setReadOnly","self","window","globalThis","getGlobal","codegen","Function","GlobalThis","Self","Win","root","nodeList","document","childNodes","typedarray","Int8Array","reFunctionName","RE_FUNCTION_NAME","isObjectLike","REGEXP","isObjectLikeArray","predicate","len","arrayfun","isBuffer","_isBuffer","constructor","constructorName","name","ctor","ctorName","type","isFunction","typeOf","getProto","Obj","getPrototypeOf","proto","getProto$1","objectPrototype","isPlainObject","isPrototypeOf","key","ownProps","Global","setNonEnumerableReadOnlyAccessor","getter","bytesPerElement","dtype","BYTES_PER_ELEMENT","iterationOrder","strides","cnt","x","strides2order","column","ndims","row","s1","s2","isColumnMajorContiguous","order","contiguous","isRowMajorContiguous","minmaxViewBufferIndex","shape","offset","min","max","s","real","z","re","imag","im","isString","valueOf","RE_CHARS","RegExp","isRegExp","search","newval","rescape","CTORS","int8","uint8","uint8c","int16","uint16","int32","uint32","float32","float64","generic","binary","complex64","complex128","hasUint8Array","Uint8Array","bool","arr","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","Uint8Array$1","hasUint16Array","Uint16Array","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","uint16view","Uint16Array$1","ctors","IS_LITTLE_ENDIAN","buffer","hasArrayBuffer","ArrayBuffer","isArrayBuffer","hasFloat64Array","Float64Array","GlobalFloat64Array","NaN","hasFloat64ArraySupport","Float64Array$1","view","buf","GlobalArrayBuffer","isView","byteLength","hasArrayBufferSupport","ArrayBuffer$1","hasDataView","DataView","GlobalDataView","getFloat64","setFloat64","byteOffset","hasDataViewSupport","DataView$1","BigInteger","BigInt","RE_SUFFIX","dtypes","kind","DTYPES","all","enumeration","int64","uint64","notype","userdefined_type","keys","isArguments","bool$6","detect","hasArgumentsClass","main$7","Number","isNan","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","PINF","NINF","isInt","isEnumerableProperty","propertyIsEnumerable","hasStringEnumBug","isEnum","UINT32_MAX","isArguments$1","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","searchElement","fromIndex","isConstructorPrototype","w","hasAutomationEqualityBug","k","win","EXCLUDED_KEYS","check","HAS_BUILTIN","skipConstructor","skipPrototype","isFcn","p","HAS_ENUM_PROTO_BUG","HAS_NON_ENUM_PROPS_BUG","HAS_WINDOW","error","NON_ENUMERABLE","main$6","target","source","objectKeys","assign","orders","ORDERS","enumerated","DATA","LAYOUTS","modes","MODES","throw","clamp","wrap","normalize","LOW_MASK","TWO_32","BYTES","VIEW","float64ToInt64Bytes","stride","hi","lo","setUint32","bytes","ndarray","nbytes","ord","this","_byteLength","_bytesPerElement","_buffer","_dtype","_length","_ndims","_offset","_order","_shape","_strides","_accessors","_iterationOrder","isContiguous","_flags","ROW_MAJOR_CONTIGUOUS","COLUMN_MAJOR_CONTIGUOUS","READONLY","__meta_dataview__","isndarrayLike","data","isNonNegativeInteger","idx","ind","dt","iget","join","flgs","sh","st","sm","m","o","N","M","_mode","_submode","setInt8","setInt16","setBigInt64","setInt32","MAX_ARRAY_LENGTH","arraylikefcn","isArrayLike","isPrimitiveArray","isObjectArray","isNonNegativeIntegerArray","shape2strides","columnmajor","rowmajor","strides2offset","numel","TYPE","isAccessorArray","GETTERS","default","ctor2dtypes","Float32Array","Int16Array","Int32Array","Uint32Array","Uint8ClampedArray","Complex64Array","Complex128Array","hasFloat32Array","GlobalFloat32Array","hasFloat32ArraySupport","Float32Array$1","hasUint32Array","GlobalUint32Array","hasUint32ArraySupport","Uint32Array$1","hasInt32Array","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","Int32Array$1","hasInt16Array","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","Int16Array$1","hasUint8ClampedArray","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","Uint8ClampedArray$1","hasInt8Array","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","Int8Array$1","isArrayLikeObject","Complex128","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","realf","imagf","reinterpret","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","isComplexArrayConstructor","getComplex64","nargs","fromArray","RangeError","reinterpret64","reinterpret128","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","start","copyWithin","iter","entries","end","fcn","separator","sep","outbuf","reducer","initialValue","acc","sbuf","outlen","begin","index","getComplex128","NTYPES","ctor2dtype","factory","isDataType","contains","d","isOrder","ROW_MAJOR","COLUMN_MAJOR","isIntegerArray","defaults","numeric","floating_point","real_floating_point","complex_floating_point","integer","signed_integer","unsigned_integer","boolean","casting","index_mode","DEFAULTS","HASH","validate","create","Ctor","createObject$1","clampIndex","wrapIndex","mp1","normalizeIndex","isIndexMode","TABLE","mode","parent","iset","copy","MAX_DIMS","INDEX_MODE","options","opts","minmax","isBufferLengthCompatible","readonly","submode","superCtor","createObject","inherit","getIndex","filled","DEFAULT_DTYPE","gzeros","table","Buffer","allocUnsafe$1","allocUnsafe","size","emptyLike","getDType","getShape","getOrder","emptyArray","SETTERS","setter","copyIndexed","ndarraylike2object","xbuf","getData","ref","getStrides","getOffset","accessorProtocol","accessors","accessorSetter","zeroTo","arraylike2object","complex","take","indices","loopOrder","sx","sy","y","avx","ix","iy","jx","jy","vx","vy","ux","sort2ins","indexed","BLOCK_SIZE_IN_BYTES","BLOCK_SIZE_IN_ELEMENTS","unaryBlockSize","dtypeX","dtypeY","nbx","nby","reverse","method","hasMethod","internal","vind2bind","ceil","trunc","ind2sub","getSubscripts","MODE","MAP","ybuf","dx0","dy0","S0","i0","dx1","dy1","S1","i1","dx2","dy2","S2","i2","dx3","dy3","S3","i3","dx4","dy4","S4","i4","dx5","dy5","S5","i5","dx6","dy6","S6","i6","dx7","dy7","S7","i7","dx8","dy8","S8","i8","dx9","dy9","S9","i9","ACCESSOR_MAP","BLOCKED_MAP","bsize","ox1","oy1","s0","ox","oy","j0","j1","blockSize","ox2","oy2","j2","ox3","oy3","j3","ox4","oy4","j4","ox5","oy5","j5","ox6","oy6","j6","ox7","oy7","j7","ox8","oy8","j8","ox9","oy9","j9","BLOCKED_ACCESSOR_MAP","map","arrays","shx","shy","iox","ioy","ndarray2object","ordx","ordy","accessormapnd","mapnd","fmtprodmsg","a","u","encodeURIComponent","hasOpts","ctx"],"mappings":";oOA2BA,IAAIA,ECMgB,mBAAXC,QACoB,iBAApBA,OAAQ,ODOjB,SAASC,IACR,OAASF,GAAqC,iBAAvBC,OAAOE,WAC/B,CErBA,IAAIC,EAAQC,OAAOC,UAAUC,SCA7B,IAAIC,EAAMH,OAAOC,UAAUG,eA4B3B,SAASC,EAAYC,EAAOC,GAC3B,OACCD,SAKMH,EAAIK,KAAMF,EAAOC,EACzB,CCpCA,IAAIE,EAA0B,mBAAXb,OAA0BA,YAAS,ECKlDc,EAA+B,mBAAXd,EAA0BA,EAAOE,YAAc,GCiCvE,IAAAa,EATKC,ICDL,SAAsBC,GACrB,IAAIC,EACAC,EACAC,EAEJ,GAAKH,QACJ,OAAOd,EAAMS,KAAMK,GAEpBE,EAAMF,EAAGf,GACTgB,EAAQT,EAAYQ,EAAGf,GAGvB,IACCe,EAAGf,QAAgB,CACnB,CAAC,MAAQmB,GACT,OAAOlB,EAAMS,KAAMK,EACnB,CAQD,OAPAG,EAAMjB,EAAMS,KAAMK,GAEbC,EACJD,EAAGf,GAAgBiB,SAEZF,EAAGf,GAEJkB,CACR,EC3BA,SAAsBH,GACrB,OAAOd,EAAMS,KAAMK,EACpB,ECYA,IAAAK,EATKC,MAAMC,QACND,MAAMC,QARX,SAAkBd,GACjB,MAAkC,mBAAzBK,EAAaL,EACvB,ECPA,SAASe,EAAUf,GAClB,MACkB,iBAAVA,GACG,OAAVA,IACCc,EAASd,EAEZ,CC3BA,IAAIgB,EAAK,ICELC,EAA0C,mBAA1BvB,OAAOwB,eAAkCxB,OAAOwB,eAAiB,KCiCrF,IAAIA,EAAiBxB,O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oBF,EAAGvqB,IAEzC,OAAOwqB,CACR,QC2BA,SAAcvgB,EAAGqW,EAASnD,EAAKX,GAC9B,IAAIkO,EACAjO,EACA8D,EACAoK,EACA1H,EACJ,IAAMjN,GAAe/L,GACpB,MAAM,IAAIvG,UAAWe,GAAQ,SAAUwF,IAmBxC,GAjBKpG,UAAUtD,OAAS,EACvBkc,EAAO6D,EACyB,IAArBzc,UAAUtD,OAChBqI,GAAY0X,IAChB7D,EAAO6D,EACPqK,EAAMxN,IAENuN,GAAU,EACVnK,EAAOD,EACP7D,EAAOU,IAGRuN,GAAU,EACVnK,EAAOD,EACP7D,EAAOU,EACPwN,EAAMnO,IAED5T,GAAY6T,GACjB,MAAM,IAAI/Y,UAAWe,GAAQ,SAAUgY,IAExC,GAAKiO,EAAU,CACd,IAAMthB,GAAemX,GACpB,MAAM,IAAI7c,UAAWe,GAAQ,SAAU8b,IAIvC0C,EAFIxkB,EAAY8hB,EAAM,SAElBiB,GAAWvX,EAAG,CACjBL,MAAS2W,EAAK3W,QAIX4X,GAAWvX,EAElB,MACEgZ,EAAIzB,GAAWvX,GAGhB,OADAhJ,GAAM,CAAEgJ,EAAGgZ,GAAKxG,EAAMkO,GACf1H,CACR","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415]} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 4504e2e..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import map from '../docs/types/index'; -export = map; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index fec6dab..0000000 --- a/dist/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict";var b=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var p=b(function(k,g){ -var c=require('@stdlib/assert-is-plain-object/dist'),f=require('@stdlib/assert-is-ndarray-like/dist'),m=require('@stdlib/assert-is-function/dist'),o=require('@stdlib/assert-has-own-property/dist'),l=require('@stdlib/ndarray-empty-like/dist'),d=require('@stdlib/ndarray-base-map/dist'),v=require('@stdlib/error-tools-fmtprodmsg/dist');function q(r,e,u,y){var n,a,t,s,i;if(!f(r))throw new TypeError(v('null5t',r));if(arguments.length<3?a=e:arguments.length===3?m(e)?(a=e,s=u):(n=!0,t=e,a=u):(n=!0,t=e,a=u,s=y),!m(a))throw new TypeError(v('null2b',a));if(n){if(!c(t))throw new TypeError(v('null2V',t));o(t,"dtype")?i=l(r,{dtype:t.dtype}):i=l(r)}else i=l(r);return d([r,i],a,s),i}g.exports=q -});var h=p();module.exports=h; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 3ada168..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../lib/main.js", "../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 isPlainObject = require( '@stdlib/assert-is-plain-object' );\nvar isndarrayLike = require( '@stdlib/assert-is-ndarray-like' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar emptyLike = require( '@stdlib/ndarray-empty-like' );\nvar base = require( '@stdlib/ndarray-base-map' );\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.\n*\n* @param {ndarray} x - input ndarray\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type\n* @param {Callback} fcn - callback function\n* @param {*} [thisArg] - callback execution context\n* @throws {TypeError} first argument must be an ndarray-like object\n* @throws {TypeError} callback argument must be a function\n* @throws {TypeError} options argument must be an object\n* @returns {ndarray} output ndarray\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ndarray = require( '@stdlib/ndarray-ctor' );\n* var ndarray2array = require( '@stdlib/ndarray-to-array' );\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var shape = [ 2, 3 ];\n* var strides = [ 6, 1 ];\n* var offset = 1;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var y = map( x, scale );\n* // returns \n*\n* var arr = ndarray2array( y );\n* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ]\n*/\nfunction map( x, options, fcn, thisArg ) {\n\tvar hasOpts;\n\tvar clbk;\n\tvar opts;\n\tvar ctx;\n\tvar y;\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );\n\t}\n\tif ( arguments.length < 3 ) {\n\t\tclbk = options;\n\t} else if ( arguments.length === 3 ) {\n\t\tif ( isFunction( options ) ) {\n\t\t\tclbk = options;\n\t\t\tctx = fcn;\n\t\t} else {\n\t\t\thasOpts = true;\n\t\t\topts = options;\n\t\t\tclbk = fcn;\n\t\t}\n\t} else {\n\t\thasOpts = true;\n\t\topts = options;\n\t\tclbk = fcn;\n\t\tctx = thisArg;\n\t}\n\tif ( !isFunction( clbk ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', clbk ) );\n\t}\n\tif ( hasOpts ) {\n\t\tif ( !isPlainObject( opts ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', opts ) );\n\t\t}\n\t\tif ( hasOwnProp( opts, 'dtype' ) ) {\n\t\t\t// Delegate `dtype` validation to `emptyLike` during output array creation:\n\t\t\ty = emptyLike( x, {\n\t\t\t\t'dtype': opts.dtype\n\t\t\t});\n\t\t} else {\n\t\t\t// We only support a `dtype` option, so avoid passing along any other options:\n\t\t\ty = emptyLike( x );\n\t\t}\n\t} else {\n\t\ty = emptyLike( x );\n\t}\n\tbase( [ x, y ], clbk, ctx );\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = map;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 callback function to elements in an input ndarray and assign results to elements in an output ndarray.\n*\n* @module @stdlib/ndarray-map\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var ndarray = require( '@stdlib/ndarray-ctor' );\n* var ndarray2array = require( '@stdlib/ndarray-to-array' );\n* var map = require( '@stdlib/ndarray-map' );\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var shape = [ 2, 3 ];\n* var strides = [ 6, 1 ];\n* var offset = 1;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var y = map( x, scale );\n* // returns \n*\n* var arr = ndarray2array( y );\n* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], - "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAgB,QAAS,gCAAiC,EAC1DC,EAAgB,QAAS,gCAAiC,EAC1DC,EAAa,QAAS,4BAA6B,EACnDC,EAAa,QAAS,iCAAkC,EACxDC,EAAY,QAAS,4BAA6B,EAClDC,EAAO,QAAS,0BAA2B,EAC3CC,EAAS,QAAS,uBAAwB,EAyC9C,SAASC,EAAKC,EAAGC,EAASC,EAAKC,EAAU,CACxC,IAAIC,EACAC,EACAC,EACAC,EACAC,EACJ,GAAK,CAACf,EAAeO,CAAE,EACtB,MAAM,IAAI,UAAWF,EAAQ,gFAAiFE,CAAE,CAAE,EAmBnH,GAjBK,UAAU,OAAS,EACvBK,EAAOJ,EACI,UAAU,SAAW,EAC3BP,EAAYO,CAAQ,GACxBI,EAAOJ,EACPM,EAAML,IAENE,EAAU,GACVE,EAAOL,EACPI,EAAOH,IAGRE,EAAU,GACVE,EAAOL,EACPI,EAAOH,EACPK,EAAMJ,GAEF,CAACT,EAAYW,CAAK,EACtB,MAAM,IAAI,UAAWP,EAAQ,uEAAwEO,CAAK,CAAE,EAE7G,GAAKD,EAAU,CACd,GAAK,CAACZ,EAAec,CAAK,EACzB,MAAM,IAAI,UAAWR,EAAQ,qEAAsEQ,CAAK,CAAE,EAEtGX,EAAYW,EAAM,OAAQ,EAE9BE,EAAIZ,EAAWI,EAAG,CACjB,MAASM,EAAK,KACf,CAAC,EAGDE,EAAIZ,EAAWI,CAAE,CAEnB,MACCQ,EAAIZ,EAAWI,CAAE,EAElB,OAAAH,EAAM,CAAEG,EAAGQ,CAAE,EAAGH,EAAME,CAAI,EACnBC,CACR,CAKAjB,EAAO,QAAUQ,ICrEjB,IAAIU,EAAO,IAKX,OAAO,QAAUA", - "names": ["require_main", "__commonJSMin", "exports", "module", "isPlainObject", "isndarrayLike", "isFunction", "hasOwnProp", "emptyLike", "base", "format", "map", "x", "options", "fcn", "thisArg", "hasOpts", "clbk", "opts", "ctx", "y", "main"] -} diff --git a/docs/repl.txt b/docs/repl.txt deleted file mode 100644 index bba7441..0000000 --- a/docs/repl.txt +++ /dev/null @@ -1,39 +0,0 @@ - -{{alias}}( x[, options], fcn[, thisArg] ) - Applies a callback function to elements in an input ndarray and assigns - results to elements in a new output ndarray. - - The callback function is provided the following arguments: - - - value: current array element. - - indices: current array element indices. - - arr: the input ndarray. - - Parameters - ---------- - x: ndarray - Input ndarray. - - options: Object (optional) - Function options. - - options.dtype: string (optional) - Output ndarray data type. Overrides using the input array's inferred - data type. - - fcn: Function - Callback function. - - thisArg: any (optional) - Callback function execution context. - - Examples - -------- - > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ); - > function f( v ) { return v*10.0; }; - > var y = {{alias}}( x, f ); - > {{alias:@stdlib/ndarray/to-array}}( y ) - [ [ 10.0, 20.0 ], [ 30.0, 40.0 ] ] - - See Also - -------- diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts deleted file mode 100644 index dc22bfd..0000000 --- a/docs/types/index.d.ts +++ /dev/null @@ -1,1180 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2024 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 - -/// - -/* eslint-disable max-lines */ - -import { typedndarray, DataType, float64ndarray, float32ndarray, complex128ndarray, complex64ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, boolndarray, genericndarray } from '@stdlib/types/ndarray'; -import { Complex64, Complex128, ComplexLike } from '@stdlib/types/complex'; - -/** -* Callback invoked for each ndarray element. -* -* @returns output value -*/ -type Nullary = ( this: W ) => V; - -/** -* Callback invoked for each ndarray element. -* -* @param value - current array element -* @returns output value -*/ -type Unary = ( this: W, value: T ) => V; - -/** -* Callback invoked for each ndarray element. -* -* @param value - current array element -* @param indices - current array element indices -* @returns output value -*/ -type Binary = ( this: W, value: T, indices: Array ) => V; - -/** -* Callback invoked for each ndarray element. -* -* @param value - current array element -* @param indices - current array element indices -* @param arr - input array -* @returns output value -*/ -type Ternary = ( this: W, value: T, indices: Array, arr: U ) => V; - -/** -* Callback invoked for each ndarray element. -* -* @param value - current array element -* @param indices - current array element indices -* @param arr - input array -* @returns output value -*/ -type Callback = Nullary | Unary | Binary | Ternary; - -/** -* Interface describing function options. -*/ -interface Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: DataType; -} - -/** -* Interface describing function options. -*/ -interface Float64Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'float64'; -} - -/** -* Interface describing function options. -*/ -interface Float32Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'float32'; -} - -/** -* Interface describing function options. -*/ -interface Complex128Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'complex128'; -} - -/** -* Interface describing function options. -*/ -interface Complex64Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'complex64'; -} - -/** -* Interface describing function options. -*/ -interface Int32Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'int32'; -} - -/** -* Interface describing function options. -*/ -interface Int16Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'int16'; -} - -/** -* Interface describing function options. -*/ -interface Int8Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'int8'; -} - -/** -* Interface describing function options. -*/ -interface Uint32Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'uint32'; -} - -/** -* Interface describing function options. -*/ -interface Uint16Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'uint16'; -} - -/** -* Interface describing function options. -*/ -interface Uint8Options extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'uint8'; -} - -/** -* Interface describing function options. -*/ -interface Uint8COptions extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'uint8c'; -} - -/** -* Interface describing function options. -*/ -interface BoolOptions extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'bool'; -} - -/** -* Interface describing function options. -*/ -interface GenericOptions extends Options { - /** - * Output ndarray data type. - * - * ## Notes - * - * - This option overrides using the input ndarray's inferred data type. - */ - dtype?: 'generic'; -} - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ] -*/ -declare function map( x: float64ndarray, fcn: Callback, thisArg?: ThisParameterType> ): float64ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float32Array = require( '@stdlib/array-float32' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float32', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ] -*/ -declare function map( x: float32ndarray, fcn: Callback, thisArg?: ThisParameterType> ): float32ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Complex64Array = require( '@stdlib/array-complex64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* -* function identity( z ) { -* return z; -* } -* -* var buffer = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 3, 1 ]; -* var offset = 0; -* -* var x = ndarray( 'complex64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, identity ); -* // returns -*/ -declare function map( x: complex64ndarray, fcn: Callback, thisArg?: ThisParameterType> ): complex64ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Complex128Array = require( '@stdlib/array-complex128' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* -* function identity( z ) { -* return z; -* } -* -* var buffer = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 3, 1 ]; -* var offset = 0; -* -* var x = ndarray( 'complex128', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, identity ); -* // returns -*/ -declare function map( x: complex128ndarray, fcn: Callback, thisArg?: ThisParameterType> ): complex128ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Int32Array = require( '@stdlib/array-int32' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10; -* } -* -* var buffer = new Int32Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'int32', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: int32ndarray, fcn: Callback, thisArg?: ThisParameterType> ): int32ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Int16Array = require( '@stdlib/array-int16' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10; -* } -* -* var buffer = new Int16Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'int16', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: int16ndarray, fcn: Callback, thisArg?: ThisParameterType> ): int16ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Int8Array = require( '@stdlib/array-int8' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10; -* } -* -* var buffer = new Int8Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'int8', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: int8ndarray, fcn: Callback, thisArg?: ThisParameterType> ): int8ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Uint32Array = require( '@stdlib/array-uint32' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10; -* } -* -* var buffer = new Uint32Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'uint32', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: uint32ndarray, fcn: Callback, thisArg?: ThisParameterType> ): uint32ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Uint16Array = require( '@stdlib/array-uint16' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10; -* } -* -* var buffer = new Uint16Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'uint16', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: uint16ndarray, fcn: Callback, thisArg?: ThisParameterType> ): uint16ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Uint8Array = require( '@stdlib/array-uint8' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10; -* } -* -* var buffer = new Uint8Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'uint8', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: uint8ndarray, fcn: Callback, thisArg?: ThisParameterType> ): uint8ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Uint8ClampedArray = require( '@stdlib/array-uint8c' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10; -* } -* -* var buffer = new Uint8ClampedArray( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'uint8c', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: uint8cndarray, fcn: Callback, thisArg?: ThisParameterType> ): uint8cndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var BooleanArray = require( '@stdlib/array-bool' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function invert( v ) { -* return !v; -* } -* -* var buffer = new BooleanArray( [ false, false, false, false, false, false, false, false, false, false, false, false ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'bool', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, invert ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ true, true, true ], [ true, true, true ] ] -*/ -declare function map( x: boolndarray, fcn: Callback, thisArg?: ThisParameterType> ): boolndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ]; -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ] -*/ -declare function map( x: genericndarray, fcn: Callback, V, W>, thisArg?: ThisParameterType, V, W>> ): genericndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'float64' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ] -*/ -declare function map( x: typedndarray, options: Float64Options, fcn: Callback, number, W>, thisArg?: ThisParameterType, number, W>> ): float64ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'float32' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ] -*/ -declare function map( x: typedndarray, options: Float32Options, fcn: Callback, number, W>, thisArg?: ThisParameterType, number, W>> ): float32ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var Complex128 = require( '@stdlib/complex-float64-ctor' ); -* -* function toComplex( z ) { -* return new Complex128( z, 0.0 ); -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'complex128' -* }; -* var y = map( x, opts, toComplex ); -* // returns -*/ -declare function map( x: typedndarray, options: Complex128Options, fcn: Callback, ComplexLike, W>, thisArg?: ThisParameterType, ComplexLike, W>> ): complex128ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var Complex64 = require( '@stdlib/complex-float32-ctor' ); -* -* function toComplex( z ) { -* return new Complex64( z, 0.0 ); -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'complex64' -* }; -* var y = map( x, opts, toComplex ); -* // returns -*/ -declare function map( x: typedndarray, options: Complex64Options, fcn: Callback, ComplexLike, W>, thisArg?: ThisParameterType, ComplexLike, W>> ): complex64ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'int32' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: typedndarray, options: Int32Options, fcn: Callback, number, W>, thisArg?: ThisParameterType, number, W>> ): int32ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'int16' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: typedndarray, options: Int16Options, fcn: Callback, number, W>, thisArg?: ThisParameterType, number, W>> ): int16ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'int8' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: typedndarray, options: Int8Options, fcn: Callback, number, W>, thisArg?: ThisParameterType, number, W>> ): int8ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'uint32' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: typedndarray, options: Uint32Options, fcn: Callback, number, W>, thisArg?: ThisParameterType, number, W>> ): uint32ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'uint16' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: typedndarray, options: Uint16Options, fcn: Callback, number, W>, thisArg?: ThisParameterType, number, W>> ): uint16ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'uint8' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: typedndarray, options: Uint8Options, fcn: Callback, number, W>, thisArg?: ThisParameterType, number, W>> ): uint8ndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'uint8c' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: typedndarray, options: Uint8COptions, fcn: Callback, number, W>, thisArg?: ThisParameterType, number, W>> ): uint8cndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* var Boolean = require( '@stdlib/boolean-ctor' ); -* -* function toBoolean( z ) { -* return Boolean( z ); -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'bool' -* }; -* var y = map( x, opts, toBoolean ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ true, true, true ], [ true, true, true ] ] -*/ -declare function map( x: typedndarray, options: BoolOptions, fcn: Callback, boolean, W>, thisArg?: ThisParameterType, boolean, W>> ): boolndarray; - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param x - input ndarray -* @param options - options -* @param options.dtype - output ndarray data type -* @param fcn - callback function -* @param thisArg - callback function execution context -* @returns output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var opts = { -* 'dtype': 'generic' -* }; -* var y = map( x, opts, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ] -*/ -declare function map( x: typedndarray, options: GenericOptions, fcn: Callback, V, W>, thisArg?: ThisParameterType, V, W>> ): genericndarray; - - -// EXPORTS // - -export = map; diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 6f8b1df..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* -* @license Apache-2.0 -* -* Copyright (c) 2024 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 empty = require( '@stdlib/ndarray-base-empty' ); -import zeros = require( '@stdlib/ndarray-base-zeros' ); -import map = require( './index' ); - -/** -* Evaluates the identity function. -* -* @param x - input value -* @returns input value -*/ -function identity( x: any ): any { - return x; -} - -// The function returns an ndarray... -{ - const sh = [ 2, 2 ]; - const ord = 'row-major'; - - map( zeros( 'float64', sh, ord ), identity ); // $ExpectType float64ndarray - map( zeros( 'float64', sh, ord ), identity, {} ); // $ExpectType float64ndarray - map( zeros( 'float32', sh, ord ), identity ); // $ExpectType float32ndarray - map( zeros( 'float32', sh, ord ), identity, {} ); // $ExpectType float32ndarray - map( zeros( 'complex64', sh, ord ), identity ); // $ExpectType complex64ndarray - map( zeros( 'complex64', sh, ord ), identity, {} ); // $ExpectType complex64ndarray - map( zeros( 'complex128', sh, ord ), identity ); // $ExpectType complex128ndarray - map( zeros( 'complex128', sh, ord ), identity, {} ); // $ExpectType complex128ndarray - map( zeros( 'int32', sh, ord ), identity ); // $ExpectType int32ndarray - map( zeros( 'int32', sh, ord ), identity, {} ); // $ExpectType int32ndarray - map( zeros( 'int16', sh, ord ), identity ); // $ExpectType int16ndarray - map( zeros( 'int16', sh, ord ), identity, {} ); // $ExpectType int16ndarray - map( zeros( 'int8', sh, ord ), identity ); // $ExpectType int8ndarray - map( zeros( 'int8', sh, ord ), identity, {} ); // $ExpectType int8ndarray - map( zeros( 'uint32', sh, ord ), identity ); // $ExpectType uint32ndarray - map( zeros( 'uint32', sh, ord ), identity, {} ); // $ExpectType uint32ndarray - map( zeros( 'uint16', sh, ord ), identity ); // $ExpectType uint16ndarray - map( zeros( 'uint16', sh, ord ), identity, {} ); // $ExpectType uint16ndarray - map( zeros( 'uint8', sh, ord ), identity ); // $ExpectType uint8ndarray - map( zeros( 'uint8', sh, ord ), identity, {} ); // $ExpectType uint8ndarray - map( zeros( 'uint8c', sh, ord ), identity ); // $ExpectType uint8cndarray - map( zeros( 'uint8c', sh, ord ), identity, {} ); // $ExpectType uint8cndarray - map( empty( 'bool', sh, ord ), identity ); // $ExpectType boolndarray - map( empty( 'bool', sh, ord ), identity, {} ); // $ExpectType boolndarray - map( zeros( 'generic', sh, ord ), identity ); // $ExpectType genericndarray - map( zeros( 'generic', sh, ord ), identity, {} ); // $ExpectType genericndarray - - - map( zeros( 'generic', sh, ord ), { 'dtype': 'float64' }, identity ); // $ExpectType float64ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'float64' }, identity, {} ); // $ExpectType float64ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'float32' }, identity ); // $ExpectType float32ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'float32' }, identity, {} ); // $ExpectType float32ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'complex64' }, identity ); // $ExpectType complex64ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'complex64' }, identity, {} ); // $ExpectType complex64ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'complex128' }, identity ); // $ExpectType complex128ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'complex128' }, identity, {} ); // $ExpectType complex128ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'int32' }, identity ); // $ExpectType int32ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'int32' }, identity, {} ); // $ExpectType int32ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'int16' }, identity ); // $ExpectType int16ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'int16' }, identity, {} ); // $ExpectType int16ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'int8' }, identity ); // $ExpectType int8ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'int8' }, identity, {} ); // $ExpectType int8ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'uint32' }, identity ); // $ExpectType uint32ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'uint32' }, identity, {} ); // $ExpectType uint32ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'uint16' }, identity ); // $ExpectType uint16ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'uint16' }, identity, {} ); // $ExpectType uint16ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'uint8' }, identity ); // $ExpectType uint8ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'uint8' }, identity, {} ); // $ExpectType uint8ndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'uint8c' }, identity ); // $ExpectType uint8cndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'uint8c' }, identity, {} ); // $ExpectType uint8cndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'bool' }, identity ); // $ExpectType boolndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'bool' }, identity, {} ); // $ExpectType boolndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'generic' }, identity ); // $ExpectType genericndarray - map( zeros( 'generic', sh, ord ), { 'dtype': 'generic' }, identity, {} ); // $ExpectType genericndarray - -} - -// The compiler throws an error if the function is provided a first argument which is not an ndarray... -{ - map( 5, identity ); // $ExpectError - map( true, identity ); // $ExpectError - map( false, identity ); // $ExpectError - map( null, identity ); // $ExpectError - map( undefined, identity ); // $ExpectError - map( {}, identity ); // $ExpectError - map( [ 1 ], identity ); // $ExpectError - map( ( x: number ): number => x, identity ); // $ExpectError -} - -// The compiler throws an error if the function is provided a callback which is not a function... -{ - const x = zeros( 'generic', [ 2, 2 ], 'row-major' ); - - map( x, '5' ); // $ExpectError - map( x, true ); // $ExpectError - map( x, false ); // $ExpectError - map( x, null ); // $ExpectError - map( x, undefined ); // $ExpectError - map( x, {} ); // $ExpectError - map( x, [ 1 ] ); // $ExpectError -} - -// The compiler throws an error if the function is provided an options argument which is not an object... -{ - const x = zeros( 'generic', [ 2, 2 ], 'row-major' ); - - map( x, '10', identity, {} ); // $ExpectError - map( x, 10, identity, {} ); // $ExpectError - map( x, false, identity, {} ); // $ExpectError - map( x, true, identity, {} ); // $ExpectError - map( x, [], identity, {} ); // $ExpectError - map( x, ( x: number ): number => x, identity, {} ); // $ExpectError -} - -// The compiler throws an error if the function is provided a `dtype` option which is not a valid data type... -{ - const x = zeros( 'generic', [ 2, 2 ], 'row-major' ); - - map( x, { 'dtype': '10' }, identity ); // $ExpectError - map( x, { 'dtype': 10 }, identity ); // $ExpectError - map( x, { 'dtype': null }, identity ); // $ExpectError - map( x, { 'dtype': false }, identity ); // $ExpectError - map( x, { 'dtype': true }, identity ); // $ExpectError - map( x, { 'dtype': [] }, identity ); // $ExpectError - map( x, { 'dtype': {} }, identity ); // $ExpectError - map( x, { 'dtype': ( x: number ): number => x }, identity ); // $ExpectError -} - -// The compiler throws an error if the function is provided an unsupported number of arguments... -{ - map(); // $ExpectError - map( zeros( 'float64', [ 2, 2 ], 'row-major' ) ); // $ExpectError - map( zeros( 'float64', [ 2, 2 ], 'row-major' ), {}, ( x: number ): number => x, {}, {} ); // $ExpectError -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1896de3..0000000 --- a/examples/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 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 abs = require( '@stdlib/math-base-special-abs' ); -var ndarray2array = require( '@stdlib/ndarray-to-array' ); -var naryFunction = require( '@stdlib/utils-nary-function' ); -var ndarray = require( '@stdlib/ndarray-ctor' ); -var map = require( './../lib' ); - -var buffer = discreteUniform( 10, -100, 100, { - 'dtype': 'generic' -}); -var shape = [ 5, 2 ]; -var strides = [ 2, 1 ]; -var offset = 0; -var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' ); -console.log( ndarray2array( x ) ); - -var y = map( x, naryFunction( abs, 1 ) ); -console.log( ndarray2array( y ) ); diff --git a/index.js b/index.js new file mode 100644 index 0000000..9cbd745 --- /dev/null +++ b/index.js @@ -0,0 +1,3 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("buffer")):"function"==typeof define&&define.amd?define(["buffer"],t):(r="undefined"!=typeof globalThis?globalThis:r||self).map=t(r.require$$0)}(this,(function(r){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function e(){return t&&"symbol"==typeof Symbol.toStringTag}var n=Object.prototype.toString;var o=Object.prototype.hasOwnProperty;function i(r,t){return null!=r&&o.call(r,t)}var a="function"==typeof Symbol?Symbol:void 0,f="function"==typeof a?a.toStringTag:"";var s=e()?function(r){var t,e,o;if(null==r)return n.call(r);e=r[f],t=i(r,f);try{r[f]=void 0}catch(t){return n.call(r)}return o=n.call(r),t?r[f]=e:delete r[f],o}:function(r){return n.call(r)};var u=Array.isArray?Array.isArray:function(r){return"[object Array]"===s(r)};function l(r){return"object"==typeof r&&null!==r&&!u(r)}var c=/./,h="function"==typeof Object.defineProperty?Object.defineProperty:null;var p=Object.defineProperty;function d(r){return"number"==typeof r}function g(r){var t,e="";for(t=0;t0&&(t-=1),e=n.toExponential(t)):e=n.toPrecision(r.precision),r.alternate||(e=T.call(e,I,"$1e"),e=T.call(e,S,"e"),e=T.call(e,O,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return e=T.call(e,x,"e+0$1"),e=T.call(e,V,"e-0$1"),r.alternate&&(e=T.call(e,j,"$1."),e=T.call(e,A,"$1.e")),n>=0&&r.sign&&(e=r.sign+e),e=r.specifier===E.call(r.specifier)?E.call(e):_.call(e)}function L(r){var t,e="";for(t=0;t127)throw new Error("invalid character code. Value: "+n.arg);n.arg=N(i)?String(n.arg):F(i)}break;case"e":case"E":case"f":case"F":case"g":case"G":t||(n.precision=6),n.arg=R(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=m(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(l=n.arg,c=n.width,h=n.padRight,p=void 0,(p=c-l.length)<0?l:l=h?l+L(p):L(p)+l)),a+=n.arg||"",f+=1}return a}var U=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function C(r){var t={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(t.precision="1"),t}function P(r){var t,e,n,o;for(e=[],o=0,n=U.exec(r);n;)(t=r.slice(o,U.lastIndex-n[0].length)).length&&e.push(t),e.push(C(n)),o=U.lastIndex,n=U.exec(r);return(t=r.slice(o)).length&&e.push(t),e}function Y(r){var t,e;if("string"!=typeof r)throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",r));for(t=[P(r)],e=1;eo&&(n=!1),!n&&!t)return 0;o=i}return n&&t?3:n?1:2}function Lr(r,t){return t&&(2===r||3===r)}function Fr(r,t){return t&&(1===r||3===r)}function Br(r,t,e){var n,o,i,a,f;for(n=r.length,o=e,i=e,f=0;f0?i+=a*(r[f]-1):a<0&&(o+=a*(r[f]-1))}return[o,i]}function Nr(r){return r.re}function Mr(r){return r.im}function kr(r){return"string"==typeof r}X(Br,"assign",(function(r,t,e,n){var o,i,a,f,s;for(o=r.length,i=e,a=e,s=0;s0?a+=f*(r[s]-1):f<0&&(i+=f*(r[s]-1))}return n[0]=i,n[1]=a,n}));var Ur=String.prototype.valueOf;var Cr=e();function Pr(r){return"object"==typeof r&&(r instanceof String||(Cr?function(r){try{return Ur.call(r),!0}catch(r){return!1}}(r):"[object String]"===s(r)))}function Yr(r){return kr(r)||Pr(r)}X(Yr,"isPrimitive",kr),X(Yr,"isObject",Pr);var Dr=/[-\/\\^$*+?.()|[\]{}]/g;var Wr=RegExp.prototype.exec;var zr=e();function Gr(r){return"object"==typeof r&&(r instanceof RegExp||(zr?function(r){try{return Wr.call(r),!0}catch(r){return!1}}(r):"[object RegExp]"===s(r)))}function $r(r,t,e){return r.replace(t,e)}function Jr(r,t,e){if(!kr(r))throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",r));if(kr(t))t=new RegExp(function(r){var t,e;if(!kr(r))throw new TypeError(Y("invalid argument. Must provide a regular expression string. Value: `%s`.",r));if("/"===r[0])for(e=r.length-1;e>=0&&"/"!==r[e];e--);return void 0===e||e<=0?r.replace(Dr,"\\$&"):(t=(t=r.substring(1,e)).replace(Dr,"\\$&"),r=r[0]+t+r.substring(e))}(t),"g");else if(!Gr(t))throw new TypeError(Y("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",t));if(!kr(e)&&!vr(e))throw new TypeError(Y("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",e));return $r(r,t,e)}var Zr={int8:"new Int8Array( [ {{data}} ] )",uint8:"new Uint8Array( [ {{data}} ] )",uint8c:"new Uint8ClampedArray( [ {{data}} ] )",int16:"new Int16Array( [ {{data}} ] )",uint16:"new Uint16Array( [ {{data}} ] )",int32:"new Int32Array( [ {{data}} ] )",uint32:"new Uint32Array( [ {{data}} ] )",float32:"new Float32Array( [ {{data}} ] )",float64:"new Float64Array( [ {{data}} ] )",generic:"[ {{data}} ]",binary:"new Buffer( [ {{data}} ] )",complex64:"new Complex64Array( [ {{data}} ] )",complex128:"new Complex128Array( [ {{data}} ] )"};var Kr="function"==typeof Uint8Array;function Xr(r){return Kr&&r instanceof Uint8Array||"[object Uint8Array]"===s(r)}var qr="function"==typeof Uint8Array?Uint8Array:null;var Hr,Qr="function"==typeof Uint8Array?Uint8Array:void 0;Hr=function(){var r,t;if("function"!=typeof qr)return!1;try{r=Xr(t=new qr(t=[1,3.14,-3.14,256,257]))&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?Qr:function(){throw new Error("not implemented")};var rt=Hr,tt="function"==typeof Uint16Array;var et="function"==typeof Uint16Array?Uint16Array:null;var nt,ot="function"==typeof Uint16Array?Uint16Array:void 0;nt=function(){var r,t,e;if("function"!=typeof et)return!1;try{t=new et(t=[1,3.14,-3.14,65536,65537]),e=t,r=(tt&&e instanceof Uint16Array||"[object Uint16Array]"===s(e))&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?ot:function(){throw new Error("not implemented")};var it,at=nt,ft={uint16:at,uint8:rt};(it=new ft.uint16(1))[0]=4660;var st=52===new ft.uint8(it.buffer)[0],ut="function"==typeof ArrayBuffer;function lt(r){return ut&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===s(r)}var ct="function"==typeof Float64Array;var ht="function"==typeof Float64Array?Float64Array:null;var pt,dt="function"==typeof Float64Array?Float64Array:void 0;pt=function(){var r,t,e;if("function"!=typeof ht)return!1;try{t=new ht([1,3.14,-3.14,NaN]),e=t,r=(ct&&e instanceof Float64Array||"[object Float64Array]"===s(e))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){r=!1}return r}()?dt:function(){throw new Error("not implemented")};var gt=pt,mt="function"==typeof ArrayBuffer?ArrayBuffer:null;var yt,vt="function"==typeof ArrayBuffer?ArrayBuffer:void 0;yt=function(){var r,t,e;if("function"!=typeof mt)return!1;try{(r=lt(e=new mt(16))&&"function"==typeof mt.isView)&&((t=new gt(e))[0]=-3.14,t[1]=NaN,r=r&&mt.isView(t)&&16===e.byteLength&&-3.14===t[0]&&t[1]!=t[1])}catch(t){r=!1}return r}()?vt:function(){throw new Error("not implemented")};var wt=yt,bt="function"==typeof DataView;var _t="function"==typeof DataView?DataView:null;var Et,Tt="function"==typeof DataView?DataView:void 0;Et=function(){var r,t,e,n;if("function"!=typeof _t)return!1;try{e=new wt(24),t=new _t(e,8),n=t,(r=(bt&&n instanceof DataView||"[object DataView]"===s(n))&&"function"==typeof t.getFloat64&&"function"==typeof t.setFloat64)&&(t.setFloat64(0,-3.14),t.setFloat64(8,NaN),r=r&&t.buffer===e&&16===t.byteLength&&8===t.byteOffset&&-3.14===t.getFloat64(0)&&t.getFloat64(8)!=t.getFloat64(8))}catch(t){r=!1}return r}()?Tt:function(){throw new Error("not implemented")};var xt=Et,Vt="function"==typeof BigInt?BigInt:void 0,jt={all:["binary","bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["binary","bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"]},At=/_and_generic$/;function Ot(){var r,t,e;return 0===arguments.length?jt.all.slice():(e=!1,r=arguments[0],At.test(r)&&"all"!==(r=$r(r,At,""))&&(e=!0),t=(t=jt[r])?t.slice():[],e&&t.length>0&&t.push("generic"),t)}function St(){return{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256}}function It(r,t,e){K(r,t,{configurable:!1,enumerable:!0,writable:!1,value:e})}function Rt(r){return Object.keys(Object(r))}var Lt,Ft=void 0!==Object.keys;function Bt(r){return"[object Arguments]"===s(r)}Lt=function(){return Bt(arguments)}();var Nt=Lt;function Mt(r){return"number"==typeof r}var kt=Number,Ut=kt.prototype.toString;var Ct=e();function Pt(r){return"object"==typeof r&&(r instanceof kt||(Ct?function(r){try{return Ut.call(r),!0}catch(r){return!1}}(r):"[object Number]"===s(r)))}function Yt(r){return Mt(r)||Pt(r)}function Dt(r){return r!=r}function Wt(r){return Mt(r)&&Dt(r)}function zt(r){return Pt(r)&&Dt(r.valueOf())}function Gt(r){return Wt(r)||zt(r)}X(Yt,"isPrimitive",Mt),X(Yt,"isObject",Pt),X(Gt,"isPrimitive",Wt),X(Gt,"isObject",zt);var $t=Number.POSITIVE_INFINITY,Jt=kt.NEGATIVE_INFINITY,Zt=Math.floor;function Kt(r){return Zt(r)===r}function Xt(r){return r<$t&&r>Jt&&Kt(r)}function qt(r){return Mt(r)&&Xt(r)}function Ht(r){return Pt(r)&&Xt(r.valueOf())}function Qt(r){return qt(r)||Ht(r)}X(Qt,"isPrimitive",qt),X(Qt,"isObject",Ht);var re=Object.prototype.propertyIsEnumerable;var te=!re.call("beep","0");function ee(r,t){var e;return null!=r&&(!(e=re.call(r,t))&&te&&Yr(r)?!Wt(t=+t)&&qt(t)&&t>=0&&t=0&&r.length<=ne&&i(r,"callee")&&!ee(r,"callee")},ie=Array.prototype.slice;var ae=ee((function(){}),"prototype"),fe=!ee({toString:null},"toString"),se=9007199254740991;function ue(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Kt(r.length)&&r.length>=0&&r.length<=se}function le(r,t,e){var n,o;if(!ue(r)&&!kr(r))throw new TypeError(Y("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(0===(n=r.length))return-1;if(3===arguments.length){if(!qt(e))throw new TypeError(Y("invalid argument. Third argument must be an integer. Value: `%s`.",e));if(e>=0){if(e>=n)return-1;o=e}else(o=n+e)<0&&(o=0)}else o=0;if(Gt(t)){for(;o0&&!i(r,"0"))for(s=0;s>>0,o=Zt(r/Le),st?(Be.setUint32(0,i,st),Be.setUint32(4,o,st)):(Be.setUint32(0,o,st),Be.setUint32(4,i,st)),a=0;a>>0,n=Zt(r/4294967296),e=new xt(t.buffer),st?(e.setUint32(0,o,st),e.setUint32(4,n,st)):(e.setUint32(0,n,st),e.setUint32(4,o,st))),t}),"assign",Ne);var Me={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256},ke=xe(),Ue={throw:1,clamp:2,wrap:3,normalize:4};function Ce(r,t,e,n,o,i){var a,f,s,u,l;if(!(this instanceof Ce))return new Ce(r,t,e,n,o,i);for(u=1,l=0;l=0}function De(r){return Ht(r)&&r.valueOf()>=0}function We(r){return Ye(r)||De(r)}X(Ce,"name","ndarray"),jr(Ce.prototype,"byteLength",(function(){return this._byteLength})),jr(Ce.prototype,"BYTES_PER_ELEMENT",(function(){return this._bytesPerElement})),jr(Ce.prototype,"data",(function(){return this._buffer})),jr(Ce.prototype,"dtype",(function(){return this._dtype})),jr(Ce.prototype,"flags",(function(){return{ROW_MAJOR_CONTIGUOUS:(r=this._flags).ROW_MAJOR_CONTIGUOUS,COLUMN_MAJOR_CONTIGUOUS:r.COLUMN_MAJOR_CONTIGUOUS,READONLY:r.READONLY};var r})),jr(Ce.prototype,"length",(function(){return this._length})),jr(Ce.prototype,"ndims",(function(){return this._ndims})),jr(Ce.prototype,"offset",(function(){return this._offset})),jr(Ce.prototype,"order",(function(){return this._order})),jr(Ce.prototype,"shape",(function(){return this._shape.slice()})),jr(Ce.prototype,"strides",(function(){return this._strides.slice()})),X(Ce.prototype,"get",(function(){var r,t;for(r=this._offset,t=0;t=0;a--)r-=i=r%e[a],r/=e[a],o+=i*t[a];return this._accessors?this._buffer.get(o):this._buffer[o]})),X(Ce.prototype,"set",(function(){var r,t;for(r=this._offset,t=0;t=0;f--)r-=a=r%n[f],r/=n[f],i+=a*e[f];return this._accessors?this._buffer.set(t,i):this._buffer[i]=t,this})),X(Ce.prototype,"toString",(function(){var r,t,e,n,o,i;if(t=this._shape.length,e="ndarray( '"+(n=this._dtype)+"', ",r="",this._length<=100)if("complex64"===n||"complex128"===n)for(i=0;i=0;i--)r+=Nr(o=this.iget(this._length-1-i))+", "+Mr(o),i>0&&(r+=", ");else for(i=2;i>=0;i--)r+=this.iget(this._length-1-i),i>0&&(r+=", ")}if(e+=Jr(Zr[this.dtype],"{{data}}",r),e+=", ",e+=0===t?"[]":"[ "+this._shape.join(", ")+" ]",e+=", ",e+="[ ",0===t)e+="0";else for(i=0;i=0&&r.length<=ze}(t))return!1;if(e=t.length,0===e)return!1;for(n=0;n=0;o--)e[o]=n,n*=r[o];return e}(r)}function Xe(r,t){var e,n,o;for(n=r.length,e=0,o=0;o=0;n--)t[n]=e,e*=r[n];return t}(r,e)}));var He="function";function Qe(r){return typeof r.get===He&&typeof r.set===He}var rn={complex128:function(r,t){return r.get(t)},complex64:function(r,t){return r.get(t)},default:function(r,t){return r.get(t)}};function tn(r){var t=rn[r];return"function"==typeof t?t:rn.default}var en={float64:function(r,t){return r[t]},float32:function(r,t){return r[t]},int32:function(r,t){return r[t]},int16:function(r,t){return r[t]},int8:function(r,t){return r[t]},uint32:function(r,t){return r[t]},uint16:function(r,t){return r[t]},uint8:function(r,t){return r[t]},uint8c:function(r,t){return r[t]},generic:function(r,t){return r[t]},default:function(r,t){return r[t]}};function nn(r){var t=en[r];return"function"==typeof t?t:en.default}var on={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128"},an="function"==typeof Float32Array;var fn="function"==typeof Float32Array?Float32Array:null;var sn,un="function"==typeof Float32Array?Float32Array:void 0;sn=function(){var r,t,e;if("function"!=typeof fn)return!1;try{t=new fn([1,3.14,-3.14,5e40]),e=t,r=(an&&e instanceof Float32Array||"[object Float32Array]"===s(e))&&1===t[0]&&3.140000104904175===t[1]&&-3.140000104904175===t[2]&&t[3]===$t}catch(t){r=!1}return r}()?un:function(){throw new Error("not implemented")};var ln=sn,cn="function"==typeof Uint32Array;var hn="function"==typeof Uint32Array?Uint32Array:null;var pn,dn="function"==typeof Uint32Array?Uint32Array:void 0;pn=function(){var r,t,e;if("function"!=typeof hn)return!1;try{t=new hn(t=[1,3.14,-3.14,4294967296,4294967297]),e=t,r=(cn&&e instanceof Uint32Array||"[object Uint32Array]"===s(e))&&1===t[0]&&3===t[1]&&4294967293===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?dn:function(){throw new Error("not implemented")};var gn=pn,mn="function"==typeof Int32Array;var yn="function"==typeof Int32Array?Int32Array:null;var vn,wn="function"==typeof Int32Array?Int32Array:void 0;vn=function(){var r,t,e;if("function"!=typeof yn)return!1;try{t=new yn([1,3.14,-3.14,2147483648]),e=t,r=(mn&&e instanceof Int32Array||"[object Int32Array]"===s(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-2147483648===t[3]}catch(t){r=!1}return r}()?wn:function(){throw new Error("not implemented")};var bn=vn,_n="function"==typeof Int16Array;var En="function"==typeof Int16Array?Int16Array:null;var Tn,xn="function"==typeof Int16Array?Int16Array:void 0;Tn=function(){var r,t,e;if("function"!=typeof En)return!1;try{t=new En([1,3.14,-3.14,32768]),e=t,r=(_n&&e instanceof Int16Array||"[object Int16Array]"===s(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-32768===t[3]}catch(t){r=!1}return r}()?xn:function(){throw new Error("not implemented")};var Vn=Tn,jn="function"==typeof Uint8ClampedArray;var An="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var On,Sn="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;On=function(){var r,t,e;if("function"!=typeof An)return!1;try{t=new An([-1,0,1,3.14,4.99,255,256]),e=t,r=(jn&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===s(e))&&0===t[0]&&0===t[1]&&1===t[2]&&3===t[3]&&5===t[4]&&255===t[5]&&255===t[6]}catch(t){r=!1}return r}()?Sn:function(){throw new Error("not implemented")};var In=On,Rn="function"==typeof Int8Array;var Ln="function"==typeof Int8Array?Int8Array:null;var Fn,Bn="function"==typeof Int8Array?Int8Array:void 0;Fn=function(){var r,t,e;if("function"!=typeof Ln)return!1;try{t=new Ln([1,3.14,-3.14,128]),e=t,r=(Rn&&e instanceof Int8Array||"[object Int8Array]"===s(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-128===t[3]}catch(t){r=!1}return r}()?Bn:function(){throw new Error("not implemented")};var Nn=Fn;function Mn(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Kt(r.length)&&r.length>=0&&r.length<=ze}function kn(r,t){if(!(this instanceof kn))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Mt(r))throw new TypeError(Y("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Mt(t))throw new TypeError(Y("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return K(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),K(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:t}),this}X(kn,"BYTES_PER_ELEMENT",8),X(kn.prototype,"BYTES_PER_ELEMENT",8),X(kn.prototype,"byteLength",16),X(kn.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),X(kn.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var Un="function"==typeof Math.fround?Math.fround:null,Cn=new ln(1);var Pn="function"==typeof Un?Un:function(r){return Cn[0]=r,Cn[0]};function Yn(r,t){if(!(this instanceof Yn))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Mt(r))throw new TypeError(Y("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Mt(t))throw new TypeError(Y("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return K(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Pn(r)}),K(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Pn(t)}),this}function Dn(r){return r instanceof kn||r instanceof Yn||"object"==typeof r&&null!==r&&"number"==typeof r.re&&"number"==typeof r.im}function Wn(r){return Kt(r/2)}X(Yn,"BYTES_PER_ELEMENT",4),X(Yn.prototype,"BYTES_PER_ELEMENT",4),X(Yn.prototype,"byteLength",8),X(Yn.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),X(Yn.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var zn=8;function Gn(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===zn}var $n=16;function Jn(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===$n}function Zn(){return"function"==typeof a&&"symbol"==typeof a("foo")&&i(a,"iterator")&&"symbol"==typeof a.iterator}var Kn=Zn()?Symbol.iterator:null;function Xn(r,t){if(!(this instanceof Xn))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Mt(r))throw new TypeError(Y("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Mt(t))throw new TypeError(Y("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return K(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Pn(r)}),K(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Pn(t)}),this}function qn(r){return r.re}function Hn(r){return r.im}function Qn(r,t){return new ln(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function ro(r,t){return new gt(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function to(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(Mn(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!Dn(n))return new TypeError(Y("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(qn(n),Hn(n))}return t}X(Xn,"BYTES_PER_ELEMENT",4),X(Xn.prototype,"BYTES_PER_ELEMENT",4),X(Xn.prototype,"byteLength",8),X(Xn.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),X(Xn.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var eo=2*ln.BYTES_PER_ELEMENT,no=Zn();function oo(r){return r instanceof fo||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function io(r){return r===fo||"Complex128Array"===r.name}function ao(r,t){return new Xn(r[t*=2],r[t+1])}function fo(){var r,t,e,n;if(t=arguments.length,!(this instanceof fo))return 0===t?new fo:1===t?new fo(arguments[0]):2===t?new fo(arguments[0],arguments[1]):new fo(arguments[0],arguments[1],arguments[2]);if(0===t)e=new ln(0);else if(1===t)if(Ye(arguments[0]))e=new ln(2*arguments[0]);else if(ue(arguments[0]))if((n=(e=arguments[0]).length)&&u(e)&&Dn(e[0])){if(e=function(r,t){var e,n,o,i;for(e=t.length,i=0,o=0;oe.byteLength-r)throw new RangeError(Y("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*eo));e=new ln(e,r,2*n)}}return X(this,"_buffer",e),X(this,"_length",e.length/2),this}function so(r,t){if(!(this instanceof so))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Mt(r))throw new TypeError(Y("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Mt(t))throw new TypeError(Y("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return K(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),K(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:t}),this}function uo(r){return r.re}function lo(r){return r.im}function co(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(Mn(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!Dn(n))return new TypeError(Y("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(uo(n),lo(n))}return t}X(fo,"BYTES_PER_ELEMENT",eo),X(fo,"name","Complex64Array"),X(fo,"from",(function(r){var t,e,n,o,i,a,f,s,u,c,h,p;if(!vr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!io(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!vr(n=arguments[1]))throw new TypeError(Y("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(oo(r)){if(s=r.length,n){for(i=(o=new this(s))._buffer,p=0,h=0;h=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));i[p]=c[0],i[p+1]=c[1]}p+=2}return o}return new this(r)}if(ue(r)){if(n){for(s=r.length,f=r.get&&r.set?tn("default"):nn("default"),h=0;h=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));i[p]=c[0],i[p+1]=c[1]}p+=2}return o}return new this(r)}if(l(r)&&no&&vr(r[Kn])){if(!vr((i=r[Kn]()).next))throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,o,i,a;for(n=[],a=-1;!(o=r.next()).done;)if(a+=1,Mn(i=t.call(e,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!Dn(i))return new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));n.push(qn(i),Hn(i))}return n}(i,n,t):to(i),a instanceof Error)throw a;for(i=(o=new this(s=a.length/2))._buffer,h=0;h=this._length))return ao(this._buffer,r)})),jr(fo.prototype,"buffer",(function(){return this._buffer.buffer})),jr(fo.prototype,"byteLength",(function(){return this._buffer.byteLength})),jr(fo.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),X(fo.prototype,"BYTES_PER_ELEMENT",fo.BYTES_PER_ELEMENT),X(fo.prototype,"copyWithin",(function(r,t){if(!oo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),X(fo.prototype,"entries",(function(){var r,t,e,n,o,i,a;if(!oo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,i=-1,a=-2,X(e={},"next",(function(){var t;if(i+=1,o||i>=n)return{done:!0};return t=new Xn(r[a+=2],r[a+1]),{value:[i,t],done:!1}})),X(e,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Kn&&X(e,Kn,(function(){return t.entries()})),e})),X(fo.prototype,"every",(function(r,t){var e,n;if(!oo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vr(r))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n1){if(!Kt(t))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=o)<0&&(t=0),arguments.length>2){if(!Kt(e))throw new TypeError(Y("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=o)<0&&(e=0),e>o&&(e=o)}else e=o}else t=0,e=o;for(a=qn(r),f=Hn(r),s=t;s=0;n--)if(o=ao(e,n),r.call(t,o,n,this))return o})),X(fo.prototype,"findLastIndex",(function(r,t){var e,n,o;if(!oo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vr(r))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(o=ao(e,n),r.call(t,o,n,this))return n;return-1})),X(fo.prototype,"forEach",(function(r,t){var e,n,o;if(!oo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vr(r))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n=this._length))return ao(this._buffer,r)})),X(fo.prototype,"includes",(function(r,t){var e,n,o,i,a;if(!oo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Dn(r))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Kt(t))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=qn(r),i=Hn(r),e=this._buffer,a=t;a1){if(!Kt(t))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=qn(r),i=Hn(r),e=this._buffer,a=t;a1){if(!Kt(t))throw new TypeError(Y("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(o=qn(r),i=Hn(r),e=this._buffer,a=t;a>=0;a--)if(o===e[n=2*a]&&i===e[n+1])return a;return-1})),jr(fo.prototype,"length",(function(){return this._length})),X(fo.prototype,"map",(function(r,t){var e,n,o,i,a;if(!oo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vr(r))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(o=new this.constructor(this._length))._buffer,i=0;i1)n=t,i=0;else{if(0===o)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=ao(e,0),i=1}for(;i1){if(!Ye(e=arguments[1]))throw new TypeError(Y("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Dn(r)){if(e>=this._length)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=qn(r),void(n[e+1]=Hn(r))}if(oo(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,u=n.byteOffset+e*eo,t.buffer===n.buffer&&t.byteOffsetu){for(o=new ln(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,u=n.byteOffset+e*eo,t.buffer===n.buffer&&t.byteOffsetu){for(o=new ln(a),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,s=0;sf&&(t=f)}}for(e=ro&&(t=o)}}return r>=o?(o=0,e=n.byteLength):r>=t?(o=0,e=n.byteOffset+r*eo):(o=t-r,e=n.byteOffset+r*eo),new this.constructor(n.buffer,e,o<0?0:o)})),X(fo.prototype,"toReversed",(function(){var r,t,e,n,o,i;if(!oo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,o=0;o=o)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Dn(t))throw new TypeError(Y("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=qn(t),e[2*r+1]=Hn(t),n})),X(so,"BYTES_PER_ELEMENT",8),X(so.prototype,"BYTES_PER_ELEMENT",8),X(so.prototype,"byteLength",16),X(so.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),X(so.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var ho=2*gt.BYTES_PER_ELEMENT,po=Zn();function go(r){return r instanceof vo||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function mo(r){return r===vo||"Complex64Array"===r.name}function yo(r,t){return new so(r[t*=2],r[t+1])}function vo(){var r,t,e,n;if(t=arguments.length,!(this instanceof vo))return 0===t?new vo:1===t?new vo(arguments[0]):2===t?new vo(arguments[0],arguments[1]):new vo(arguments[0],arguments[1],arguments[2]);if(0===t)e=new gt(0);else if(1===t)if(Ye(arguments[0]))e=new gt(2*arguments[0]);else if(ue(arguments[0]))if((n=(e=arguments[0]).length)&&u(e)&&Dn(e[0])){if(e=function(r,t){var e,n,o,i;for(e=t.length,i=0,o=0;oe.byteLength-r)throw new RangeError(Y("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*ho));e=new gt(e,r,2*n)}}return X(this,"_buffer",e),X(this,"_length",e.length/2),this}X(vo,"BYTES_PER_ELEMENT",ho),X(vo,"name","Complex128Array"),X(vo,"from",(function(r){var t,e,n,o,i,a,f,s,u,c,h,p;if(!vr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!mo(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!vr(n=arguments[1]))throw new TypeError(Y("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(go(r)){if(s=r.length,n){for(i=(o=new this(s))._buffer,p=0,h=0;h=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));i[p]=c[0],i[p+1]=c[1]}p+=2}return o}return new this(r)}if(ue(r)){if(n){for(s=r.length,f=r.get&&r.set?tn("default"):nn("default"),h=0;h=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));i[p]=c[0],i[p+1]=c[1]}p+=2}return o}return new this(r)}if(l(r)&&po&&vr(r[Kn])){if(!vr((i=r[Kn]()).next))throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,o,i,a;for(n=[],a=-1;!(o=r.next()).done;)if(a+=1,Mn(i=t.call(e,o.value,a))&&i.length>=2)n.push(i[0],i[1]);else{if(!Dn(i))return new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",i));n.push(uo(i),lo(i))}return n}(i,n,t):co(i),a instanceof Error)throw a;for(i=(o=new this(s=a.length/2))._buffer,h=0;h=this._length))return yo(this._buffer,r)})),jr(vo.prototype,"buffer",(function(){return this._buffer.buffer})),jr(vo.prototype,"byteLength",(function(){return this._buffer.byteLength})),jr(vo.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),X(vo.prototype,"BYTES_PER_ELEMENT",vo.BYTES_PER_ELEMENT),X(vo.prototype,"copyWithin",(function(r,t){if(!go(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),X(vo.prototype,"entries",(function(){var r,t,e,n,o,i,a;if(!go(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,i=-1,a=-2,X(e={},"next",(function(){var t;if(i+=1,o||i>=n)return{done:!0};return t=new so(r[a+=2],r[a+1]),{value:[i,t],done:!1}})),X(e,"return",(function(r){if(o=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Kn&&X(e,Kn,(function(){return t.entries()})),e})),X(vo.prototype,"every",(function(r,t){var e,n;if(!go(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vr(r))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n1){if(!Kt(t))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=o)<0&&(t=0),arguments.length>2){if(!Kt(e))throw new TypeError(Y("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=o)<0&&(e=0),e>o&&(e=o)}else e=o}else t=0,e=o;for(a=uo(r),f=lo(r),s=t;s=0;n--)if(o=yo(e,n),r.call(t,o,n,this))return o})),X(vo.prototype,"findLastIndex",(function(r,t){var e,n,o;if(!go(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vr(r))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(o=yo(e,n),r.call(t,o,n,this))return n;return-1})),X(vo.prototype,"forEach",(function(r,t){var e,n,o;if(!go(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vr(r))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n=this._length))return yo(this._buffer,r)})),jr(vo.prototype,"length",(function(){return this._length})),X(vo.prototype,"includes",(function(r,t){var e,n,o,i,a;if(!go(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Dn(r))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Kt(t))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=uo(r),i=lo(r),e=this._buffer,a=t;a1){if(!Kt(t))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(o=uo(r),i=lo(r),e=this._buffer,a=t;a1){if(!Kt(t))throw new TypeError(Y("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(o=uo(r),i=lo(r),e=this._buffer,a=t;a>=0;a--)if(o===e[n=2*a]&&i===e[n+1])return a;return-1})),X(vo.prototype,"map",(function(r,t){var e,n,o,i,a;if(!go(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vr(r))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(o=new this.constructor(this._length))._buffer,i=0;i1)n=t,i=0;else{if(0===o)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=yo(e,0),i=1}for(;i1){if(!Ye(e=arguments[1]))throw new TypeError(Y("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Dn(r)){if(e>=this._length)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=uo(r),void(n[e+1]=lo(r))}if(go(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,u=n.byteOffset+e*ho,t.buffer===n.buffer&&t.byteOffsetu){for(o=new gt(t.length),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,u=n.byteOffset+e*ho,t.buffer===n.buffer&&t.byteOffsetu){for(o=new gt(a),s=0;sthis._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,s=0;sf&&(t=f)}}for(e=ro&&(t=o)}}return r>=o?(o=0,e=n.byteLength):r>=t?(o=0,e=n.byteOffset+r*ho):(o=t-r,e=n.byteOffset+r*ho),new this.constructor(n.buffer,e,o<0?0:o)})),X(vo.prototype,"toReversed",(function(){var r,t,e,n,o,i;if(!go(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,o=0;o=o)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Dn(t))throw new TypeError(Y("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=uo(t),e[2*r+1]=lo(t),n}));var wo=[gt,ln,bn,gn,Vn,at,Nn,rt,In,fo,vo],bo=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128"],_o=bo.length;function Eo(r){var t;if(u(r))return"generic";if(gr(r))return null;for(t=0;t<_o;t++)if(r instanceof wo[t])return bo[t];return on[mr(r)]||null}function To(r){var t,e,n;if(!ue(r))throw new TypeError(Y("invalid argument. Must provide an array-like object. Value: `%s`.",r));return n=Eo(r),Qe(r)&&(t=tn(n)),e=r.length,void 0===t?function(t){var n;for(n=0;nt?t:r}function zo(r,t){var e=t+1;return r<0?((r+=e)<0&&0!==(r%=e)&&(r+=e),r):r>t?((r-=e)>t&&(r%=e),r):r}function Go(r,t){return r<0?(r+=t+1)<0?-1:r:r>t?-1:r}var $o=To(je()),Jo={wrap:zo,clamp:Wo,normalize:function(r,t){var e=Go(r,t);if(e<0||e>t)throw new RangeError(Y("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return e},throw:function(r,t){if(r<0||r>t)throw new RangeError(Y("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return r}};function Zo(r,t,e){var n;if("clamp"===e)return Wo(r,t);if("wrap"===e)return zo(r,t);if(n=r,"normalize"===e&&(n=Go(n,t)),n<0||n>t)throw new RangeError(Y("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return n}X(Zo,"factory",(function(r){if(!$o(r))throw new TypeError(Y("invalid argument. First argument must be a recognized index mode. Value: `%s`.",r));return Jo[r]}));var Ko=Ce.prototype.iget;var Xo=Ce.prototype.iset;function qo(r,t){var e,n;for(e=[],n=0;n0))throw new TypeError(Y("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",e));if((s=e.length)>Ho)throw new RangeError(Y("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",Ho,s));if(!Fo(n))throw new TypeError(Y("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",n));if(s>0){if(n.length!==s)throw new RangeError(Y("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",s,n.length))}else{if(1!==n.length)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(0!==n[0])throw new RangeError(Y("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",n[0]))}if(!Ye(o))throw new TypeError(Y("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",o));if(!So(a))throw new TypeError(Y("invalid argument. Sixth argument must be a supported order. Value: `%s`.",a));if(s>0&&!function(r,t,e,n){var o=Br(t,e,n);return o[0]>=0&&o[1]0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if((l={}).mode=Qo,l.readonly=ri,arguments.length>6&&(c=function(r,t){var e;if(!xr(t))return new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",t));if(i(t,"mode")&&(r.mode=t.mode,!$o(r.mode)))return new TypeError(Y("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",r.mode));if(i(t,"submode")){if(r.submode=t.submode,!u(r.submode))return new TypeError(Y("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",r.submode));if(0===r.submode.length)return new TypeError(Y("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",r.submode.join(",")));for(e=0;e0){if(!qt(r))throw new TypeError(Y("invalid argument. Index must be an integer. Value: `%s`.",r));return r=Zo(r,this._length-1,this._mode),Ko.call(this,r)}return Ko.call(this)})),X(ti.prototype,"set",(function(){var r,t,e,n;if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(arguments.length!==this._ndims+1)throw new RangeError(Y("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(r=this._offset,e=this._submode.length,n=0;n0){if(!qt(r))throw new TypeError(Y("invalid argument. Index must be an integer. Value: `%s`.",r));r=Zo(r,this._length-1,this._mode),Xo.call(this,r,t)}else Xo.call(this,r);return this}));var ei="function"==typeof Buffer?Buffer:null;var ni,oi=r.Buffer;ni=function(){var r,t;if("function"!=typeof ei)return!1;try{r=gr(t="function"==typeof ei.from?ei.from([1,2,3,4]):new ei([1,2,3,4]))&&1===t[0]&&2===t[1]&&3===t[2]&&4===t[3]}catch(t){r=!1}return r}()?oi:function(){throw new Error("not implemented")};var ii=ni;var ai=vr(ii.allocUnsafe)?function(r){if(!We(r))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));return ii.allocUnsafe(r)}:function(r){if(!We(r))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));return new ii(r)};var fi={float64:gt,float32:ln,int16:Vn,int32:bn,int8:Nn,uint16:at,uint32:gn,uint8:rt,uint8c:In,complex64:fo,complex128:vo};function si(r){return function(r,t){var e,n;for(e=[],n=0;n1?arguments[1]:vi))return si(r);if(e=function(r){return pi[r]||null}(t),null===e)throw new TypeError(Y("invalid argument. Second argument must be a recognized data type. Value: `%s`.",t));return new e(r)}yi=Xr(ai(1))?function(r){var t,e,n,o,i,a;if(!Ye(r))throw new TypeError(Y("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(n=arguments.length>1?arguments[1]:hi))return si(r);if(null===(t=Or(n)))throw new TypeError(Y("invalid argument. Second argument must be a supported data type. Value: `%s`.",n));return o=function(r){return fi[r]||null}(n),a=t*r,"complex128"===n&&(a+=8),e=(i=ai(a)).byteOffset,"complex128"===n&&(Ye(e/t)||(e+=8)),new o(i.buffer,e,r)}:function(r){return arguments.length>1?wi(r,arguments[1]):wi(r)};var bi=yi;function _i(r){var t,e,n,o,a,f,s;if(!Pe(r))throw new TypeError(Y("invalid argument. First argument must be an ndarray-like object. Value: `%s`.",r));if(o={},arguments.length>1){if(!xr(t=arguments[1]))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",t));if(e=i(t,"dtype")?t.dtype:Vo(r),i(t,"shape")){if("number"==typeof(s=t.shape)&&(s=[s]),!$e(s))throw new TypeError(Y("invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.","shape",s))}else s=jo(r);n=i(t,"order")?t.order:Lo(r),i(t,"mode")&&(o.mode=t.mode),i(t,"submode")&&(o.submode=t.submode)}else e=Vo(r),s=jo(r),n=Lo(r);return s.length>0?(a=qe(s),f=Ke(s,n)):(a=1,f=[0]),new ti(e,"binary"===e?ai(a):bi(a,e),s,f,Xe(s,f),n,o)}var Ei={complex128:function(r,t,e){r.set(e,t)},complex64:function(r,t,e){r.set(e,t)},default:function(r,t,e){r.set(e,t)}};function Ti(r){var t=Ei[r];return"function"==typeof t?t:Ei.default}var xi={float64:function(r,t,e){r[t]=e},float32:function(r,t,e){r[t]=e},int32:function(r,t,e){r[t]=e},int16:function(r,t,e){r[t]=e},int8:function(r,t,e){r[t]=e},uint32:function(r,t,e){r[t]=e},uint16:function(r,t,e){r[t]=e},uint8:function(r,t,e){r[t]=e},uint8c:function(r,t,e){r[t]=e},generic:function(r,t,e){r[t]=e},default:function(r,t,e){r[t]=e}};function Vi(r){var t=xi[r];return"function"==typeof t?t:xi.default}function ji(r){var t,e,n;for(e=r.length,t=[],n=0;n=0&&a=0&&!(((u=r[i])<0?-u:u)<=e);)r[i+1]=u,t[a+1]=t[a],i-=1,a-=1;r[i+1]=f,t[a+1]=s,n+=1,o+=1}}(t=ji(t),n),{sh:r=ki(r,n),sx:t,sy:e=ki(e,n)}}X(Bi,"assign",(function(r,t,e){var n=Ni(r);return n.accessorProtocol?"complex128"===n.dtype?Mi(r,ro(r,0),t,e):"complex64"===n.dtype?Mi(r,Qn(r,0),t,e):function(r,t,e){var n,o,i,a;for(n=r.data,o=r.accessors[1],a=e,i=0;a>=0&&a=0&&on?Ci.BLOCK_SIZE_IN_BYTES/e|0:Ci.BLOCK_SIZE_IN_BYTES/n|0}function Yi(r){var t;return function(r,t){return"function"==typeof r[t]}(r,"reverse")?r.reverse():(t=Ni(r)).accessorProtocol?function(r){var t,e,n,o,i,a,f,s;for(t=r.data,e=r.accessors[0],n=r.accessors[1],i=Zt(t.length/2),a=t.length-1,f=0;f=f&&(o=f-1);else if("wrap"===i)o<0?(o+=f)<0&&0!==(o%=f)&&(o+=f):o>=f&&(o-=f)>=f&&(o%=f);else if("normalize"===i&&o<0&&(o+=f),o<0||o>=f)throw new RangeError(Y("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",f,o));if(s=e,"column-major"===n){for(l=0;l=0;l--)o-=u=o%r[l],o/=r[l],s+=u*t[l];return s}var Wi=Math.ceil;function zi(r){return r<0?Wi(r):Zt(r)}function Gi(r,t,e,n,o,i,a){var f,s,u,l,c;for(f=r.length,s=1,c=0;c=s&&(o=s-1);else if("wrap"===i)o<0?(o+=s)<0&&0!==(o%=s)&&(o+=s):o>=s&&(o-=s)>=s&&(o%=s);else if("normalize"===i&&o<0&&(o+=s),o<0||o>=s)throw new RangeError(Y("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",s,o));if(0===e){if("column-major"===n){for(c=0;c=0;c--)o-=l=o%r[c],o/=r[c],a[c]=l;return a}if("column-major"===n){for(c=f-1;c>=0;c--)(l=t[c])<0?(o-=(u=zi(o/l))*l,a[c]=r[c]-1+u):(o-=(u=zi(o/l))*l,a[c]=u);return a}for(c=0;c0;)for(j0;)for(V0;)for(F0;)for(L0;)for(R0;)for(P0;)for(C0;)for(U0;)for(k0;)for(J0;)for($0;)for(G0;)for(z0;)for(W0;)for(rr0;)for(Q0;)for(H0;)for(q0;)for(X0;)for(K0;)for(fr0;)for(ar0;)for(ir0;)for(or0;)for(nr0;)for(er0;)for(tr0;)for(dr0;)for(pr0;)for(hr0;)for(cr0;)for(lr0;)for(ur0;)for(sr0;)for(fr0;)for(_r0;)for(br0;)for(wr0;)for(vr0;)for(yr0;)for(mr0;)for(gr0;)for(dr0;)for(pr0;)for(Or0;)for(Ar0;)for(jr0;)for(Vr0;)for(xr0;)for(Tr0;)for(Er0;)for(_r0;)for(br0;)for(wr0;)for(O0;)for(A0;)for(N0;)for(B0;)for(F0;)for(D0;)for(Y0;)for(P0;)for(C0;)for(K0;)for(Z0;)for(J0;)for($0;)for(G0;)for(er0;)for(tr0;)for(rr0;)for(Q0;)for(H0;)for(q0;)for(ur0;)for(sr0;)for(fr0;)for(ar0;)for(ir0;)for(or0;)for(nr0;)for(mr0;)for(gr0;)for(dr0;)for(pr0;)for(hr0;)for(cr0;)for(lr0;)for(ur0;)for(Tr0;)for(Er0;)for(_r0;)for(br0;)for(wr0;)for(vr0;)for(yr0;)for(mr0;)for(gr0;)for(Ir0;)for(Sr0;)for(Or0;)for(Ar0;)for(jr0;)for(Vr0;)for(xr0;)for(Tr0;)for(Er0;)for(_r\n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default hasToStringTagSupport;\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/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns \n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasSymbolSupport;\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 toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nexport default toStr;\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// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nexport default hasOwnProp;\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 Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\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\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\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 a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* import nativeClass from '@stdlib/utils-native-class';\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default 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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\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\nimport toStr from './tostring.js';\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nexport default nativeClass;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\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\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\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\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\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\nvar main = ( typeof Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default 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/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\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* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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// FUNCTIONS //\n\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\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\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\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\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e' );\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\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// FUNCTIONS //\n\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\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\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating whether a value is `NaN`.\n*\n* @private\n* @param {*} value - input value\n* @returns {boolean} boolean indicating whether a value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 4 );\n* // returns false\n*/\nfunction isnan( value ) { // explicitly define a function here instead of `@stdlib/math/base/assert/is-nan` in order to avoid circular dependencies\n\treturn ( value !== value );\n}\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\ttoken.arg = String( token.arg );\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ? String( token.arg ) : fromCharCode( num ); // eslint-disable-line max-len\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\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 RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\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\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\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/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\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* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\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\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns \n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\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\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\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* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\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* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns \n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Bool;\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// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\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\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\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* Test if a value is a boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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\nvar obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\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 obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\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 obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\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\nvar obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\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\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\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/**\n* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\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\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\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\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\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 regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\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\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\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* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\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* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Test if a value is object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default 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\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\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\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\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\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\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* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default 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\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\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\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\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\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see http://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\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\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\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* Returns an object.\n*\n* @name Object\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {Object} object\n*\n* @example\n* var o = new Object( null );\n* // returns {}\n*\n* @example\n* var o = new Object( 5.0 );\n* // returns \n*\n* @example\n* var o = new Object( 'beep' );\n* // returns \n*\n* @example\n* var o1 = {};\n*\n* var o2 = new Object( o1 );\n* // returns {}\n*\n* var bool = ( o1 === o2 );\n* // returns true\n*/\nvar Obj = Object; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Obj;\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\nimport isFunction from '@stdlib/assert-is-function';\nimport builtin from './native.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar getProto;\nif ( isFunction( Object.getPrototypeOf ) ) {\n\tgetProto = builtin;\n} else {\n\tgetProto = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\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 getProto = Object.getPrototypeOf;\n\n\n// EXPORTS //\n\nexport default getProto;\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\nimport nativeClass from '@stdlib/utils-native-class';\nimport getProto from './proto.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {(Object|null)} prototype\n*/\nfunction getPrototypeOf( obj ) {\n\tvar proto = getProto( obj );\n\tif ( proto || proto === null ) {\n\t\treturn proto;\n\t}\n\tif ( nativeClass( obj.constructor ) === '[object Function]' ) {\n\t\t// May break if the constructor has been tampered with...\n\t\treturn obj.constructor.prototype;\n\t}\n\tif ( obj instanceof Object ) {\n\t\treturn Object.prototype;\n\t}\n\t// Return `null` for objects created via `Object.create( null )`. Also return `null` for cross-realm objects on browsers that lack `__proto__` support, such as IE < 11.\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\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* Returns the value of the `__proto__` property.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {*} value of `__proto__` property\n*/\nfunction getProto( obj ) {\n\t// eslint-disable-next-line no-proto\n\treturn obj.__proto__;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\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\nimport isObject from '@stdlib/assert-is-object';\nimport isFunction from '@stdlib/assert-is-function';\nimport getPrototypeOf from '@stdlib/utils-get-prototype-of';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar objectPrototype = Object.prototype;\n\n\n// FUNCTIONS //\n\n/**\n* Tests that an object only has own properties.\n*\n* @private\n* @param {Object} obj - value to test\n* @returns {boolean} boolean indicating if an object only has own properties\n*/\nfunction ownProps( obj ) {\n\tvar key;\n\n\t// NOTE: possibility of perf boost if key enumeration order is known (see http://stackoverflow.com/questions/18531624/isplainobject-thing).\n\tfor ( key in obj ) {\n\t\tif ( !hasOwnProp( obj, key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n\n// MAIN //\n\n/**\n* Tests if a value is a plain object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a plain object\n*\n* @example\n* var bool = isPlainObject( {} );\n* // returns true\n*\n* @example\n* var bool = isPlainObject( null );\n* // returns false\n*/\nfunction isPlainObject( value ) {\n\tvar proto;\n\n\t// Screen for obvious non-objects...\n\tif ( !isObject( value ) ) {\n\t\treturn false;\n\t}\n\t// Objects with no prototype (e.g., `Object.create( null )`) are plain...\n\tproto = getPrototypeOf( value );\n\tif ( !proto ) {\n\t\treturn true;\n\t}\n\t// Objects having a prototype are plain if and only if they are constructed with a global `Object` function and the prototype points to the prototype of a plain object...\n\treturn (\n\t\t// Cannot have own `constructor` property:\n\t\t!hasOwnProp( value, 'constructor' ) &&\n\n\t\t// Prototype `constructor` property must be a function (see also https://bugs.jquery.com/ticket/9897 and http://stackoverflow.com/questions/18531624/isplainobject-thing):\n\t\thasOwnProp( proto, 'constructor' ) &&\n\t\tisFunction( proto.constructor ) &&\n\t\tnativeClass( proto.constructor ) === '[object Function]' &&\n\n\t\t// Test for object-specific method:\n\t\thasOwnProp( proto, 'isPrototypeOf' ) &&\n\t\tisFunction( proto.isPrototypeOf ) &&\n\n\t\t(\n\t\t\t// Test if the prototype matches the global `Object` prototype (same realm):\n\t\t\tproto === objectPrototype ||\n\n\t\t\t// Test that all properties are own properties (cross-realm; *most* likely a plain object):\n\t\t\townProps( value )\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isPlainObject;\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\nimport Object from '@stdlib/object-ctor';\nimport getProto from './detect.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @param {*} value - input value\n* @returns {(Object|null)} prototype\n*\n* @example\n* var proto = getPrototypeOf( {} );\n* // returns {}\n*/\nfunction getPrototypeOf( value ) {\n\tif (\n\t\tvalue === null ||\n\t\tvalue === void 0\n\t) {\n\t\treturn null;\n\t}\n\t// In order to ensure consistent ES5/ES6 behavior, cast input value to an object (strings, numbers, booleans); ES5 `Object.getPrototypeOf` throws when provided primitives and ES6 `Object.getPrototypeOf` casts:\n\tvalue = Object( value );\n\n\treturn getProto( value );\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\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\nimport getGlobal from '@stdlib/utils-global';\n\n\n// VARIABLES //\n\nvar Global = getGlobal();\n\n\n// MAIN //\n\n/**\n* Tests for native `BigInt` support.\n*\n* @returns {boolean} boolean indicating if an environment has `BigInt` support\n*\n* @example\n* var bool = hasBigIntSupport();\n* // returns \n*/\nfunction hasBigIntSupport() {\n\treturn (\n\t\ttypeof Global.BigInt === 'function' &&\n\t\ttypeof BigInt === 'function' && // eslint-disable-line stdlib/require-globals\n\t\ttypeof Global.BigInt( '1' ) === 'bigint' &&\n\t\ttypeof BigInt( '1' ) === 'bigint' // eslint-disable-line stdlib/require-globals, no-undef\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasBigIntSupport;\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\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\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\nimport BYTES_PER_ELEMENT from './bytes_per_element.json';\n\n\n// MAIN //\n\n/**\n* Returns the number of bytes per element provided an underlying array data type.\n*\n* @param {string} dtype - data type\n* @returns {(NonNegativeInteger|null)} number of bytes per element\n*\n* @example\n* var nbytes = bytesPerElement( 'float64' );\n* // returns 8\n*\n* nbytes = bytesPerElement( 'generic' );\n* // returns null\n*/\nfunction bytesPerElement( dtype ) {\n\treturn BYTES_PER_ELEMENT[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default bytesPerElement;\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/**\n* Returns array iteration order.\n*\n* ## Notes\n*\n* - Return value key:\n*\n* - `0`: unordered (i.e., strides of mixed sign; e.g., `[ 9, -3, 1 ]`)\n* - `1`: ordered left-to-right (i.e., all nonnegative strides)\n* - `-1`: ordered right-to-left (i.e., all negative strides)\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} iteration order\n*\n* @example\n* var o = iterationOrder( [ 2, 1 ] );\n* // returns 1\n*\n* o = iterationOrder( [ -2, 1 ] );\n* // returns 0\n*\n* o = iterationOrder( [ -2, -1 ] );\n* // returns -1\n*/\nfunction iterationOrder( strides ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < strides.length; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\tif ( cnt === 0 ) {\n\t\t// All nonnegative strides:\n\t\treturn 1|0; // asm-type annotation\n\t}\n\tif ( cnt === strides.length ) {\n\t\t// All negative strides:\n\t\treturn -1|0; // asm-type annotation\n\t}\n\t// Strides of mixed signs:\n\treturn 0|0; // asm-type annotation\n}\n\n\n// EXPORTS //\n\nexport default iterationOrder;\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* Computes the absolute value of a double-precision floating-point number `x`.\n*\n* @param {number} x - input value\n* @returns {number} absolute value\n*\n* @example\n* var v = abs( -1.0 );\n* // returns 1.0\n*\n* @example\n* var v = abs( 2.0 );\n* // returns 2.0\n*\n* @example\n* var v = abs( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( -0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( NaN );\n* // returns NaN\n*/\nfunction abs( x ) {\n\treturn Math.abs( x ); // eslint-disable-line stdlib/no-builtin-math\n}\n\n\n// EXPORTS //\n\nexport default abs;\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\nimport abs from '@stdlib/math-base-special-abs';\n\n\n// MAIN //\n\n/**\n* Determines the order of a multidimensional array based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} order\n*\n* @example\n* import strides2order from '@stdlib/ndarray-base-strides2order';\n*\n* var order = strides2order( [ 2, 1 ] );\n* // returns 1\n*\n* order = strides2order( [ 1, 2 ] );\n* // returns 2\n*\n* order = strides2order( [ 1, 1, 1 ] );\n* // returns 3\n*\n* order = strides2order( [ 2, 3, 1 ] );\n* // returns 0\n*/\nfunction strides2order( strides ) {\n\tvar column;\n\tvar ndims;\n\tvar row;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0|0; // 'none'\n\t}\n\tcolumn = true;\n\trow = true;\n\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( column && s2 < s1 ) {\n\t\t\tcolumn = false;\n\t\t} else if ( row && s2 > s1 ) {\n\t\t\trow = false;\n\t\t}\n\t\tif ( row || column ) {\n\t\t\ts1 = s2;\n\t\t} else {\n\t\t\treturn 0|0; // 'none'\n\t\t}\n\t}\n\tif ( row && column ) {\n\t\treturn 3|0; // 'both'\n\t}\n\tif ( row ) {\n\t\treturn 1|0; // 'row-major'\n\t}\n\treturn 2|0; // 'column-major'\n}\n\n\n// EXPORTS //\n\nexport default strides2order;\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/**\n* Determines if an array is column-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is column-major contiguous\n*/\nfunction isColumnMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 2 || order === 3 );\n}\n\n\n// EXPORTS //\n\nexport default isColumnMajorContiguous;\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/**\n* Determines if an array is row-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is row-major contiguous\n*/\nfunction isRowMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 1 || order === 3 );\n}\n\n\n// EXPORTS //\n\nexport default isRowMajorContiguous;\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/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {Array} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn [ offset, offset ];\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\treturn [ min, max ];\n}\n\n\n// EXPORTS //\n\nexport default minmaxViewBufferIndex;\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* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\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* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\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* Compute the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @module @stdlib/ndarray-base-minmax-view-buffer-index\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* import minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view and assigns results to a provided output array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset, out ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\tout[ 0 ] = offset;\n\t\t\tout[ 1 ] = offset;\n\t\t\treturn out;\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\tout[ 0 ] = min;\n\tout[ 1 ] = max;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default minmaxViewBufferIndex;\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// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\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\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\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* Test if a value is a string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar RE_CHARS = /[-\\/\\\\^$*+?.()|[\\]{}]/g; // eslint-disable-line no-useless-escape\n\n\n// MAIN //\n\n/**\n* Escapes a regular expression string.\n*\n* @param {string} str - regular expression string\n* @throws {TypeError} first argument must be a string\n* @returns {string} escaped string\n*\n* @example\n* var str = rescape( '[A-Z]*' );\n* // returns '\\\\[A\\\\-Z\\\\]\\\\*'\n*/\nfunction rescape( str ) {\n\tvar len;\n\tvar s;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a regular expression string. Value: `%s`.', str ) );\n\t}\n\t// Check if the string starts with a forward slash...\n\tif ( str[ 0 ] === '/' ) {\n\t\t// Find the last forward slash...\n\t\tlen = str.length;\n\t\tfor ( i = len-1; i >= 0; i-- ) {\n\t\t\tif ( str[ i ] === '/' ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t// If we searched the string to no avail or if the first letter is not `/`, assume that the string is not of the form `/[...]/[guimy]`:\n\tif ( i === void 0 || i <= 0 ) {\n\t\treturn str.replace( RE_CHARS, '\\\\$&' );\n\t}\n\t// We need to de-construct the string...\n\ts = str.substring( 1, i );\n\n\t// Only escape the characters between the `/`:\n\ts = s.replace( RE_CHARS, '\\\\$&' );\n\n\t// Reassemble:\n\tstr = str[ 0 ] + s + str.substring( i );\n\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default rescape;\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\nvar exec = RegExp.prototype.exec; // non-generic\n\n\n// EXPORTS //\n\nexport default exec;\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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2exec.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a regular expression.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a regular expression\n*\n* @example\n* var bool = isRegExp( /\\.+/ );\n* // returns true\n*\n* @example\n* var bool = isRegExp( {} );\n* // returns false\n*/\nfunction isRegExp( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof RegExp ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object RegExp]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isRegExp;\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\nimport exec from './exec.js';\n\n\n// MAIN //\n\n/**\n* Attempts to call a `RegExp` method.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if able to call a `RegExp` method\n*/\nfunction test( value ) {\n\ttry {\n\t\texec.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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* Replaces search occurrences with a replacement string.\n*\n* @param {string} str - input string\n* @param {RegExp} search - search expression\n* @param {(string|Function)} newval - replacement value or function\n* @returns {string} new string containing replacement(s)\n*\n* @example\n* var str = 'Hello World';\n* var out = replace( str, /world/i, 'Mr. President' );\n* // returns 'Hello Mr. President'\n*\n* @example\n* import capitalize from '@stdlib/string-base-capitalize';\n*\n* var str = 'Oranges and lemons say the bells of St. Clement\\'s';\n*\n* function replacer( match, p1 ) {\n* return capitalize( p1 );\n* }\n*\n* var out = replace( str, /([^\\s]*)/gi, replacer );\n* // returns 'Oranges And Lemons Say The Bells Of St. Clement\\'s'\n*/\nfunction replace( str, search, newval ) {\n\treturn str.replace( search, newval );\n}\n\n\n// EXPORTS //\n\nexport default replace;\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\nimport rescape from '@stdlib/utils-escape-regexp-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isRegExp from '@stdlib/assert-is-regexp';\nimport format from '@stdlib/string-format';\nimport base from '@stdlib/string-base-replace';\n\n\n// MAIN //\n\n/**\n* Replaces search occurrences with a replacement string.\n*\n* @param {string} str - input string\n* @param {(string|RegExp)} search - search expression\n* @param {(string|Function)} newval - replacement value or function\n* @throws {TypeError} first argument must be a string\n* @throws {TypeError} second argument argument must be a string or regular expression\n* @throws {TypeError} third argument must be a string or function\n* @returns {string} new string containing replacement(s)\n*\n* @example\n* var str = 'beep';\n* var out = replace( str, 'e', 'o' );\n* // returns 'boop'\n*\n* @example\n* var str = 'Hello World';\n* var out = replace( str, /world/i, 'Mr. President' );\n* // returns 'Hello Mr. President'\n*\n* @example\n* import capitalize from '@stdlib/string-capitalize';\n*\n* var str = 'Oranges and lemons say the bells of St. Clement\\'s';\n*\n* function replacer( match, p1 ) {\n* return capitalize( p1 );\n* }\n*\n* var out = replace( str, /([^\\s]*)/gi, replacer );\n* // returns 'Oranges And Lemons Say The Bells Of St. Clement\\'s'\n*/\nfunction replace( str, search, newval ) {\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\tif ( isString( search ) ) {\n\t\tsearch = new RegExp( rescape( search ), 'g' );\n\t} else if ( !isRegExp( search ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a string or regular expression. Value: `%s`.', search ) );\n\t}\n\tif ( !isString( newval ) && !isFunction( newval ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Third argument must be a string or replacement function. Value: `%s`.', newval ) );\n\t}\n\treturn base( str, search, newval );\n}\n\n\n// EXPORTS //\n\nexport default replace;\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\nimport replace from '@stdlib/string-replace';\nimport real from '@stdlib/complex-float64-real';\nimport imag from '@stdlib/complex-float64-imag';\n\n\n// VARIABLES //\n\nvar CTORS = {\n\t'int8': 'new Int8Array( [ {{data}} ] )',\n\t'uint8': 'new Uint8Array( [ {{data}} ] )',\n\t'uint8c': 'new Uint8ClampedArray( [ {{data}} ] )',\n\t'int16': 'new Int16Array( [ {{data}} ] )',\n\t'uint16': 'new Uint16Array( [ {{data}} ] )',\n\t'int32': 'new Int32Array( [ {{data}} ] )',\n\t'uint32': 'new Uint32Array( [ {{data}} ] )',\n\t'float32': 'new Float32Array( [ {{data}} ] )',\n\t'float64': 'new Float64Array( [ {{data}} ] )',\n\t'generic': '[ {{data}} ]',\n\t'binary': 'new Buffer( [ {{data}} ] )',\n\t'complex64': 'new Complex64Array( [ {{data}} ] )',\n\t'complex128': 'new Complex128Array( [ {{data}} ] )'\n};\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {string} string representation\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar buffer;\n\tvar ndims;\n\tvar ctor;\n\tvar str;\n\tvar dt;\n\tvar v;\n\tvar i;\n\n\tndims = this._shape.length;\n\tdt = this._dtype;\n\n\t// Function to invoke to create an ndarray:\n\tstr = 'ndarray( \\''+dt+'\\', ';\n\n\t// Data buffer parameter...\n\tbuffer = '';\n\tif ( this._length <= 100 ) {\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// First three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbuffer += ', ..., ';\n\n\t\t// Last three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tv = this.iget( this._length-1-i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tbuffer += this.iget( this._length-1-i );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tctor = CTORS[ this.dtype ];\n\tstr += replace( ctor, '{{data}}', buffer );\n\tstr += ', ';\n\n\t// Array shape...\n\tif ( ndims === 0 ) {\n\t\tstr += '[]';\n\t} else {\n\t\tstr += '[ ' + this._shape.join( ', ' ) + ' ]';\n\t}\n\tstr += ', ';\n\n\t// Stride array...\n\tstr += '[ ';\n\tif ( ndims === 0 ) {\n\t\tstr += '0';\n\t} else {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( this._strides[ i ] < 0 ) {\n\t\t\t\tstr += -this._strides[ i ];\n\t\t\t} else {\n\t\t\t\tstr += this._strides[ i ];\n\t\t\t}\n\t\t\tif ( i < ndims-1 ) {\n\t\t\t\tstr += ', ';\n\t\t\t}\n\t\t}\n\t}\n\tstr += ' ]';\n\tstr += ', ';\n\n\t// Buffer offset:\n\tstr += '0';\n\tstr += ', ';\n\n\t// Order:\n\tstr += '\\'' + this._order + '\\'';\n\n\t// Close the function call:\n\tstr += ' )';\n\treturn str;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default toString;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8Array;\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* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* import UINT8_MAX from '@stdlib/constants-uint8-max';\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT8_MAX;\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 main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns \n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ArraySupport;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint16Array;\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* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* import UINT16_MAX from '@stdlib/constants-uint16-max';\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default UINT16_MAX;\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 main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns \n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint16ArraySupport;\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\nexport default 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// MODULES //\n\nimport ctors from './ctors.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if an environment is little endian.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment is little endian\n*\n* @example\n* var bool = isLittleEndian();\n* // returns \n*/\nfunction isLittleEndian() {\n\tvar uint16view;\n\tvar uint8view;\n\n\tuint16view = new ctors[ 'uint16' ]( 1 );\n\n\t/*\n\t* Set the uint16 view to a value having distinguishable lower and higher order words.\n\t*\n\t* 4660 => 0x1234 => 0x12 0x34 => '00010010 00110100' => (0x12,0x34) == (18,52)\n\t*/\n\tuint16view[ 0 ] = 0x1234;\n\n\t// Create a uint8 view on top of the uint16 buffer:\n\tuint8view = new ctors[ 'uint8' ]( uint16view.buffer );\n\n\t// If little endian, the least significant byte will be first...\n\treturn ( uint8view[ 0 ] === 0x34 );\n}\n\n\n// MAIN //\n\nbool = isLittleEndian();\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint16Array from '@stdlib/array-uint16';\n\n\n// MAIN //\n\nvar ctors = {\n\t'uint16': Uint16Array,\n\t'uint8': Uint8Array\n};\n\n\n// EXPORTS //\n\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat64Array;\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 main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns \n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat64ArraySupport;\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\nexport default 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// MAIN //\n\nvar main = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\n* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @module @stdlib/array-buffer\n*\n* @example\n* import ctor from '@stdlib/array-buffer';\n*\n* var buf = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasArrayBufferSupport from '@stdlib/assert-has-arraybuffer-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasArrayBufferSupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default 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\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport Float64Array from '@stdlib/array-float64';\nimport GlobalArrayBuffer from './arraybuffer.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `ArrayBuffer` support.\n*\n* @returns {boolean} boolean indicating if an environment has `ArrayBuffer` support\n*\n* @example\n* var bool = hasArrayBufferSupport();\n* // returns \n*/\nfunction hasArrayBufferSupport() {\n\tvar bool;\n\tvar view;\n\tvar buf;\n\n\tif ( typeof GlobalArrayBuffer !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tbuf = new GlobalArrayBuffer( 16 );\n\t\tbool = ( isArrayBuffer( buf ) && typeof GlobalArrayBuffer.isView === 'function' );\n\t\tif ( bool ) {\n\t\t\tview = new Float64Array( buf );\n\t\t\tview[ 0 ] = -3.14;\n\t\t\tview[ 1 ] = NaN;\n\t\t\tbool = (\n\t\t\t\tbool &&\n\t\t\t\tGlobalArrayBuffer.isView( view ) &&\n\t\t\t\tbuf.byteLength === 16 &&\n\t\t\t\tview[ 0 ] === -3.14 &&\n\t\t\t\tview[ 1 ] !== view[ 1 ]\n\t\t\t);\n\t\t}\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasArrayBufferSupport;\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* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasDataView = ( typeof DataView === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `DataView`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a DataView\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import DataView from '@stdlib/array-dataview';\n*\n* var bool = isDataView( new DataView( new ArrayBuffer( 10 ) ) );\n* // returns true\n*\n* @example\n* var bool = isDataView( [] );\n* // returns false\n*/\nfunction isDataView( value ) {\n\treturn (\n\t\t( hasDataView && value instanceof DataView ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object DataView]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isDataView;\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\nvar main = ( typeof DataView === 'function' ) ? DataView : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof DataView === 'function' ) ? DataView : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default ctor;\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* Constructor which returns a data view representing a provided array buffer.\n*\n* @module @stdlib/array-dataview\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n* import DataView from '@stdlib/array-dataview';\n*\n* var buf = new ArrayBuffer( 10 );\n* // returns \n*\n* var dv = new DataView( buf );\n* // returns \n*/\n\n// MODULES //\n\nimport hasDataViewSupport from '@stdlib/assert-has-dataview-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasDataViewSupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default ctor;\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\nimport isDataView from '@stdlib/assert-is-dataview';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport GlobalDataView from './dataview.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `DataView` support.\n*\n* @returns {boolean} boolean indicating if an environment has `DataView` support\n*\n* @example\n* var bool = hasDataViewSupport();\n* // returns \n*/\nfunction hasDataViewSupport() {\n\tvar bool;\n\tvar view;\n\tvar buf;\n\n\tif ( typeof GlobalDataView !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tbuf = new ArrayBuffer( 24 );\n\t\tview = new GlobalDataView( buf, 8 );\n\t\tbool = ( isDataView( view ) && typeof view.getFloat64 === 'function' && typeof view.setFloat64 === 'function' );\n\t\tif ( bool ) {\n\t\t\tview.setFloat64( 0, -3.14 );\n\t\t\tview.setFloat64( 8, NaN );\n\t\t\tbool = (\n\t\t\t\tbool &&\n\t\t\t\tview.buffer === buf &&\n\t\t\t\tview.byteLength === 16 &&\n\t\t\t\tview.byteOffset === 8 &&\n\t\t\t\tview.getFloat64( 0 ) === -3.14 &&\n\t\t\t\tview.getFloat64( 8 ) !== view.getFloat64( 8 )\n\t\t\t);\n\t\t}\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasDataViewSupport;\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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Constructor which returns a data view representing a provided array buffer.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default polyfill;\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/* global BigInt */\n\n'use strict';\n\n// MAIN //\n\nvar BigInteger = ( typeof BigInt === 'function' ) ? BigInt : void 0; // eslint-disable-line stdlib/require-globals, node/no-unsupported-features/es-builtins\n\n\n// EXPORTS //\n\nexport default BigInteger;\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\nimport replace from '@stdlib/string-base-replace';\nimport DTYPES from './dtypes.json';\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of ndarray data types\n*\n* @example\n* var list = dtypes();\n* // returns [...]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default dtypes;\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/* eslint-disable stdlib/empty-line-before-comment */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects. While certain dtypes, such as \"generic\" and \"binary\", have special behavior in JavaScript, they do not have a direct complement in C.\n*\n* @private\n* @returns {Object} object mapping supported dtypes to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `dtypes.h` enumeration!!!!\n\treturn {\n\t\t// Boolean data types:\n\t\t'bool': 0,\n\n\t\t// Integer data types:\n\t\t'int8': 1,\n\t\t'uint8': 2,\n\t\t'uint8c': 3,\n\t\t'int16': 4,\n\t\t'uint16': 5,\n\t\t'int32': 6,\n\t\t'uint32': 7,\n\t\t'int64': 8,\n\t\t'uint64': 9,\n\t\t// 'int128': 10, // uncomment once supported\n\t\t// 'uint128': 11,\n\t\t// 'int256': 12,\n\t\t// 'uint256': 13,\n\n\t\t// Floating-point data types:\n\t\t// 'float16': 14,\n\t\t// 'bfloat16': 15,\n\t\t'float32': 10,\n\t\t'float64': 11,\n\t\t// 'float128': 18, // uncomment once supported\n\n\t\t// Complex floating-point number data types:\n\t\t'complex64': 12,\n\t\t'complex128': 13,\n\n\t\t// Data type for \"binary\" data (i.e., data stored in a Node.js `Buffer` object):\n\t\t'binary': 14,\n\n\t\t// Data type for \"generic\" JavaScript values (objects):\n\t\t'generic': 15,\n\n\t\t// Define a signaling value which is guaranteed not to be a valid type enumeration value:\n\t\t'notype': 17,\n\n\t\t// Indicate the start of user defined type numbers (leaving room for type growth above):\n\t\t'userdefined_type': 256\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumeration;\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\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setReadOnly;\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/**\n* Returns an array of an object's own enumerable property names.\n*\n* ## Notes\n*\n* - In contrast to the built-in `Object.keys()`, this function returns an empty array if provided `undefined` or `null`, rather than throwing an error.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\treturn Object.keys( Object( value ) );\n}\n\n\n// EXPORTS //\n\nexport default keys;\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 bool = ( typeof Object.keys !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport isArguments from './main.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment returns the expected internal class of the `arguments` object.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment behaves as expected\n*\n* @example\n* var bool = detect();\n* // returns \n*/\nfunction detect() {\n\treturn isArguments( arguments );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn ( nativeClass( value ) === '[object Arguments]' );\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\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* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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// EXPORTS //\n\nexport default Number; // eslint-disable-line stdlib/require-globals\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\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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/**\n* Tests if a double-precision floating-point numeric value is `NaN`.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 7.0 );\n* // returns false\n*/\nfunction isnan( x ) {\n\treturn ( x !== x );\n}\n\n\n// EXPORTS //\n\nexport default isnan;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `NaN` number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `NaN` number primitive\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isnan;\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\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a value of `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a value of `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isnan;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( null );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isnan;\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* Test if a value is a number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Test if a value is `NaN`.\n*\n* @module @stdlib/assert-is-nan\n*\n* @example\n* import isnan from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns false\n*\n* @example\n* import { isObject as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* import FLOAT64_PINF from '@stdlib/constants-float64-pinf';\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default FLOAT64_PINF;\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* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nexport default FLOAT64_NINF;\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: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\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\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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* Test if a value is an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Tests if an object's own property is enumerable.\n*\n* @private\n* @name isEnumerableProperty\n* @type {Function}\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nvar isEnumerableProperty = Object.prototype.propertyIsEnumerable;\n\n\n// EXPORTS //\n\nexport default isEnumerableProperty;\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\nimport isEnum from './native.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Detects whether an environment has a bug where String indices are not detected as \"enumerable\" properties. Observed in Node v0.10.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment has the bug\n*/\nfunction detect() {\n\treturn !isEnum.call( 'beep', '0' );\n}\n\n\n// MAIN //\n\nbool = detect();\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport isString from '@stdlib/assert-is-string';\nimport { isPrimitive as isnan } from '@stdlib/assert-is-nan';\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport isEnum from './native.js';\nimport hasStringEnumBug from './has_string_enumerability_bug.js';\n\n\n// MAIN //\n\n/**\n* Tests if an object's own property is enumerable.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object property is enumerable\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = isEnumerableProperty( beep, 'hasOwnProperty' );\n* // returns false\n*/\nfunction isEnumerableProperty( value, property ) {\n\tvar bool;\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\tbool = isEnum.call( value, property );\n\tif ( !bool && hasStringEnumBug && isString( value ) ) {\n\t\t// Note: we only check for indices, as properties attached to a `String` object are properly detected as enumerable above.\n\t\tproperty = +property;\n\t\treturn (\n\t\t\t!isnan( property ) &&\n\t\t\tisInteger( property ) &&\n\t\t\tproperty >= 0 &&\n\t\t\tproperty < value.length\n\t\t);\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default isEnumerableProperty;\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* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* import UINT32_MAX from '@stdlib/constants-uint32-max';\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nexport default UINT32_MAX;\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* Test if a value is an `arguments` object.\n*\n* @module @stdlib/assert-is-arguments\n*\n* @example\n* import isArguments from '@stdlib/assert-is-arguments';\n*\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* bool = isArguments( [] );\n* // returns false\n*/\n\n// MODULES //\n\nimport hasArgumentsClass from './detect.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar isArguments;\nif ( hasArgumentsClass ) {\n\tisArguments = main;\n} else {\n\tisArguments = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\nimport isArray from '@stdlib/assert-is-array';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-uint32-max';\n\n\n// MAIN //\n\n/**\n* Tests whether a value is an `arguments` object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is an `arguments` object\n*\n* @example\n* function foo() {\n* return arguments;\n* }\n*\n* var bool = isArguments( foo() );\n* // returns true\n*\n* @example\n* var bool = isArguments( [] );\n* // returns false\n*/\nfunction isArguments( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object' &&\n\t\t!isArray( value ) &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH &&\n\t\thasOwnProp( value, 'callee' ) &&\n\t\t!isEnumerableProperty( value, 'callee' )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArguments;\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\nimport isArguments from '@stdlib/assert-is-arguments';\nimport builtin from './builtin.js';\n\n\n// VARIABLES //\n\nvar slice = Array.prototype.slice;\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tif ( isArguments( value ) ) {\n\t\treturn builtin( slice.call( value ) );\n\t}\n\treturn builtin( value );\n}\n\n\n// EXPORTS //\n\nexport default keys;\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\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\nimport noop from '@stdlib/utils-noop';\n\n\n// MAIN //\n\n// Note: certain environments treat an object's prototype as enumerable, which, as a matter of convention, it shouldn't be...\nvar bool = isEnumerableProperty( noop, 'prototype' );\n\n\n// EXPORTS //\n\nexport default bool;\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* No operation.\n*\n* @example\n* noop();\n* // ...does nothing.\n*/\nfunction noop() {\n\t// Empty function...\n}\n\n\n// EXPORTS //\n\nexport default noop;\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\nimport isEnumerableProperty from '@stdlib/assert-is-enumerable-property';\n\n\n// VARIABLES //\n\nvar obj = {\n\t'toString': null\n};\n\n\n// MAIN //\n\n// Note: certain environments don't allow enumeration of overwritten properties which are considered non-enumerable...\nvar bool = !isEnumerableProperty( obj, 'toString' );\n\n\n// EXPORTS //\n\nexport default bool;\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* Maximum length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\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\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\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\nimport isnan from '@stdlib/assert-is-nan';\nimport isCollection from '@stdlib/assert-is-collection';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @param {ArrayLike} arr - array-like object\n* @param {*} searchElement - element to find\n* @param {integer} [fromIndex] - starting index (if negative, the start index is determined relative to last element)\n* @throws {TypeError} must provide an array-like object\n* @throws {TypeError} third argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 3 );\n* // returns 1\n*\n* @example\n* var arr = [ 4, 3, 2, 1 ];\n* var idx = indexOf( arr, 5 );\n* // returns -1\n*\n* @example\n* // Using a `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, 3 );\n* // returns 5\n*\n* @example\n* // `fromIndex` which exceeds `array` length:\n* var arr = [ 1, 2, 3, 4, 2, 5 ];\n* var idx = indexOf( arr, 2, 10 );\n* // returns -1\n*\n* @example\n* // Negative `fromIndex`:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6, 2 ];\n* var idx = indexOf( arr, 2, -4 );\n* // returns 5\n*\n* idx = indexOf( arr, 2, -1 );\n* // returns 7\n*\n* @example\n* // Negative `fromIndex` exceeding input `array` length:\n* var arr = [ 1, 2, 3, 4, 5, 2, 6 ];\n* var idx = indexOf( arr, 2, -10 );\n* // returns 1\n*\n* @example\n* // Array-like objects:\n* var str = 'bebop';\n* var idx = indexOf( str, 'o' );\n* // returns 3\n*/\nfunction indexOf( arr, searchElement, fromIndex ) {\n\tvar len;\n\tvar i;\n\tif ( !isCollection( arr ) && !isString( arr ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', arr ) );\n\t}\n\tlen = arr.length;\n\tif ( len === 0 ) {\n\t\treturn -1;\n\t}\n\tif ( arguments.length === 3 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= 0 ) {\n\t\t\tif ( fromIndex >= len ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\ti = fromIndex;\n\t\t} else {\n\t\t\ti = len + fromIndex;\n\t\t\tif ( i < 0 ) {\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\ti = 0;\n\t}\n\t// Check for `NaN`...\n\tif ( isnan( searchElement ) ) {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( isnan( arr[i] ) ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( arr[ i ] === searchElement ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\treturn -1;\n}\n\n\n// EXPORTS //\n\nexport default indexOf;\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/**\n* Tests whether a value equals the prototype of its constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction isConstructorPrototype( value ) {\n\treturn ( value.constructor && value.constructor.prototype === value );\n}\n\n\n// EXPORTS //\n\nexport default isConstructorPrototype;\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 w = ( typeof window === 'undefined' ) ? void 0 : window;\n\n\n// EXPORTS //\n\nexport default w;\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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport indexOf from '@stdlib/utils-index-of';\nimport typeOf from '@stdlib/utils-type-of';\nimport isConstructorPrototype from './is_constructor_prototype.js';\nimport EXCLUDED_KEYS from './excluded_keys.json';\nimport win from './window.js';\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Determines whether an environment throws when comparing to the prototype of a value's constructor (e.g., [IE9][1]).\n*\n* [1]: https://stackoverflow.com/questions/7688070/why-is-comparing-the-constructor-property-of-two-windows-unreliable\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment is buggy\n*/\nfunction check() {\n\tvar k;\n\tif ( typeOf( win ) === 'undefined' ) {\n\t\treturn false;\n\t}\n\tfor ( k in win ) { // eslint-disable-line guard-for-in\n\t\ttry {\n\t\t\tif (\n\t\t\t\tindexOf( EXCLUDED_KEYS, k ) === -1 &&\n\t\t\t\thasOwnProp( win, k ) &&\n\t\t\t\twin[ k ] !== null &&\n\t\t\t\ttypeOf( win[ k ] ) === 'object'\n\t\t\t) {\n\t\t\t\tisConstructorPrototype( win[ k ] );\n\t\t\t}\n\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// MAIN //\n\nbool = check();\n\n\n// EXPORTS //\n\nexport default bool;\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 bool = ( typeof window !== 'undefined' );\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport hasArgumentsBug from './has_arguments_bug.js';\nimport HAS_BUILTIN from './has_builtin.js';\nimport builtin from './builtin.js';\nimport wrapper from './builtin_wrapper.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @name keys\n* @type {Function}\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nvar keys;\nif ( HAS_BUILTIN ) {\n\tif ( hasArgumentsBug() ) {\n\t\tkeys = wrapper;\n\t} else {\n\t\tkeys = builtin;\n\t}\n} else {\n\tkeys = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default keys;\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\nimport keys from './builtin.js';\n\n\n// FUNCTIONS //\n\n/**\n* Tests the built-in `Object.keys()` implementation when provided `arguments`.\n*\n* @private\n* @returns {boolean} boolean indicating whether the built-in implementation returns the expected number of keys\n*/\nfunction test() {\n\treturn ( keys( arguments ) || '' ).length !== 2;\n}\n\n\n// MAIN //\n\n/**\n* Tests whether the built-in `Object.keys()` implementation supports providing `arguments` as an input value.\n*\n* ## Notes\n*\n* - Safari 5.0 does **not** support `arguments` as an input value.\n*\n* @private\n* @returns {boolean} boolean indicating whether a built-in implementation supports `arguments`\n*/\nfunction check() {\n\treturn test( 1, 2 );\n}\n\n\n// EXPORTS //\n\nexport default check;\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\nimport isObjectLike from '@stdlib/assert-is-object-like';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArguments from '@stdlib/assert-is-arguments';\nimport HAS_ENUM_PROTO_BUG from './has_enumerable_prototype_bug.js';\nimport HAS_NON_ENUM_PROPS_BUG from './has_non_enumerable_properties_bug.js';\nimport isConstructorPrototype from './is_constructor_prototype_wrapper.js';\nimport NON_ENUMERABLE from './non_enumerable.json';\n\n\n// MAIN //\n\n/**\n* Returns an array of an object's own enumerable property names.\n*\n* @private\n* @param {*} value - input object\n* @returns {Array} a list of own enumerable property names\n*\n* @example\n* var obj = {\n* 'beep': 'boop',\n* 'foo': 3.14\n* };\n*\n* var k = keys( obj );\n* // e.g., returns [ 'beep', 'foo' ]\n*/\nfunction keys( value ) {\n\tvar skipConstructor;\n\tvar skipPrototype;\n\tvar isFcn;\n\tvar out;\n\tvar k;\n\tvar p;\n\tvar i;\n\n\tout = [];\n\tif ( isArguments( value ) ) {\n\t\t// Account for environments which treat `arguments` differently...\n\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\tout.push( i.toString() );\n\t\t}\n\t\t// Note: yes, we are precluding the `arguments` array-like object from having other enumerable properties; however, this should (1) be very rare and (2) not be encouraged (e.g., doing something like `arguments.a = 'b'`; in certain engines directly manipulating the `arguments` value results in automatic de-optimization).\n\t\treturn out;\n\t}\n\tif ( typeof value === 'string' ) {\n\t\t// Account for environments which do not treat string character indices as \"own\" properties...\n\t\tif ( value.length > 0 && !hasOwnProp( value, '0' ) ) {\n\t\t\tfor ( i = 0; i < value.length; i++ ) {\n\t\t\t\tout.push( i.toString() );\n\t\t\t}\n\t\t}\n\t} else {\n\t\tisFcn = ( typeof value === 'function' );\n\t\tif ( isFcn === false && !isObjectLike( value ) ) {\n\t\t\treturn out;\n\t\t}\n\t\tskipPrototype = ( HAS_ENUM_PROTO_BUG && isFcn );\n\t}\n\tfor ( k in value ) {\n\t\tif ( !( skipPrototype && k === 'prototype' ) && hasOwnProp( value, k ) ) {\n\t\t\tout.push( String( k ) );\n\t\t}\n\t}\n\tif ( HAS_NON_ENUM_PROPS_BUG ) {\n\t\tskipConstructor = isConstructorPrototype( value );\n\t\tfor ( i = 0; i < NON_ENUMERABLE.length; i++ ) {\n\t\t\tp = NON_ENUMERABLE[ i ];\n\t\t\tif ( !( skipConstructor && p === 'constructor' ) && hasOwnProp( value, p ) ) {\n\t\t\t\tout.push( String( p ) );\n\t\t\t}\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default keys;\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\nimport hasAutomationEqualityBug from './has_automation_equality_bug.js';\nimport isConstructorPrototype from './is_constructor_prototype.js';\nimport HAS_WINDOW from './has_window.js';\n\n\n// MAIN //\n\n/**\n* Wraps the test for constructor prototype equality to accommodate buggy environments (e.g., environments which throw when testing equality).\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value equals the prototype of its constructor\n*/\nfunction wrapper( value ) {\n\tif ( HAS_WINDOW === false && !hasAutomationEqualityBug ) {\n\t\treturn isConstructorPrototype( value );\n\t}\n\ttry {\n\t\treturn isConstructorPrototype( value );\n\t} catch ( error ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default wrapper;\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 a list of ndarray data types.\n*\n* @module @stdlib/ndarray-dtypes\n*\n* @example\n* import dtypes from '@stdlib/ndarray-dtypes';\n*\n* var list = dtypes();\n* // returns [...]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nexport default 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\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\nimport objectKeys from '@stdlib/utils-keys';\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nexport default assign;\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\nimport ORDERS from './orders.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray orders.\n*\n* @returns {StringArray} list of ndarray orders\n*\n* @example\n* var list = orders();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\nfunction orders() {\n\treturn ORDERS.slice();\n}\n\n\n// EXPORTS //\n\nexport default orders;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 an object mapping supported layouts to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 101`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of array objects.\n*\n* @returns {Object} object mapping supported layouts to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `layouts.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': 101,\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': 102\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 a list of BLAS memory layouts.\n*\n* @module @stdlib/blas-base-layouts\n*\n* @example\n* import layouts from '@stdlib/blas-base-layouts';\n*\n* var list = layouts();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport DATA from './data.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of BLAS memory layouts.\n*\n* @returns {StringArray} list of memory layouts\n*\n* @example\n* var list = layouts();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\nfunction layouts() {\n\treturn DATA.slice();\n}\n\n\n// EXPORTS //\n\nexport default layouts;\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\nimport { enum as layouts } from '@stdlib/blas-base-layouts';\n\n\n// VARIABLES //\n\nvar LAYOUTS = layouts();\n\n\n// MAIN //\n\n/**\n* Returns an object mapping supported orders to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported orders to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `orders.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': LAYOUTS[ 'row-major' ],\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': LAYOUTS[ 'column-major' ]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\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 a list of ndarray orders.\n*\n* @module @stdlib/ndarray-orders\n*\n* @example\n* import orders from '@stdlib/ndarray-orders';\n*\n* var list = orders();\n* // e.g., returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default 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\nimport MODES from './modes.json';\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray index modes.\n*\n* @returns {StringArray} list of ndarray index modes\n*\n* @example\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nexport default modes;\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 an object mapping supported index modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `throw == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported index modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `index_modes.h` enumeration!!!!\n\treturn {\n\t\t'throw': 1,\n\t\t'clamp': 2,\n\t\t'wrap': 3,\n\t\t'normalize': 4\n\t};\n}\n\n\n// EXPORTS //\n\nexport default enumerated;\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 a list of ndarray index modes.\n*\n* @module @stdlib/ndarray-index-modes\n*\n* @example\n* import modes from '@stdlib/ndarray-index-modes';\n*\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport modes from './main.js';\nimport enumeration from './enum.js';\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nexport default modes;\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\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport DataView from '@stdlib/array-dataview';\nimport BigInt from '@stdlib/bigint-ctor';\nimport { enum as dtypes } from '@stdlib/ndarray-dtypes';\nimport { enum as orders } from '@stdlib/ndarray-orders';\nimport { enum as modes } from '@stdlib/ndarray-index-modes';\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tv.setBigInt64( o, BigInt( N ), IS_LITTLE_ENDIAN );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv.setBigInt64( o, BigInt( sh[i] ), IS_LITTLE_ENDIAN );\n\t\tv.setBigInt64( o+s, BigInt( st[i]*nbytes ), IS_LITTLE_ENDIAN );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tv.setBigInt64( o, BigInt( this._offset*nbytes ), IS_LITTLE_ENDIAN );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tv.setBigInt64( o, BigInt( M ), IS_LITTLE_ENDIAN );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default meta2dataview;\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\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport Uint8Array from '@stdlib/array-uint8';\nimport DataView from '@stdlib/array-dataview';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// VARIABLES //\n\n// 0xFFFFFFFF = 2**32 - 1 => 11111111 11111111 11111111 11111111\nvar LOW_MASK = 0xFFFFFFFF >>> 0;\n\n// 2**32\nvar TWO_32 = 4294967296;\n\n// Byte array workspace:\nvar BYTES = new Uint8Array( 8 );\nvar VIEW = new DataView( BYTES.buffer );\n\n\n// MAIN //\n\n/**\n* Converts an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* ## Notes\n*\n* - This function assumes that the input value is less than the maximum safe double-precision floating-point integer plus one (i.e., `2**53`).\n*\n* @param {number} x - input value\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var out = new Uint8Array( 8 );\n* var bytes = float64ToInt64Bytes( 1.0, out, 1, 0 );\n* // returns \n*/\nfunction float64ToInt64Bytes( x, out, stride, offset ) {\n\tvar hi;\n\tvar lo;\n\tvar i;\n\n\tif ( x === 0 ) {\n\t\tfor ( i = 0; i < BYTES.length; i++ ) {\n\t\t\tout[ offset ] = 0;\n\t\t\toffset += stride;\n\t\t}\n\t\treturn out;\n\t}\n\t// Get the low 32-bit word:\n\tlo = (x&LOW_MASK)>>>0;\n\n\t// Get the high 32-bit word:\n\thi = floor( x/TWO_32 );\n\n\t// Insert the high and low words according to host byte order (endianness):\n\tif ( IS_LITTLE_ENDIAN ) {\n\t\tVIEW.setUint32( 0, lo, IS_LITTLE_ENDIAN );\n\t\tVIEW.setUint32( 4, hi, IS_LITTLE_ENDIAN );\n\t} else {\n\t\tVIEW.setUint32( 0, hi, IS_LITTLE_ENDIAN );\n\t\tVIEW.setUint32( 4, lo, IS_LITTLE_ENDIAN );\n\t}\n\tfor ( i = 0; i < BYTES.length; i++ ) {\n\t\tout[ offset ] = BYTES[ i ];\n\t\toffset += stride;\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default float64ToInt64Bytes;\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* Convert an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* @module @stdlib/number-float64-base-to-int64-bytes\n*\n* @example\n* import float64ToInt64Bytes from '@stdlib/number-float64-base-to-int64-bytes';\n*\n* var bytes = float64ToInt64Bytes( 1.0 );\n* // returns \n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n* import float64ToInt64Bytes from '@stdlib/number-float64-base-to-int64-bytes';\n*\n* var out = new Uint8Array( 8 );\n* var bytes = float64ToInt64Bytes( 1.0, out, 1, 0 );\n* // returns \n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default 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\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport Uint8Array from '@stdlib/array-uint8';\nimport DataView from '@stdlib/array-dataview';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// VARIABLES //\n\n// 0xFFFFFFFF = 2**32 - 1 => 11111111 11111111 11111111 11111111\nvar LOW_MASK = 0xFFFFFFFF >>> 0;\n\n// 2**32\nvar TWO_32 = 4294967296;\n\n\n// MAIN //\n\n/**\n* Converts an integer-valued double-precision floating-point number to a signed 64-bit integer byte array according to host byte order (endianness).\n*\n* ## Notes\n*\n* - This function assumes that the input value is less than the maximum safe double-precision floating-point integer plus one (i.e., `2**53`).\n*\n* @param {number} x - input value\n* @returns {Uint8Array} byte array\n*\n* @example\n* var bytes = float64ToInt64Bytes( 1.0 );\n* // returns \n*/\nfunction float64ToInt64Bytes( x ) {\n\tvar bytes;\n\tvar view;\n\tvar hi;\n\tvar lo;\n\n\tbytes = new Uint8Array( 8 );\n\tif ( x === 0 ) {\n\t\treturn bytes;\n\t}\n\t// Get the low 32-bit word:\n\tlo = (x&LOW_MASK)>>>0;\n\n\t// Get the high 32-bit word:\n\thi = floor( x/TWO_32 );\n\n\t// Insert the high and low words according to host byte order (endianness):\n\tview = new DataView( bytes.buffer );\n\tif ( IS_LITTLE_ENDIAN ) {\n\t\tview.setUint32( 0, lo, IS_LITTLE_ENDIAN );\n\t\tview.setUint32( 4, hi, IS_LITTLE_ENDIAN );\n\t} else {\n\t\tview.setUint32( 0, hi, IS_LITTLE_ENDIAN );\n\t\tview.setUint32( 4, lo, IS_LITTLE_ENDIAN );\n\t}\n\treturn bytes;\n}\n\n\n// EXPORTS //\n\nexport default float64ToInt64Bytes;\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\nimport IS_LITTLE_ENDIAN from '@stdlib/assert-is-little-endian';\nimport ArrayBuffer from '@stdlib/array-buffer';\nimport DataView from '@stdlib/array-dataview';\nimport Uint8Array from '@stdlib/array-uint8';\nimport { enum as dtypes } from '@stdlib/ndarray-dtypes';\nimport { enum as orders } from '@stdlib/ndarray-orders';\nimport { enum as modes } from '@stdlib/ndarray-index-modes';\nimport { assign as float64ToInt64Bytes } from '@stdlib/number-float64-base-to-int64-bytes';\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar bytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create views for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\tbytes = new Uint8Array( v.buffer );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tfloat64ToInt64Bytes( N, bytes, 1, o );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tfloat64ToInt64Bytes( sh[i], bytes, 1, o );\n\t\tfloat64ToInt64Bytes( st[i]*nbytes, bytes, 1, o+s );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tfloat64ToInt64Bytes( this._offset*nbytes, bytes, 1, o );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tfloat64ToInt64Bytes( M, bytes, 1, o );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default meta2dataview;\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/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport hasBigIntSupport from '@stdlib/assert-has-bigint-support';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport strides2order from '@stdlib/ndarray-base-strides2order';\nimport Boolean from '@stdlib/boolean-ctor';\nimport isColumnMajorContiguous from './is_column_major_contiguous.js';\nimport isRowMajorContiguous from './is_row_major_contiguous.js';\nimport isContiguous from './is_contiguous.js';\nimport copyFlags from './copy_flags.js';\nimport igetValue from './iget.js';\nimport isetValue from './iset.js';\nimport setValue from './set.js';\nimport getValue from './get.js';\nimport toJSON from './tojson.js';\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\nimport meta2dataview from './meta2dataview.js';\nimport meta2dataviewPolyfill from './meta2dataview.polyfill.js';\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* ## Notes\n*\n* - To create a zero-dimensional array,\n*\n* ```javascript\n* var buffer = [ 1 ];\n* var shape = [];\n* var strides = [ 0 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* ```\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {(ArrayLikeObject|TypedArray|Buffer)} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order ) {\n\tvar contiguous;\n\tvar nbytes;\n\tvar ord;\n\tvar len;\n\tvar i;\n\tif ( !(this instanceof ndarray) ) {\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t}\n\t// Compute the number of elements...\n\tlen = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\t// Compute the number of bytes...\n\tif ( buffer.BYTES_PER_ELEMENT ) {\n\t\tnbytes = buffer.BYTES_PER_ELEMENT * len;\n\t} else {\n\t\tnbytes = null;\n\t}\n\t// Set private properties...\n\tthis._byteLength = nbytes;\n\tthis._bytesPerElement = bytesPerElement( dtype );\n\tthis._buffer = buffer;\n\tthis._dtype = dtype;\n\tthis._length = len;\n\tthis._ndims = shape.length;\n\tthis._offset = offset;\n\tthis._order = order;\n\tthis._shape = shape;\n\tthis._strides = strides;\n\tthis._accessors = Boolean( buffer.get && buffer.set );\n\n\tthis._iterationOrder = iterationOrder( strides );\n\n\t// Determine if the array can be stored contiguously:\n\tcontiguous = isContiguous( len, shape, strides, offset, this._iterationOrder ); // eslint-disable-line max-len\n\n\t// Infer the array \"order\" from the stride array (this is supplementary to the `order` parameter):\n\tord = strides2order( strides );\n\n\tthis._flags = {\n\t\t'ROW_MAJOR_CONTIGUOUS': isRowMajorContiguous( ord, contiguous ),\n\t\t'COLUMN_MAJOR_CONTIGUOUS': isColumnMajorContiguous( ord, contiguous ),\n\t\t'READONLY': false\n\t};\n\n\t// Initialize a property for caching serialized meta data:\n\tthis.__meta_dataview__ = null;\n\n\treturn this;\n}\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Size (in bytes) of the array (if known).\n*\n* @name byteLength\n* @memberof ndarray.prototype\n* @type {(NonNegativeInteger|null)}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var byteLength = x.byteLength;\n* // returns 48\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'byteLength', function get() {\n\treturn this._byteLength;\n});\n\n/**\n* Size (in bytes) of each array element (if known).\n*\n* @name BYTES_PER_ELEMENT\n* @memberof ndarray.prototype\n* @type {(PositiveInteger|null)}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var nbytes = x.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'BYTES_PER_ELEMENT', function get() {\n\treturn this._bytesPerElement;\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name data\n* @memberof ndarray.prototype\n* @type {(Array|TypedArray|Buffer)}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var data = x.data;\n* // returns [ 1, 2, 3, 4, 5, 6 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'data', function get() {\n\treturn this._buffer;\n});\n\n/**\n* Underlying data type.\n*\n* @name dtype\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dtype = x.dtype;\n* // returns 'generic'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'dtype', function get() {\n\treturn this._dtype;\n});\n\n/**\n* Meta information, such as information concerning the memory layout of the array.\n*\n* @name flags\n* @memberof ndarray.prototype\n* @type {Object}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var flgs = x.flags;\n* // returns \n*/\nsetReadOnlyAccessor( ndarray.prototype, 'flags', function get() {\n\treturn copyFlags( this._flags );\n});\n\n/**\n* Length of the array.\n*\n* @name length\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var len = x.length;\n* // returns 6\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Number of dimensions.\n*\n* @name ndims\n* @memberof ndarray.prototype\n* @type {PositiveInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var ndims = x.ndims;\n* // returns 2\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'ndims', function get() {\n\treturn this._ndims;\n});\n\n/**\n* Index offset which specifies the buffer index at which to start iterating over array elements.\n*\n* @name offset\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.offset;\n* // returns 0\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'offset', function get() {\n\treturn this._offset;\n});\n\n/**\n* Array order.\n*\n* ## Notes\n*\n* - The array order is either row-major (C-style) or column-major (Fortran-style).\n*\n* @name order\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var order = x.order;\n* // returns 'row-major'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'order', function get() {\n\treturn this._order;\n});\n\n/**\n* Shape of the array.\n*\n* @name shape\n* @memberof ndarray.prototype\n* @type {NonNegativeIntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.shape;\n* // returns [ 3, 2 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'shape', function get() {\n\treturn this._shape.slice();\n});\n\n/**\n* Index strides which specify how to access data along corresponding array dimensions.\n*\n* @name strides\n* @memberof ndarray.prototype\n* @type {IntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.strides;\n* // returns [ 2, 1 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'strides', function get() {\n\treturn this._strides.slice();\n});\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', getValue );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', igetValue );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', setValue );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', isetValue );\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toString\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {string} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var str = x.toString();\n* // returns \"ndarray( 'generic', [ 3, 4, 5, 6, 7, 8 ], [ 3, 2 ], [ 2, 1 ], 0, 'row-major' )\"\n*/\nsetReadOnly( ndarray.prototype, 'toString', toString );\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying an `ndarray` instance.\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toJSON\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {Object} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.toJSON();\n* // e.g., returns { 'type': 'ndarray', 'dtype': 'generic', 'flags': {...}, 'offset': 0, 'order': 'row-major', 'shape': [ 3, 2 ], 'strides': [ 2, 1 ], 'data': [ 3, 4, 5, 6, 7, 8 ] }\n*/\nsetReadOnly( ndarray.prototype, 'toJSON', toJSON );\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - Meta data format:\n*\n* ```text\n* | (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Consumers of this method should treat the returned `DataView` as **immutable**. Otherwise, mutation can invalidate meta data and potentially affect other consumers.\n*\n* @private\n* @name __array_meta_dataview__\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {DataView} serialized meta data\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dv = x.__array_meta_dataview__();\n* // returns \n*/\nsetReadOnly( ndarray.prototype, '__array_meta_dataview__', ( hasBigIntSupport() ) ? meta2dataview : meta2dataviewPolyfill );\n\n\n// EXPORTS //\n\nexport default ndarray;\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\nimport minmaxViewBufferIndex from '@stdlib/ndarray-base-minmax-view-buffer-index';\n\n\n// MAIN //\n\n/**\n* Determines if an array is contiguous.\n*\n* @private\n* @param {NonNegativeInteger} len - array length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {integer} iterationOrder - iteration order\n* @returns {boolean} boolean indicating if an array is contiguous\n*/\nfunction isContiguous( len, shape, strides, offset, iterationOrder ) {\n\tvar buf;\n\n\t// If an array does not contain any elements, then no data to store, and, if the array is unordered, adjacent array elements are not guaranteed to be stored next to each other.\n\tif ( len === 0 || iterationOrder === 0 ) {\n\t\treturn false;\n\t}\n\t// Ensure that the array is compatible with a single memory segment:\n\tbuf = minmaxViewBufferIndex( shape, strides, offset );\n\treturn ( len === ( buf[1]-buf[0]+1 ) );\n}\n\n\n// EXPORTS //\n\nexport default isContiguous;\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\nimport ndarray from '@stdlib/ndarray-base-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is ndarray-like.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating if a value is ndarray-like\n*\n* @example\n* import ndarray from '@stdlib/ndarray-ctor';\n*\n* var arr = ndarray( 'generic', [ 0, 0, 0, 0 ], [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );\n*\n* var bool = isndarrayLike( arr );\n* // returns true\n*\n* bool = isndarrayLike( [] );\n* // returns false\n*/\nfunction isndarrayLike( v ) {\n\treturn (\n\t\tv instanceof ndarray ||\n\t\t(\n\t\t\tv !== null &&\n\t\t\ttypeof v === 'object' &&\n\t\t\ttypeof v.data === 'object' &&\n\t\t\ttypeof v.shape === 'object' &&\n\t\t\ttypeof v.strides === 'object' &&\n\t\t\ttypeof v.offset === 'number' &&\n\t\t\ttypeof v.order === 'string' &&\n\t\t\ttypeof v.ndims === 'number' &&\n\t\t\ttypeof v.dtype === 'string' &&\n\t\t\ttypeof v.length === 'number' &&\n\t\t\ttypeof v.flags === 'object' &&\n\t\t\ttypeof v.get === 'function' &&\n\t\t\ttypeof v.set === 'function'\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isndarrayLike;\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\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\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\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\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/**\n* Copies ndarray flags.\n*\n* @private\n* @param {Object} flags - flags\n* @returns {Object} copy of input object\n*/\nfunction copyFlags( flags ) {\n\treturn {\n\t\t'ROW_MAJOR_CONTIGUOUS': flags.ROW_MAJOR_CONTIGUOUS,\n\t\t'COLUMN_MAJOR_CONTIGUOUS': flags.COLUMN_MAJOR_CONTIGUOUS,\n\t\t'READONLY': flags.READONLY\n\t};\n}\n\n\n// EXPORTS //\n\nexport default copyFlags;\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/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} idx - indices\n* @returns {*} array element\n*/\nfunction get() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default get;\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/**\n* Returns an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( this._offset );\n\t\t}\n\t\treturn this._buffer[ this._offset ];\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this._offset+idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset+idx ];\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this.offset-idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset-idx ];\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( ind );\n\t\t}\n\t\treturn this._buffer[ ind ];\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( ind );\n\t}\n\treturn this._buffer[ ind ];\n}\n\n\n// EXPORTS //\n\nexport default iget;\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/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default set;\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/**\n* Sets an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( idx, this._offset );\n\t\t} else {\n\t\t\tthis._buffer[ this._offset ] = idx;\n\t\t}\n\t\treturn this;\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset+idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset+idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset-idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset-idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( v, ind );\n\t\t} else {\n\t\t\tthis._buffer[ ind ] = v;\n\t\t}\n\t\treturn this;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( v, ind );\n\t} else {\n\t\tthis._buffer[ ind ] = v;\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default iset;\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\nimport real from '@stdlib/complex-float64-real';\nimport imag from '@stdlib/complex-float64-imag';\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tlen = this._length;\n\n\t// Build an object containing all ndarray properties needed to revive a serialized ndarray...\n\tout = {};\n\tout.type = 'ndarray';\n\tout.dtype = this.dtype;\n\tout.flags = {\n\t\t'READONLY': this._flags.READONLY\n\t};\n\tout.order = this._order;\n\tout.shape = this._shape.slice();\n\tout.strides = this._strides.slice();\n\n\t// Flip the signs of negative strides:\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( out.strides[ i ] < 0 ) {\n\t\t\tout.strides[ i ] *= -1;\n\t\t}\n\t}\n\t// Cast data to generic array...\n\tout.data = [];\n\tif ( out.dtype === 'complex64' || out.dtype === 'complex128' ) {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tv = this.iget( i );\n\t\t\tout.data.push( real( v ), imag( v ) );\n\t\t}\n\t} else {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout.data.push( this.iget( i ) );\n\t\t}\n\t}\n\treturn out;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\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* Test if a value is a nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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/**\n* Maximum length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\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\nimport isArrayLike from '@stdlib/assert-is-array-like';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array-like object passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array-like object function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arraylikefcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arraylikefcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array-like object passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array-like object for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArrayLike( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arraylikefcn;\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\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is array-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is array-like\n*\n* @example\n* var bool = isArrayLike( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLike( {'length':10} );\n* // returns true\n*/\nfunction isArrayLike( value ) {\n\treturn (\n\t\tvalue !== void 0 &&\n\t\tvalue !== null &&\n\t\ttypeof value !== 'function' &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLike;\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* Test if a value is an array-like object containing only nonnegative integers.\n*\n* @module @stdlib/assert-is-nonnegative-integer-array\n*\n* @example\n* import isNonNegativeIntegerArray from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ 3.0, new Number(3.0) ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 3.0, '3.0' ] );\n* // returns false\n*\n* @example\n* import { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ 1.0, 0.0, 10.0 ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 3.0, new Number(1.0) ] );\n* // returns false\n*\n* @example\n* import { objects as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\n*\n* var bool = isNonNegativeIntegerArray( [ new Number(3.0), new Number(1.0) ] );\n* // returns true\n*\n* bool = isNonNegativeIntegerArray( [ 1.0, 0.0, 10.0 ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-like-function';\n\n\n// VARIABLES //\n\nvar isPrimitiveArray = arrayfun( isNonNegativeInteger.isPrimitive );\nvar isObjectArray = arrayfun( isNonNegativeInteger.isObject );\n\n\n// MAIN //\n\nvar isNonNegativeIntegerArray = arrayfun( isNonNegativeInteger );\nsetReadOnly( isNonNegativeIntegerArray, 'primitives', isPrimitiveArray );\nsetReadOnly( isNonNegativeIntegerArray, 'objects', isObjectArray );\n\n\n// EXPORTS //\n\nexport default isNonNegativeIntegerArray;\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// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction rowmajor( shape ) {\n\tvar ndims;\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tout = [];\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tout.push( 0 );\n\t}\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction columnmajor( shape ) {\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tout = [];\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout.push( s );\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {Array} array strides\n*\n* @example\n* var s = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* s = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape );\n\t}\n\treturn rowmajor( shape );\n}\n\n\n// EXPORTS //\n\nexport default shape2strides;\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/**\n* Returns the index offset which specifies the location of the first indexed value in a multidimensional array based on a stride array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @returns {NonNegativeInteger} offset - offset\n*\n* @example\n* var shape = [ 2, 3, 10 ];\n* var strides = [ 30, -10, 1 ];\n*\n* var offset = strides2offset( shape, strides );\n* // returns 20\n*/\nfunction strides2offset( shape, strides ) {\n\tvar offset;\n\tvar ndims;\n\tvar i;\n\n\tndims = shape.length;\n\toffset = 0;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\t// Note that, since the stride is negative, this operation increments, not decrements, the offset...\n\t\t\toffset -= strides[ i ] * ( shape[ i ]-1 );\n\t\t}\n\t}\n\treturn offset;\n}\n\n\n// EXPORTS //\n\nexport default strides2offset;\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/**\n* Returns the number of elements in an array.\n*\n* @param {(NonNegativeIntegerArray|EmptyArray)} shape - array shape\n* @returns {NonNegativeInteger} number of elements\n*\n* @example\n* var n = numel( [ 3, 3, 3 ] );\n* // returns 27\n*/\nfunction numel( shape ) {\n\tvar ndims;\n\tvar n;\n\tvar i;\n\n\tndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0;\n\t}\n\tn = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tn *= shape[ i ];\n\t}\n\treturn n;\n}\n\n\n// EXPORTS //\n\nexport default numel;\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* Generate a stride array from an array shape.\n*\n* @module @stdlib/ndarray-base-shape2strides\n*\n* @example\n* import shape2strides from '@stdlib/ndarray-base-shape2strides';\n*\n* var strides = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* strides = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default 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// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction rowmajor( shape, out ) {\n\tvar ndims;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction columnmajor( shape, out ) {\n\tvar s;\n\tvar i;\n\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*\n* @example\n* var strides = [ 0, 0 ];\n*\n* var out = shape2strides( [ 3, 2 ], 'row-major', strides );\n* // returns [ 2, 1 ]\n*\n* var bool = ( out === strides );\n* // returns true\n*\n* out = shape2strides( [ 3, 2 ], 'column-major', strides );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order, out ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape, out );\n\t}\n\treturn rowmajor( shape, out );\n}\n\n\n// EXPORTS //\n\nexport default shape2strides;\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 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* import Complex128Array from '@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\nexport default 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// 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* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-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* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\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* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@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\nexport default 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// 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* import Float64Array from '@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* import Float32Array from '@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* import Int32Array from '@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* import Int16Array from '@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* import Int8Array from '@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* import Uint32Array from '@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* import Uint16Array from '@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* import Uint8Array from '@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* import Uint8ClampedArray from '@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* import dtype from '@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\nexport default getter;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\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 main = ( typeof Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns \n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasFloat32ArraySupport;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint32Array;\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 main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns \n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint32ArraySupport;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\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* Maximum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MAX;\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 main = ( typeof Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns \n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt32ArraySupport;\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* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\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* Maximum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MAX;\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 main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns \n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt16ArraySupport;\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* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\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 main = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns \n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasUint8ClampedArraySupport;\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\nexport default 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// MODULES //\n\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\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* Maximum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MAX;\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 main = ( typeof Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = ( typeof Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\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* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns \n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasInt8ArraySupport;\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* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\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\nexport default 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// MODULES //\n\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\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* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\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 fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\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\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\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* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\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\nimport Complex128 from '@stdlib/complex-float64-ctor';\nimport Complex64 from '@stdlib/complex-float32-ctor';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\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\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\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* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\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// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\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// EXPORTS //\n\nexport default isComplex128Array;\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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns \n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\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\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\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* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\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* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\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\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\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\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns \n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@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\nexport default 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/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './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* 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* import ArrayBuffer from '@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* import ArrayBuffer from '@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* import ArrayBuffer from '@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* import Complex64 from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import Complex64 from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import Complex64 from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import Complex64 from '@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* import Complex64 from '@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* import Complex64 from '@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* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\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.reduce( caddf );\n* // returns \n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\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.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\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\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\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 an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@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 out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.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 = out.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* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.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 = out.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, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\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\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First 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 === 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 ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* import realf from '@stdlib/complex-realf';\n* import imagf from '@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* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\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.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\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\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\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* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@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\nexport default 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// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@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\nexport default fromArray;\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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns \n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\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* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\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* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@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\nexport default 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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@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\nexport default 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/**\n* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './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* 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* import ArrayBuffer from '@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* import ArrayBuffer from '@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* import ArrayBuffer from '@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* import Complex128 from '@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* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@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* import Complex128 from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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 modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.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* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\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 = arr.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.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 = real( value );\n\tim = imag( 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 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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import Complex128 from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* import Complex128 from '@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* import Complex128 from '@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 a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.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 Complex128Array( 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( Complex128Array.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( getComplex128( 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 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* import Complex128 from '@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* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@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* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\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.reduce( cadd );\n* // returns \n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\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.reverse();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\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\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\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* import real from '@stdlib/complex-real';\n* import imag from '@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* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\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 an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@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 out = arr.slice();\n* // returns \n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.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 = out.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* out = arr.slice( 1, -2 );\n* // returns \n*\n* len = out.length;\n* // returns 2\n*\n* z = out.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 = out.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, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\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\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First 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 === 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 ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\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* import real from '@stdlib/complex-real';\n* import imag from '@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* import real from '@stdlib/complex-real';\n* import imag from '@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* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\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.toReversed();\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns \n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns \n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\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\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\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* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.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 {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\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.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns \n*\n* var z = out.get( 0 );\n* // returns \n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.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 ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default 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// MODULES //\n\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@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\nexport default fromArray;\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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@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\nexport default 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\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int8Array from '@stdlib/array-int8';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-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\nexport default 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\nexport default 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\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport isArray from '@stdlib/assert-is-array';\nimport constructorName from '@stdlib/utils-constructor-name';\nimport ctor2dtype from './ctor2dtype.js';\nimport CTORS from './ctors.js';\nimport DTYPES from './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\nexport default dtype;\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\nimport isCollection from '@stdlib/assert-is-collection';\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport dtype from '@stdlib/array-dtype';\nimport format from '@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\nexport default 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* import contains from '@stdlib/array-base-assert-contains';\n*\n* var out = contains( [ 1, 2, 3 ], 2 );\n* // returns true\n*/\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport factory from './factory.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default main;\n\n// exports: { \"factory\": \"main.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// MODULES //\n\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport getter from '@stdlib/array-base-getter';\nimport dtype from '@stdlib/array-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\nexport default contains;\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\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport dtypes from '@stdlib/ndarray-dtypes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray data type.\n*\n* @name isDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray data type\n*\n* @example\n* var bool = isDataType( 'binary' );\n* // returns true\n*\n* bool = isDataType( 'float32' );\n* // returns true\n*\n* bool = isDataType( 'float64' );\n* // returns true\n*\n* bool = isDataType( 'generic' );\n* // returns true\n*\n* bool = isDataType( 'int16' );\n* // returns true\n*\n* bool = isDataType( 'int32' );\n* // returns true\n*\n* bool = isDataType( 'int8' );\n* // returns true\n*\n* bool = isDataType( 'uint16' );\n* // returns true\n*\n* bool = isDataType( 'uint32' );\n* // returns true\n*\n* bool = isDataType( 'uint8' );\n* // returns true\n*\n* bool = isDataType( 'uint8c' );\n* // returns true\n*\n* bool = isDataType( 'foo' );\n* // returns false\n*/\nvar isDataType = contains( dtypes() );\n\n\n// EXPORTS //\n\nexport default isDataType;\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\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray having a supported data type\n* @returns {string} data type\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\tvar dt;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tdt = x.dtype;\n\tif ( isDataType( dt ) ) {\n\t\treturn dt;\n\t}\n\t// A data type is essential for interpreting the memory associated with an ndarray object, so no fallbacks or workarounds for data type resolution...\n\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray having a supported data type. Value: `%s`.', dt ) );\n}\n\n\n// EXPORTS //\n\nexport default dtype;\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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x ) {\n\tvar out;\n\tvar sh;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\t// Copy the shape in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < sh.length; i++ ) {\n\t\td = sh[ i ];\n\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default shape;\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\nimport orders from '@stdlib/ndarray-orders';\n\n\n// VARIABLES //\n\nvar ORDERS = orders();\nvar len = ORDERS.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is an ndarray order.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is an ndarray order\n*\n* @example\n* var bool = isOrder( 'row-major' );\n* // returns true\n*\n* bool = isOrder( 'column-major' );\n* // returns true\n*\n* bool = isOrder( 'foo' );\n* // returns false\n*/\nfunction isOrder( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === ORDERS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isOrder;\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\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nimport strides from '@stdlib/ndarray-strides';\nimport ndims from '@stdlib/ndarray-ndims';\nimport strides2order from '@stdlib/ndarray-base-strides2order';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\to = x.order;\n\tif ( isOrder( o ) ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = strides( x );\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( ndims( x ) === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default order;\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\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {IntegerArray} strides\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x ) {\n\tvar out;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tst = x.strides; // TODO: consider whether we want to support ecosystem libraries, such as scijs/ndarray, which name this property `stride`\n\tif ( !isCollection( st ) ) {\n\t\t// WARNING: if no strides array, try to derive the strides from the shape. Note, however, that there is a lot that can go wrong here, as the only thing we are requiring is that the shape is a collection. The main point of going through the effort to compute strides is to support minimal ndarray-esque objects, where the only essential attributes are `shape` and `dtype` and where other attributes can be computed (e.g., `strides`, `offset`, `ndims`, `order`, etc), assuming single-segment contiguous data stored in row-major order...\n\t\tsh = x.shape;\n\t\tif ( !isCollection( sh ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( !isOrder( ord ) ) {\n\t\t\tord = 'row-major';\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\t// Copy the strides in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < st.length; i++ ) {\n\t\td = st[ i ];\n\t\tif ( !isInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default strides;\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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isCollection from '@stdlib/assert-is-collection';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns the number of ndarray dimensions.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} number of dimensions\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\nfunction ndims( x ) {\n\tvar sh;\n\tvar n;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.ndims;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\treturn sh.length;\n}\n\n\n// EXPORTS //\n\nexport default ndims;\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* Test if a value is an array-like object containing only integers.\n*\n* @module @stdlib/assert-is-integer-array\n*\n* @example\n* import isIntegerArray from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ -3.0, new Number(0.0), 2.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -3.0, '3.0' ] );\n* // returns false\n*\n* @example\n* import { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ -1.0, 10.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -1.0, 0.0, 5.0 ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -3.0, new Number(-1.0) ] );\n* // returns false\n*\n* @example\n* import { objects as isIntegerArray } from '@stdlib/assert-is-integer-array';\n*\n* var bool = isIntegerArray( [ new Number(1.0), new Number(3.0) ] );\n* // returns true\n*\n* bool = isIntegerArray( [ -1.0, 0.0, 3.0 ] );\n* // returns false\n*\n* bool = isIntegerArray( [ 3.0, new Number(-1.0) ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport isInteger from '@stdlib/assert-is-integer';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-like-function';\n\n\n// VARIABLES //\n\nvar isPrimitiveArray = arrayfun( isInteger.isPrimitive );\nvar isObjectArray = arrayfun( isInteger.isObject );\n\n\n// MAIN //\n\nvar isIntegerArray = arrayfun( isInteger );\nsetReadOnly( isIntegerArray, 'primitives', isPrimitiveArray );\nsetReadOnly( isIntegerArray, 'objects', isObjectArray );\n\n\n// EXPORTS //\n\nexport default isIntegerArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 default ndarray settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32',\n\t\t\t'boolean': 'bool'\n\t\t},\n\n\t\t// Memory layout:\n\t\t'order': 'row-major',\n\n\t\t// Casting mode:\n\t\t'casting': 'safe',\n\n\t\t// Index mode:\n\t\t'index_mode': 'throw'\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'order': DEFAULTS.order,\n\t'casting': DEFAULTS.casting,\n\t'index_mode': DEFAULTS.index_mode\n};\n\n\n// MAIN //\n\n/**\n* Returns a default ndarray setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\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\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Tests that a value is a valid constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {(Error|null)} error object or null\n*\n* @example\n* var ctor = function ctor() {};\n*\n* var err = validate( ctor );\n* // returns null\n*\n* err = validate( null );\n* // returns \n*/\nfunction validate( value ) {\n\tvar type = typeof value;\n\tif (\n\t\tvalue === null ||\n\t\t(type !== 'object' && type !== 'function')\n\t) {\n\t\treturn new TypeError( format( 'invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.', value ) );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\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 default ndarray settings.\n*\n* @module @stdlib/ndarray-defaults\n*\n* @example\n* import defaults from '@stdlib/ndarray-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default 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// EXPORTS //\n\nexport default Object.create;\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// FUNCTIONS //\n\n/**\n* Dummy constructor.\n*\n* @private\n*/\nfunction Ctor() {\n\t// Empty...\n}\n\n\n// MAIN //\n\n/**\n* An `Object.create` shim for older JavaScript engines.\n*\n* @private\n* @param {Object} proto - prototype\n* @returns {Object} created object\n*\n* @example\n* var obj = createObject( Object.prototype );\n* // returns {}\n*/\nfunction createObject( proto ) {\n\tCtor.prototype = proto;\n\treturn new Ctor();\n}\n\n\n// EXPORTS //\n\nexport default createObject;\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\nimport builtin from './native.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar createObject;\nif ( typeof builtin === 'function' ) {\n\tcreateObject = builtin;\n} else {\n\tcreateObject = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default createObject;\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/**\n* Restricts an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = clampIndex( -1, 10 );\n* // returns 0\n*\n* idx = clampIndex( 15, 10 );\n* // returns 10\n*\n* idx = clampIndex( 5, 10 );\n* // returns 5\n*/\nfunction clampIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\treturn 0;\n\t}\n\tif ( idx > max ) {\n\t\treturn max;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default clampIndex;\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/**\n* Wraps an index on the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = wrapIndex( -1, 10 );\n* // returns 10\n*\n* idx = wrapIndex( 13, 10 );\n* // returns 2\n*\n* idx = wrapIndex( 6, 10 );\n* // returns 6\n*/\nfunction wrapIndex( idx, max ) {\n\tvar mp1 = max + 1;\n\tif ( idx < 0 ) {\n\t\tidx += mp1; // slight optimization to avoid modulo arithmetic when |idx| <= max+1\n\t\tif ( idx < 0 ) {\n\t\t\tidx %= mp1;\n\t\t\tif ( idx !== 0 ) {\n\t\t\t\tidx += mp1;\n\t\t\t}\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\tidx -= mp1; // slight optimization to avoid modulo arithmetic when max+1 < idx <= 2*(max+1)\n\t\tif ( idx > max ) {\n\t\t\tidx %= mp1;\n\t\t}\n\t\treturn idx;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default wrapIndex;\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* Normalizes an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {integer} index\n*\n* @example\n* var idx = normalizeIndex( -2, 10 );\n* // returns 9\n*\n* idx = normalizeIndex( 15, 10 );\n* // returns -1\n*\n* idx = normalizeIndex( 5, 10 );\n* // returns 5\n*/\nfunction normalizeIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\tidx += max + 1;\n\t\tif ( idx < 0 ) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\treturn -1;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nexport default normalizeIndex;\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\nimport { factory as contains } from '@stdlib/array-base-assert-contains';\nimport modes from '@stdlib/ndarray-index-modes';\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray index mode.\n*\n* @name isIndexMode\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray index mode\n*\n* @example\n* var bool = isIndexMode( 'wrap' );\n* // returns true\n*\n* bool = isIndexMode( 'clamp' );\n* // returns true\n*\n* bool = isIndexMode( 'throw' );\n* // returns true\n*\n* bool = isIndexMode( 'foo' );\n* // returns false\n*/\nvar isIndexMode = contains( modes() );\n\n\n// EXPORTS //\n\nexport default isIndexMode;\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\nimport clampIndex from '@stdlib/ndarray-base-clamp-index';\nimport wrapIndex from '@stdlib/ndarray-base-wrap-index';\nimport normalize from '@stdlib/ndarray-base-normalize-index';\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar TABLE = {\n\t'wrap': wrapIndex,\n\t'clamp': clampIndex,\n\t'normalize': normalizeIndex,\n\t'throw': throwIfOutOfBounds\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an index if within bounds and throw an error otherwise.\n*\n* @private\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = throwIfOutOfBounds( 2, 9 );\n* // returns 2\n*\n* idx = throwIfOutOfBounds( 10, 9 );\n* // throws \n*\n* idx = throwIfOutOfBounds( -1, 9 );\n* // throws \n*/\nfunction throwIfOutOfBounds( idx, max ) {\n\tif ( idx < 0 || idx > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn idx;\n}\n\n/**\n* Normalizes an index before performing a strict bounds check.\n*\n* @private\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = normalizeIndex( 1, 10 );\n* // returns 1\n*\n* idx = normalizeIndex( -4, 10 );\n* // returns 7\n*\n* idx = normalizeIndex( -100, 10 );\n* // throws \n*/\nfunction normalizeIndex( idx, max ) {\n\tvar index = normalize( idx, max );\n\tif ( index < 0 || index > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn index;\n}\n\n\n// MAIN //\n\n/**\n* Returns a function for returning an index according to a provided index mode.\n*\n* @param {string} mode - specifies how to handle an out-of-bounds index\n* @throws {TypeError} first argument must be a recognized index mode\n* @returns {Function} function for returning an index\n*\n* @example\n* var ind = factory( 'clamp' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // returns 9\n*\n* idx = ind( -1, 9 );\n* // returns 0\n*\n* @example\n* var ind = factory( 'wrap' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // returns 0\n*\n* idx = ind( -1, 9 );\n* // returns 9\n*\n* @example\n* var ind = factory( 'throw' );\n*\n* var idx = ind( 2, 9 );\n* // returns 2\n*\n* idx = ind( 10, 9 );\n* // throws \n*\n* idx = ind( -1, 9 );\n* // throws \n*\n* @example\n* var ind = factory( 'normalize' );\n*\n* var idx = ind( 1, 10 );\n* // returns 1\n*\n* idx = ind( -4, 10 );\n* // returns 7\n*\n* idx = ind( -100, 10 );\n* // throws \n*/\nfunction factory( mode ) {\n\tif ( !isIndexMode( mode ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a recognized index mode. Value: `%s`.', mode ) );\n\t}\n\treturn TABLE[ mode ];\n}\n\n\n// EXPORTS //\n\nexport default factory;\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\nimport clampIndex from '@stdlib/ndarray-base-clamp-index';\nimport wrapIndex from '@stdlib/ndarray-base-wrap-index';\nimport normalizeIndex from '@stdlib/ndarray-base-normalize-index';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an index given an index mode.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @param {string} mode - specifies how to handle an index outside the interval `[0,max]`\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = ind( 2, 9, 'clamp' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'clamp' );\n* // returns 9\n*\n* idx = ind( -1, 9, 'clamp' );\n* // returns 0\n*\n* @example\n* var idx = ind( 2, 9, 'wrap' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'wrap' );\n* // returns 0\n*\n* idx = ind( -1, 9, 'wrap' );\n* // returns 9\n*\n* @example\n* var idx = ind( 2, 9, 'throw' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'throw' );\n* // throws \n*\n* idx = ind( -1, 9, 'throw' );\n* // throws \n*\n* @example\n* var idx = ind( 1, 10, 'normalize' );\n* // returns 1\n*\n* idx = ind( -4, 10, 'normalize' );\n* // returns 7\n*\n* idx = ind( -100, 10, 'normalize' );\n* // throws \n*/\nfunction ind( idx, max, mode ) {\n\tvar index;\n\tif ( mode === 'clamp' ) {\n\t\treturn clampIndex( idx, max );\n\t}\n\tif ( mode === 'wrap' ) {\n\t\treturn wrapIndex( idx, max );\n\t}\n\tindex = idx;\n\tif ( mode === 'normalize' ) {\n\t\tindex = normalizeIndex( index, max );\n\t}\n\tif ( index < 0 || index > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn index;\n}\n\n\n// EXPORTS //\n\nexport default ind;\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 an index given an index mode.\n*\n* @module @stdlib/ndarray-base-ind\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( -1, 10, 'wrap' );\n* // returns 10\n*\n* idx = ind( 14, 10, 'wrap' );\n* // returns 3\n*\n* idx = ind( 6, 10, 'wrap' );\n* // returns 6\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( -1, 10, 'clamp' );\n* // returns 0\n*\n* idx = ind( 14, 10, 'clamp' );\n* // returns 10\n*\n* idx = ind( 6, 10, 'clamp' );\n* // returns 6\n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( 1, 10, 'throw' );\n* // returns 1\n*\n* idx = ind( 14, 10, 'throw' );\n* // throws \n*\n* idx = ind( -1, 10, 'throw' );\n* // throws \n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var idx = ind( 1, 10, 'normalize' );\n* // returns 1\n*\n* idx = ind( -4, 10, 'normalize' );\n* // returns 7\n*\n* idx = ind( -100, 10, 'normalize' );\n* // throws \n*\n* @example\n* import ind from '@stdlib/ndarray-base-ind';\n*\n* var fcn = ind.factory( 'clamp' );\n*\n* var idx = fcn( -1, 10 );\n* // returns 0\n*\n* idx = fcn( 14, 10 );\n* // returns 10\n*\n* idx = fcn( 6, 10 );\n* // returns 6\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport factory from './factory.js';\nimport main from './main.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default 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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iget;\n\n\n// MAIN //\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\treturn base.call( this, idx );\n\t}\n\treturn base.call( this );\n}\n\n\n// EXPORTS //\n\nexport default iget;\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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// METHODS //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iset;\n\n\n// MAIN //\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\tbase.call( this, idx, v );\n\t} else {\n\t\tbase.call( this, idx );\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default iset;\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/**\n* Copies the contents of array-like value to a new array.\n*\n* @private\n* @param {ArrayLike} arr - input array\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var arr = [ 1.0, 2.0, 3.0 ];\n*\n* var out = copy( arr, arr.length );\n* // returns [ 1.0, 2.0, 3.0 ]\n*\n* var bool = ( arr === out );\n* // returns false\n*/\nfunction copy( arr, len ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( arr[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default copy;\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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport isCollection from '@stdlib/assert-is-collection';\nimport { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport { primitives as isIntegerArray } from '@stdlib/assert-is-integer-array';\nimport isFunction from '@stdlib/assert-is-function';\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nimport numel from '@stdlib/ndarray-base-numel';\nimport parent from '@stdlib/ndarray-base-ctor'; // eslint-disable-line stdlib/no-redeclare\nimport defaults from '@stdlib/ndarray-defaults';\nimport inherit from '@stdlib/utils-inherit';\nimport format from '@stdlib/string-format';\nimport iget from './iget.js';\nimport iset from './iset.js';\nimport get from './get.js';\nimport set from './set.js';\nimport copy from './copy_array.js';\nimport validate from './validate.js';\n\n\n// VARIABLES //\n\n/*\n* See the following references:\n*\n* - https://stackoverflow.com/questions/22747068/is-there-a-max-number-of-arguments-javascript-functions-can-accept\n* - https://bugs.webkit.org/show_bug.cgi?id=80797\n* - https://github.com/numpy/numpy/issues/5744\n*\n* Note that the maximum number of function arguments can vary from engine to engine. Here, we choose something of a lowest common denominator which may **not** be valid everywhere.\n*/\nvar MAX_DIMS = 32767|0;\n\nvar INDEX_MODE = defaults.get( 'index_mode' );\nvar READONLY = false;\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {Collection} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} `dtype` argument must be a supported ndarray data type\n* @throws {TypeError} `buffer` argument must be an array-like object, typed-array-like, or a Buffer\n* @throws {TypeError} `buffer` argument `get` and `set` properties must be functions\n* @throws {TypeError} `shape` argument must be an array-like object containing nonnegative integers\n* @throws {Error} `shape` argument length must equal the number of dimensions\n* @throws {TypeError} `strides` argument must be an array-like object containing integers\n* @throws {Error} `strides` argument length must equal the number of dimensions (except for zero-dimensional arrays; in which case, the `strides` argument length must be equal to `1`)\n* @throws {Error} for zero-dimensional ndarrays, the `strides` argument must contain a single element equal to `0`\n* @throws {TypeError} `offset` argument must be a nonnegative integer\n* @throws {TypeError} `order` argument must be a supported ndarray order\n* @throws {Error} `buffer` argument must be compatible with specified meta data\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} too many dimensions\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order, options ) {\n\tvar ndims;\n\tvar opts;\n\tvar err;\n\tvar sh;\n\tvar st;\n\n\tif ( !(this instanceof ndarray) ) {\n\t\tif ( arguments.length < 7 ) {\n\t\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t\t}\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order, options ); // eslint-disable-line max-len\n\t}\n\tif ( !isDataType( dtype ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a supported ndarray data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( !isCollection( buffer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.', buffer ) );\n\t} else if ( buffer.get && buffer.set && ( !isFunction( buffer.get ) || !isFunction( buffer.set ) ) ) { // eslint-disable-line max-len\n\t\tthrow new TypeError( format( 'invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.', buffer ) );\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tif ( !isCollection( shape) || shape.length > 0 ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t}\n\tndims = shape.length;\n\tif ( ndims > MAX_DIMS ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.', MAX_DIMS, ndims ) );\n\t}\n\tif ( !isIntegerArray( strides ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.', strides ) );\n\t}\n\tif ( ndims > 0 ) {\n\t\tif ( strides.length !== ndims ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.', ndims, strides.length ) );\n\t\t}\n\t} else if ( strides.length !== 1 ) {\n\t\tthrow new RangeError( 'invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.' );\n\t} else if ( strides[ 0 ] !== 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.', strides[ 0 ] ) );\n\t}\n\tif ( !isNonNegativeInteger( offset ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.', offset ) );\n\t}\n\tif ( !isOrder( order ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Sixth argument must be a supported order. Value: `%s`.', order ) );\n\t}\n\tif ( ndims > 0 && !isBufferLengthCompatible( buffer.length, shape, strides, offset ) && numel( shape ) > 0 ) { // eslint-disable-line max-len\n\t\tthrow new Error( 'invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.' );\n\t}\n\topts = {};\n\topts.mode = INDEX_MODE;\n\topts.readonly = READONLY;\n\tif ( arguments.length > 6 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tthis._mode = opts.mode;\n\tif ( opts.submode === void 0 ) {\n\t\topts.submode = [ this._mode ];\n\t}\n\tthis._submode = opts.submode;\n\n\t// Copy `shape` and `strides` to prevent external mutation:\n\tsh = copy( shape, ndims );\n\tst = copy( strides, ndims || 1 );\n\n\t// Call the parent constructor:\n\tparent.call( this, dtype, buffer, sh, st, offset, order );\n\tthis._flags.READONLY = opts.readonly;\n\n\treturn this;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n// Inherit from the parent constructor:\ninherit( ndarray, parent );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', get );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', iget );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', set );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', iset );\n\n\n// EXPORTS //\n\nexport default ndarray;\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\nimport minmax from '@stdlib/ndarray-base-minmax-view-buffer-index';\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data.\n*\n* @param {NonNegativeInteger} len - buffer length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if a buffer length is compatible\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns false\n*/\nfunction isBufferLengthCompatible( len, shape, strides, offset ) {\n\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\tvar buf = minmax( shape, strides, offset );\n\n\t// If the indices are \"inbounds\", then the buffer length is compatible:\n\treturn ( buf[ 0 ] >= 0 && buf[ 1 ] < len );\n}\n\n\n// EXPORTS //\n\nexport default isBufferLengthCompatible;\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\nimport isObject from '@stdlib/assert-is-plain-object';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isArray from '@stdlib/assert-is-array';\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.mode] - specifies how to handle indices which exceed array dimensions\n* @param {string} [options.submode] - specifies how to handle subscripts which exceed array dimensions\n* @param {boolean} [options.readonly] - boolean indicating whether an array should be read-only\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'clamp',\n* 'submode': [ 'throw', 'wrap', 'clamp' ]\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tvar i;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isIndexMode( opts.mode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a recognized mode. Option: `%s`.', 'mode', opts.mode ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\topts.submode = options.submode;\n\t\tif ( !isArray( opts.submode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode ) );\n\t\t}\n\t\tif ( opts.submode.length === 0 ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode.join( ',' ) ) );\n\t\t}\n\t\tfor ( i = 0; i < opts.submode.length; i++ ) {\n\t\t\tif ( !isIndexMode( opts.submode[ i ] ) ) {\n\t\t\t\treturn new TypeError( format( 'invalid option. Each submode must be a recognized mode. Option: `%s`.', opts.submode[ i ] ) );\n\t\t\t}\n\t\t}\n\t\topts.submode = opts.submode.slice();\n\t}\n\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\topts.readonly = options.readonly;\n\t\tif ( !isBoolean( opts.readonly ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', opts.readonly ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\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\nimport defineProperty from '@stdlib/utils-define-property';\nimport format from '@stdlib/string-format';\nimport validate from './validate.js';\nimport createObject from './detect.js';\n\n\n// MAIN //\n\n/**\n* Implements prototypical inheritance by replacing the prototype of one constructor with the prototype of another constructor.\n*\n* ## Notes\n*\n* - This implementation is not designed to work with ES2015/ES6 classes. For ES2015/ES6 classes, use `class` with `extends`.\n* - For reference, see [node#3455](https://github.com/nodejs/node/pull/3455), [node#4179](https://github.com/nodejs/node/issues/4179), [node#3452](https://github.com/nodejs/node/issues/3452), and [node commit](https://github.com/nodejs/node/commit/29da8cf8d7ab8f66b9091ab22664067d4468461e#diff-3deb3f32958bb937ae05c6f3e4abbdf5).\n*\n* @param {(Object|Function)} ctor - constructor which will inherit\n* @param {(Object|Function)} superCtor - super (parent) constructor\n* @throws {TypeError} first argument must be either an object or a function which can inherit\n* @throws {TypeError} second argument must be either an object or a function from which a constructor can inherit\n* @throws {TypeError} second argument must have an inheritable prototype\n* @returns {(Object|Function)} child constructor\n*\n* @example\n* function Foo() {\n* return this;\n* }\n* Foo.prototype.beep = function beep() {\n* return 'boop';\n* };\n*\n* function Bar() {\n* Foo.call( this );\n* return this;\n* }\n* inherit( Bar, Foo );\n*\n* var bar = new Bar();\n* var v = bar.beep();\n* // returns 'boop'\n*/\nfunction inherit( ctor, superCtor ) {\n\tvar err = validate( ctor );\n\tif ( err ) {\n\t\tthrow err;\n\t}\n\terr = validate( superCtor );\n\tif ( err ) {\n\t\tthrow err;\n\t}\n\tif ( typeof superCtor.prototype === 'undefined' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.', superCtor.prototype ) );\n\t}\n\t// Create a prototype which inherits from the parent prototype:\n\tctor.prototype = createObject( superCtor.prototype );\n\n\t// Set the constructor to refer to the child constructor:\n\tdefineProperty( ctor.prototype, 'constructor', {\n\t\t'configurable': true,\n\t\t'enumerable': false,\n\t\t'writable': true,\n\t\t'value': ctor\n\t});\n\n\treturn ctor;\n}\n\n\n// EXPORTS //\n\nexport default inherit;\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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {*} array element\n*/\nfunction get() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( arguments.length !== this._ndims ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nexport default get;\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/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\nimport getIndex from '@stdlib/ndarray-base-ind';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( arguments.length !== this._ndims+1 ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nexport default set;\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 main = ( typeof Buffer === 'function' ) ? Buffer : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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\nvar ctor = require( 'buffer' ).Buffer; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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/**\n* Buffer constructor.\n*\n* @module @stdlib/buffer-ctor\n*\n* @example\n* import ctor from '@stdlib/buffer-ctor';\n*\n* var b = new ctor( [ 1, 2, 3, 4 ] );\n* // returns \n*/\n\n// MODULES //\n\nimport hasNodeBufferSupport from '@stdlib/assert-has-node-buffer-support';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasNodeBufferSupport() ) {\n\tctor = main;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default 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\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport GlobalBuffer from './buffer.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Buffer` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Buffer` support\n*\n* @example\n* var bool = hasNodeBufferSupport();\n* // returns \n*/\nfunction hasNodeBufferSupport() {\n\tvar bool;\n\tvar b;\n\n\tif ( typeof GlobalBuffer !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tif ( typeof GlobalBuffer.from === 'function' ) {\n\t\t\tb = GlobalBuffer.from( [ 1, 2, 3, 4 ] );\n\t\t} else {\n\t\t\tb = new GlobalBuffer( [ 1, 2, 3, 4 ] ); // Note: this is deprecated behavior starting in Node v6 (see https://nodejs.org/api/buffer.html#buffer_new_buffer_array)\n\t\t}\n\t\tbool = (\n\t\t\tisBuffer( b ) &&\n\t\t\tb[ 0 ] === 1 &&\n\t\t\tb[ 1 ] === 2 &&\n\t\t\tb[ 2 ] === 3 &&\n\t\t\tb[ 3 ] === 4\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default hasNodeBufferSupport;\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 (browser) polyfill\n\n// MAIN //\n\n/**\n* Buffer constructor.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default 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* Allocate a buffer having a specified number of bytes.\n*\n* @module @stdlib/buffer-alloc-unsafe\n*\n* @example\n* import allocUnsafe from '@stdlib/buffer-alloc-unsafe';\n*\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\n\n// MODULES //\n\nimport hasAllocUnsafe from './has_alloc_unsafe.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar allocUnsafe;\nif ( hasAllocUnsafe ) {\n\tallocUnsafe = main;\n} else {\n\tallocUnsafe = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\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\nimport isFunction from '@stdlib/assert-is-function';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\nvar bool = isFunction( Buffer.allocUnsafe );\n\n\n// EXPORTS //\n\nexport default bool;\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\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport format from '@stdlib/string-format';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\n/**\n* Allocates a buffer having a specified number of bytes.\n*\n* ## Notes\n*\n* - The underlying memory of returned `Buffer` instances is not initialized. Memory contents are unknown and may contain sensitive data.\n* - When the size is less than half the pool size (specified on the `Buffer` constructor), memory is allocated from the `Buffer` pool for faster allocation of new `Buffer` instances.\n*\n* @param {NonNegativeInteger} size - number of bytes to allocate\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {Buffer} new `Buffer` instance\n*\n* @example\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\nfunction allocUnsafe( size ) {\n\tif ( !isNonNegativeInteger( size ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', size ) );\n\t}\n\treturn Buffer.allocUnsafe( size );\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\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\nimport isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\nimport format from '@stdlib/string-format';\nimport Buffer from '@stdlib/buffer-ctor';\n\n\n// MAIN //\n\n/**\n* Allocates a buffer having a specified number of bytes.\n*\n* ## Notes\n*\n* - The underlying memory of returned `Buffer` instances is not initialized. Memory contents are unknown and may contain sensitive data.\n* - When the size is less than half the pool size (specified on the `Buffer` constructor), memory is allocated from the `Buffer` pool for faster allocation of new `Buffer` instances.\n*\n* @param {NonNegativeInteger} size - number of bytes to allocate\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {Buffer} new `Buffer` instance\n*\n* @example\n* var buf = allocUnsafe( 10 );\n* // returns \n*/\nfunction allocUnsafe( size ) {\n\tif ( !isNonNegativeInteger( size ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', size ) );\n\t}\n\treturn new Buffer( size );\n}\n\n\n// EXPORTS //\n\nexport default allocUnsafe;\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\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\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\nimport filled from '@stdlib/array-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\nexport default 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// 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\nexport default filled;\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* Returns default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\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\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\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 default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default 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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport allocUnsafe from '@stdlib/buffer-alloc-unsafe';\nimport ctors from '@stdlib/array-typed-ctors';\nimport zeros from '@stdlib/array-base-zeros';\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tvar nbytes;\n\tvar offset;\n\tvar dtype;\n\tvar ctor;\n\tvar buf;\n\tvar out;\n\tvar nb;\n\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn zeros( length );\n\t}\n\tnbytes = bytesPerElement( dtype );\n\tif ( nbytes === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) );\n\t}\n\t// Resolve typed array constructor:\n\tctor = ctors( dtype );\n\n\t// Compute the number of bytes to allocate:\n\tnb = nbytes * length;\n\tif ( dtype === 'complex128' ) {\n\t\tnb += 8; // Note: need to allocate additional bytes to ensure alignment\n\t}\n\t// Allocate binary buffer:\n\tbuf = allocUnsafe( nb );\n\n\t// Resolve the byte offset:\n\toffset = buf.byteOffset;\n\tif ( dtype === 'complex128' ) {\n\t\tif ( !isNonNegativeInteger( offset/nbytes ) ) {\n\t\t\toffset += 8; // Note: ensure alignment\n\t\t}\n\t}\n\t// Reinterpret the binary buffer:\n\tout = new ctor( buf.buffer, offset, length );\n\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default empty;\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\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Int16Array from '@stdlib/array-int16';\nimport Int32Array from '@stdlib/array-int32';\nimport Int8Array from '@stdlib/array-int8';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Mapping from data types to constructors...\nvar ctors = {\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nexport default ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 default array settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'boolean': 'bool',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t}\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport defaults from './main.js';\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.boolean': DEFAULTS.dtypes.boolean,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer\n};\n\n\n// MAIN //\n\n/**\n* Returns a default array setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nexport default get;\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 default array settings.\n*\n* @module @stdlib/array-defaults\n*\n* @example\n* import defaults from '@stdlib/array-defaults';\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport get from './get.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nexport default 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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport ctors from '@stdlib/array-ctors';\nimport gzeros from '@stdlib/array-base-zeros';\nimport defaults from '@stdlib/array-defaults';\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = zeros( 2 );\n* // returns [ 0.0, 0.0 ]\n*\n* @example\n* var arr = zeros( 2, 'float32' );\n* // returns [ 0.0, 0.0 ]\n*/\nfunction zeros( length ) {\n\tvar dtype;\n\tvar ctor;\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn gzeros( length );\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ctor( length ); // WARNING: we assume that, apart from 'generic', the constructors for supported array data types are zero-filled by default\n}\n\n\n// EXPORTS //\n\nexport default zeros;\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 an uninitialized array having a specified length.\n*\n* @module @stdlib/array-empty\n*\n* @example\n* import empty from '@stdlib/array-empty';\n*\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* import empty from '@stdlib/array-empty';\n*\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\n\n// MODULES //\n\nimport isBufferUint8Array from './is_buffer_uint8array.js';\nimport main from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar empty;\nif ( isBufferUint8Array() ) {\n\tempty = main;\n} else {\n\tempty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default empty;\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\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns an array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\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\nimport allocUnsafe from '@stdlib/buffer-alloc-unsafe';\nimport isUint8Array from '@stdlib/assert-is-uint8array';\n\n\n// MAIN //\n\n/**\n* Checks whether an environment supports Node.js buffer instances which inherit from `Uint8Array`.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment supports Node.js buffer instances inheriting from `Uint8Array`\n*\n* @example\n* var bool = check();\n* // returns \n*/\nfunction check() {\n\tvar buf = allocUnsafe( 1 );\n\treturn isUint8Array( buf );\n}\n\n\n// EXPORTS //\n\nexport default check;\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\nimport table from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns a typed array constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nexport default ctors;\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\nimport zeros from '@stdlib/array-zeros';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nexport default empty;\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\nimport isndarrayLike from '@stdlib/assert-is-ndarray-like';\nimport isPlainObject from '@stdlib/assert-is-plain-object';\nimport { primitives as isNonNegativeIntegerArray } from '@stdlib/assert-is-nonnegative-integer-array';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport strides2offset from '@stdlib/ndarray-base-strides2offset';\nimport numel from '@stdlib/ndarray-base-numel';\nimport getDType from '@stdlib/ndarray-dtype';\nimport getShape from '@stdlib/ndarray-shape';\nimport getOrder from '@stdlib/ndarray-order';\nimport ndarray from '@stdlib/ndarray-ctor';\nimport emptyArray from '@stdlib/array-empty';\nimport allocUnsafe from '@stdlib/buffer-alloc-unsafe';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type (overrides the input array's inferred data type)\n* @param {string} [options.order] - specifies whether the output array should be 'row-major' (C-style) or 'column-major' (Fortran-style) (overrides the input array's inferred order)\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} [options.shape] - output array shape (overrides the input array's inferred shape)\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @throws {TypeError} first argument must have a recognized data type\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a supported ndarray data type\n* @throws {TypeError} `order` option must be a supported order\n* @throws {TypeError} `shape` option must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\nfunction emptyLike( x ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );\n\t}\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = getDType( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'shape' ) ) {\n\t\t\tsh = options.shape;\n\t\t\tif ( typeof sh === 'number' ) {\n\t\t\t\tsh = [ sh ];\n\t\t\t}\n\t\t\tif ( !isNonNegativeIntegerArray( sh ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.', 'shape', sh ) );\n\t\t\t}\n\t\t} else {\n\t\t\tsh = getShape( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = getOrder( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t} else {\n\t\tdtype = getDType( x );\n\t\tsh = getShape( x );\n\t\torder = getOrder( x );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default emptyLike;\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* import Complex128Array from '@stdlib/array-complex128';\n* import Complex128 from '@stdlib/complex-float64-ctor';\n* import real from '@stdlib/complex-float64-real';\n* import imag from '@stdlib/complex-float64-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* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\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* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n* import dtype from '@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\nexport default 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// 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* import Float64Array from '@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* import Float32Array from '@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* import Int32Array from '@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* import Int16Array from '@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* import Int8Array from '@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* import Uint32Array from '@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* import Uint16Array from '@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* import Uint8Array from '@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* import Uint8ClampedArray from '@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* import dtype from '@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\nexport default 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// 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\nexport default copy;\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\nimport shape2strides from '@stdlib/ndarray-base-shape2strides';\nimport copyIndexed from '@stdlib/array-base-copy-indexed';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `strides` property\n* @returns {IntegerArray} strides\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x, copy ) {\n\tvar ord;\n\tvar sh;\n\tvar st;\n\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\tsh = x.shape;\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( typeof ord !== 'string' ) {\n\t\t\tord = ROW_MAJOR;\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\tif ( copy ) {\n\t\treturn copyIndexed( st );\n\t}\n\treturn st;\n}\n\n\n// EXPORTS //\n\nexport default strides;\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\nimport strides2offset from '@stdlib/ndarray-base-strides2offset';\n\n\n// MAIN //\n\n/**\n* Returns the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {NonNegativeInteger} index offset\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\nfunction offset( x ) {\n\tvar st;\n\tvar sh;\n\tvar o;\n\n\to = x.offset;\n\tif ( typeof o === 'number' ) {\n\t\treturn o;\n\t}\n\tsh = x.shape;\n\tif ( sh.length === 0 ) {\n\t\treturn 0;\n\t}\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn 0;\n\t}\n\treturn strides2offset( sh, st );\n}\n\n\n// EXPORTS //\n\nexport default offset;\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\nimport strides2order from '@stdlib/ndarray-base-strides2order';\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\to = x.order;\n\tif ( typeof o === 'string' ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn ROW_MAJOR; // WARNING: default to row-major for ndarray-like objects lacking strides. This may or may not be accurate, and we're defaulting to row-major here based on the belief that row-major is more likely given that, e.g., JavaScript arrays are similar to C arrays (i.e., stored in row-major order).\n\t}\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( x.shape.length === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default order;\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\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport accessorSetter from '@stdlib/array-base-accessor-setter';\nimport getter from '@stdlib/array-base-getter';\nimport setter from '@stdlib/array-base-setter';\nimport numel from '@stdlib/ndarray-base-numel';\nimport getDType from '@stdlib/ndarray-base-dtype';\nimport getShape from '@stdlib/ndarray-base-shape';\nimport getStrides from '@stdlib/ndarray-base-strides';\nimport getOffset from '@stdlib/ndarray-base-offset';\nimport getOrder from '@stdlib/ndarray-base-order';\nimport getData from '@stdlib/ndarray-base-data-buffer';\n\n\n// MAIN //\n\n/**\n* Converts an ndarray-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 ndarray meta data to ensure that internal functions operating on ndarrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **ref**: reference to the original ndarray-like object.\n* - **dtype**: underlying data type.\n* - **data**: data buffer.\n* - **length**: number of elements.\n* - **shape**: array dimensions.\n* - **strides**: array strides.\n* - **offset**: index offset.\n* - **order**: order.\n* - **accessorProtocol**: `boolean` indicating whether the data buffer 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 ndarray element and whose second element is an accessor for setting an ndarray element.\n*\n* @param {ndarrayLike} x - ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {Object} object containing ndarray meta data\n*\n* @example\n* import array from '@stdlib/ndarray-array';\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n*\n* var obj = ndarraylike2object( x );\n* // returns {...}\n*/\nfunction ndarraylike2object( x ) {\n\tvar xbuf;\n\tvar bool;\n\tvar sh;\n\tvar dt;\n\n\txbuf = getData( x );\n\tsh = getShape( x, true );\n\tdt = getDType( x );\n\n\tbool = isAccessorArray( xbuf );\n\n\treturn {\n\t\t'ref': x,\n\t\t'dtype': dt,\n\t\t'data': xbuf,\n\t\t'length': numel( sh ),\n\t\t'shape': sh,\n\t\t'strides': getStrides( x, true ),\n\t\t'offset': getOffset( x ),\n\t\t'order': getOrder( x ),\n\t\t'accessorProtocol': bool,\n\t\t'accessors': ( bool ) ?\n\t\t\t[ accessorGetter( dt ), accessorSetter( dt ) ] :\n\t\t\t[ getter( dt ), setter( dt ) ]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default ndarraylike2object;\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* Returns the underlying data buffer of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {Collection} underlying data buffer\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\nfunction data( x ) {\n\treturn x.data;\n}\n\n\n// EXPORTS //\n\nexport default data;\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\nimport copyIndexed from '@stdlib/array-base-copy-indexed';\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `shape` property\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x, copy ) {\n\tvar sh = x.shape;\n\tif ( copy ) {\n\t\treturn copyIndexed( sh );\n\t}\n\treturn sh;\n}\n\n\n// EXPORTS //\n\nexport default shape;\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* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {string} data type\n*\n* @example\n* import zeros from '@stdlib/ndarray-zeros';\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\treturn x.dtype;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\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* Generates a linearly spaced numeric array whose elements increment by 1 starting from zero.\n*\n* @param {number} n - number of elements\n* @returns {Array} linearly spaced numeric array\n*\n* @example\n* var arr = zeroTo( 6 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*/\nfunction zeroTo( n ) {\n\tvar arr;\n\tvar i;\n\n\tarr = [];\n\tif ( n <= 0 ) {\n\t\treturn arr;\n\t}\n\tfor ( i = 0; i < n; i++ ) {\n\t\tarr.push( i );\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nexport default zeroTo;\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\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport getter from '@stdlib/array-base-getter';\nimport setter from '@stdlib/array-base-setter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport accessorSetter from '@stdlib/array-base-accessor-setter';\nimport dtype from '@stdlib/array-dtype';\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* - **dtype**: array data type.\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 dt = dtype( x );\n\tif ( isAccessorArray( x ) ) {\n\t\treturn {\n\t\t\t'data': x,\n\t\t\t'dtype': dt,\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'data': x,\n\t\t'dtype': dt,\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\nexport default arraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\n\n\n// FUNCTIONS //\n\n/**\n* Fills an indexed array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = indexed( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = indexed( out, -1, out.length-1 );\n* // returns [ 5, 4, 3, 2, 1, 0 ]\n*/\nfunction indexed( out, stride, offset ) {\n\tvar v;\n\tvar i;\n\n\ti = offset;\n\tv = 0;\n\twhile ( i >= 0 && i < out.length ) {\n\t\tout[ i ] = v;\n\t\ti += stride;\n\t\tv += 1;\n\t}\n\treturn out;\n}\n\n/**\n* Fills a complex number array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {(Complex128Array|Complex64Array)} out - output complex number array\n* @param {(Float64Array|Float32Array)} data - output array data\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {(Complex128Array|Complex64Array)} output array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\n*\n* var out = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n* // returns \n*\n* var data = reinterpret128( out, 0 );\n* // returns [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]\n*\n* var arr = complex( out, data, 1, 0 );\n* // returns \n*\n* var bool = ( arr === out );\n* // returns true\n*\n* data = reinterpret128( out, 0 );\n* returns [ 0.0, 0.0, 1.0, 0.0, 2.0, 0.0 ]\n*/\nfunction complex( out, data, stride, offset ) {\n\tvar v;\n\tvar s;\n\tvar i;\n\n\ts = stride * 2;\n\ti = offset * 2;\n\tv = 0.0;\n\twhile ( i >= 0 && i < data.length ) {\n\t\tdata[ i ] = v; // real component\n\t\tdata[ i+1 ] = 0.0; // imaginary component\n\t\ti += s;\n\t\tv += 1.0;\n\t}\n\treturn out;\n}\n\n/**\n* Fills an accessor array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @private\n* @param {Object} out - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n\n* var out = toAccessorArray( [ 0, 0, 0, 0, 0, 0 ] );\n* var arr = accessors( arraylike2object( out ), 1, 0 );\n*\n* var bool = ( arr === out );\n* // returns true\n*\n* var v = out.get( 0 );\n* // returns 0\n*\n* v = out.get( out.length-1 );\n* // returns 5\n*/\nfunction accessors( out, stride, offset ) {\n\tvar data;\n\tvar set;\n\tvar v;\n\tvar i;\n\n\tdata = out.data;\n\tset = out.accessors[ 1 ];\n\n\ti = offset;\n\tv = 0;\n\twhile ( i >= 0 && i < data.length ) {\n\t\tset( data, i, v );\n\t\ti += stride;\n\t\tv += 1;\n\t}\n\treturn data;\n}\n\n\n// MAIN //\n\n/**\n* Fills an array with linearly spaced numeric elements which increment by 1 starting from zero.\n*\n* @param {Collection} out - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array index offset\n* @returns {Collection} output array\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = assign( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n*\n* var arr = assign( out, -1, out.length-1 );\n* // returns [ 5, 4, 3, 2, 1, 0 ]\n*/\nfunction assign( out, stride, offset ) {\n\tvar obj = arraylike2object( out );\n\tif ( obj.accessorProtocol ) {\n\t\t// If provided a complex number array, reinterpret as a real typed array and only set the real components...\n\t\tif ( obj.dtype === 'complex128' ) {\n\t\t\treturn complex( out, reinterpret128( out, 0 ), stride, offset );\n\t\t}\n\t\tif ( obj.dtype === 'complex64' ) {\n\t\t\treturn complex( out, reinterpret64( out, 0 ), stride, offset );\n\t\t}\n\t\treturn accessors( obj, stride, offset );\n\t}\n\treturn indexed( out, stride, offset );\n}\n\n\n// EXPORTS //\n\nexport default assign;\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* Takes elements from an indexed array.\n*\n* @param {Collection} x - input array\n* @param {NonNegativeIntegerArray} indices - list of indices\n* @returns {Array} output array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n* var indices = [ 3, 1, 2, 0 ];\n*\n* var y = take( x, indices );\n* // returns [ 4, 2, 3, 1 ]\n*/\nfunction take( x, indices ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < indices.length; i++ ) {\n\t\tout.push( x[ indices[ i ] ] ); // use `Array#push` to ensure \"fast\" elements\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default take;\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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport copy from '@stdlib/array-base-copy-indexed';\nimport take from '@stdlib/array-base-take-indexed';\nimport sort2ins from './sort2ins.js';\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: input ndarray strides sorted in loop order.\n* - **sy**: output ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - input array stride lengths\n* @param {IntegerArray} sy - output array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 6, -2, 1 ]\n*/\nfunction loopOrder( sh, sx, sy ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the input array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape and output array strides based on the sorted input array strides:\n\tsh = take( sh, idx );\n\tsy = take( sy, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'sy': sy\n\t};\n}\n\n\n// EXPORTS //\n\nexport default loopOrder;\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* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default sort2ins;\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* Generate a linearly spaced numeric array whose elements increment by 1 starting from zero.\n*\n* @module @stdlib/array-base-zero-to\n*\n* @example\n* import zeroTo from '@stdlib/array-base-zero-to';\n*\n* var arr = zeroTo( 6 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* @example\n* import zeroTo from '@stdlib/array-base-zero-to';\n*\n* var out = [ 0, 0, 0, 0, 0, 0 ];\n* var arr = zeroTo.assign( out, 1, 0 );\n* // returns [ 0, 1, 2, 3, 4, 5 ]\n*\n* var bool = ( out === arr );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default 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\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nexport default defaults;\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\nimport bytesPerElement from '@stdlib/ndarray-base-bytes-per-element';\nimport defaults from './defaults.js';\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - input array data type\n* @param {string} dtypeY - output array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = unaryBlockSize( 'float64', 'float64' );\n* // returns \n*/\nfunction unaryBlockSize( dtypeX, dtypeY ) {\n\tvar nbx;\n\tvar nby;\n\n\tnbx = bytesPerElement( dtypeX );\n\tnby = bytesPerElement( dtypeY );\n\tif ( nbx === null || nby === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\tif ( nbx > nby ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nby )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nexport default unaryBlockSize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// FUNCTIONS //\n\n/**\n* Tests whether an object has a specified method.\n*\n* @private\n* @param {Object} obj - input object\n* @param {string} method - method name\n* @returns {boolean} boolean indicating whether an object has a specified method\n*\n* @example\n* var bool = hasMethod( [], 'reverse' );\n* // returns true\n*\n* @example\n* var bool = hasMethod( [], 'beep' );\n* // returns false\n*/\nfunction hasMethod( obj, method ) {\n\treturn ( typeof obj[ method ] === 'function' );\n}\n\n/**\n* Reverses an array in-place.\n*\n* @private\n* @param {Collection} x - input array\n* @returns {Collection} input array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = internal( x );\n* // returns [ 4, 3, 2, 1 ]\n*/\nfunction internal( x ) {\n\tvar tmp;\n\tvar N;\n\tvar M;\n\tvar i;\n\tvar j;\n\n\tN = floor( x.length/2 );\n\tM = x.length - 1;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = M - i;\n\t\ttmp = x[ i ];\n\t\tx[ i ] = x[ j ];\n\t\tx[ j ] = tmp;\n\t}\n\treturn x;\n}\n\n/**\n* Reverses an array in-place.\n*\n* @private\n* @param {Object} x - input array object\n* @returns {Collection} input array\n*\n* @example\n* import toAccessorArray from '@stdlib/array-base-to-accessor-array';\n* import arraylike2object from '@stdlib/array-base-arraylike2object';\n*\n* var x = toAccessorArray( [ 1, 2, 3, 4 ] );\n*\n* var v = x.get( 0 );\n* // returns 1\n*\n* var out = accessors( arraylike2object( x ) );\n*\n* v = x.get( 0 );\n* // returns 4\n*/\nfunction accessors( x ) {\n\tvar data;\n\tvar get;\n\tvar set;\n\tvar tmp;\n\tvar N;\n\tvar M;\n\tvar i;\n\tvar j;\n\n\tdata = x.data;\n\tget = x.accessors[ 0 ];\n\tset = x.accessors[ 1 ];\n\n\tN = floor( data.length/2 );\n\tM = data.length - 1;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = M - i;\n\t\ttmp = get( data, i );\n\t\tset( data, i, get( data, j ) );\n\t\tset( data, j, tmp );\n\t}\n\treturn data;\n}\n\n\n// MAIN //\n\n/**\n* Reverses an array in-place.\n*\n* @param {Collection} x - input array\n* @returns {Collection} input array\n*\n* @example\n* var x = [ 1, 2, 3, 4 ];\n*\n* var out = reverse( x );\n* // returns [ 4, 3, 2, 1 ]\n*\n* var bool = ( out === x );\n* // returns true\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var x = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var out = reverse( x );\n* // returns [ 4, 3, 2, 1 ]\n*\n* var bool = ( out === x );\n* // returns true\n*/\nfunction reverse( x ) {\n\tvar obj;\n\tif ( hasMethod( x, 'reverse' ) ) {\n\t\treturn x.reverse();\n\t}\n\tobj = arraylike2object( x );\n\tif ( obj.accessorProtocol ) {\n\t\treturn accessors( obj );\n\t}\n\treturn internal( x );\n}\n\n\n// EXPORTS //\n\nexport default reverse;\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\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Converts a linear index in an array view to a linear index in an underlying data buffer.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index in an array view\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {NonNegativeInteger} linear index in an underlying data buffer\n*\n* @example\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = vind2bind( shape, strides, offset, order, 1, mode );\n* // returns 7\n*/\nfunction vind2bind( shape, strides, offset, order, idx, mode ) {\n\tvar ndims;\n\tvar len;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ( mode === 'normalize' && idx < 0 ) {\n\t\t\tidx += len;\n\t\t}\n\t\tif ( idx < 0 || idx >= len ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tind = offset;\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\treturn ind;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\treturn ind;\n}\n\n\n// EXPORTS //\n\nexport default vind2bind;\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: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward positive infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = ceil( -4.2 );\n* // returns -4.0\n*\n* @example\n* var v = ceil( 9.99999 );\n* // returns 10.0\n*\n* @example\n* var v = ceil( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = ceil( NaN );\n* // returns NaN\n*/\nvar ceil = Math.ceil; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default ceil;\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\nimport floor from '@stdlib/math-base-special-floor';\nimport ceil from '@stdlib/math-base-special-ceil';\n\n\n// MAIN //\n\n/**\n* Rounds a double-precision floating-point number toward zero.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = trunc( -4.2 );\n* // returns -4.0\n*\n* @example\n* var v = trunc( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = trunc( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = trunc( -0.0 );\n* // returns -0.0\n*\n* @example\n* var v = trunc( NaN );\n* // returns NaN\n*\n* @example\n* var v = trunc( Infinity );\n* // returns Infinity\n*\n* @example\n* var v = trunc( -Infinity );\n* // returns -Infinity\n*/\nfunction trunc( x ) {\n\tif ( x < 0.0 ) {\n\t\treturn ceil( x );\n\t}\n\treturn floor( x );\n}\n\n\n// EXPORTS //\n\nexport default trunc;\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\nimport format from '@stdlib/string-format';\nimport trunc from '@stdlib/math-base-special-trunc';\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @param {(Array|TypedArray|Object)} out - destination object\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {(Array|TypedArray|Object)} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n* var order = 'row-major';\n*\n* var s = [ 0, 0, 0 ];\n* var out = ind2sub( shape, strides, offset, order, 17, 'throw', s );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( out === s );\n* // returns true\n*/\nfunction ind2sub( shape, strides, offset, order, idx, mode, out ) {\n\tvar ndims;\n\tvar len;\n\tvar k;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ( mode === 'normalize' && idx < 0 ) {\n\t\t\tidx += len;\n\t\t}\n\t\tif ( idx < 0 || idx >= len ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t\t}\n\t}\n\tif ( offset === 0 ) {\n\t\tif ( order === 'column-major' ) {\n\t\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\t\ts = idx % shape[ i ];\n\t\t\t\tidx -= s;\n\t\t\t\tidx /= shape[ i ];\n\t\t\t\tout[ i ] = s;\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\t// Case: row-major\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tout[ i ] = s;\n\t\t}\n\t\treturn out;\n\t}\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = strides[ i ];\n\t\t\tif ( s < 0 ) {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tout[ i ] = shape[ i ] - 1 + k;\n\t\t\t} else {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tout[ i ] = k;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\t// Case: row-major\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\ts = strides[ i ];\n\t\tif ( s < 0 ) {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tout[ i ] = shape[ i ] - 1 + k;\n\t\t} else {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tout[ i ] = k;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default ind2sub;\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\nimport zeros from '@stdlib/array-base-zeros';\nimport getSubscripts from './assign.js';\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - **throw**: throw an error when a linear index exceeds array dimensions.\n* - **normalize**: normalize negative indices and throw an error when a linear index exceeds array dimensions.\n* - **wrap**: wrap around a linear index exceeding array dimensions using modulo arithmetic.\n* - **clamp**: set a linear index exceeding array dimensions to either `0` (minimum linear index) or the maximum linear index.\n*\n* - When provided a stride array containing negative strides, if an `offset` is greater than `0`, the function interprets the linear index as an index into the underlying data buffer for the array, thus returning subscripts from the perspective of that buffer. If an `offset` is equal to `0`, the function treats the linear index as an index into an array view, thus returning subscripts from the perspective of that view.\n*\n* ```text\n* Dims: 2x2\n* Buffer: [ 1, 2, 3, 4 ]\n*\n* View = [ a00, a01,\n* a10, a11 ]\n*\n* Strides: 2,1\n* Offset: 0\n*\n* View = [ 1, 2,\n* 3, 4 ]\n*\n* Strides: 2,-1\n* Offset: 1\n*\n* View = [ 2, 1,\n* 4, 3 ]\n*\n* Strides: -2,1\n* Offset: 2\n*\n* View = [ 3, 4,\n* 1, 2 ]\n*\n* Strides: -2,-1\n* Offset: 3\n*\n* View = [ 4, 3,\n* 2, 1 ]\n* ```\n*\n* ```javascript\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ -2, 1 ];\n* var offset = 2;\n* var mode = 'throw';\n*\n* // From the perspective of a view...\n* var s = ind2sub( shape, strides, 0, order, 0, mode );\n* // returns [ 0, 0 ]\n*\n* s = ind2sub( shape, strides, 0, order, 1, mode );\n* // returns [ 0, 1 ]\n*\n* s = ind2sub( shape, strides, 0, order, 2, mode );\n* // returns [ 1, 0 ]\n*\n* s = ind2sub( shape, strides, 0, order, 3, mode );\n* // returns [ 1, 1 ]\n*\n* // From the perspective of an underlying buffer...\n* s = ind2sub( shape, strides, offset, order, 0, mode );\n* // returns [ 1, 0 ]\n*\n* s = ind2sub( shape, strides, offset, order, 1, mode );\n* // returns [ 1, 1 ]\n*\n* s = ind2sub( shape, strides, offset, order, 2, mode );\n* // returns [ 0, 0 ]\n*\n* s = ind2sub( shape, strides, offset, order, 3, mode );\n* // returns [ 0, 1 ]\n* ```\n*\n* In short, from the perspective of a view, view data is always ordered.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {Array} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n* var order = 'row-major';\n*\n* var s = ind2sub( shape, strides, offset, order, 17, 'throw' );\n* // returns [ 1, 2, 2 ]\n*/\nfunction ind2sub( shape, strides, offset, order, idx, mode ) {\n\treturn getSubscripts( shape, strides, offset, order, idx, mode, zeros( shape.length ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default ind2sub;\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* Convert a linear index to an array of subscripts.\n*\n* @module @stdlib/ndarray-base-ind2sub\n*\n* @example\n* import ind2sub from '@stdlib/ndarray-base-ind2sub';\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n*\n* var s = ind2sub( shape, strides, offset, 'row-major', 17, 'throw' );\n* // returns [ 1, 2, 2 ]\n*\n* @example\n* import ind2sub from '@stdlib/ndarray-base-ind2sub';\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n*\n* var s = [ 0, 0, 0 ];\n* var out = ind2sub.assign( shape, strides, offset, 'row-major', 17, 'throw', s );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( out === s );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport assign from './assign.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\nimport ind2sub from '@stdlib/ndarray-base-ind2sub';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an -dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* mapnd( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction mapnd( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar get;\n\tvar set;\n\tvar idx;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tidx = ind2sub( sh, sx, 0, ordx, i, MODE ); // return subscripts from the perspective of the ndarray view\n\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), idx, x.ref ) );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default mapnd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport numel from '@stdlib/ndarray-base-numel';\nimport vind2bind from '@stdlib/ndarray-base-vind2bind';\nimport ind2sub from '@stdlib/ndarray-base-ind2sub';\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an n-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* mapnd( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction mapnd( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar idx;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tidx = ind2sub( sh, sx, 0, ordx, i, MODE ); // return subscripts from the perspective of the ndarray view\n\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], idx, x.ref );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default mapnd;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport iterationOrder from '@stdlib/ndarray-base-iteration-order';\nimport ndarray2object from '@stdlib/ndarray-base-ndarraylike2object';\nimport blockedaccessormap2d from './2d_blocked_accessors.js';\nimport blockedaccessormap3d from './3d_blocked_accessors.js';\nimport blockedaccessormap4d from './4d_blocked_accessors.js';\nimport blockedaccessormap5d from './5d_blocked_accessors.js';\nimport blockedaccessormap6d from './6d_blocked_accessors.js';\nimport blockedaccessormap7d from './7d_blocked_accessors.js';\nimport blockedaccessormap8d from './8d_blocked_accessors.js';\nimport blockedaccessormap9d from './9d_blocked_accessors.js';\nimport blockedaccessormap10d from './10d_blocked_accessors.js';\nimport blockedmap2d from './2d_blocked.js';\nimport blockedmap3d from './3d_blocked.js';\nimport blockedmap4d from './4d_blocked.js';\nimport blockedmap5d from './5d_blocked.js';\nimport blockedmap6d from './6d_blocked.js';\nimport blockedmap7d from './7d_blocked.js';\nimport blockedmap8d from './8d_blocked.js';\nimport blockedmap9d from './9d_blocked.js';\nimport blockedmap10d from './10d_blocked.js';\nimport accessormap0d from './0d_accessors.js';\nimport accessormap1d from './1d_accessors.js';\nimport accessormap2d from './2d_accessors.js';\nimport accessormap3d from './3d_accessors.js';\nimport accessormap4d from './4d_accessors.js';\nimport accessormap5d from './5d_accessors.js';\nimport accessormap6d from './6d_accessors.js';\nimport accessormap7d from './7d_accessors.js';\nimport accessormap8d from './8d_accessors.js';\nimport accessormap9d from './9d_accessors.js';\nimport accessormap10d from './10d_accessors.js';\nimport accessormapnd from './nd_accessors.js';\nimport map0d from './0d.js';\nimport map1d from './1d.js';\nimport map2d from './2d.js';\nimport map3d from './3d.js';\nimport map4d from './4d.js';\nimport map5d from './5d.js';\nimport map6d from './6d.js';\nimport map7d from './7d.js';\nimport map8d from './8d.js';\nimport map9d from './9d.js';\nimport map10d from './10d.js';\nimport mapnd from './nd.js';\n\n\n// VARIABLES //\n\nvar MAP = [\n\tmap0d,\n\tmap1d,\n\tmap2d,\n\tmap3d,\n\tmap4d,\n\tmap5d,\n\tmap6d,\n\tmap7d,\n\tmap8d,\n\tmap9d,\n\tmap10d\n];\nvar ACCESSOR_MAP = [\n\taccessormap0d,\n\taccessormap1d,\n\taccessormap2d,\n\taccessormap3d,\n\taccessormap4d,\n\taccessormap5d,\n\taccessormap6d,\n\taccessormap7d,\n\taccessormap8d,\n\taccessormap9d,\n\taccessormap10d\n];\nvar BLOCKED_MAP = [\n\tblockedmap2d, // 0\n\tblockedmap3d,\n\tblockedmap4d,\n\tblockedmap5d,\n\tblockedmap6d,\n\tblockedmap7d,\n\tblockedmap8d,\n\tblockedmap9d,\n\tblockedmap10d // 8\n];\nvar BLOCKED_ACCESSOR_MAP = [\n\tblockedaccessormap2d, // 0\n\tblockedaccessormap3d,\n\tblockedaccessormap4d,\n\tblockedaccessormap5d,\n\tblockedaccessormap6d,\n\tblockedaccessormap7d,\n\tblockedaccessormap8d,\n\tblockedaccessormap9d,\n\tblockedaccessormap10d // 8\n];\nvar MAX_DIMS = MAP.length -1;\n\n\n// MAIN //\n\n/**\n* Applies a callback function to the elements in an input ndarray and assigns results to the elements in an output ndarray.\n*\n* ## Notes\n*\n* - Each provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array and one output array\n* @param {Callback} fcn - callback function\n* @param {*} [thisArg] - callback execution context\n* @throws {Error} arrays must have the same number of dimensions\n* @throws {Error} arrays must have the same shape\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map( [ x, y ], scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map( arrays, fcn, thisArg ) {\n\tvar ndims;\n\tvar shx;\n\tvar shy;\n\tvar iox;\n\tvar ioy;\n\tvar len;\n\tvar x;\n\tvar y;\n\tvar i;\n\tvar d;\n\n\t// Unpack the ndarrays and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\ty = ndarray2object( arrays[ 1 ] );\n\n\t// Verify that the input and output arrays have the same number of dimensions...\n\tshx = x.shape;\n\tshy = y.shape;\n\tndims = shx.length;\n\tif ( ndims !== shy.length ) {\n\t\tthrow new Error( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == '+ndims+'. ndims(y) == '+shy.length+'.' );\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_MAP[ ndims ]( x, y, fcn, thisArg );\n\t\t}\n\t\treturn MAP[ ndims ]( x, y, fcn, thisArg );\n\t}\n\t// Verify that the input and output arrays have the same dimensions...\n\tlen = 1; // number of elements\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\t\tif ( d !== shy[ i ] ) {\n\t\t\tthrow new Error( 'invalid arguments. Array must have the same shape.' );\n\t\t}\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\t}\n\t// Check whether we were provided empty ndarrays...\n\tif ( len === 0 ) {\n\t\treturn;\n\t}\n\t// Determine whether the ndarrays are one-dimensional and thus readily translate to one-dimensional strided arrays...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_MAP[ ndims ]( x, y, fcn, thisArg );\n\t\t}\n\t\treturn MAP[ ndims ]( x, y, fcn, thisArg );\n\t}\n\t// Determine iteration order:\n\tiox = iterationOrder( x.strides ); // +/-1\n\tioy = iterationOrder( y.strides ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 && ioy !== 0 && iox === ioy ) {\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration for each respective array always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_MAP[ ndims ]( x, y, fcn, thisArg );\n\t\t\t}\n\t\t\treturn MAP[ ndims ]( x, y, fcn, thisArg );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_MAP[ ndims-2 ]( x, y, fcn, thisArg );\n\t\t}\n\t\treturn BLOCKED_MAP[ ndims-2 ]( x, y, fcn, thisArg );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\treturn accessormapnd( x, y, fcn, thisArg );\n\t}\n\tmapnd( x, y, fcn, thisArg );\n}\n\n\n// EXPORTS //\n\nexport default map;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 callback function to elements in a zero-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ){\n* return z * 10.0;\n* }\n*\n* // Create a data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n* var ybuf = new Float64Array( 1 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like object:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* }\n*\n* // Apply the map function:\n* map0d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0 ]\n*/\nfunction map0d( x, y, fcn, thisArg ) {\n\ty.data[ y.offset ] = fcn.call( thisArg, x.data[ x.offset ], [], x.ref );\n}\n\n\n// EXPORTS //\n\nexport default map0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 callback function to elements in a one-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map1d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 40.0, 60.0, 80.0 ]\n*/\nfunction map1d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], [ i0 ], x.ref );\n\t\tix += dx0;\n\t\tiy += dy0;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map2d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction map2d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for the outermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for innermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for outermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for innermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sx[0] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointer to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache the references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map3d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map3d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map4d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map4d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\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 idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map5d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map5d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\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 idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map6d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map6d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map7d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map7d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map8d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map8d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map9d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map9d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* map10d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction map10d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 callback function to elements in a zero-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n* var ybuf = new Complex64Array( 2 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map0d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 30.0\n*\n* var im = imagf( v );\n* // returns 40.0\n*/\nfunction map0d( x, y, fcn, thisArg ) {\n\ty.accessors[ 1 ]( y.data, y.offset, fcn.call( thisArg, x.accessors[ 0 ]( x.data, x.offset ), [], x.ref ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default map0d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 callback function to elements in a one-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map1d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map1d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), [ i0 ], x.ref ) );\n\t\tix += dx0;\n\t\tiy += dy0;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map1d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map2d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map2d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for the outermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for innermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for outermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for innermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sx[0] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointer to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache the references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 2, 1 ];\n* var sy = [ 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map3d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map3d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar idx;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map4d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map4d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\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 idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map5d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map5d( x, y, fcn, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\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 idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map6d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map6d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map7d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map7d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map8d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map8d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map9d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map9d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport zeroTo from '@stdlib/array-base-zero-to';\nimport reverse from '@stdlib/array-base-reverse';\nimport take from '@stdlib/array-base-take-indexed';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* map10d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction map10d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tidx = zeroTo( sh.length );\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t\tidx = reverse( idx );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default map10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap2d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction blockedmap2d( x, y, fcn, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar idx;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + (j0*sx[0]);\n\t\t\tiy = oy1 + (j0*sy[0]);\n\n\t\t\t// Compute the loop offset increments...\n\t\t\tdx1 = sx[1] - (s0*sx[0]);\n\t\t\tdy1 = sy[1] - (s0*sy[0]);\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap3d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap3d( x, y, fcn, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar idx;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap4d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap4d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\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 ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar idx;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\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 o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\tS3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\tS3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\tS2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\tS2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\tS1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap5d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap5d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\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 ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar idx;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\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 o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\tS4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\tS4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\tS3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\tS3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\tS2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap6d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap6d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\tS5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\tS5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\tS4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\tS4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\tS3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap7d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap7d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\tS6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\tS6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\tS5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\tS5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\tS4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap8d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap8d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\tS7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\tS7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\tS6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\tS6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\tS5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap9d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap9d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\tS8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\tS8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\tS7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\tS7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( S7*sx[7] );\n\t\t\tdy8 = sy[8] - ( S7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\tS6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\tS5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i8, i7, i6, i5, i4, i3, i2, i1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\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the map function:\n* blockedmap10d( x, y, scale, {} );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedmap10d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\tS9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\tS9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\tS8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\tS8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( S8*sx[8] );\n\t\t\tdy9 = sy[9] - ( S8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\tS7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( S7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( S7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\tS6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\tS5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn.call( thisArg, xbuf[ ix ], take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\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t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap10d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap2d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap2d( x, y, fcn, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar idx;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + (j0*sx[0]);\n\t\t\tiy = oy1 + (j0*sy[0]);\n\n\t\t\t// Compute the loop offset increments...\n\t\t\tdx1 = sx[1] - (s0*sx[0]);\n\t\t\tdy1 = sy[1] - (s0*sy[0]);\n\n\t\t\t// Cache accessors:\n\t\t\tget = x.accessors[0];\n\t\t\tset = y.accessors[1];\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap2d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap3d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap3d( x, y, fcn, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar idx;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap3d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap4d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap4d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\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 ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar idx;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\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 o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\tS3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\tS3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\tS2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\tS2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\tS1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t// Cache accessors:\n\t\t\t\t\tget = x.accessors[ 0 ];\n\t\t\t\t\tset = y.accessors[ 1 ];\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap4d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap5d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap5d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\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 ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar idx;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\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 o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\tS4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\tS4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\tS3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\tS3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\tS2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i4, i3, i2, i1, i0 ], idx ), x.ref ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap5d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap6d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap6d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar set;\n\tvar get;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\tS5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\tS5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\tS4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\tS4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\tS3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap6d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap7d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap7d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\tS6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\tS6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\tS5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\tS5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\tS4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap7d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap8d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap8d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\tS7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\tS7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\tS6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\tS6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\tS5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn.call( thisArg, get( xbuf, ix ), take( [ i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap8d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap9d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap9d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\tS8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\tS8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\tS7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\tS7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( S7*sx[7] );\n\t\t\tdy8 = sy[8] - ( S7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\tS6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\tS5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor 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\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap9d;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nimport loopOrder from '@stdlib/ndarray-base-unary-loop-interchange-order';\nimport blockSize from '@stdlib/ndarray-base-unary-tiling-block-size';\nimport take from '@stdlib/array-base-take-indexed';\nimport reverse from '@stdlib/array-base-reverse';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {ndarrayLike} x.ref - reference to the original ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - callback function\n* @param {*} thisArg - callback execution context\n* @returns {void}\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32-ctor';\n* import realf from '@stdlib/complex-float32-real';\n* import imagf from '@stdlib/complex-float32-imag';\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n* var sy = [ 4, 4, 4, 4, 4, 4, 4, 4, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'ref': null,\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the map function:\n* blockedmap10d( x, y, scale, {} );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedmap10d( x, y, fcn, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar idx;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\tidx = reverse( o.idx );\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\tS9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\tS9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\tS8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\tS8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( S8*sx[8] );\n\t\t\tdy9 = sy[9] - ( S8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\tS7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\tS7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( S7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( S7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\tS6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tS6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( S6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( S6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\tS5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tS5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( S5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( S5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\tS4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tS4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( S4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( S4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\tS3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tS3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( S3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( S3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\tS2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tS2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( S2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( S2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\tS1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tS1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( S1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( S1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\tS0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tS0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( S0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( S0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4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n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nexport default blockedmap10d;\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* Formats an error message for production.\n*\n* @param {string} code - error code\n* @param {*} ...args - error message arguments\n* @returns {string} formatted error message\n*\n* @example\n* var msg = fmtprodmsg( '3', 'wrong_type' );\n* // returns 'https://stdlib.io/e/3?&arg[]=wrong_type'\n*/\nfunction fmtprodmsg() {\n\tvar a = arguments;\n\tvar c = a[ 0 ];\n\tvar u = 'https://stdlib.io/e/'+c+'?';\n\tvar i;\n\tfor ( i = 1; i < a.length; i++ ) {\n\t\tu += '&arg[]=' + encodeURIComponent( a[ i ] );\n\t}\n\treturn u;\n}\n\n\n// EXPORTS //\n\nexport default fmtprodmsg;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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\nimport isPlainObject from '@stdlib/assert-is-plain-object';\nimport isndarrayLike from '@stdlib/assert-is-ndarray-like';\nimport isFunction from '@stdlib/assert-is-function';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport emptyLike from '@stdlib/ndarray-empty-like';\nimport base from '@stdlib/ndarray-base-map';\nimport format from '@stdlib/error-tools-fmtprodmsg';\n\n\n// MAIN //\n\n/**\n* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.\n*\n* @param {ndarray} x - input ndarray\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type\n* @param {Callback} fcn - callback function\n* @param {*} [thisArg] - callback execution context\n* @throws {TypeError} first argument must be an ndarray-like object\n* @throws {TypeError} callback argument must be a function\n* @throws {TypeError} options argument must be an object\n* @returns {ndarray} output ndarray\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import ndarray from '@stdlib/ndarray-ctor';\n* import ndarray2array from '@stdlib/ndarray-to-array';\n*\n* function scale( z ) {\n* return z * 10.0;\n* }\n*\n* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var shape = [ 2, 3 ];\n* var strides = [ 6, 1 ];\n* var offset = 1;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var y = map( x, scale );\n* // returns \n*\n* var arr = ndarray2array( y );\n* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ]\n*/\nfunction map( x, options, fcn, thisArg ) {\n\tvar hasOpts;\n\tvar clbk;\n\tvar opts;\n\tvar ctx;\n\tvar y;\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'null5t', x ) );\n\t}\n\tif ( arguments.length < 3 ) {\n\t\tclbk = options;\n\t} else if ( arguments.length === 3 ) {\n\t\tif ( isFunction( options ) ) {\n\t\t\tclbk = options;\n\t\t\tctx = fcn;\n\t\t} else {\n\t\t\thasOpts = true;\n\t\t\topts = options;\n\t\t\tclbk = fcn;\n\t\t}\n\t} else {\n\t\thasOpts = true;\n\t\topts = options;\n\t\tclbk = fcn;\n\t\tctx = thisArg;\n\t}\n\tif ( !isFunction( clbk ) ) {\n\t\tthrow new TypeError( format( 'null2b', clbk ) );\n\t}\n\tif ( hasOpts ) {\n\t\tif ( !isPlainObject( opts ) ) {\n\t\t\tthrow new TypeError( format( 'null2V', opts ) );\n\t\t}\n\t\tif ( hasOwnProp( opts, 'dtype' ) ) {\n\t\t\t// Delegate `dtype` validation to `emptyLike` during output array creation:\n\t\t\ty = emptyLike( x, {\n\t\t\t\t'dtype': opts.dtype\n\t\t\t});\n\t\t} else {\n\t\t\t// We only support a `dtype` option, so avoid passing along any other options:\n\t\t\ty = emptyLike( x );\n\t\t}\n\t} else {\n\t\ty = emptyLike( x );\n\t}\n\tbase( [ x, y ], clbk, ctx );\n\treturn y;\n}\n\n\n// EXPORTS //\n\nexport default map;\n"],"names":["FLG","Symbol","hasToStringTagSupport","toStringTag","toStr","Object","prototype","toString","has","hasOwnProperty","hasOwnProp","value","property","call","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","out","err","main$g","Array","isArray","isObject","RE","main","defineProperty","isNumber","zeros","n","i","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","precision","padRight","sign","alternate","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isnan","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","isBoolean","Bool","Boolean","test","isPrimitive","setReadOnly","self","window","global","globalThis","getGlobal","codegen","Function","GlobalThis","Self","Win","Global","root","nodeList","document","childNodes","typedarray","Int8Array","reFunctionName","RE_FUNCTION_NAME","isObjectLike","REGEXP","isObjectLikeArray","predicate","len","arrayfun","isBuffer","_isBuffer","constructor","constructorName","name","ctor","ctorName","type","isFunction","typeOf","getProto","Obj","getPrototypeOf","proto","getProto$1","objectPrototype","isPlainObject","isPrototypeOf","key","ownProps","setNonEnumerableReadOnlyAccessor","getter","bytesPerElement","dtype","BYTES_PER_ELEMENT","iterationOrder","strides","cnt","x","strides2order","column","ndims","row","s1","s2","isColumnMajorContiguous","order","contiguous","isRowMajorContiguous","minmaxViewBufferIndex","shape","offset","min","max","s","real","z","re","imag","im","isString","valueOf","RE_CHARS","RegExp","isRegExp","search","newval","rescape","CTORS","int8","uint8","uint8c","int16","uint16","int32","uint32","float32","float64","generic","binary","complex64","complex128","hasUint8Array","Uint8Array","isUint8Array","bool","arr","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","Uint8Array$1","hasUint16Array","Uint16Array","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","uint16view","Uint16Array$1","ctors","IS_LITTLE_ENDIAN","buffer","hasArrayBuffer","ArrayBuffer","isArrayBuffer","hasFloat64Array","Float64Array","GlobalFloat64Array","NaN","hasFloat64ArraySupport","Float64Array$1","view","buf","GlobalArrayBuffer","isView","byteLength","hasArrayBufferSupport","ArrayBuffer$1","hasDataView","DataView","GlobalDataView","getFloat64","setFloat64","byteOffset","hasDataViewSupport","DataView$1","BigInteger","BigInt","RE_SUFFIX","dtypes","kind","DTYPES","all","enumeration","int64","uint64","notype","userdefined_type","keys","isArguments","bool$6","detect","hasArgumentsClass","main$8","Number","isNan","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","floor","isInteger","PINF","NINF","isInt","isEnumerableProperty","propertyIsEnumerable","hasStringEnumBug","isEnum","UINT32_MAX","isArguments$1","MAX_LENGTH","MAX_TYPED_ARRAY_LENGTH","isCollection","searchElement","fromIndex","isConstructorPrototype","w","hasAutomationEqualityBug","k","win","EXCLUDED_KEYS","check","HAS_BUILTIN","skipConstructor","skipPrototype","isFcn","p","HAS_ENUM_PROTO_BUG","HAS_NON_ENUM_PROPS_BUG","HAS_WINDOW","error","NON_ENUMERABLE","main$7","target","source","objectKeys","assign","orders","ORDERS","enumerated","DATA","LAYOUTS","modes","MODES","throw","clamp","wrap","normalize","LOW_MASK","TWO_32","BYTES","VIEW","float64ToInt64Bytes","stride","hi","lo","setUint32","bytes","ndarray","nbytes","ord","this","_byteLength","_bytesPerElement","_buffer","_dtype","_length","_ndims","_offset","_order","_shape","_strides","_accessors","_iterationOrder","isContiguous","_flags","ROW_MAJOR_CONTIGUOUS","COLUMN_MAJOR_CONTIGUOUS","READONLY","__meta_dataview__","isndarrayLike","data","isNonNegativeInteger","idx","ind","dt","iget","join","flgs","sh","st","sm","m","o","N","M","_mode","_submode","setInt8","setInt16","setBigInt64","setInt32","MAX_ARRAY_LENGTH","arraylikefcn","isArrayLike","isPrimitiveArray","isObjectArray","isNonNegativeIntegerArray","shape2strides","columnmajor","rowmajor","strides2offset","numel","TYPE","isAccessorArray","GETTERS","default","ctor2dtypes","Float32Array","Int16Array","Int32Array","Uint32Array","Uint8ClampedArray","Complex64Array","Complex128Array","hasFloat32Array","GlobalFloat32Array","hasFloat32ArraySupport","Float32Array$1","hasUint32Array","GlobalUint32Array","hasUint32ArraySupport","Uint32Array$1","hasInt32Array","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","Int32Array$1","hasInt16Array","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","Int16Array$1","hasUint8ClampedArray","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","Uint8ClampedArray$1","hasInt8Array","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","Int8Array$1","isArrayLikeObject","Complex128","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","isComplex64Array","isComplex128Array","hasIteratorSymbolSupport","iterator","IteratorSymbol","realf","imagf","reinterpret","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","isComplexArrayConstructor","getComplex64","nargs","fromArray","RangeError","reinterpret64","reinterpret128","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","start","copyWithin","iter","entries","end","fcn","separator","sep","outbuf","reducer","initialValue","acc","sbuf","outlen","begin","index","getComplex128","NTYPES","ctor2dtype","factory","isDataType","contains","d","isOrder","ROW_MAJOR","COLUMN_MAJOR","isIntegerArray","defaults","numeric","floating_point","real_floating_point","complex_floating_point","integer","signed_integer","unsigned_integer","boolean","casting","index_mode","DEFAULTS","HASH","validate","create","Ctor","createObject$1","clampIndex","wrapIndex","mp1","normalizeIndex","isIndexMode","TABLE","mode","parent","iset","copy","MAX_DIMS","INDEX_MODE","options","opts","minmax","isBufferLengthCompatible","readonly","submode","superCtor","createObject","inherit","getIndex","Buffer","require$$0","b","GlobalBuffer","from","hasNodeBufferSupport","Buffer$1","allocUnsafe$1","allocUnsafe","size","filled","DEFAULT_DTYPE","empty","gzeros","table","nb","emptyArray","emptyLike","getDType","getShape","getOrder","SETTERS","setter","copyIndexed","ndarraylike2object","xbuf","getData","ref","getStrides","getOffset","accessorProtocol","accessors","accessorSetter","zeroTo","arraylike2object","complex","take","indices","loopOrder","sx","sy","y","avx","ix","iy","jx","jy","vx","vy","ux","sort2ins","indexed","BLOCK_SIZE_IN_BYTES","BLOCK_SIZE_IN_ELEMENTS","unaryBlockSize","dtypeX","dtypeY","nbx","nby","reverse","method","hasMethod","internal","vind2bind","ceil","trunc","ind2sub","getSubscripts","MODE","MAP","ybuf","dx0","dy0","S0","i0","dx1","dy1","S1","i1","dx2","dy2","S2","i2","dx3","dy3","S3","i3","dx4","dy4","S4","i4","dx5","dy5","S5","i5","dx6","dy6","S6","i6","dx7","dy7","S7","i7","dx8","dy8","S8","i8","dx9","dy9","S9","i9","ACCESSOR_MAP","BLOCKED_MAP","bsize","ox1","oy1","s0","ox","oy","j0","j1","blockSize","ox2","oy2","j2","ox3","oy3","j3","ox4","oy4","j4","ox5","oy5","j5","ox6","oy6","j6","ox7","oy7","j7","ox8","oy8","j8","ox9","oy9","j9","BLOCKED_ACCESSOR_MAP","map","arrays","shx","shy","iox","ioy","ndarray2object","ordx","ordy","accessormapnd","mapnd","fmtprodmsg","a","u","encodeURIComponent","hasOpts","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C1GgB,IAAM4B,EACN3B,IAAM4B,EAEP7B,IAAMgC,EACN/B,IAAMgC,CACN,CACDjC,IAAMoC,EACNnC,IAAMoC,CACN,CACDrC,IAAMwC,EACNvC,IAAMwC,CACN,CACDzC,IAAM4C,EACN3C,IAAM4C,CACN,CACD7C,IAAMgD,EACN/C,IAAMgD,CACN,CACDjD,IAAMoD,EACNnD,IAAMoD,CACN,CACDrD,IAAMwD,EACNvD,IAAMwD,CACN,CACDzD,IAAM4D,EACN3D,IAAM4D,CACN,CAUX,ECvQA,SAAwBxd,EAAGyZ,EAAGtG,EAAKX,GAClC,IAAIyL,EACAxF,EACA6C,EACAxf,EACAC,EACAwf,EACAI,EACAI,EACAI,EACAI,EACAI,EACAI,EACAI,EACAI,EACAI,EACAnC,EACAI,EACAI,EACAI,EACAI,EACAI,EACAI,EACAI,EACAI,EACAI,EACAM,EACAQ,EACAG,EACAG,EACAG,EACAG,EACAG,EACAG,EACAG,EACA5B,EACAQ,EACAG,EACAG,EACAG,EACAG,EACAG,EACAG,EACAG,EACA7T,EACAM,EACAgP,EACAI,EACAI,EACAI,EACAI,EACAI,GACAI,GACAI,GACAI,GACAI,GACAtE,GACAC,GACA6E,GACAC,GACA3E,GACAC,GACA8B,GACAI,GACAI,GACAI,GACAI,GACAI,GACAI,GACAI,GACAI,GACAI,GACAS,GACAC,GACAI,GACAG,GACAG,GACAG,GACAG,GACAG,GACAG,GACAG,GACApT,GA+BJ,IAzBAJ,GADAI,GAAIyM,GAAWtZ,EAAEY,MAAOZ,EAAEF,QAAS2Z,EAAE3Z,UAC9B2M,GACP8M,GAAK1M,GAAE0M,GACPC,GAAK3M,GAAE2M,GACPrN,EAAMwO,GAAS9N,GAAEV,KAGjB8R,EAAQQ,GAAWze,EAAEL,MAAO8Z,EAAE9Z,OAG9B0e,GAAKre,EAAEa,OACPyd,GAAK7E,EAAE5Y,OAGP4X,EAAOzY,EAAEiM,KACTqP,EAAO7B,EAAExN,KAGTsP,EAAMhC,GAAG,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AU,EACV3K,EAAOD,EACP7D,EAAOU,EACPgO,EAAM3O,IAED5T,GAAY6T,GACjB,MAAM,IAAIjZ,UAAWe,GAAQ,SAAUkY,IAExC,GAAKyO,EAAU,CACd,IAAM9hB,GAAemX,GACpB,MAAM,IAAI/c,UAAWe,GAAQ,SAAUgc,IAIvCkD,EAFIllB,EAAYgiB,EAAM,SAElB0B,GAAWjY,EAAG,CACjBL,MAAS4W,EAAK5W,QAIXsY,GAAWjY,EAElB,MACEyZ,EAAIxB,GAAWjY,GAGhB,OADAjJ,GAAM,CAAEiJ,EAAGyZ,GAAKhH,EAAM0O,GACf1H,CACR","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426]} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index c88fb18..0000000 --- a/lib/index.js +++ /dev/null @@ -1,58 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/** -* Apply a callback function to elements in an input ndarray and assign results to elements in an output ndarray. -* -* @module @stdlib/ndarray-map -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* var map = require( '@stdlib/ndarray-map' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ] -*/ - -// MODULES // - -var main = require( './main.js' ); - - -// EXPORTS // - -module.exports = main; diff --git a/lib/main.js b/lib/main.js deleted file mode 100644 index e23f9ee..0000000 --- a/lib/main.js +++ /dev/null @@ -1,122 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 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 isPlainObject = require( '@stdlib/assert-is-plain-object' ); -var isndarrayLike = require( '@stdlib/assert-is-ndarray-like' ); -var isFunction = require( '@stdlib/assert-is-function' ); -var hasOwnProp = require( '@stdlib/assert-has-own-property' ); -var emptyLike = require( '@stdlib/ndarray-empty-like' ); -var base = require( '@stdlib/ndarray-base-map' ); -var format = require( '@stdlib/string-format' ); - - -// MAIN // - -/** -* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray. -* -* @param {ndarray} x - input ndarray -* @param {Options} [options] - function options -* @param {string} [options.dtype] - output array data type -* @param {Callback} fcn - callback function -* @param {*} [thisArg] - callback execution context -* @throws {TypeError} first argument must be an ndarray-like object -* @throws {TypeError} callback argument must be a function -* @throws {TypeError} options argument must be an object -* @returns {ndarray} output ndarray -* -* @example -* var Float64Array = require( '@stdlib/array-float64' ); -* var ndarray = require( '@stdlib/ndarray-ctor' ); -* var ndarray2array = require( '@stdlib/ndarray-to-array' ); -* -* function scale( z ) { -* return z * 10.0; -* } -* -* var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); -* var shape = [ 2, 3 ]; -* var strides = [ 6, 1 ]; -* var offset = 1; -* -* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); -* // returns -* -* var y = map( x, scale ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ] -*/ -function map( x, options, fcn, thisArg ) { - var hasOpts; - var clbk; - var opts; - var ctx; - var y; - if ( !isndarrayLike( x ) ) { - throw new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) ); - } - if ( arguments.length < 3 ) { - clbk = options; - } else if ( arguments.length === 3 ) { - if ( isFunction( options ) ) { - clbk = options; - ctx = fcn; - } else { - hasOpts = true; - opts = options; - clbk = fcn; - } - } else { - hasOpts = true; - opts = options; - clbk = fcn; - ctx = thisArg; - } - if ( !isFunction( clbk ) ) { - throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', clbk ) ); - } - if ( hasOpts ) { - if ( !isPlainObject( opts ) ) { - throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', opts ) ); - } - if ( hasOwnProp( opts, 'dtype' ) ) { - // Delegate `dtype` validation to `emptyLike` during output array creation: - y = emptyLike( x, { - 'dtype': opts.dtype - }); - } else { - // We only support a `dtype` option, so avoid passing along any other options: - y = emptyLike( x ); - } - } else { - y = emptyLike( x ); - } - base( [ x, y ], clbk, ctx ); - return y; -} - - -// EXPORTS // - -module.exports = map; diff --git a/package.json b/package.json index ef1ce04..fdfa412 100644 --- a/package.json +++ b/package.json @@ -3,31 +3,7 @@ "version": "0.0.0", "description": "Apply a callback to elements in an input ndarray and assign results to elements in a new output ndarray.", "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": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "main": "./index.js", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -36,59 +12,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/assert-has-own-property": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-ndarray-like": "^0.2.2", - "@stdlib/assert-is-plain-object": "^0.2.2", - "@stdlib/ndarray-base-map": "github:stdlib-js/ndarray-base-map#main", - "@stdlib/ndarray-empty-like": "^0.3.0", - "@stdlib/string-format": "^0.2.2", - "@stdlib/types": "^0.4.3", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-float32": "^0.2.2", - "@stdlib/array-float64": "^0.2.2", - "@stdlib/array-ones": "^0.2.1", - "@stdlib/assert-is-same-float32array": "^0.2.2", - "@stdlib/assert-is-same-float64array": "^0.2.2", - "@stdlib/blas-ext-base-dfill": "^0.2.2", - "@stdlib/blas-ext-base-sfill": "^0.2.2", - "@stdlib/math-base-assert-is-nan": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/math-base-special-identity": "^0.2.2", - "@stdlib/math-base-special-pow": "^0.3.0", - "@stdlib/math-base-special-sqrt": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-base-unary-tiling-block-size": "^0.2.2", - "@stdlib/ndarray-ctor": "^0.2.2", - "@stdlib/ndarray-to-array": "^0.2.1", - "@stdlib/random-array-discrete-uniform": "^0.2.1", - "@stdlib/utils-nary-function": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "strided", @@ -101,7 +24,6 @@ "transform", "for-each" ], - "__stdlib__": {}, "funding": { "type": "opencollective", "url": "https://opencollective.com/stdlib" diff --git a/stats_browser.html b/stats_browser.html new file mode 100644 index 0000000..5fa01b5 --- /dev/null +++ b/stats_browser.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/stats_node.html b/stats_node.html new file mode 100644 index 0000000..cf2b9ba --- /dev/null +++ b/stats_node.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 37b7765..0000000 --- a/test/test.js +++ /dev/null @@ -1,735 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 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 ones = require( '@stdlib/array-ones' ); -var ndarray = require( '@stdlib/ndarray-ctor' ); -var shape2strides = require( '@stdlib/ndarray-base-shape2strides' ); -var strides2offset = require( '@stdlib/ndarray-base-strides2offset' ); -var Float64Array = require( '@stdlib/array-float64' ); -var Float32Array = require( '@stdlib/array-float32' ); -var isSameFloat64Array = require( '@stdlib/assert-is-same-float64array' ); -var isSameFloat32Array = require( '@stdlib/assert-is-same-float32array' ); -var numel = require( '@stdlib/ndarray-base-numel' ); -var dfill = require( '@stdlib/blas-ext-base-dfill' ); -var sfill = require( '@stdlib/blas-ext-base-sfill' ); -var blockSize = require( '@stdlib/ndarray-base-unary-tiling-block-size' ); -var map = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof map, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function throws an error if provided a first argument which is not an ndarray', function test( t ) { - var values; - var i; - - values = [ - '5', - 5, - true, - false, - null, - void 0, - [], - {}, - function noop() {}, - { - 'data': true - } - ]; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided ' + values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - map( value, scale ); - }; - } - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function throws an error if a callback argument which is not a function', function test( t ) { - var values; - var x; - var i; - - values = [ - '5', - 5, - true, - false, - null, - void 0, - {}, - [] - ]; - x = ndarray( 'generic', ones( 4, 'generic' ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' ); - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided ' + values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - map( x, value ); - }; - } -}); - -tape( 'the function throws an error if callback argument which is not a function (options)', function test( t ) { - var values; - var opts; - var x; - var i; - - values = [ - '5', - 5, - true, - false, - null, - void 0, - {}, - [] - ]; - x = ndarray( 'generic', ones( 4, 'generic' ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' ); - opts = { - 'dtype': 'float64' - }; - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided ' + values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - map( x, opts, value ); - }; - } -}); - -tape( 'the function throws an error if provided an options argument which is not an object', function test( t ) { - var values; - var x; - var i; - - values = [ - '5', - 5, - true, - false, - null, - void 0, - [] - ]; - x = ndarray( 'generic', ones( 4, 'generic' ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' ); - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+ values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - map( x, value, scale ); - }; - } - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function throws an error if provided an invalid `dtype` option', function test( t ) { - var values; - var x; - var i; - - values = [ - 'foo', - 'bar', - 1, - NaN, - true, - false, - void 0, - null, - [], - {}, - function noop() {} - ]; - x = ndarray( 'generic', ones( 4, 'generic' ), [ 2, 2 ], [ 2, 1 ], 0, 'row-major' ); - - for ( i = 0; i < values.length; i++ ) { - t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+ values[i] ); - } - t.end(); - - function badValue( value ) { - return function badValue() { - var opts = { - 'dtype': value - }; - map( x, opts, scale ); - }; - } - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function applies a callback to each indexed element in an input ndarray and returns an output ndarray with mapped values (row-major, contiguous)', function test( t ) { - var expected; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'row-major'; - sh = [ 2, 1, 2 ]; - st = shape2strides( sh, ord ); - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh ), dt ), sh, st, o, ord ); - - y = map( x, scale ); - - expected = new Float64Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - - t.end(); - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function applies a callback to each indexed element in an input ndarray and returns an output ndarray with mapped values (column-major, contiguous)', function test( t ) { - var expected; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'column-major'; - sh = [ 2, 1, 2 ]; - st = shape2strides( sh, ord ); - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh ), dt ), sh, st, o, ord ); - - y = map( x, scale ); - - expected = new Float64Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - - t.end(); - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function applies a callback to each indexed element in an input ndarray and returns an output ndarray with mapped values (row-major, contiguous, options)', function test( t ) { - var expected; - var opts; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'row-major'; - sh = [ 2, 1, 2 ]; - st = shape2strides( sh, ord ); - o = strides2offset( sh, st ); - x = ndarray( dt, ones( numel( sh ), dt ), sh, st, o, ord ); - - opts = {}; - y = map( x, opts, scale ); - - expected = new Float64Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - - opts = { - 'dtype': 'float32' - }; - y = map( x, opts, scale ); - - expected = new Float32Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat32Array( y.data, expected ), true, 'returns expected value' ); - - t.end(); - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function applies a callback to each indexed element in an input ndarray and returns an output ndarray with mapped values (column-major, contiguous, options)', function test( t ) { - var expected; - var opts; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'column-major'; - sh = [ 2, 1, 2 ]; - st = shape2strides( sh, ord ); - o = strides2offset( sh, st ); - x = ndarray( dt, ones( numel( sh ), dt ), sh, st, o, ord ); - - opts = {}; - y = map( x, opts, scale ); - - expected = new Float64Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - - opts = { - 'dtype': 'float32' - }; - y = map( x, opts, scale ); - - expected = new Float32Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat32Array( y.data, expected ), true, 'returns expected value' ); - - t.end(); - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function applies a callback to each indexed element in an input ndarray and returns an output ndarray with mapped values (row-major, non-contiguous, large arrays)', function test( t ) { - var expected; - var bsize; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'row-major'; - - bsize = blockSize( dt ); - sh = [ bsize*2, 1, 2 ]; - st = [ -4, -4, 2 ]; - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh )*2, dt ), sh, st, o, ord ); - - y = map( x, scale ); - expected = new Float64Array( y.length ); - dfill( y.length, 10.0, expected, 1 ); - - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - - t.end(); - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function applies a callback to each indexed element in an input ndarray and returns an output ndarray with mapped values (row-major, non-contiguous, large arrays, options)', function test( t ) { - var expected; - var bsize; - var opts; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'row-major'; - - bsize = blockSize( dt ); - sh = [ bsize*2, 1, 2 ]; - st = [ -4, -4, 2 ]; - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh )*2, dt ), sh, st, o, ord ); - - opts = { - 'dtype': 'float32' - }; - y = map( x, opts, scale ); - expected = new Float32Array( y.length ); - sfill( y.length, 10.0, expected, 1 ); - - t.strictEqual( isSameFloat32Array( y.data, expected ), true, 'returns expected value' ); - - t.end(); - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function applies a callback to each indexed element in an input ndarray and returns an output ndarray with mapped values (column-major, non-contiguous, large arrays)', function test( t ) { - var expected; - var bsize; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'column-major'; - - bsize = blockSize( dt ); - sh = [ 2, 1, bsize*2 ]; - st = [ 2, -4, -4 ]; - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh )*2, dt ), sh, st, o, ord ); - - y = map( x, scale ); - - expected = new Float64Array( y.length ); - dfill( y.length, 10.0, expected, 1 ); - - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - - t.end(); - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function applies a callback to each indexed element in an input ndarray and returns an output ndarray with mapped values (column-major, non-contiguous, large arrays, options)', function test( t ) { - var expected; - var bsize; - var opts; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'column-major'; - - bsize = blockSize( dt ); - sh = [ 2, 1, bsize*2 ]; - st = [ 2, -4, -4 ]; - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh )*2, dt ), sh, st, o, ord ); - - opts = { - 'dtype': 'float32' - }; - y = map( x, opts, scale ); - - expected = new Float32Array( y.length ); - sfill( y.length, 10.0, expected, 1 ); - - t.strictEqual( isSameFloat32Array( y.data, expected ), true, 'returns expected value' ); - - t.end(); - - function scale( z ) { - return z * 10.0; - } -}); - -tape( 'the function supports providing a callback execution context', function test( t ) { - var expected; - var ctx; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'row-major'; - sh = [ 2, 1, 2 ]; - st = shape2strides( sh, ord ); - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh ), dt ), sh, st, o, ord ); - - ctx = { - 'count': 0 - }; - y = map( x, scale, ctx ); - - expected = new Float64Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - t.strictEqual( ctx.count, 4, 'returns expected value' ); - - t.end(); - - function scale( z ) { - this.count += 1; // eslint-disable-line no-invalid-this - return z * 10.0; - } -}); - -tape( 'the function supports providing a callback execution context (options)', function test( t ) { - var expected; - var ctx; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - - dt = 'float64'; - ord = 'row-major'; - sh = [ 2, 1, 2 ]; - st = shape2strides( sh, ord ); - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh ), dt ), sh, st, o, ord ); - - ctx = { - 'count': 0 - }; - y = map( x, {}, scale, ctx ); - - expected = new Float64Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - t.strictEqual( ctx.count, 4, 'returns expected value' ); - - t.end(); - - function scale( z ) { - this.count += 1; // eslint-disable-line no-invalid-this - return z * 10.0; - } -}); - -tape( 'the function invokes a provided callback with three arguments (row-major)', function test( t ) { - var expected; - var indices; - var values; - var arrays; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - var i; - - dt = 'float64'; - ord = 'row-major'; - sh = [ 2, 1, 2 ]; - st = shape2strides( sh, ord ); - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh ), dt ), sh, st, o, ord ); - - values = []; - indices = []; - arrays = []; - y = map( x, scale ); - - expected = new Float64Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - - expected = [ - [ 0, 0, 0 ], - [ 0, 0, 1 ], - [ 1, 0, 0 ], - [ 1, 0, 1 ] - ]; - t.deepEqual( indices, expected, 'returns expected value' ); - - expected = [ - x, - x, - x, - x - ]; - for ( i = 0; i < expected.length; i++ ) { - t.strictEqual( arrays[ i ], expected[ i ], 'returns expected value' ); - } - - t.end(); - - function scale( z, idx, arr ) { - values.push( z ); - indices.push( idx ); - arrays.push( arr ); - return z * 10.0; - } -}); - -tape( 'the function invokes a provided callback with three arguments (column-major)', function test( t ) { - var expected; - var indices; - var values; - var arrays; - var ord; - var sh; - var st; - var dt; - var o; - var x; - var y; - var i; - - dt = 'float64'; - ord = 'column-major'; - sh = [ 2, 1, 2 ]; - st = shape2strides( sh, ord ); - o = strides2offset( sh, st ); - - x = ndarray( dt, ones( numel( sh ), dt ), sh, st, o, ord ); - - values = []; - indices = []; - arrays = []; - y = map( x, scale ); - - expected = new Float64Array([ - 10.0, - 10.0, - 10.0, - 10.0 - ]); - t.strictEqual( isSameFloat64Array( y.data, expected ), true, 'returns expected value' ); - - expected = [ - [ 0, 0, 0 ], - [ 1, 0, 0 ], - [ 0, 0, 1 ], - [ 1, 0, 1 ] - ]; - t.deepEqual( indices, expected, 'returns expected value' ); - - expected = [ - x, - x, - x, - x - ]; - for ( i = 0; i < expected.length; i++ ) { - t.strictEqual( arrays[ i ], expected[ i ], 'returns expected value' ); - } - - t.end(); - - function scale( z, idx, arr ) { - values.push( z ); - indices.push( idx ); - arrays.push( arr ); - return z * 10.0; - } -});