diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index dab5d2a..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,180 +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
-
-# 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 0411612..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/stats/base/dmskmin) 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 d83ea57..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/stats/base/dmskmin) 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 89f1062..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: '4 4 * * 4'
-
- # 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 dmskmin = require( '@stdlib/stats-base-dmskmin' );
+If no recognized module system is present, access bundle contents via the global scope:
+
+```html
+
```
#### dmskmin( N, x, strideX, mask, strideMask )
@@ -176,10 +182,15 @@ var v = dmskmin.ndarray( 4, x, 2, 1, mask, 2, 1 );
-```javascript
-var uniform = require( '@stdlib/random-array-uniform' );
-var bernoulli = require( '@stdlib/random-array-bernoulli' );
-var dmskmin = require( '@stdlib/stats-base-dmskmin' );
+```html
+
+
+
+
+
+
+
+
+
```
@@ -203,138 +219,7 @@ console.log( v );
-* * *
-
-
-
-## C APIs
-
-
-
-
-
-
-
-
-
-
-
-### Usage
-
-```c
-#include "stdlib/stats/base/dmskmin.h"
-```
-
-#### stdlib_strided_dmskmin( N, \*X, strideX, \*Mask, strideMask )
-
-Computes the minimum value of a double-precision floating-point strided array according to a mask.
-
-```c
-#include
-
-const double x[] = { 1.0, -2.0, 2.0 };
-const uint8_t mask[] = { 0, 1, 0 };
-
-double v = stdlib_strided_dmskmin( 3, x, 1, mask, 1 );
-// returns 1.0
-```
-
-The function accepts the following arguments:
-
-- **N**: `[in] CBLAS_INT` number of indexed elements.
-- **X**: `[in] double*` input array.
-- **strideX**: `[in] CBLAS_INT` stride length for `X`.
-- **Mask**: `[in] uint8_t*` mask array. If a `Mask` array element is `0`, the corresponding element in `X` is considered valid and included in computation. If a `Mask` array element is `1`, the corresponding element in `X` is considered invalid/missing and excluded from computation.
-- **strideMask**: `[in] CBLAS_INT` stride length for `Mask`.
-
-```c
-double stdlib_strided_dmskmin( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const uint8_t *Mask, const CBLAS_INT strideMask );
-```
-
-
-
-#### stdlib_strided_dmskmin_ndarray( N, \*X, strideX, offsetX, \*Mask, strideMask, offsetMask )
-
-Computes the minimum value of a double-precision floating-point strided array according to a mask and using alternative indexing semantics.
-
-```c
-#include
-
-const double x[] = { 1.0, -2.0, 2.0 };
-const uint8_t mask[] = { 0, 1, 0 };
-
-double v = stdlib_strided_dmskmin( 3, x, 1, 0, mask, 1, 0 );
-// returns 1.0
-```
-
-The function accepts the following arguments:
-
-- **N**: `[in] CBLAS_INT` number of indexed elements.
-- **X**: `[in] double*` input array.
-- **strideX**: `[in] CBLAS_INT` stride length for `X`.
-- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
-- **Mask**: `[in] uint8_t*` mask array. If a `Mask` array element is `0`, the corresponding element in `X` is considered valid and included in computation. If a `Mask` array element is `1`, the corresponding element in `X` is considered invalid/missing and excluded from computation.
-- **strideMask**: `[in] CBLAS_INT` stride length for `Mask`.
-- **offsetMask**: `[in] CBLAS_INT` starting index for `Mask`.
-
-```c
-double stdlib_strided_dmskmin_ndarray( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const uint8_t *Mask, const CBLAS_INT strideMask, const CBLAS_INT offsetMask );
-```
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-### Examples
-
-```c
-#include "stdlib/stats/base/dmskmin.h"
-#include
-#include
-
-int main( void ) {
- // Create a strided array:
- const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 };
-
- // Create a mask array:
- const uint8_t mask[] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 };
-
- // Specify the number of elements:
- const int N = 5;
-
- // Specify the stride lengths:
- const int strideX = 2;
- const int strideMask = 2;
-
- // Compute the minimum value:
- double v = stdlib_strided_dmskmin( N, x, strideX, mask, strideMask );
-
- // Print the result:
- printf( "min: %lf\n", v );
-}
-```
-
-
-
-
-
-
-
@@ -427,25 +312,25 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors].
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/stats-base-dmskmin/main/LICENSE
-[@stdlib/array/float64]: https://github.com/stdlib-js/array-float64
+[@stdlib/array/float64]: https://github.com/stdlib-js/array-float64/tree/umd
-[@stdlib/array/uint8]: https://github.com/stdlib-js/array-uint8
+[@stdlib/array/uint8]: https://github.com/stdlib-js/array-uint8/tree/umd
[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
-[@stdlib/stats/strided/dmin]: https://github.com/stdlib-js/stats-strided-dmin
+[@stdlib/stats/strided/dmin]: https://github.com/stdlib-js/stats-strided-dmin/tree/umd
-[@stdlib/stats/base/dmskmax]: https://github.com/stdlib-js/stats-base-dmskmax
+[@stdlib/stats/base/dmskmax]: https://github.com/stdlib-js/stats-base-dmskmax/tree/umd
-[@stdlib/stats/base/dnanmin]: https://github.com/stdlib-js/stats-base-dnanmin
+[@stdlib/stats/base/dnanmin]: https://github.com/stdlib-js/stats-base-dnanmin/tree/umd
-[@stdlib/stats/base/dnanmskmin]: https://github.com/stdlib-js/stats-base-dnanmskmin
+[@stdlib/stats/base/dnanmskmin]: https://github.com/stdlib-js/stats-base-dnanmskmin/tree/umd
-[@stdlib/stats/base/mskmin]: https://github.com/stdlib-js/stats-base-mskmin
+[@stdlib/stats/base/mskmin]: https://github.com/stdlib-js/stats-base-mskmin/tree/umd
-[@stdlib/stats/base/smskmin]: https://github.com/stdlib-js/stats-base-smskmin
+[@stdlib/stats/base/smskmin]: https://github.com/stdlib-js/stats-base-smskmin/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.js b/benchmark/benchmark.js
deleted file mode 100644
index 485ff31..0000000
--- a/benchmark/benchmark.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 uniform = require( '@stdlib/random-array-uniform' );
-var bernoulli = require( '@stdlib/random-array-bernoulli' );
-var isnan = require( '@stdlib/math-base-assert-is-nan' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var pkg = require( './../package.json' ).name;
-var dmskmin = require( './../lib/dmskmin.js' );
-
-
-// VARIABLES //
-
-var uniformOptions = {
- 'dtype': 'float64'
-};
-var bernoulliOptions = {
- 'dtype': 'uint8'
-};
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var mask = bernoulli( len, 0.2, bernoulliOptions );
- var x = uniform( len, -10.0, 10.0, uniformOptions );
- return benchmark;
-
- function benchmark( b ) {
- var v;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = dmskmin( x.length, x, 1, mask, 1 );
- if ( isnan( v ) ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( isnan( v ) ) {
- 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 f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( pkg+':len='+len, f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.native.js b/benchmark/benchmark.native.js
deleted file mode 100644
index c751951..0000000
--- a/benchmark/benchmark.native.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 resolve = require( 'path' ).resolve;
-var bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var bernoulli = require( '@stdlib/random-array-bernoulli' );
-var isnan = require( '@stdlib/math-base-assert-is-nan' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var tryRequire = require( '@stdlib/utils-try-require' );
-var pkg = require( './../package.json' ).name;
-
-
-// VARIABLES //
-
-var dmskmin = tryRequire( resolve( __dirname, './../lib/dmskmin.native.js' ) );
-var opts = {
- 'skip': ( dmskmin instanceof Error )
-};
-var uniformOptions = {
- 'dtype': 'float64'
-};
-var bernoulliOptions = {
- 'dtype': 'uint8'
-};
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var mask = bernoulli( len, 0.2, bernoulliOptions );
- var x = uniform( len, -10.0, 10.0, uniformOptions );
- return benchmark;
-
- function benchmark( b ) {
- var v;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = dmskmin( x.length, x, 1, mask, 1 );
- if ( isnan( v ) ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( isnan( v ) ) {
- 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 f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( pkg+'::native:len='+len, opts, f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.ndarray.js b/benchmark/benchmark.ndarray.js
deleted file mode 100644
index 3571584..0000000
--- a/benchmark/benchmark.ndarray.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 uniform = require( '@stdlib/random-array-uniform' );
-var bernoulli = require( '@stdlib/random-array-bernoulli' );
-var isnan = require( '@stdlib/math-base-assert-is-nan' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var pkg = require( './../package.json' ).name;
-var dmskmin = require( './../lib/ndarray.js' );
-
-
-// VARIABLES //
-
-var uniformOptions = {
- 'dtype': 'float64'
-};
-var bernoulliOptions = {
- 'dtype': 'uint8'
-};
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var mask = bernoulli( len, 0.2, bernoulliOptions );
- var x = uniform( len, -10.0, 10.0, uniformOptions );
- return benchmark;
-
- function benchmark( b ) {
- var v;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- if ( isnan( v ) ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( isnan( v ) ) {
- 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 f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( pkg+':ndarray:len='+len, f );
- }
-}
-
-main();
diff --git a/benchmark/benchmark.ndarray.native.js b/benchmark/benchmark.ndarray.native.js
deleted file mode 100644
index d4fa5c3..0000000
--- a/benchmark/benchmark.ndarray.native.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 resolve = require( 'path' ).resolve;
-var bench = require( '@stdlib/bench-harness' );
-var uniform = require( '@stdlib/random-array-uniform' );
-var bernoulli = require( '@stdlib/random-array-bernoulli' );
-var isnan = require( '@stdlib/math-base-assert-is-nan' );
-var pow = require( '@stdlib/math-base-special-pow' );
-var tryRequire = require( '@stdlib/utils-try-require' );
-var pkg = require( './../package.json' ).name;
-
-
-// VARIABLES //
-
-var dmskmin = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
-var opts = {
- 'skip': ( dmskmin instanceof Error )
-};
-var uniformOptions = {
- 'dtype': 'float64'
-};
-var bernoulliOptions = {
- 'dtype': 'uint8'
-};
-
-
-// FUNCTIONS //
-
-/**
-* Creates a benchmark function.
-*
-* @private
-* @param {PositiveInteger} len - array length
-* @returns {Function} benchmark function
-*/
-function createBenchmark( len ) {
- var mask = bernoulli( len, 0.2, bernoulliOptions );
- var x = uniform( len, -10.0, 10.0, uniformOptions );
- return benchmark;
-
- function benchmark( b ) {
- var v;
- var i;
-
- b.tic();
- for ( i = 0; i < b.iterations; i++ ) {
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- if ( isnan( v ) ) {
- b.fail( 'should not return NaN' );
- }
- }
- b.toc();
- if ( isnan( v ) ) {
- 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 f;
- var i;
-
- min = 1; // 10^min
- max = 6; // 10^max
-
- for ( i = min; i <= max; i++ ) {
- len = pow( 10, i );
- f = createBenchmark( len );
- bench( pkg+'::native:ndarray:len='+len, opts, f );
- }
-}
-
-main();
diff --git a/benchmark/c/Makefile b/benchmark/c/Makefile
deleted file mode 100644
index 7280962..0000000
--- a/benchmark/c/Makefile
+++ /dev/null
@@ -1,146 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2020 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.
-#/
-
-# VARIABLES #
-
-ifndef VERBOSE
- QUIET := @
-else
- QUIET :=
-endif
-
-# Determine the OS ([1][1], [2][2]).
-#
-# [1]: https://en.wikipedia.org/wiki/Uname#Examples
-# [2]: http://stackoverflow.com/a/27776822/2225624
-OS ?= $(shell uname)
-ifneq (, $(findstring MINGW,$(OS)))
- OS := WINNT
-else
-ifneq (, $(findstring MSYS,$(OS)))
- OS := WINNT
-else
-ifneq (, $(findstring CYGWIN,$(OS)))
- OS := WINNT
-else
-ifneq (, $(findstring Windows_NT,$(OS)))
- OS := WINNT
-endif
-endif
-endif
-endif
-
-# Define the program used for compiling C source files:
-ifdef C_COMPILER
- CC := $(C_COMPILER)
-else
- CC := gcc
-endif
-
-# Define the command-line options when compiling C files:
-CFLAGS ?= \
- -std=c99 \
- -O3 \
- -Wall \
- -pedantic
-
-# Determine whether to generate position independent code ([1][1], [2][2]).
-#
-# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
-# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
-ifeq ($(OS), WINNT)
- fPIC ?=
-else
- fPIC ?= -fPIC
-endif
-
-# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
-INCLUDE ?=
-
-# List of source files:
-SOURCE_FILES ?=
-
-# List of libraries (e.g., `-lopenblas -lpthread`):
-LIBRARIES ?=
-
-# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
-LIBPATH ?=
-
-# List of C targets:
-c_targets := benchmark.length.out
-
-
-# RULES #
-
-#/
-# Compiles source files.
-#
-# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
-# @param {string} [CFLAGS] - C compiler options
-# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
-# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
-# @param {string} [SOURCE_FILES] - list of source files
-# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
-# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
-#
-# @example
-# make
-#
-# @example
-# make all
-#/
-all: $(c_targets)
-
-.PHONY: all
-
-#/
-# Compiles C source files.
-#
-# @private
-# @param {string} CC - C compiler (e.g., `gcc`)
-# @param {string} CFLAGS - C compiler options
-# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
-# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
-# @param {string} SOURCE_FILES - list of source files
-# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
-# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
-#/
-$(c_targets): %.out: %.c
- $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
-
-#/
-# Runs compiled benchmarks.
-#
-# @example
-# make run
-#/
-run: $(c_targets)
- $(QUIET) ./$<
-
-.PHONY: run
-
-#/
-# Removes generated files.
-#
-# @example
-# make clean
-#/
-clean:
- $(QUIET) -rm -f *.o *.out
-
-.PHONY: clean
diff --git a/benchmark/c/benchmark.length.c b/benchmark/c/benchmark.length.c
deleted file mode 100644
index eb44fa9..0000000
--- a/benchmark/c/benchmark.length.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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.
-*/
-
-#include "stdlib/stats/base/dmskmin.h"
-#include
-#include
-#include
-#include
-#include
-
-#define NAME "dmskmin"
-#define ITERATIONS 1000000
-#define REPEATS 3
-#define MIN 1
-#define MAX 6
-
-/**
-* Prints the TAP version.
-*/
-static void print_version( void ) {
- printf( "TAP version 13\n" );
-}
-
-/**
-* Prints the TAP summary.
-*
-* @param total total number of tests
-* @param passing total number of passing tests
-*/
-static void print_summary( int total, int passing ) {
- printf( "#\n" );
- printf( "1..%d\n", total ); // TAP plan
- printf( "# total %d\n", total );
- printf( "# pass %d\n", passing );
- printf( "#\n" );
- printf( "# ok\n" );
-}
-
-/**
-* Prints benchmarks results.
-*
-* @param iterations number of iterations
-* @param elapsed elapsed time in seconds
-*/
-static void print_results( int iterations, double elapsed ) {
- double rate = (double)iterations / elapsed;
- printf( " ---\n" );
- printf( " iterations: %d\n", iterations );
- printf( " elapsed: %0.9f\n", elapsed );
- printf( " rate: %0.9f\n", rate );
- printf( " ...\n" );
-}
-
-/**
-* Returns a clock time.
-*
-* @return clock time
-*/
-static double tic( void ) {
- struct timeval now;
- gettimeofday( &now, NULL );
- return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
-}
-
-/**
-* Generates a random number on the interval [0,1).
-*
-* @return random number
-*/
-static double rand_double( void ) {
- int r = rand();
- return (double)r / ( (double)RAND_MAX + 1.0 );
-}
-
-/**
-* Runs a benchmark.
-*
-* @param iterations number of iterations
-* @param len array length
-* @return elapsed time in seconds
-*/
-static double benchmark1( int iterations, int len ) {
- unsigned char mask[ len ];
- double elapsed;
- double x[ len ];
- double v;
- double t;
- int i;
-
- for ( i = 0; i < len; i++ ) {
- if ( rand_double() < 0.2 ) {
- mask[ i ] = 1; // missing
- } else {
- mask[ i ] = 0;
- }
- x[ i ] = ( rand_double() * 20000.0 ) - 10000.0;
- }
- v = 0.0;
- t = tic();
- for ( i = 0; i < iterations; i++ ) {
- // cppcheck-suppress uninitvar
- v = stdlib_strided_dmskmin( len, x, 1, mask, 1 );
- if ( v != v ) {
- printf( "should not return NaN\n" );
- break;
- }
- }
- elapsed = tic() - t;
- if ( v != v ) {
- printf( "should not return NaN\n" );
- }
- return elapsed;
-}
-
-/**
-* Runs a benchmark.
-*
-* @param iterations number of iterations
-* @param len array length
-* @return elapsed time in seconds
-*/
-static double benchmark2( int iterations, int len ) {
- unsigned char mask[ len ];
- double elapsed;
- double x[ len ];
- double v;
- double t;
- int i;
-
- for ( i = 0; i < len; i++ ) {
- if ( rand_double() < 0.2 ) {
- mask[ i ] = 1; // missing
- } else {
- mask[ i ] = 0;
- }
- x[ i ] = ( rand_double() * 20000.0 ) - 10000.0;
- }
- v = 0.0;
- t = tic();
- for ( i = 0; i < iterations; i++ ) {
- // cppcheck-suppress uninitvar
- v = stdlib_strided_dmskmin_ndarray( len, x, 1, 0, mask, 1, 0 );
- if ( v != v ) {
- printf( "should not return NaN\n" );
- break;
- }
- }
- elapsed = tic() - t;
- if ( v != v ) {
- printf( "should not return NaN\n" );
- }
- return elapsed;
-}
-
-/**
-* Main execution sequence.
-*/
-int main( void ) {
- double elapsed;
- int count;
- int iter;
- int len;
- int i;
- int j;
-
- // Use the current time to seed the random number generator:
- srand( time( NULL ) );
-
- print_version();
- count = 0;
- for ( i = MIN; i <= MAX; i++ ) {
- len = pow( 10, i );
- iter = ITERATIONS / pow( 10, i-1 );
- for ( j = 0; j < REPEATS; j++ ) {
- count += 1;
- printf( "# c::%s:len=%d\n", NAME, len );
- elapsed = benchmark1( iter, len );
- print_results( iter, elapsed );
- printf( "ok %d benchmark finished\n", count );
- }
- }
- for ( i = MIN; i <= MAX; i++ ) {
- len = pow( 10, i );
- iter = ITERATIONS / pow( 10, i-1 );
- for ( j = 0; j < REPEATS; j++ ) {
- count += 1;
- printf( "# c::%s:ndarray:len=%d\n", NAME, len );
- elapsed = benchmark2( iter, len );
- print_results( iter, elapsed );
- printf( "ok %d benchmark finished\n", count );
- }
- }
- print_summary( count, count );
-}
diff --git a/binding.gyp b/binding.gyp
deleted file mode 100644
index 7d0005b..0000000
--- a/binding.gyp
+++ /dev/null
@@ -1,170 +0,0 @@
-# @license Apache-2.0
-#
-# Copyright (c) 2020 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.
-
-# A `.gyp` file for building a Node.js native add-on.
-#
-# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
-# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
-{
- # List of files to include in this file:
- 'includes': [
- './include.gypi',
- ],
-
- # Define variables to be used throughout the configuration for all targets:
- 'variables': {
- # Target name should match the add-on export name:
- 'addon_target_name%': 'addon',
-
- # Set variables based on the host OS:
- 'conditions': [
- [
- 'OS=="win"',
- {
- # Define the object file suffix:
- 'obj': 'obj',
- },
- {
- # Define the object file suffix:
- 'obj': 'o',
- }
- ], # end condition (OS=="win")
- ], # end conditions
- }, # end variables
-
- # Define compile targets:
- 'targets': [
-
- # Target to generate an add-on:
- {
- # The target name should match the add-on export name:
- 'target_name': '<(addon_target_name)',
-
- # Define dependencies:
- 'dependencies': [],
-
- # Define directories which contain relevant include headers:
- 'include_dirs': [
- # Local include directory:
- '<@(include_dirs)',
- ],
-
- # List of source files:
- 'sources': [
- '<@(src_files)',
- ],
-
- # Settings which should be applied when a target's object files are used as linker input:
- 'link_settings': {
- # Define libraries:
- 'libraries': [
- '<@(libraries)',
- ],
-
- # Define library directories:
- 'library_dirs': [
- '<@(library_dirs)',
- ],
- },
-
- # C/C++ compiler flags:
- 'cflags': [
- # Enable commonly used warning options:
- '-Wall',
-
- # Aggressive optimization:
- '-O3',
- ],
-
- # C specific compiler flags:
- 'cflags_c': [
- # Specify the C standard to which a program is expected to conform:
- '-std=c99',
- ],
-
- # C++ specific compiler flags:
- 'cflags_cpp': [
- # Specify the C++ standard to which a program is expected to conform:
- '-std=c++11',
- ],
-
- # Linker flags:
- 'ldflags': [],
-
- # Apply conditions based on the host OS:
- 'conditions': [
- [
- 'OS=="mac"',
- {
- # Linker flags:
- 'ldflags': [
- '-undefined dynamic_lookup',
- '-Wl,-no-pie',
- '-Wl,-search_paths_first',
- ],
- },
- ], # end condition (OS=="mac")
- [
- 'OS!="win"',
- {
- # C/C++ flags:
- 'cflags': [
- # Generate platform-independent code:
- '-fPIC',
- ],
- },
- ], # end condition (OS!="win")
- ], # end conditions
- }, # end target <(addon_target_name)
-
- # Target to copy a generated add-on to a standard location:
- {
- 'target_name': 'copy_addon',
-
- # Declare that the output of this target is not linked:
- 'type': 'none',
-
- # Define dependencies:
- 'dependencies': [
- # Require that the add-on be generated before building this target:
- '<(addon_target_name)',
- ],
-
- # Define a list of actions:
- 'actions': [
- {
- 'action_name': 'copy_addon',
- 'message': 'Copying addon...',
-
- # Explicitly list the inputs in the command-line invocation below:
- 'inputs': [],
-
- # Declare the expected outputs:
- 'outputs': [
- '<(addon_output_dir)/<(addon_target_name).node',
- ],
-
- # Define the command-line invocation:
- 'action': [
- 'cp',
- '<(PRODUCT_DIR)/<(addon_target_name).node',
- '<(addon_output_dir)/<(addon_target_name).node',
- ],
- },
- ], # end actions
- }, # end target copy_addon
- ], # end targets
-}
diff --git a/branches.md b/branches.md
deleted file mode 100644
index 842d181..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/stats/base/dmskmin"
-%% click B href "https://github.com/stdlib-js/stats-base-dmskmin/tree/main"
-%% click C href "https://github.com/stdlib-js/stats-base-dmskmin/tree/production"
-%% click D href "https://github.com/stdlib-js/stats-base-dmskmin/tree/esm"
-%% click E href "https://github.com/stdlib-js/stats-base-dmskmin/tree/deno"
-%% click F href "https://github.com/stdlib-js/stats-base-dmskmin/tree/umd"
-```
-
-[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dmskmin
-[production-url]: https://github.com/stdlib-js/stats-base-dmskmin/tree/production
-[deno-url]: https://github.com/stdlib-js/stats-base-dmskmin/tree/deno
-[deno-readme]: https://github.com/stdlib-js/stats-base-dmskmin/blob/deno/README.md
-[umd-url]: https://github.com/stdlib-js/stats-base-dmskmin/tree/umd
-[umd-readme]: https://github.com/stdlib-js/stats-base-dmskmin/blob/umd/README.md
-[esm-url]: https://github.com/stdlib-js/stats-base-dmskmin/tree/esm
-[esm-readme]: https://github.com/stdlib-js/stats-base-dmskmin/blob/esm/README.md
\ No newline at end of file
diff --git a/browser.js b/browser.js
new file mode 100644
index 0000000..e39f83c
--- /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
+var e,r;e=this,r=function(){"use strict";var e="function"==typeof Object.defineProperty?Object.defineProperty:null,r=Object.defineProperty;function i(e){return"number"==typeof e}function t(e){var r,i="";for(r=0;r0&&(r-=1),t=a.toExponential(r)):t=a.toPrecision(e.precision),e.alternate||(t=u.call(t,v,"$1e"),t=u.call(t,b,"e"),t=u.call(t,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return t=u.call(t,f,"e+0$1"),t=u.call(t,g,"e-0$1"),e.alternate&&(t=u.call(t,d,"$1."),t=u.call(t,h,"$1.e")),a>=0&&e.sign&&(t=e.sign+t),t=e.specifier===l.call(e.specifier)?l.call(t):p.call(t)}function y(e){var r,i="";for(r=0;r127)throw new Error("invalid character code. Value: "+t.arg);t.arg=k(o)?String(t.arg):_(o)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(t.precision=6),t.arg=m(t);break;default:throw new Error("invalid specifier: "+t.specifier)}t.maxWidth>=0&&t.arg.length>t.maxWidth&&(t.arg=t.arg.substring(0,t.maxWidth)),t.padZeros?t.arg=a(t.arg,t.width||t.precision,t.padRight):t.width&&(t.arg=(f=t.arg,g=t.width,d=t.padRight,h=void 0,(h=g-f.length)<0?f:f=d?f+y(h):y(h)+f)),c+=t.arg||"",p+=1}return c}var I=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function T(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function V(e){var r,i,t,a;for(i=[],a=0,t=I.exec(e);t;)(r=e.slice(a,I.lastIndex-t[0].length)).length&&i.push(r),i.push(T(t)),a=I.lastIndex,t=I.exec(e);return(r=e.slice(a)).length&&i.push(r),i}function j(e){var r,i;if("string"!=typeof e)throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=[V(e)],i=1;i0?0:(1-e)*r}function Z(e){return e!=e}var W=Number.NEGATIVE_INFINITY;function L(e){return 0===e&&1/e===W}function U(e,r,i,t,a,n,o){var s,c,p,l,u;if(e<=0)return NaN;for(c=t,p=o,u=0;u 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) 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 the index offset which specifies the location of the first indexed value in a strided array.\n*\n* @param {NonNegativeInteger} N - number of indexed elements\n* @param {integer} stride - index increment\n* @returns {NonNegativeInteger} offset - offset\n*\n* @example\n* var offset = stride2offset( 10, -10 );\n* // returns 90\n*/\nfunction stride2offset( N, stride ) {\n\tif ( stride > 0 ) {\n\t\treturn 0;\n\t}\n\treturn ( 1 - N ) * stride;\n}\n\n\n// EXPORTS //\n\nexport default stride2offset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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// 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/**\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// MODULES //\n\nimport NINF from '@stdlib/constants-float64-ninf';\n\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is negative zero.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is negative zero\n*\n* @example\n* var bool = isNegativeZero( -0.0 );\n* // returns true\n*\n* @example\n* var bool = isNegativeZero( 0.0 );\n* // returns false\n*/\nfunction isNegativeZero( x ) {\n\treturn (x === 0.0 && 1.0/x === NINF);\n}\n\n\n// EXPORTS //\n\nexport default isNegativeZero;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isnan from '@stdlib/math-base-assert-is-nan';\nimport isNegativeZero from '@stdlib/math-base-assert-is-negative-zero';\n\n\n// MAIN //\n\n/**\n* Computes the minimum value of a double-precision floating-point strided array according to a mask.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Uint8Array} mask - mask array\n* @param {integer} strideMask - `mask` stride length\n* @param {NonNegativeInteger} offsetMask - `mask` starting index\n* @returns {number} minimum value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import Uint8Array from '@stdlib/array-uint8';\n* import floor from '@stdlib/math-base-special-floor';\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, -5.0, -6.0 ] );\n* var mask = new Uint8Array( [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 ] );\n*\n* var v = dmskmin( 5, x, 2, 1, mask, 2, 1 );\n* // returns -2.0\n*/\nfunction dmskmin( N, x, strideX, offsetX, mask, strideMask, offsetMask ) {\n\tvar min;\n\tvar ix;\n\tvar im;\n\tvar v;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn NaN;\n\t}\n\tix = offsetX;\n\tim = offsetMask;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( mask[ im ] === 0 ) {\n\t\t\tbreak;\n\t\t}\n\t\tix += strideX;\n\t\tim += strideMask;\n\t}\n\tif ( i === N ) {\n\t\treturn NaN;\n\t}\n\tmin = x[ ix ];\n\tif ( isnan( min ) ) {\n\t\treturn min;\n\t}\n\ti += 1;\n\tfor ( i; i < N; i++ ) {\n\t\tix += strideX;\n\t\tim += strideMask;\n\t\tif ( mask[ im ] ) {\n\t\t\tcontinue;\n\t\t}\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) ) {\n\t\t\treturn v;\n\t\t}\n\t\tif ( v < min || ( v === min && isNegativeZero( v ) ) ) {\n\t\t\tmin = v;\n\t\t}\n\t}\n\treturn min;\n}\n\n\n// EXPORTS //\n\nexport default dmskmin;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport stride2offset from '@stdlib/strided-base-stride2offset';\nimport ndarray from './ndarray.js';\n\n\n// MAIN //\n\n/**\n* Computes the minimum value of a double-precision floating-point strided array according to a mask.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Uint8Array} mask - mask array\n* @param {integer} strideMask - `mask` stride length\n* @returns {number} minimum value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var x = new Float64Array( [ 1.0, -2.0, -4.0, 2.0 ] );\n* var mask = new Uint8Array( [ 0, 0, 1, 0 ] );\n*\n* var v = dmskmin( x.length, x, 1, mask, 1 );\n* // returns -2.0\n*/\nfunction dmskmin( N, x, strideX, mask, strideMask ) {\n\tvar ox = stride2offset( N, strideX );\n\tvar om = stride2offset( N, strideMask );\n\treturn ndarray( N, x, strideX, ox, mask, strideMask, om );\n}\n\n\n// EXPORTS //\n\nexport default dmskmin;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See 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) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport dmskmin from './dmskmin.js';\nimport ndarray from './ndarray.js';\n\n\n// MAIN //\n\nsetReadOnly( dmskmin, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nexport default dmskmin;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","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","isArray","Array","isnan","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","stride2offset","N","stride","x","FLOAT64_NINF","Number","NEGATIVE_INFINITY","isNegativeZero","NINF","dmskmin","strideX","offsetX","mask","strideMask","offsetMask","min","ix","im","v","NaN","ndarray","configurable","enumerable","writable"],"mappings":"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","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,22]}
\ No newline at end of file
diff --git a/dist/index.d.ts b/dist/index.d.ts
deleted file mode 100644
index b6299ec..0000000
--- a/dist/index.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-///
-import dmskmin from '../docs/types/index';
-export = dmskmin;
\ No newline at end of file
diff --git a/dist/index.js b/dist/index.js
deleted file mode 100644
index 9280552..0000000
--- a/dist/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-"use strict";var q=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var c=q(function(F,x){
-var p=require('@stdlib/math-base-assert-is-nan/dist'),g=require('@stdlib/math-base-assert-is-negative-zero/dist');function E(r,e,u,f,t,o,m){var a,v,s,n,i;if(r<=0)return NaN;for(v=f,s=m,i=0;i var x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, -4.0, 2.0 ] );
- > var mask = new {{alias:@stdlib/array/uint8}}( [ 0, 0, 1, 0 ] );
- > {{alias}}( x.length, x, 1, mask, 1 )
- -2.0
-
- // Using `N` and stride parameters:
- > x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0, -4.0 ] );
- > mask = new {{alias:@stdlib/array/uint8}}( [ 0, 0, 0, 0, 0, 0, 1 ] );
- > {{alias}}( 3, x, 2, mask, 2 )
- -2.0
-
- // Using view offsets:
- > var x0 = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, -4.0 ] );
- > var x1 = new {{alias:@stdlib/array/float64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
- > var mask0 = new {{alias:@stdlib/array/uint8}}( [ 0, 0, 0, 0, 0, 0, 1 ] );
- > var mask1 = new {{alias:@stdlib/array/uint8}}( mask0.buffer, mask0.BYTES_PER_ELEMENT*1 );
- > {{alias}}( 3, x1, 2, mask1, 2 )
- -2.0
-
-
-{{alias}}.ndarray( N, x, strideX, offsetX, mask, strideMask, offsetMask )
- Computes the minimum value of a double-precision floating-point strided
- array according to a mask and using alternative indexing semantics.
-
- While typed array views mandate a view offset based on the underlying
- buffer, the `offset` parameter supports indexing semantics based on a
- starting index.
-
- Parameters
- ----------
- N: integer
- Number of indexed elements.
-
- x: Float64Array
- Input array.
-
- strideX: integer
- Stride length for `x`.
-
- offsetX: integer
- Starting index for `x`.
-
- mask: Uint8Array
- Mask array.
-
- strideMask: integer
- Stride length for `mask`.
-
- offsetMask: integer
- Starting index for `mask`.
-
- Returns
- -------
- out: number
- Minimum value.
-
- Examples
- --------
- // Standard Usage:
- > var x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 2.0, -4.0 ] );
- > var mask = new {{alias:@stdlib/array/uint8}}( [ 0, 0, 0, 1 ] );
- > {{alias}}.ndarray( x.length, x, 1, 0, mask, 1, 0 )
- -2.0
-
- // Using offset parameter:
- > x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, -4.0 ] );
- > mask = new {{alias:@stdlib/array/uint8}}( [ 0, 0, 0, 0, 0, 0, 1 ] );
- > {{alias}}.ndarray( 3, x, 2, 1, mask, 2, 1 )
- -2.0
-
- See Also
- --------
-
diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts
deleted file mode 100644
index 22ff028..0000000
--- a/docs/types/index.d.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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
-
-/**
-* Interface describing `dmskmin`.
-*/
-interface Routine {
- /**
- * Computes the minimum value of a double-precision floating-point strided array according to a mask.
- *
- * @param N - number of indexed elements
- * @param x - input array
- * @param strideX - `x` stride length
- * @param mask - mask array
- * @param strideMask - `mask` stride length
- * @returns minimum value
- *
- * @example
- * var Float64Array = require( '@stdlib/array-float64' );
- * var Uint8Array = require( '@stdlib/array-uint8' );
- *
- * var x = new Float64Array( [ 1.0, -2.0, -4.0, 2.0 ] );
- * var mask = new Uint8Array( [ 0, 0, 1, 0 ] );
- *
- * var v = dmskmin( x.length, x, 1, mask, 1 );
- * // returns -2.0
- */
- ( N: number, x: Float64Array, strideX: number, mask: Uint8Array, strideMask: number ): number;
-
- /**
- * Computes the minimum value of a double-precision floating-point strided array according to a mask and using alternative indexing semantics.
- *
- * @param N - number of indexed elements
- * @param x - input array
- * @param strideX - `x` stride length
- * @param offsetX - `x` starting index
- * @param mask - mask array
- * @param strideMask - `mask` stride length
- * @param offsetMask - `mask` starting index
- * @returns minimum value
- *
- * @example
- * var Float64Array = require( '@stdlib/array-float64' );
- * var Uint8Array = require( '@stdlib/array-uint8' );
- *
- * var x = new Float64Array( [ 1.0, -2.0, -4.0, 2.0 ] );
- * var mask = new Uint8Array( [ 0, 0, 1, 0 ] );
- *
- * var v = dmskmin.ndarray( x.length, x, 1, 0, mask, 1, 0 );
- * // returns -2.0
- */
- ndarray( N: number, x: Float64Array, strideX: number, offsetX: number, mask: Uint8Array, strideMask: number, offsetMask: number ): number;
-}
-
-/**
-* Computes the minimum value of a double-precision floating-point strided array according to a mask.
-*
-* @param N - number of indexed elements
-* @param x - input array
-* @param strideX - `x` stride length
-* @param mask - mask array
-* @param strideMask - `mask` stride length
-* @returns minimum value
-*
-* @example
-* var Float64Array = require( '@stdlib/array-float64' );
-* var Uint8Array = require( '@stdlib/array-uint8' );
-*
-* var x = new Float64Array( [ 1.0, -2.0, -4.0, 2.0 ] );
-* var mask = new Uint8Array( [ 0, 0, 1, 0 ] );
-*
-* var v = dmskmin( x.length, x, 1, mask, 1 );
-* // returns -2.0
-*
-* @example
-* var Float64Array = require( '@stdlib/array-float64' );
-* var Uint8Array = require( '@stdlib/array-uint8' );
-*
-* var x = new Float64Array( [ 1.0, -2.0, -4.0, 2.0 ] );
-* var mask = new Uint8Array( [ 0, 0, 1, 0 ] );
-*
-* var v = dmskmin.ndarray( x.length, x, 1, 0, mask, 1, 0 );
-* // returns -2.0
-*/
-declare var dmskmin: Routine;
-
-
-// EXPORTS //
-
-export = dmskmin;
diff --git a/docs/types/test.ts b/docs/types/test.ts
deleted file mode 100644
index 3d18ac8..0000000
--- a/docs/types/test.ts
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 dmskmin = require( './index' );
-
-
-// TESTS //
-
-// The function returns a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin( x.length, x, 1, mask, 1 ); // $ExpectType number
-}
-
-// The compiler throws an error if the function is provided a first argument which is not a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin( '10', x, 1, mask, 1 ); // $ExpectError
- dmskmin( true, x, 1, mask, 1 ); // $ExpectError
- dmskmin( false, x, 1, mask, 1 ); // $ExpectError
- dmskmin( null, x, 1, mask, 1 ); // $ExpectError
- dmskmin( undefined, x, 1, mask, 1 ); // $ExpectError
- dmskmin( [], x, 1, mask, 1 ); // $ExpectError
- dmskmin( {}, x, 1, mask, 1 ); // $ExpectError
- dmskmin( ( x: number ): number => x, x, 1, mask, 1 ); // $ExpectError
-}
-
-// The compiler throws an error if the function is provided a second argument which is not a Float64Array...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin( x.length, 10, 1, mask, 1 ); // $ExpectError
- dmskmin( x.length, '10', 1, mask, 1 ); // $ExpectError
- dmskmin( x.length, true, 1, mask, 1 ); // $ExpectError
- dmskmin( x.length, false, 1, mask, 1 ); // $ExpectError
- dmskmin( x.length, null, 1, mask, 1 ); // $ExpectError
- dmskmin( x.length, undefined, 1, mask, 1 ); // $ExpectError
- dmskmin( x.length, [], 1, mask, 1 ); // $ExpectError
- dmskmin( x.length, {}, 1, mask, 1 ); // $ExpectError
- dmskmin( x.length, ( x: number ): number => x, 1, mask, 1 ); // $ExpectError
-}
-
-// The compiler throws an error if the function is provided a third argument which is not a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin( x.length, x, '10', mask, 1 ); // $ExpectError
- dmskmin( x.length, x, true, mask, 1 ); // $ExpectError
- dmskmin( x.length, x, false, mask, 1 ); // $ExpectError
- dmskmin( x.length, x, null, mask, 1 ); // $ExpectError
- dmskmin( x.length, x, undefined, mask, 1 ); // $ExpectError
- dmskmin( x.length, x, [], mask, 1 ); // $ExpectError
- dmskmin( x.length, x, {}, mask, 1 ); // $ExpectError
- dmskmin( x.length, x, ( x: number ): number => x, mask, 1 ); // $ExpectError
-}
-
-// The compiler throws an error if the function is provided a fourth argument which is not a Uint8Array...
-{
- const x = new Float64Array( 10 );
-
- dmskmin( x.length, x, 1, 10, 1 ); // $ExpectError
- dmskmin( x.length, x, 1, '10', 1 ); // $ExpectError
- dmskmin( x.length, x, 1, true, 1 ); // $ExpectError
- dmskmin( x.length, x, 1, false, 1 ); // $ExpectError
- dmskmin( x.length, x, 1, null, 1 ); // $ExpectError
- dmskmin( x.length, x, 1, undefined, 1 ); // $ExpectError
- dmskmin( x.length, x, 1, [], 1 ); // $ExpectError
- dmskmin( x.length, x, 1, {}, 1 ); // $ExpectError
- dmskmin( x.length, x, 1, ( x: number ): number => x, 1 ); // $ExpectError
-}
-
-// The compiler throws an error if the function is provided a fifth argument which is not a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin( x.length, x, 1, mask, '10' ); // $ExpectError
- dmskmin( x.length, x, 1, mask, true ); // $ExpectError
- dmskmin( x.length, x, 1, mask, false ); // $ExpectError
- dmskmin( x.length, x, 1, mask, null ); // $ExpectError
- dmskmin( x.length, x, 1, mask, undefined ); // $ExpectError
- dmskmin( x.length, x, 1, mask, [] ); // $ExpectError
- dmskmin( x.length, x, 1, mask, {} ); // $ExpectError
- dmskmin( x.length, x, 1, mask, ( x: number ): number => x ); // $ExpectError
-}
-
-// The compiler throws an error if the function is provided an unsupported number of arguments...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin(); // $ExpectError
- dmskmin( x.length ); // $ExpectError
- dmskmin( x.length, x, 1 ); // $ExpectError
- dmskmin( x.length, x, 1, mask ); // $ExpectError
- dmskmin( x.length, x, 1, mask, 1, 10 ); // $ExpectError
-}
-
-// Attached to main export is an `ndarray` method which returns a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, 0 ); // $ExpectType number
-}
-
-// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin.ndarray( '10', x, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( true, x, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( false, x, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( null, x, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( undefined, x, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( [], x, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( {}, x, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( ( x: number ): number => x, x, 1, 0, mask, 1, 0 ); // $ExpectError
-}
-
-// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Float64Array...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin.ndarray( x.length, 10, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, '10', 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, true, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, false, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, null, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, undefined, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, [], 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, {}, 1, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, ( x: number ): number => x, 1, 0, mask, 1, 0 ); // $ExpectError
-}
-
-// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin.ndarray( x.length, x, '10', 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, true, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, false, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, null, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, undefined, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, [], 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, {}, 0, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, ( x: number ): number => x, 0, mask, 1, 0 ); // $ExpectError
-}
-
-// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin.ndarray( x.length, x, 1, '10', mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, true, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, false, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, null, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, undefined, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, [], mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, {}, mask, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, ( x: number ): number => x, mask, 1, 0 ); // $ExpectError
-}
-
-// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Uint8Array...
-{
- const x = new Float64Array( 10 );
-
- dmskmin.ndarray( x.length, 1, 0, 10, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, 1, 0, '10', 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, 1, 0, true, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, 1, 0, false, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, 1, 0, null, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, 1, 0, undefined, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, 1, 0, [], 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, 1, 0, {}, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, 1, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError
-}
-
-// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin.ndarray( x.length, x, 1, 0, mask, '10', 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, true, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, false, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, null, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, undefined, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, [], 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, {}, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, ( x: number ): number => x, 0 ); // $ExpectError
-}
-
-// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, '10' ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, true ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, false ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, null ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, undefined ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, [] ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, {} ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, ( x: number ): number => x ); // $ExpectError
-}
-
-// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
-{
- const x = new Float64Array( 10 );
- const mask = new Uint8Array( 10 );
-
- dmskmin.ndarray(); // $ExpectError
- dmskmin.ndarray( x.length ); // $ExpectError
- dmskmin.ndarray( x.length, x ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1 ); // $ExpectError
- dmskmin.ndarray( x.length, x, 1, 0, mask, 1, 0, 10 ); // $ExpectError
-}
diff --git a/examples/c/Makefile b/examples/c/Makefile
deleted file mode 100644
index ff5293d..0000000
--- a/examples/c/Makefile
+++ /dev/null
@@ -1,146 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2020 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.
-#/
-
-# VARIABLES #
-
-ifndef VERBOSE
- QUIET := @
-else
- QUIET :=
-endif
-
-# Determine the OS ([1][1], [2][2]).
-#
-# [1]: https://en.wikipedia.org/wiki/Uname#Examples
-# [2]: http://stackoverflow.com/a/27776822/2225624
-OS ?= $(shell uname)
-ifneq (, $(findstring MINGW,$(OS)))
- OS := WINNT
-else
-ifneq (, $(findstring MSYS,$(OS)))
- OS := WINNT
-else
-ifneq (, $(findstring CYGWIN,$(OS)))
- OS := WINNT
-else
-ifneq (, $(findstring Windows_NT,$(OS)))
- OS := WINNT
-endif
-endif
-endif
-endif
-
-# Define the program used for compiling C source files:
-ifdef C_COMPILER
- CC := $(C_COMPILER)
-else
- CC := gcc
-endif
-
-# Define the command-line options when compiling C files:
-CFLAGS ?= \
- -std=c99 \
- -O3 \
- -Wall \
- -pedantic
-
-# Determine whether to generate position independent code ([1][1], [2][2]).
-#
-# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
-# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
-ifeq ($(OS), WINNT)
- fPIC ?=
-else
- fPIC ?= -fPIC
-endif
-
-# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
-INCLUDE ?=
-
-# List of source files:
-SOURCE_FILES ?=
-
-# List of libraries (e.g., `-lopenblas -lpthread`):
-LIBRARIES ?=
-
-# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
-LIBPATH ?=
-
-# List of C targets:
-c_targets := example.out
-
-
-# RULES #
-
-#/
-# Compiles source files.
-#
-# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
-# @param {string} [CFLAGS] - C compiler options
-# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
-# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
-# @param {string} [SOURCE_FILES] - list of source files
-# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
-# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
-#
-# @example
-# make
-#
-# @example
-# make all
-#/
-all: $(c_targets)
-
-.PHONY: all
-
-#/
-# Compiles C source files.
-#
-# @private
-# @param {string} CC - C compiler (e.g., `gcc`)
-# @param {string} CFLAGS - C compiler options
-# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
-# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
-# @param {string} SOURCE_FILES - list of source files
-# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
-# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
-#/
-$(c_targets): %.out: %.c
- $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
-
-#/
-# Runs compiled examples.
-#
-# @example
-# make run
-#/
-run: $(c_targets)
- $(QUIET) ./$<
-
-.PHONY: run
-
-#/
-# Removes generated files.
-#
-# @example
-# make clean
-#/
-clean:
- $(QUIET) -rm -f *.o *.out
-
-.PHONY: clean
diff --git a/examples/c/example.c b/examples/c/example.c
deleted file mode 100644
index 9fa5caf..0000000
--- a/examples/c/example.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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.
-*/
-
-#include "stdlib/stats/base/dmskmin.h"
-#include
-#include
-
-int main( void ) {
- // Create a strided array:
- const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 };
-
- // Create a mask array:
- const uint8_t mask[] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 };
-
- // Specify the number of elements:
- const int N = 5;
-
- // Specify the stride lengths:
- const int strideX = 2;
- const int strideMask = 2;
-
- // Compute the minimum value:
- double v = stdlib_strided_dmskmin( N, x, strideX, mask, strideMask );
-
- // Print the result:
- printf( "min: %lf\n", v );
-}
diff --git a/examples/index.js b/examples/index.js
deleted file mode 100644
index 647ae1b..0000000
--- a/examples/index.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 uniform = require( '@stdlib/random-array-uniform' );
-var bernoulli = require( '@stdlib/random-array-bernoulli' );
-var dmskmin = require( './../lib' );
-
-var uniformOptions = {
- 'dtype': 'float64'
-};
-var bernoulliOptions = {
- 'dtype': 'uint8'
-};
-
-var x = uniform( 10, -50.0, 50.0, uniformOptions );
-var mask = bernoulli( x.length, 0.2, bernoulliOptions );
-console.log( x );
-console.log( mask );
-
-var v = dmskmin( x.length, x, 1, mask, 1 );
-console.log( v );
diff --git a/include.gypi b/include.gypi
deleted file mode 100644
index 9212937..0000000
--- a/include.gypi
+++ /dev/null
@@ -1,53 +0,0 @@
-# @license Apache-2.0
-#
-# Copyright (c) 2020 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.
-
-# A GYP include file for building a Node.js native add-on.
-#
-# Main documentation:
-#
-# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
-# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
-{
- # Define variables to be used throughout the configuration for all targets:
- 'variables': {
- # Source directory:
- 'src_dir': './src',
-
- # Include directories:
- 'include_dirs': [
- '
-
-/*
-* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
-*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
-* Computes the minimum value of a double-precision floating-point strided array according to a mask.
-*/
-double API_SUFFIX(stdlib_strided_dmskmin)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const uint8_t *Mask, const CBLAS_INT strideMask );
-
-/**
-* Computes the minimum value of a double-precision floating-point strided array according to a mask and using alternative indexing semantics.
-*/
-double API_SUFFIX(stdlib_strided_dmskmin_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const uint8_t *Mask, const CBLAS_INT strideMask, const CBLAS_INT offsetMask );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // !STDLIB_STATS_BASE_DMSKMIN_H
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..ab271d3
--- /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
+var e,r;e=this,r=function(){"use strict";var e="function"==typeof Object.defineProperty?Object.defineProperty:null,r=Object.defineProperty;function i(e){return"number"==typeof e}function t(e){var r,i="";for(r=0;r0&&(r-=1),t=a.toExponential(r)):t=a.toPrecision(e.precision),e.alternate||(t=u.call(t,v,"$1e"),t=u.call(t,b,"e"),t=u.call(t,w,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return t=u.call(t,f,"e+0$1"),t=u.call(t,g,"e-0$1"),e.alternate&&(t=u.call(t,d,"$1."),t=u.call(t,h,"$1.e")),a>=0&&e.sign&&(t=e.sign+t),t=e.specifier===l.call(e.specifier)?l.call(t):p.call(t)}function y(e){var r,i="";for(r=0;r127)throw new Error("invalid character code. Value: "+t.arg);t.arg=k(o)?String(t.arg):_(o)}break;case"e":case"E":case"f":case"F":case"g":case"G":r||(t.precision=6),t.arg=m(t);break;default:throw new Error("invalid specifier: "+t.specifier)}t.maxWidth>=0&&t.arg.length>t.maxWidth&&(t.arg=t.arg.substring(0,t.maxWidth)),t.padZeros?t.arg=a(t.arg,t.width||t.precision,t.padRight):t.width&&(t.arg=(f=t.arg,g=t.width,d=t.padRight,h=void 0,(h=g-f.length)<0?f:f=d?f+y(h):y(h)+f)),c+=t.arg||"",p+=1}return c}var I=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function T(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function V(e){var r,i,t,a;for(i=[],a=0,t=I.exec(e);t;)(r=e.slice(a,I.lastIndex-t[0].length)).length&&i.push(r),i.push(T(t)),a=I.lastIndex,t=I.exec(e);return(r=e.slice(a)).length&&i.push(r),i}function j(e){var r,i;if("string"!=typeof e)throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=[V(e)],i=1;i0?0:(1-e)*r}function Z(e){return e!=e}var W=Number.NEGATIVE_INFINITY;function L(e){return 0===e&&1/e===W}function U(e,r,i,t,a,n,o){var s,c,p,l,u;if(e<=0)return NaN;for(c=t,p=o,u=0;u 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) 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 the index offset which specifies the location of the first indexed value in a strided array.\n*\n* @param {NonNegativeInteger} N - number of indexed elements\n* @param {integer} stride - index increment\n* @returns {NonNegativeInteger} offset - offset\n*\n* @example\n* var offset = stride2offset( 10, -10 );\n* // returns 90\n*/\nfunction stride2offset( N, stride ) {\n\tif ( stride > 0 ) {\n\t\treturn 0;\n\t}\n\treturn ( 1 - N ) * stride;\n}\n\n\n// EXPORTS //\n\nexport default stride2offset;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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// 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/**\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// MODULES //\n\nimport NINF from '@stdlib/constants-float64-ninf';\n\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is negative zero.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is negative zero\n*\n* @example\n* var bool = isNegativeZero( -0.0 );\n* // returns true\n*\n* @example\n* var bool = isNegativeZero( 0.0 );\n* // returns false\n*/\nfunction isNegativeZero( x ) {\n\treturn (x === 0.0 && 1.0/x === NINF);\n}\n\n\n// EXPORTS //\n\nexport default isNegativeZero;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport isnan from '@stdlib/math-base-assert-is-nan';\nimport isNegativeZero from '@stdlib/math-base-assert-is-negative-zero';\n\n\n// MAIN //\n\n/**\n* Computes the minimum value of a double-precision floating-point strided array according to a mask.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Uint8Array} mask - mask array\n* @param {integer} strideMask - `mask` stride length\n* @param {NonNegativeInteger} offsetMask - `mask` starting index\n* @returns {number} minimum value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import Uint8Array from '@stdlib/array-uint8';\n* import floor from '@stdlib/math-base-special-floor';\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, -5.0, -6.0 ] );\n* var mask = new Uint8Array( [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 ] );\n*\n* var v = dmskmin( 5, x, 2, 1, mask, 2, 1 );\n* // returns -2.0\n*/\nfunction dmskmin( N, x, strideX, offsetX, mask, strideMask, offsetMask ) {\n\tvar min;\n\tvar ix;\n\tvar im;\n\tvar v;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn NaN;\n\t}\n\tix = offsetX;\n\tim = offsetMask;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( mask[ im ] === 0 ) {\n\t\t\tbreak;\n\t\t}\n\t\tix += strideX;\n\t\tim += strideMask;\n\t}\n\tif ( i === N ) {\n\t\treturn NaN;\n\t}\n\tmin = x[ ix ];\n\tif ( isnan( min ) ) {\n\t\treturn min;\n\t}\n\ti += 1;\n\tfor ( i; i < N; i++ ) {\n\t\tix += strideX;\n\t\tim += strideMask;\n\t\tif ( mask[ im ] ) {\n\t\t\tcontinue;\n\t\t}\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) ) {\n\t\t\treturn v;\n\t\t}\n\t\tif ( v < min || ( v === min && isNegativeZero( v ) ) ) {\n\t\t\tmin = v;\n\t\t}\n\t}\n\treturn min;\n}\n\n\n// EXPORTS //\n\nexport default dmskmin;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport stride2offset from '@stdlib/strided-base-stride2offset';\nimport ndarray from './ndarray.js';\n\n\n// MAIN //\n\n/**\n* Computes the minimum value of a double-precision floating-point strided array according to a mask.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Uint8Array} mask - mask array\n* @param {integer} strideMask - `mask` stride length\n* @returns {number} minimum value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var x = new Float64Array( [ 1.0, -2.0, -4.0, 2.0 ] );\n* var mask = new Uint8Array( [ 0, 0, 1, 0 ] );\n*\n* var v = dmskmin( x.length, x, 1, mask, 1 );\n* // returns -2.0\n*/\nfunction dmskmin( N, x, strideX, mask, strideMask ) {\n\tvar ox = stride2offset( N, strideX );\n\tvar om = stride2offset( N, strideMask );\n\treturn ndarray( N, x, strideX, ox, mask, strideMask, om );\n}\n\n\n// EXPORTS //\n\nexport default dmskmin;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See 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) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport dmskmin from './dmskmin.js';\nimport ndarray from './ndarray.js';\n\n\n// MAIN //\n\nsetReadOnly( dmskmin, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nexport default dmskmin;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","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","isArray","Array","isnan","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","stride2offset","N","stride","x","FLOAT64_NINF","Number","NEGATIVE_INFINITY","isNegativeZero","NINF","dmskmin","strideX","offsetX","mask","strideMask","offsetMask","min","ix","im","v","NaN","ndarray","configurable","enumerable","writable"],"mappings":"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","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,22]}
\ No newline at end of file
diff --git a/lib/dmskmin.js b/lib/dmskmin.js
deleted file mode 100644
index f00194b..0000000
--- a/lib/dmskmin.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 stride2offset = require( '@stdlib/strided-base-stride2offset' );
-var ndarray = require( './ndarray.js' );
-
-
-// MAIN //
-
-/**
-* Computes the minimum value of a double-precision floating-point strided array according to a mask.
-*
-* @param {PositiveInteger} N - number of indexed elements
-* @param {Float64Array} x - input array
-* @param {integer} strideX - `x` stride length
-* @param {Uint8Array} mask - mask array
-* @param {integer} strideMask - `mask` stride length
-* @returns {number} minimum value
-*
-* @example
-* var Float64Array = require( '@stdlib/array-float64' );
-* var Uint8Array = require( '@stdlib/array-uint8' );
-*
-* var x = new Float64Array( [ 1.0, -2.0, -4.0, 2.0 ] );
-* var mask = new Uint8Array( [ 0, 0, 1, 0 ] );
-*
-* var v = dmskmin( x.length, x, 1, mask, 1 );
-* // returns -2.0
-*/
-function dmskmin( N, x, strideX, mask, strideMask ) {
- var ox = stride2offset( N, strideX );
- var om = stride2offset( N, strideMask );
- return ndarray( N, x, strideX, ox, mask, strideMask, om );
-}
-
-
-// EXPORTS //
-
-module.exports = dmskmin;
diff --git a/lib/dmskmin.native.js b/lib/dmskmin.native.js
deleted file mode 100644
index 48e7f19..0000000
--- a/lib/dmskmin.native.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 addon = require( './../src/addon.node' );
-
-
-// MAIN //
-
-/**
-* Computes the minimum value of a double-precision floating-point strided array according to a mask.
-*
-* @param {PositiveInteger} N - number of indexed elements
-* @param {Float64Array} x - input array
-* @param {integer} strideX - `x` stride length
-* @param {Uint8Array} mask - mask array
-* @param {integer} strideMask - `mask` stride length
-* @returns {number} minimum value
-*
-* @example
-* var Float64Array = require( '@stdlib/array-float64' );
-* var Uint8Array = require( '@stdlib/array-uint8' );
-*
-* var x = new Float64Array( [ 1.0, -2.0, -4.0, 2.0 ] );
-* var mask = new Uint8Array( [ 0, 0, 1, 0 ] );
-*
-* var v = dmskmin( x.length, x, 1, mask, 1 );
-* // returns -2.0
-*/
-function dmskmin( N, x, strideX, mask, strideMask ) {
- return addon( N, x, strideX, mask, strideMask );
-}
-
-
-// EXPORTS //
-
-module.exports = dmskmin;
diff --git a/lib/index.js b/lib/index.js
deleted file mode 100644
index fa21325..0000000
--- a/lib/index.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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';
-
-/**
-* Compute the minimum value of a double-precision floating-point strided array according to a mask.
-*
-* @module @stdlib/stats-base-dmskmin
-*
-* @example
-* var Float64Array = require( '@stdlib/array-float64' );
-* var Uint8Array = require( '@stdlib/array-uint8' );
-* var dmskmin = require( '@stdlib/stats-base-dmskmin' );
-*
-* var x = new Float64Array( [ 1.0, -2.0, -4.0, 2.0 ] );
-* var mask = new Uint8Array( [ 0, 0, 1, 0 ] );
-*
-* var v = dmskmin( x.length, x, 1 );
-* // returns -2.0
-*
-* @example
-* var Float64Array = require( '@stdlib/array-float64' );
-* var Uint8Array = require( '@stdlib/array-uint8' );
-* var dmskmin = require( '@stdlib/stats-base-dmskmin' );
-*
-* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, -5.0, -6.0 ] );
-* var mask = new Uint8Array( [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 ] );
-*
-* var v = dmskmin.ndarray( 5, x, 2, 1, mask, 2, 1 );
-* // returns -2.0
-*/
-
-// MODULES //
-
-var join = require( 'path' ).join;
-var tryRequire = require( '@stdlib/utils-try-require' );
-var isError = require( '@stdlib/assert-is-error' );
-var main = require( './main.js' );
-
-
-// MAIN //
-
-var dmskmin;
-var tmp = tryRequire( join( __dirname, './native.js' ) );
-if ( isError( tmp ) ) {
- dmskmin = main;
-} else {
- dmskmin = tmp;
-}
-
-
-// EXPORTS //
-
-module.exports = dmskmin;
-
-// exports: { "ndarray": "dmskmin.ndarray" }
diff --git a/lib/main.js b/lib/main.js
deleted file mode 100644
index a477b65..0000000
--- a/lib/main.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );
-var dmskmin = require( './dmskmin.js' );
-var ndarray = require( './ndarray.js' );
-
-
-// MAIN //
-
-setReadOnly( dmskmin, 'ndarray', ndarray );
-
-
-// EXPORTS //
-
-module.exports = dmskmin;
diff --git a/lib/native.js b/lib/native.js
deleted file mode 100644
index dc91f26..0000000
--- a/lib/native.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );
-var dmskmin = require( './dmskmin.native.js' );
-var ndarray = require( './ndarray.native.js' );
-
-
-// MAIN //
-
-setReadOnly( dmskmin, 'ndarray', ndarray );
-
-
-// EXPORTS //
-
-module.exports = dmskmin;
diff --git a/lib/ndarray.js b/lib/ndarray.js
deleted file mode 100644
index 4f48e70..0000000
--- a/lib/ndarray.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 isnan = require( '@stdlib/math-base-assert-is-nan' );
-var isNegativeZero = require( '@stdlib/math-base-assert-is-negative-zero' );
-
-
-// MAIN //
-
-/**
-* Computes the minimum value of a double-precision floating-point strided array according to a mask.
-*
-* @param {PositiveInteger} N - number of indexed elements
-* @param {Float64Array} x - input array
-* @param {integer} strideX - `x` stride length
-* @param {NonNegativeInteger} offsetX - `x` starting index
-* @param {Uint8Array} mask - mask array
-* @param {integer} strideMask - `mask` stride length
-* @param {NonNegativeInteger} offsetMask - `mask` starting index
-* @returns {number} minimum value
-*
-* @example
-* var Float64Array = require( '@stdlib/array-float64' );
-* var Uint8Array = require( '@stdlib/array-uint8' );
-* var floor = require( '@stdlib/math-base-special-floor' );
-*
-* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, -5.0, -6.0 ] );
-* var mask = new Uint8Array( [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 ] );
-*
-* var v = dmskmin( 5, x, 2, 1, mask, 2, 1 );
-* // returns -2.0
-*/
-function dmskmin( N, x, strideX, offsetX, mask, strideMask, offsetMask ) {
- var min;
- var ix;
- var im;
- var v;
- var i;
-
- if ( N <= 0 ) {
- return NaN;
- }
- ix = offsetX;
- im = offsetMask;
- for ( i = 0; i < N; i++ ) {
- if ( mask[ im ] === 0 ) {
- break;
- }
- ix += strideX;
- im += strideMask;
- }
- if ( i === N ) {
- return NaN;
- }
- min = x[ ix ];
- if ( isnan( min ) ) {
- return min;
- }
- i += 1;
- for ( i; i < N; i++ ) {
- ix += strideX;
- im += strideMask;
- if ( mask[ im ] ) {
- continue;
- }
- v = x[ ix ];
- if ( isnan( v ) ) {
- return v;
- }
- if ( v < min || ( v === min && isNegativeZero( v ) ) ) {
- min = v;
- }
- }
- return min;
-}
-
-
-// EXPORTS //
-
-module.exports = dmskmin;
diff --git a/lib/ndarray.native.js b/lib/ndarray.native.js
deleted file mode 100644
index a283d80..0000000
--- a/lib/ndarray.native.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 addon = require( './../src/addon.node' );
-
-
-// MAIN //
-
-/**
-* Computes the minimum value of a double-precision floating-point strided array according to a mask.
-*
-* @param {PositiveInteger} N - number of indexed elements
-* @param {Float64Array} x - input array
-* @param {integer} strideX - `x` stride length
-* @param {NonNegativeInteger} offsetX - `x` starting index
-* @param {Uint8Array} mask - mask array
-* @param {integer} strideMask - `mask` stride length
-* @param {NonNegativeInteger} offsetMask - `mask` starting index
-* @returns {number} minimum value
-*
-* @example
-* var Float64Array = require( '@stdlib/array-float64' );
-* var Uint8Array = require( '@stdlib/array-uint8' );
-*
-* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, -5.0, -6.0 ] );
-* var mask = new Uint8Array( [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 ] );
-*
-* var v = dmskmin( 5, x, 2, 1, mask, 2, 1 );
-* // returns -2.0
-*/
-function dmskmin( N, x, strideX, offsetX, mask, strideMask, offsetMask ) {
- return addon.ndarray( N, x, strideX, offsetX, mask, strideMask, offsetMask ); // eslint-disable-line max-len
-}
-
-
-// EXPORTS //
-
-module.exports = dmskmin;
diff --git a/manifest.json b/manifest.json
deleted file mode 100644
index 6599d97..0000000
--- a/manifest.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "options": {
- "task": "build",
- "wasm": false
- },
- "fields": [
- {
- "field": "src",
- "resolve": true,
- "relative": true
- },
- {
- "field": "include",
- "resolve": true,
- "relative": true
- },
- {
- "field": "libraries",
- "resolve": false,
- "relative": false
- },
- {
- "field": "libpath",
- "resolve": true,
- "relative": false
- }
- ],
- "confs": [
- {
- "task": "build",
- "wasm": false,
- "src": [
- "./src/main.c"
- ],
- "include": [
- "./include"
- ],
- "libraries": [],
- "libpath": [],
- "dependencies": [
- "@stdlib/blas-base-shared",
- "@stdlib/strided-base-stride2offset",
- "@stdlib/math-base-assert-is-negative-zero",
- "@stdlib/math-base-assert-is-nan",
- "@stdlib/napi-export",
- "@stdlib/napi-argv",
- "@stdlib/napi-argv-int64",
- "@stdlib/napi-argv-strided-float64array",
- "@stdlib/napi-argv-strided-uint8array",
- "@stdlib/napi-create-double"
- ]
- },
- {
- "task": "benchmark",
- "wasm": false,
- "src": [
- "./src/main.c"
- ],
- "include": [
- "./include"
- ],
- "libraries": [],
- "libpath": [],
- "dependencies": [
- "@stdlib/blas-base-shared",
- "@stdlib/strided-base-stride2offset",
- "@stdlib/math-base-assert-is-nan",
- "@stdlib/math-base-assert-is-negative-zero"
- ]
- },
- {
- "task": "examples",
- "wasm": false,
- "src": [
- "./src/main.c"
- ],
- "include": [
- "./include"
- ],
- "libraries": [],
- "libpath": [],
- "dependencies": [
- "@stdlib/blas-base-shared",
- "@stdlib/strided-base-stride2offset",
- "@stdlib/math-base-assert-is-nan",
- "@stdlib/math-base-assert-is-negative-zero"
- ]
- },
- {
- "task": "",
- "wasm": true,
- "src": [
- "./src/main.c"
- ],
- "include": [
- "./include"
- ],
- "libraries": [],
- "libpath": [],
- "dependencies": [
- "@stdlib/blas-base-shared",
- "@stdlib/strided-base-stride2offset",
- "@stdlib/math-base-assert-is-nan",
- "@stdlib/math-base-assert-is-negative-zero"
- ]
- }
- ]
-}
diff --git a/package.json b/package.json
index ac3b8ae..da40233 100644
--- a/package.json
+++ b/package.json
@@ -3,35 +3,7 @@
"version": "0.2.2",
"description": "Calculate the minimum value of a double-precision floating-point strided array according to a mask.",
"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",
- "browser": "./lib/main.js",
- "gypfile": false,
- "directories": {
- "benchmark": "./benchmark",
- "doc": "./docs",
- "example": "./examples",
- "include": "./include",
- "lib": "./lib",
- "src": "./src",
- "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",
@@ -40,50 +12,6 @@
"bugs": {
"url": "https://github.com/stdlib-js/stdlib/issues"
},
- "dependencies": {
- "@stdlib/assert-is-error": "^0.2.2",
- "@stdlib/blas-base-shared": "^0.1.0",
- "@stdlib/math-base-assert-is-nan": "^0.2.2",
- "@stdlib/math-base-assert-is-negative-zero": "^0.2.2",
- "@stdlib/napi-argv": "^0.2.2",
- "@stdlib/napi-argv-int64": "^0.2.2",
- "@stdlib/napi-argv-strided-float64array": "^0.2.2",
- "@stdlib/napi-argv-strided-uint8array": "^0.2.2",
- "@stdlib/napi-create-double": "^0.0.2",
- "@stdlib/napi-export": "^0.2.2",
- "@stdlib/strided-base-stride2offset": "^0.1.0",
- "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2",
- "@stdlib/utils-library-manifest": "^0.2.2",
- "@stdlib/utils-try-require": "^0.2.2"
- },
- "devDependencies": {
- "@stdlib/array-float64": "^0.2.2",
- "@stdlib/array-uint8": "^0.2.2",
- "@stdlib/assert-is-browser": "^0.2.2",
- "@stdlib/math-base-special-pow": "^0.3.0",
- "@stdlib/random-array-bernoulli": "^0.2.1",
- "@stdlib/random-array-uniform": "^0.2.1",
- "proxyquire": "^2.0.0",
- "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",
"stdmath",
@@ -108,7 +36,6 @@
"double",
"float64array"
],
- "__stdlib__": {},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/stdlib"
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index dd720a3..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-#/
-# @license Apache-2.0
-#
-# Copyright (c) 2020 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.
-#/
-
-# VARIABLES #
-
-ifndef VERBOSE
- QUIET := @
-else
- QUIET :=
-endif
-
-# Determine the OS ([1][1], [2][2]).
-#
-# [1]: https://en.wikipedia.org/wiki/Uname#Examples
-# [2]: http://stackoverflow.com/a/27776822/2225624
-OS ?= $(shell uname)
-ifneq (, $(findstring MINGW,$(OS)))
- OS := WINNT
-else
-ifneq (, $(findstring MSYS,$(OS)))
- OS := WINNT
-else
-ifneq (, $(findstring CYGWIN,$(OS)))
- OS := WINNT
-else
-ifneq (, $(findstring Windows_NT,$(OS)))
- OS := WINNT
-endif
-endif
-endif
-endif
-
-
-# RULES #
-
-#/
-# Removes generated files for building an add-on.
-#
-# @example
-# make clean-addon
-#/
-clean-addon:
- $(QUIET) -rm -f *.o *.node
-
-.PHONY: clean-addon
-
-#/
-# Removes generated files.
-#
-# @example
-# make clean
-#/
-clean: clean-addon
-
-.PHONY: clean
diff --git a/src/addon.c b/src/addon.c
deleted file mode 100644
index db97644..0000000
--- a/src/addon.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2025 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.
-*/
-
-#include "stdlib/stats/base/dmskmin.h"
-#include "stdlib/blas/base/shared.h"
-#include "stdlib/napi/export.h"
-#include "stdlib/napi/argv.h"
-#include "stdlib/napi/argv_int64.h"
-#include "stdlib/napi/argv_strided_float64array.h"
-#include "stdlib/napi/argv_strided_uint8array.h"
-#include "stdlib/napi/create_double.h"
-#include
-
-/**
-* Receives JavaScript callback invocation data.
-*
-* @param env environment under which the function is invoked
-* @param info callback data
-* @return Node-API value
-*/
-static napi_value addon( napi_env env, napi_callback_info info ) {
- STDLIB_NAPI_ARGV( env, info, argv, argc, 5 );
- STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
- STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
- STDLIB_NAPI_ARGV_INT64( env, strideMask, argv, 4 );
- STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
- STDLIB_NAPI_ARGV_STRIDED_UINT8ARRAY( env, Mask, N, strideMask, argv, 3 );
- STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_dmskmin)( N, X, strideX, Mask, strideMask ), v );
- return v;
-}
-
-/**
-* Receives JavaScript callback invocation data.
-*
-* @param env environment under which the function is invoked
-* @param info callback data
-* @return Node-API value
-*/
-static napi_value addon_method( napi_env env, napi_callback_info info ) {
- STDLIB_NAPI_ARGV( env, info, argv, argc, 7 );
- STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
- STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
- STDLIB_NAPI_ARGV_INT64( env, strideMask, argv, 5 );
- STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 3 );
- STDLIB_NAPI_ARGV_INT64( env, offsetMask, argv, 6 );
- STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
- STDLIB_NAPI_ARGV_STRIDED_UINT8ARRAY( env, Mask, N, strideMask, argv, 4 );
- STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_dmskmin_ndarray)( N, X, strideX, offsetX, Mask, strideMask, offsetMask ), v );
- return v;
-}
-
-STDLIB_NAPI_MODULE_EXPORT_FCN_WITH_METHOD( addon, "ndarray", addon_method )
diff --git a/src/main.c b/src/main.c
deleted file mode 100644
index 5d1dd57..0000000
--- a/src/main.c
+++ /dev/null
@@ -1,96 +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.
-*/
-
-#include "stdlib/stats/base/dmskmin.h"
-#include "stdlib/math/base/assert/is_nan.h"
-#include "stdlib/math/base/assert/is_negative_zero.h"
-#include "stdlib/blas/base/shared.h"
-#include "stdlib/strided/base/stride2offset.h"
-#include
-
-/**
-* Computes the minimum value of a double-precision floating-point strided array according to a mask.
-*
-* @param N number of indexed elements
-* @param X input array
-* @param strideX X stride length
-* @param Mask mask array
-* @param strideMask Mask stride length
-* @return output value
-*/
-double API_SUFFIX(stdlib_strided_dmskmin)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const uint8_t *Mask, const CBLAS_INT strideMask ) {
- const CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX );
- const CBLAS_INT om = stdlib_strided_stride2offset( N, strideMask );
- return API_SUFFIX(stdlib_strided_dmskmin_ndarray)( N, X, strideX, ox, Mask, strideMask, om );
-}
-
-/**
-* Computes the minimum value of a double-precision floating-point strided array according to a mask and using alternative indexing semantics.
-*
-* @param N number of indexed elements
-* @param X input array
-* @param strideX X stride length
-* @param offsetX starting index for X
-* @param Mask mask array
-* @param strideMask Mask stride length
-* @param offsetMask starting index for Mask
-* @return output value
-*/
-double API_SUFFIX(stdlib_strided_dmskmin_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const uint8_t *Mask, const CBLAS_INT strideMask, const CBLAS_INT offsetMask ) {
- CBLAS_INT ix;
- CBLAS_INT im;
- CBLAS_INT i;
- double min;
- double v;
-
- if ( N <= 0 ) {
- return 0.0 / 0.0; // NaN
- }
- ix = offsetX;
- im = offsetMask;
- for ( i = 0; i < N; i++ ) {
- if ( Mask[ im ] == 0 ) {
- break;
- }
- ix += strideX;
- im += strideMask;
- }
- if ( i == N ) {
- return 0.0 / 0.0; // NaN
- }
- min = X[ ix ];
- if ( stdlib_base_is_nan( min ) ) {
- return 0.0 / 0.0; // NaN
- }
- i += 1;
- for (; i < N; i++ ) {
- ix += strideX;
- im += strideMask;
- if ( Mask[ im ] ) {
- continue;
- }
- v = X[ ix ];
- if ( stdlib_base_is_nan( v ) ) {
- return 0.0 / 0.0; // NaN
- }
- if ( v < min || ( v == min && stdlib_base_is_negative_zero( v ) ) ) {
- min = v;
- }
- }
- return min;
-}
diff --git a/stats_browser.html b/stats_browser.html
new file mode 100644
index 0000000..7c75700
--- /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..9010b67
--- /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.dmskmin.js b/test/test.dmskmin.js
deleted file mode 100644
index b1508f5..0000000
--- a/test/test.dmskmin.js
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 isnan = require( '@stdlib/math-base-assert-is-nan' );
-var isNegativeZero = require( '@stdlib/math-base-assert-is-negative-zero' );
-var Float64Array = require( '@stdlib/array-float64' );
-var Uint8Array = require( '@stdlib/array-uint8' );
-var dmskmin = require( './../lib/dmskmin.js' );
-
-
-// TESTS //
-
-tape( 'main export is a function', function test( t ) {
- t.ok( true, __filename );
- t.strictEqual( typeof dmskmin, 'function', 'main export is a function' );
- t.end();
-});
-
-tape( 'the function has an arity of 5', function test( t ) {
- t.strictEqual( dmskmin.length, 5, 'has expected arity' );
- t.end();
-});
-
-tape( 'the function calculates the minimum value of a strided array according to a mask', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, NaN, 5.0, 0.0, 3.0 ] );
- mask = new Uint8Array( [ 0, 0, 0, 1, 0, 0, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( v, -4.0, 'returns expected value' );
-
- x = new Float64Array( [ -4.0, NaN, -5.0 ] );
- mask = new Uint8Array( [ 0, 1, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( v, -5.0, 'returns expected value' );
-
- x = new Float64Array( [ 0.0, -0.0, NaN, 0.0 ] );
- mask = new Uint8Array( [ 0, 0, 1, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isNegativeZero( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ -4.0, 0.0, NaN, 5.0 ] );
- mask = new Uint8Array( [ 0, 0, 0, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN ] );
- mask = new Uint8Array( [ 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN ] );
- mask = new Uint8Array( [ 1 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 1, 1 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 1, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 0, 1 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 0, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `NaN`', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
- mask = new Uint8Array( x.length );
-
- v = dmskmin( 0, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- v = dmskmin( -1, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'if provided an `N` parameter equal to `1`, the function returns the first element', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
- mask = new Uint8Array( x.length );
-
- v = dmskmin( 1, x, 1, mask, 1 );
- t.strictEqual( v, 1.0, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'the function supports `stride` parameters', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- 1.0, // 0
- 2.0,
- 2.0, // 1
- -7.0,
- -2.0, // 2
- 3.0,
- 4.0, // 3
- 2.0,
- -5.0, // 4
- -6.0
- ]);
- mask = new Uint8Array([
- 0, // 0
- 0,
- 0, // 1
- 0,
- 0, // 2
- 0,
- 0, // 3
- 0,
- 1, // 4
- 1
- ]);
-
- v = dmskmin( 5, x, 2, mask, 2 );
-
- t.strictEqual( v, -2.0, 'returns expected value' );
- t.end();
-});
-
-tape( 'the function supports negative `stride` parameters', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- -5.0, // 4
- -6.0,
- 1.0, // 3
- 2.0,
- 2.0, // 2
- -7.0,
- -2.0, // 1
- 3.0,
- 4.0, // 0
- 2.0
- ]);
- mask = new Uint8Array([
- 1, // 4
- 1,
- 0, // 3
- 0,
- 0, // 2
- 0,
- 0, // 1
- 0,
- 0, // 0
- 0
- ]);
-
- v = dmskmin( 5, x, -2, mask, -2 );
-
- t.strictEqual( v, -2.0, 'returns expected value' );
- t.end();
-});
-
-tape( 'the function supports view offsets', function test( t ) {
- var mask0;
- var mask1;
- var x0;
- var x1;
- var v;
-
- x0 = new Float64Array([
- 2.0,
- 1.0, // 0
- 2.0,
- -2.0, // 1
- -2.0,
- 2.0, // 2
- 3.0,
- 4.0, // 3
- 6.0,
- -5.0, // 4
- -6.0
- ]);
- mask0 = new Uint8Array([
- 0,
- 0, // 0
- 0,
- 0, // 1
- 0,
- 0, // 2
- 0,
- 0, // 3
- 0,
- 1, // 4
- 1
- ]);
-
- x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
- mask1 = new Uint8Array( mask0.buffer, mask0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
-
- v = dmskmin( 5, x1, 2, mask1, 2 );
- t.strictEqual( v, -2.0, 'returns expected value' );
-
- t.end();
-});
diff --git a/test/test.dmskmin.native.js b/test/test.dmskmin.native.js
deleted file mode 100644
index 991f068..0000000
--- a/test/test.dmskmin.native.js
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 resolve = require( 'path' ).resolve;
-var tape = require( 'tape' );
-var isnan = require( '@stdlib/math-base-assert-is-nan' );
-var isNegativeZero = require( '@stdlib/math-base-assert-is-negative-zero' );
-var Float64Array = require( '@stdlib/array-float64' );
-var Uint8Array = require( '@stdlib/array-uint8' );
-var tryRequire = require( '@stdlib/utils-try-require' );
-
-
-// VARIABLES //
-
-var dmskmin = tryRequire( resolve( __dirname, './../lib/dmskmin.native.js' ) );
-var opts = {
- 'skip': ( dmskmin instanceof Error )
-};
-
-
-// TESTS //
-
-tape( 'main export is a function', opts, function test( t ) {
- t.ok( true, __filename );
- t.strictEqual( typeof dmskmin, 'function', 'main export is a function' );
- t.end();
-});
-
-tape( 'the function has an arity of 5', opts, function test( t ) {
- t.strictEqual( dmskmin.length, 5, 'has expected arity' );
- t.end();
-});
-
-tape( 'the function calculates the minimum value of a strided array according to a mask', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, NaN, 5.0, 0.0, 3.0 ] );
- mask = new Uint8Array( [ 0, 0, 0, 1, 0, 0, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( v, -4.0, 'returns expected value' );
-
- x = new Float64Array( [ -4.0, NaN, -5.0 ] );
- mask = new Uint8Array( [ 0, 1, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( v, -5.0, 'returns expected value' );
-
- x = new Float64Array( [ 0.0, -0.0, NaN, 0.0 ] );
- mask = new Uint8Array( [ 0, 0, 1, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isNegativeZero( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ -4.0, 0.0, NaN, 5.0 ] );
- mask = new Uint8Array( [ 0, 0, 0, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN ] );
- mask = new Uint8Array( [ 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN ] );
- mask = new Uint8Array( [ 1 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 1, 1 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 1, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 0, 1 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 0, 0 ] );
- v = dmskmin( x.length, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `NaN`', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
- mask = new Uint8Array( x.length );
-
- v = dmskmin( 0, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- v = dmskmin( -1, x, 1, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'if provided an `N` parameter equal to `1`, the function returns the first element', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
- mask = new Uint8Array( x.length );
-
- v = dmskmin( 1, x, 1, mask, 1 );
- t.strictEqual( v, 1.0, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'the function supports `stride` parameters', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- 1.0, // 0
- 2.0,
- 2.0, // 1
- -7.0,
- -2.0, // 2
- 3.0,
- 4.0, // 3
- 2.0,
- -5.0, // 4
- -6.0
- ]);
- mask = new Uint8Array([
- 0, // 0
- 0,
- 0, // 1
- 0,
- 0, // 2
- 0,
- 0, // 3
- 0,
- 1, // 4
- 1
- ]);
-
- v = dmskmin( 5, x, 2, mask, 2 );
-
- t.strictEqual( v, -2.0, 'returns expected value' );
- t.end();
-});
-
-tape( 'the function supports negative `stride` parameters', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- -5.0, // 4
- -6.0,
- 1.0, // 3
- 2.0,
- 2.0, // 2
- -7.0,
- -2.0, // 1
- 3.0,
- 4.0, // 0
- 2.0
- ]);
- mask = new Uint8Array([
- 1, // 4
- 1,
- 0, // 3
- 0,
- 0, // 2
- 0,
- 0, // 1
- 0,
- 0, // 0
- 0
- ]);
-
- v = dmskmin( 5, x, -2, mask, -2 );
-
- t.strictEqual( v, -2.0, 'returns expected value' );
- t.end();
-});
-
-tape( 'the function supports view offsets', opts, function test( t ) {
- var mask0;
- var mask1;
- var x0;
- var x1;
- var v;
-
- x0 = new Float64Array([
- 2.0,
- 1.0, // 0
- 2.0,
- -2.0, // 1
- -2.0,
- 2.0, // 2
- 3.0,
- 4.0, // 3
- 6.0,
- -5.0, // 4
- -6.0
- ]);
- mask0 = new Uint8Array([
- 0,
- 0, // 0
- 0,
- 0, // 1
- 0,
- 0, // 2
- 0,
- 0, // 3
- 0,
- 1, // 4
- 1
- ]);
-
- x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
- mask1 = new Uint8Array( mask0.buffer, mask0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
-
- v = dmskmin( 5, x1, 2, mask1, 2 );
- t.strictEqual( v, -2.0, 'returns expected value' );
-
- t.end();
-});
diff --git a/test/test.js b/test/test.js
deleted file mode 100644
index a5cc987..0000000
--- a/test/test.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 proxyquire = require( 'proxyquire' );
-var IS_BROWSER = require( '@stdlib/assert-is-browser' );
-var dmskmin = require( './../lib' );
-
-
-// VARIABLES //
-
-var opts = {
- 'skip': IS_BROWSER
-};
-
-
-// TESTS //
-
-tape( 'main export is a function', function test( t ) {
- t.ok( true, __filename );
- t.strictEqual( typeof dmskmin, 'function', 'main export is a function' );
- t.end();
-});
-
-tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) {
- t.strictEqual( typeof dmskmin.ndarray, 'function', 'method is a function' );
- t.end();
-});
-
-tape( 'if a native implementation is available, the main export is the native implementation', opts, function test( t ) {
- var dmskmin = proxyquire( './../lib', {
- '@stdlib/utils-try-require': tryRequire
- });
-
- t.strictEqual( dmskmin, mock, 'returns expected value' );
- t.end();
-
- function tryRequire() {
- return mock;
- }
-
- function mock() {
- // Mock...
- }
-});
-
-tape( 'if a native implementation is not available, the main export is a JavaScript implementation', opts, function test( t ) {
- var dmskmin;
- var main;
-
- main = require( './../lib/dmskmin.js' );
-
- dmskmin = proxyquire( './../lib', {
- '@stdlib/utils-try-require': tryRequire
- });
-
- t.strictEqual( dmskmin, main, 'returns expected value' );
- t.end();
-
- function tryRequire() {
- return new Error( 'Cannot find module' );
- }
-});
diff --git a/test/test.ndarray.js b/test/test.ndarray.js
deleted file mode 100644
index 81e9f8e..0000000
--- a/test/test.ndarray.js
+++ /dev/null
@@ -1,239 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 isnan = require( '@stdlib/math-base-assert-is-nan' );
-var isNegativeZero = require( '@stdlib/math-base-assert-is-negative-zero' );
-var Float64Array = require( '@stdlib/array-float64' );
-var Uint8Array = require( '@stdlib/array-uint8' );
-var dmskmin = require( './../lib/ndarray.js' );
-
-
-// TESTS //
-
-tape( 'main export is a function', function test( t ) {
- t.ok( true, __filename );
- t.strictEqual( typeof dmskmin, 'function', 'main export is a function' );
- t.end();
-});
-
-tape( 'the function has an arity of 7', function test( t ) {
- t.strictEqual( dmskmin.length, 7, 'has expected arity' );
- t.end();
-});
-
-tape( 'the function calculates the minimum value of a strided array according to a mask', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, NaN, 5.0, 0.0, 3.0 ] );
- mask = new Uint8Array( [ 0, 0, 0, 1, 0, 0, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( v, -4.0, 'returns expected value' );
-
- x = new Float64Array( [ -4.0, NaN, -5.0 ] );
- mask = new Uint8Array( [ 0, 1, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( v, -5.0, 'returns expected value' );
-
- x = new Float64Array( [ 0.0, -0.0, NaN, 0.0 ] );
- mask = new Uint8Array( [ 0, 0, 1, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isNegativeZero( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ -4.0, 0.0, NaN, 5.0 ] );
- mask = new Uint8Array( [ 0, 0, 0, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN ] );
- mask = new Uint8Array( [ 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN ] );
- mask = new Uint8Array( [ 1 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 1, 1 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 1, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 0, 1 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 0, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `NaN`', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
- mask = new Uint8Array( x.length );
-
- v = dmskmin( 0, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- v = dmskmin( -1, x, 1, 0, mask, 1 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'if provided an `N` parameter equal to `1`, the function returns the first element', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
- mask = new Uint8Array( x.length );
-
- v = dmskmin( 1, x, 1, 0, mask, 1, 0 );
- t.strictEqual( v, 1.0, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'the function supports `stride` parameters', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- 1.0, // 0
- 2.0,
- 2.0, // 1
- -7.0,
- -2.0, // 2
- 3.0,
- 4.0, // 3
- 2.0,
- -5.0, // 4
- -6.0
- ]);
- mask = new Uint8Array([
- 0, // 0
- 0,
- 0, // 1
- 0,
- 0, // 2
- 0,
- 0, // 3
- 0,
- 1, // 4
- 1
- ]);
-
- v = dmskmin( 5, x, 2, 0, mask, 2, 0 );
-
- t.strictEqual( v, -2.0, 'returns expected value' );
- t.end();
-});
-
-tape( 'the function supports negative `stride` parameters', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- -5.0, // 4
- -6.0,
- 1.0, // 3
- 2.0,
- 2.0, // 2
- -7.0,
- -2.0, // 1
- 3.0,
- 4.0, // 0
- 2.0
- ]);
- mask = new Uint8Array([
- 1, // 4
- 1,
- 0, // 3
- 0,
- 0, // 2
- 0,
- 0, // 1
- 0,
- 0, // 0
- 0
- ]);
-
- v = dmskmin( 5, x, -2, 8, mask, -2, 8 );
-
- t.strictEqual( v, -2.0, 'returns expected value' );
- t.end();
-});
-
-tape( 'the function supports `offset` parameters', function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- 2.0,
- 1.0, // 0
- 2.0,
- -2.0, // 1
- -2.0,
- 2.0, // 2
- 3.0,
- 4.0, // 3
- -5.0,
- -6.0 // 4
- ]);
- mask = new Uint8Array([
- 0,
- 0, // 0
- 0,
- 0, // 1
- 0,
- 0, // 2
- 0,
- 0, // 3
- 1,
- 1 // 4
- ]);
-
- v = dmskmin( 5, x, 2, 1, mask, 2, 1 );
- t.strictEqual( v, -2.0, 'returns expected value' );
-
- t.end();
-});
diff --git a/test/test.ndarray.native.js b/test/test.ndarray.native.js
deleted file mode 100644
index 4f02522..0000000
--- a/test/test.ndarray.native.js
+++ /dev/null
@@ -1,248 +0,0 @@
-/**
-* @license Apache-2.0
-*
-* Copyright (c) 2020 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 resolve = require( 'path' ).resolve;
-var tape = require( 'tape' );
-var isnan = require( '@stdlib/math-base-assert-is-nan' );
-var isNegativeZero = require( '@stdlib/math-base-assert-is-negative-zero' );
-var Float64Array = require( '@stdlib/array-float64' );
-var Uint8Array = require( '@stdlib/array-uint8' );
-var tryRequire = require( '@stdlib/utils-try-require' );
-
-
-// VARIABLES //
-
-var dmskmin = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
-var opts = {
- 'skip': ( dmskmin instanceof Error )
-};
-
-
-// TESTS //
-
-tape( 'main export is a function', opts, function test( t ) {
- t.ok( true, __filename );
- t.strictEqual( typeof dmskmin, 'function', 'main export is a function' );
- t.end();
-});
-
-tape( 'the function has an arity of 7', opts, function test( t ) {
- t.strictEqual( dmskmin.length, 7, 'has expected arity' );
- t.end();
-});
-
-tape( 'the function calculates the minimum value of a strided array according to a mask', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, NaN, 5.0, 0.0, 3.0 ] );
- mask = new Uint8Array( [ 0, 0, 0, 1, 0, 0, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( v, -4.0, 'returns expected value' );
-
- x = new Float64Array( [ -4.0, NaN, -5.0 ] );
- mask = new Uint8Array( [ 0, 1, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( v, -5.0, 'returns expected value' );
-
- x = new Float64Array( [ 0.0, -0.0, NaN, 0.0 ] );
- mask = new Uint8Array( [ 0, 0, 1, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isNegativeZero( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ -4.0, 0.0, NaN, 5.0 ] );
- mask = new Uint8Array( [ 0, 0, 0, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN ] );
- mask = new Uint8Array( [ 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN ] );
- mask = new Uint8Array( [ 1 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 1, 1 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 1, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 0, 1 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- x = new Float64Array( [ NaN, NaN ] );
- mask = new Uint8Array( [ 0, 0 ] );
- v = dmskmin( x.length, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `NaN`', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
- mask = new Uint8Array( x.length );
-
- v = dmskmin( 0, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- v = dmskmin( -1, x, 1, 0, mask, 1, 0 );
- t.strictEqual( isnan( v ), true, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'if provided an `N` parameter equal to `1`, the function returns the first element', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
- mask = new Uint8Array( x.length );
-
- v = dmskmin( 1, x, 1, 0, mask, 1, 0 );
- t.strictEqual( v, 1.0, 'returns expected value' );
-
- t.end();
-});
-
-tape( 'the function supports `stride` parameters', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- 1.0, // 0
- 2.0,
- 2.0, // 1
- -7.0,
- -2.0, // 2
- 3.0,
- 4.0, // 3
- 2.0,
- -5.0, // 4
- -6.0
- ]);
- mask = new Uint8Array([
- 0, // 0
- 0,
- 0, // 1
- 0,
- 0, // 2
- 0,
- 0, // 3
- 0,
- 1, // 4
- 1
- ]);
-
- v = dmskmin( 5, x, 2, 0, mask, 2, 0 );
-
- t.strictEqual( v, -2.0, 'returns expected value' );
- t.end();
-});
-
-tape( 'the function supports negative `stride` parameters', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- -5.0, // 4
- -6.0,
- 1.0, // 3
- 2.0,
- 2.0, // 2
- -7.0,
- -2.0, // 1
- 3.0,
- 4.0, // 0
- 2.0
- ]);
- mask = new Uint8Array([
- 1, // 4
- 1,
- 0, // 3
- 0,
- 0, // 2
- 0,
- 0, // 1
- 0,
- 0, // 0
- 0
- ]);
-
- v = dmskmin( 5, x, -2, 8, mask, -2, 8 );
-
- t.strictEqual( v, -2.0, 'returns expected value' );
- t.end();
-});
-
-tape( 'the function supports `offset` parameters', opts, function test( t ) {
- var mask;
- var x;
- var v;
-
- x = new Float64Array([
- 2.0,
- 1.0, // 0
- 2.0,
- -2.0, // 1
- -2.0,
- 2.0, // 2
- 3.0,
- 4.0, // 3
- -5.0,
- -6.0 // 4
- ]);
- mask = new Uint8Array([
- 0,
- 0, // 0
- 0,
- 0, // 1
- 0,
- 0, // 2
- 0,
- 0, // 3
- 1,
- 1 // 4
- ]);
-
- v = dmskmin( 5, x, 2, 1, mask, 2, 1 );
- t.strictEqual( v, -2.0, 'returns expected value' );
-
- t.end();
-});