diff --git a/.editorconfig b/.editorconfig index 0fd4d6c..13e9c39 100644 --- a/.editorconfig +++ b/.editorconfig @@ -179,3 +179,8 @@ 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/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 5ae1bcf..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-07-01T06:01:38.847Z diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index 3e8e2db..91f2b93 100644 --- a/.github/workflows/productionize.yml +++ b/.github/workflows/productionize.yml @@ -82,21 +82,6 @@ jobs: id: transform-error-messages uses: stdlib-js/transform-errors-action@main - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - # 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: | @@ -349,7 +334,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -520,7 +505,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -697,7 +682,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 26be02d..474004b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -209,7 +209,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f846f49..b2edd86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_bundles.yml b/.github/workflows/test_bundles.yml index e9df6a0..172cb2d 100644 --- a/.github/workflows/test_bundles.yml +++ b/.github/workflows/test_bundles.yml @@ -88,7 +88,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -130,7 +130,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -172,7 +172,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index 6d8aa0b..a73c515 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -106,7 +106,7 @@ jobs: # Send Slack notification if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 0b48ba8..57f9eab 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -75,7 +75,7 @@ jobs: # Send Slack notification if job fails: - name: 'Send notification to Slack in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..2ec6fff --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,30 @@ +cff-version: 1.2.0 +title: stdlib +message: >- + If you use this software, please cite it using the + metadata from this file. + +type: software + +authors: + - name: The Stdlib Authors + url: https://github.com/stdlib-js/stdlib/graphs/contributors + +repository-code: https://github.com/stdlib-js/stdlib +url: https://stdlib.io + +abstract: | + Standard library for JavaScript and Node.js. + +keywords: + - JavaScript + - Node.js + - TypeScript + - standard library + - scientific computing + - numerical computing + - statistical computing + +license: Apache-2.0 AND BSL-1.0 + +date-released: 2016 diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 0c2727b..93c4bde 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3,28 +3,31 @@ # Contributors listed in alphabetical order. Ali Salesi +Amit Jimiwal Athan Reines Brendan Graetz Bruno Fenzl Christopher Dambamuromo +Dan Rose Dominik Moritz +Dorrin Sotoudeh Frank Kovacs -Harshita Kalani <95532771+HarshitaKalani@users.noreply.github.com> -James +Harshita Kalani +James Gelok Jithin KS Joey Reed -Jordan-Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com> +Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com> Joris Labie Justin Dennison -KATTA NAGA NITHIN <88046362+nithinkatta@users.noreply.github.com> -Marcus +Marcus Fantham Matt Cochrane Milan Raj Momtchil Momtchev -Naresh Jagadeesan <37257700+Infinage@users.noreply.github.com> +Naresh Jagadeesan +Nithin Katta <88046362+nithinkatta@users.noreply.github.com> Ognjen Jevremović Philipp Burckhardt -Pranav <85227306+Pranavchiku@users.noreply.github.com> +Pranav Goswami Ricky Reusser Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com> Ryan Seal @@ -32,7 +35,5 @@ Seyyed Parsa Neshaei Shraddheya Shendre Stephannie Jiménez Gacha Yernar Yergaziyev -dorrin-sot <59933477+dorrin-sot@users.noreply.github.com> -drunken_devv <90555965+amitjimiwal@users.noreply.github.com> orimiles5 <97595296+orimiles5@users.noreply.github.com> -rei2hu +rei2hu diff --git a/README.md b/README.md index b3443e2..66eafc7 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,17 @@ limitations under the License. --> + +
+ + About stdlib... + +

We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.

+

The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.

+

When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.

+

To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!

+
+ # Probability Density Function [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] @@ -212,8 +223,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/stats-base-dists-truncated-normal-pdf.svg [npm-url]: https://npmjs.org/package/@stdlib/stats-base-dists-truncated-normal-pdf -[test-image]: https://github.com/stdlib-js/stats-base-dists-truncated-normal-pdf/actions/workflows/test.yml/badge.svg?branch=main -[test-url]: https://github.com/stdlib-js/stats-base-dists-truncated-normal-pdf/actions/workflows/test.yml?query=branch:main +[test-image]: https://github.com/stdlib-js/stats-base-dists-truncated-normal-pdf/actions/workflows/test.yml/badge.svg?branch=v0.1.0 +[test-url]: https://github.com/stdlib-js/stats-base-dists-truncated-normal-pdf/actions/workflows/test.yml?query=branch:v0.1.0 [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/stats-base-dists-truncated-normal-pdf/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/stats-base-dists-truncated-normal-pdf?branch=main diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..67998b8 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import pdf from '../docs/types/index'; +export = pdf; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..d8e5709 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,7 @@ +"use strict";var s=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var l=s(function(J,N){ +var B=require('@stdlib/math-base-special-exp/dist'),p=require('@stdlib/math-base-special-pow/dist'),D=require('@stdlib/math-base-special-sqrt/dist'),c=require('@stdlib/math-base-assert-is-nan/dist'),I=require('@stdlib/stats-base-dists-normal-cdf/dist').factory,P=require('@stdlib/constants-float64-pi/dist'),y=I(0,1);function x(e,r,t,a,n){var u,v,i,q;return c(e)||c(r)||c(t)||n<=0||r>=t?NaN:et?0:(u=2*p(n,2),v=1/D(u*P),i=-1/u,q=y((t-a)/n)-y((r-a)/n),v*B(i*p(e-a,2))/q)}N.exports=x +});var w=s(function(K,F){ +var O=require('@stdlib/utils-constant-function/dist'),R=require('@stdlib/math-base-special-exp/dist'),C=require('@stdlib/math-base-special-pow/dist'),o=require('@stdlib/math-base-assert-is-nan/dist'),h=require('@stdlib/math-base-special-sqrt/dist'),j=require('@stdlib/stats-base-dists-normal-cdf/dist').factory,k=require('@stdlib/constants-float64-pi/dist'),d=j(0,1);function z(e,r,t,a){var n,u,v,i;if(o(e)||o(r)||o(t)||o(a)||a<=0||e>=r)return O(NaN);return n=2*C(a,2),u=1/h(n*k),v=-1/n,i=d((r-t)/a)-d((e-t)/a),q;function q(f){return o(f)?NaN:fr?0:u*R(v*C(f-t,2))/i}}F.exports=z +});var E=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),A=l(),G=w();E(A,"factory",G);module.exports=A; +/** @license Apache-2.0 */ +//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..de22262 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../lib/main.js", "../lib/factory.js", "../lib/index.js"], + "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar exp = require( '@stdlib/math-base-special-exp' );\nvar pow = require( '@stdlib/math-base-special-pow' );\nvar sqrt = require( '@stdlib/math-base-special-sqrt' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar normal = require( '@stdlib/stats-base-dists-normal-cdf' ).factory;\nvar PI = require( '@stdlib/constants-float64-pi' );\n\n\n// VARIABLES //\n\nvar normalCDF = normal( 0.0, 1.0 );\n\n\n// MAIN //\n\n/**\n* Evaluates the probability density function (PDF) for a truncated normal distribution with endpoints `a` and `b`, location parameter `mu` and scale parameter `sigma` at a value `x`.\n*\n* @param {number} x - input value\n* @param {number} a - minimum support\n* @param {number} b - maximum support\n* @param {number} mu - location parameter\n* @param {PositiveNumber} sigma - scale parameter\n* @returns {number} evaluated PDF\n*\n* @example\n* var y = pdf( 0.9, 0.0, 1.0, 0.0, 1.0 );\n* // returns ~0.7795\n*\n* @example\n* var y = pdf( 0.9, 0.0, 1.0, 0.5, 1.0 );\n* // returns ~0.9617\n*\n* @example\n* var y = pdf( 0.9, -1.0, 1.0, 0.5, 1.0 );\n* // returns ~0.5896\n*\n* @example\n* var y = pdf( 1.4, 0.0, 1.0, 0.0, 1.0 );\n* // returns 0.0\n*\n* @example\n* var y = pdf( -0.9, 0.0, 1.0, 0.0, 1.0 );\n* // returns 0.0\n*/\nfunction pdf( x, a, b, mu, sigma ) {\n\tvar s2x2;\n\tvar A;\n\tvar B;\n\tvar C;\n\n\tif (\n\t\tisnan( x ) ||\n\t\tisnan( a ) ||\n\t\tisnan( b ) ||\n\t\tsigma <= 0.0 ||\n\t\ta >= b\n\t) {\n\t\treturn NaN;\n\t}\n\tif ( x < a || x > b ) {\n\t\treturn 0.0;\n\t}\n\ts2x2 = 2.0 * pow( sigma, 2.0 );\n\tA = 1.0 / ( sqrt( s2x2 * PI ) );\n\tB = -1.0 / ( s2x2 );\n\tC = normalCDF( (b-mu)/sigma ) - normalCDF( (a-mu)/sigma );\n\treturn A * exp( B * pow( x - mu, 2.0 ) ) / C;\n}\n\n\n// EXPORTS //\n\nmodule.exports = pdf;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar constantFunction = require( '@stdlib/utils-constant-function' );\nvar exp = require( '@stdlib/math-base-special-exp' );\nvar pow = require( '@stdlib/math-base-special-pow' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar sqrt = require( '@stdlib/math-base-special-sqrt' );\nvar normal = require( '@stdlib/stats-base-dists-normal-cdf' ).factory;\nvar PI = require( '@stdlib/constants-float64-pi' );\n\n\n// VARIABLES //\n\nvar normalCDF = normal( 0.0, 1.0 );\n\n\n// MAIN //\n\n/**\n* Returns a function for evaluating the probability density function (PDF) for a truncated normal distribution with endpoints `a` and `b`, mean `mu` and standard deviation `sigma`.\n*\n* @param {number} a - minimum support\n* @param {number} b - maximum support\n* @param {number} mu - location parameter\n* @param {PositiveNumber} sigma - scale parameter\n* @returns {Function} PDF\n*\n* @example\n* var myPDF = factory( 0.0, 1.0, 0.0, 1.0 );\n* var y = myPDF( 0.8 );\n* // returns ~0.849\n*\n* @example\n* var myPDF = factory( 0.0, 1.0, 0.5, 1.0 );\n* var y = myPDF( 0.8 );\n* // returns ~0.996\n*\n* @example\n* var myPDF = factory( 0.0, 1.0, 0.0, 1.0 );\n* var y = myPDF( 2.0 );\n* // returns 0.0\n*\n* @example\n* var myPDF = factory( 0.0, 1.0, 0.0, 1.0 );\n* var y = myPDF( -1.0 );\n* // returns 0.0\n*/\nfunction factory( a, b, mu, sigma ) {\n\tvar s2x2;\n\tvar A;\n\tvar B;\n\tvar C;\n\n\tif (\n\t\tisnan( a ) ||\n\t\tisnan( b ) ||\n\t\tisnan( mu ) ||\n\t\tisnan( sigma ) ||\n\t\tsigma <= 0.0 ||\n\t\ta >= b\n\t) {\n\t\treturn constantFunction( NaN );\n\t}\n\ts2x2 = 2.0 * pow( sigma, 2.0 );\n\tA = 1.0 / ( sqrt( s2x2 * PI ) );\n\tB = -1.0 / ( s2x2 );\n\tC = normalCDF( (b-mu)/sigma ) - normalCDF( (a-mu)/sigma );\n\treturn pdf;\n\n\t/**\n\t* Evaluates the probability density function (PDF) for a truncated normal distribution.\n\t*\n\t* @private\n\t* @param {number} x - input value\n\t* @returns {number} evaluated PDF\n\t*/\n\tfunction pdf( x ) {\n\t\tif ( isnan( x ) ) {\n\t\t\treturn NaN;\n\t\t}\n\t\tif ( x < a || x > b ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn A * exp( B * pow( x - mu, 2.0 ) ) / C;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Truncated normal distribution probability density function (PDF).\n*\n* @module @stdlib/stats-base-dists-truncated-normal-pdf\n*\n* @example\n* var pdf = require( '@stdlib/stats-base-dists-truncated-normal-pdf' );\n*\n* var y = pdf( 0.9, 0.0, 1.0, 0.0, 1.0 );\n* // returns ~0.7795\n*\n* var mypdf = pdf.factory( -1.0, 1.0, 0.0, 1.0 );\n* y = mypdf( 0.9 );\n* // returns ~0.5896\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAM,QAAS,+BAAgC,EAC/CC,EAAM,QAAS,+BAAgC,EAC/CC,EAAO,QAAS,gCAAiC,EACjDC,EAAQ,QAAS,iCAAkC,EACnDC,EAAS,QAAS,qCAAsC,EAAE,QAC1DC,EAAK,QAAS,8BAA+B,EAK7CC,EAAYF,EAAQ,EAAK,CAAI,EAmCjC,SAASG,EAAKC,EAAGC,EAAGC,EAAGC,EAAIC,EAAQ,CAClC,IAAIC,EACAC,EACAC,EACAC,EAEJ,OACCb,EAAOK,CAAE,GACTL,EAAOM,CAAE,GACTN,EAAOO,CAAE,GACTE,GAAS,GACTH,GAAKC,EAEE,IAEHF,EAAIC,GAAKD,EAAIE,EACV,GAERG,EAAO,EAAMZ,EAAKW,EAAO,CAAI,EAC7BE,EAAI,EAAQZ,EAAMW,EAAOR,CAAG,EAC5BU,EAAI,GAASF,EACbG,EAAIV,GAAYI,EAAEC,GAAIC,CAAM,EAAIN,GAAYG,EAAEE,GAAIC,CAAM,EACjDE,EAAId,EAAKe,EAAId,EAAKO,EAAIG,EAAI,CAAI,CAAE,EAAIK,EAC5C,CAKAjB,EAAO,QAAUQ,IC/FjB,IAAAU,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAmB,QAAS,iCAAkC,EAC9DC,EAAM,QAAS,+BAAgC,EAC/CC,EAAM,QAAS,+BAAgC,EAC/CC,EAAQ,QAAS,iCAAkC,EACnDC,EAAO,QAAS,gCAAiC,EACjDC,EAAS,QAAS,qCAAsC,EAAE,QAC1DC,EAAK,QAAS,8BAA+B,EAK7CC,EAAYF,EAAQ,EAAK,CAAI,EAkCjC,SAASG,EAASC,EAAGC,EAAGC,EAAIC,EAAQ,CACnC,IAAIC,EACAC,EACAC,EACAC,EAEJ,GACCb,EAAOM,CAAE,GACTN,EAAOO,CAAE,GACTP,EAAOQ,CAAG,GACVR,EAAOS,CAAM,GACbA,GAAS,GACTH,GAAKC,EAEL,OAAOV,EAAkB,GAAI,EAE9B,OAAAa,EAAO,EAAMX,EAAKU,EAAO,CAAI,EAC7BE,EAAI,EAAQV,EAAMS,EAAOP,CAAG,EAC5BS,EAAI,GAASF,EACbG,EAAIT,GAAYG,EAAEC,GAAIC,CAAM,EAAIL,GAAYE,EAAEE,GAAIC,CAAM,EACjDK,EASP,SAASA,EAAKC,EAAI,CACjB,OAAKf,EAAOe,CAAE,EACN,IAEHA,EAAIT,GAAKS,EAAIR,EACV,EAEDI,EAAIb,EAAKc,EAAIb,EAAKgB,EAAIP,EAAI,CAAI,CAAE,EAAIK,CAC5C,CACD,CAKAjB,EAAO,QAAUS,ICxEjB,IAAIW,EAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,EAAU,IAKdF,EAAaC,EAAM,UAAWC,CAAQ,EAKtC,OAAO,QAAUD", + "names": ["require_main", "__commonJSMin", "exports", "module", "exp", "pow", "sqrt", "isnan", "normal", "PI", "normalCDF", "pdf", "x", "a", "b", "mu", "sigma", "s2x2", "A", "B", "C", "require_factory", "__commonJSMin", "exports", "module", "constantFunction", "exp", "pow", "isnan", "sqrt", "normal", "PI", "normalCDF", "factory", "a", "b", "mu", "sigma", "s2x2", "A", "B", "C", "pdf", "x", "setReadOnly", "main", "factory"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 949dd6b..66abfad 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -// TypeScript Version: 2.0 +// TypeScript Version: 4.1 /** * Evaluates the probability density function (PDF) for a truncated normal distribution. diff --git a/package.json b/package.json index 0088edb..d3b895b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stdlib/stats-base-dists-truncated-normal-pdf", - "version": "0.0.7", + "version": "0.1.0", "description": "Truncated normal distribution probability density function (PDF).", "license": "Apache-2.0", "author": { @@ -35,14 +35,14 @@ "url": "https://github.com/stdlib-js/stdlib/issues" }, "dependencies": { - "@stdlib/constants-float64-pi": "^0.0.8", - "@stdlib/math-base-assert-is-nan": "^0.0.8", - "@stdlib/math-base-special-exp": "^0.0.6", - "@stdlib/math-base-special-pow": "^0.0.7", - "@stdlib/math-base-special-sqrt": "^0.0.8", - "@stdlib/stats-base-dists-normal-cdf": "^0.0.7", - "@stdlib/utils-constant-function": "^0.0.8", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7" + "@stdlib/constants-float64-pi": "^0.1.0", + "@stdlib/math-base-assert-is-nan": "^0.1.0", + "@stdlib/math-base-special-exp": "^0.1.0", + "@stdlib/math-base-special-pow": "^0.1.0", + "@stdlib/math-base-special-sqrt": "^0.1.0", + "@stdlib/stats-base-dists-normal-cdf": "^0.1.0", + "@stdlib/utils-constant-function": "^0.1.0", + "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0" }, "devDependencies": { "@stdlib/random-base-randu": "^0.0.8", diff --git a/test/test.js b/test/test.js index dc1afd7..33976f3 100644 --- a/test/test.js +++ b/test/test.js @@ -28,7 +28,7 @@ var pdf = require( './../lib' ); tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.equal( typeof pdf, 'function', 'main export is a function' ); + t.strictEqual( typeof pdf, 'function', 'main export is a function' ); t.end(); });