From 6cb82430bb0403ef77144727a4ec3bdaa660d71e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 06:17:30 +0000 Subject: [PATCH] Release v0.1.0 --- .editorconfig | 5 +++ .github/.keepalive | 1 - .github/workflows/productionize.yml | 21 ++---------- .github/workflows/publish.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/test_bundles.yml | 6 ++-- .github/workflows/test_coverage.yml | 2 +- .github/workflows/test_install.yml | 2 +- CITATION.cff | 30 +++++++++++++++++ CONTRIBUTORS | 21 ++++++------ README.md | 15 +++++++-- dist/index.d.ts | 3 ++ dist/index.js | 5 +++ dist/index.js.map | 7 ++++ docs/types/index.d.ts | 2 +- package.json | 50 ++++++++++++++--------------- 16 files changed, 110 insertions(+), 64 deletions(-) delete mode 100644 .github/.keepalive create mode 100644 CITATION.cff create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map 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 785cfda..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-07-01T06:34:40.011Z 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 14b4b73..0c10d49 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 ab7db14..fec54ad 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 a5aef98..29687de 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!

+
+ # Fréchet [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] @@ -389,8 +400,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/stats-base-dists-frechet-ctor.svg [npm-url]: https://npmjs.org/package/@stdlib/stats-base-dists-frechet-ctor -[test-image]: https://github.com/stdlib-js/stats-base-dists-frechet-ctor/actions/workflows/test.yml/badge.svg?branch=main -[test-url]: https://github.com/stdlib-js/stats-base-dists-frechet-ctor/actions/workflows/test.yml?query=branch:main +[test-image]: https://github.com/stdlib-js/stats-base-dists-frechet-ctor/actions/workflows/test.yml/badge.svg?branch=v0.1.0 +[test-url]: https://github.com/stdlib-js/stats-base-dists-frechet-ctor/actions/workflows/test.yml?query=branch:v0.1.0 [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/stats-base-dists-frechet-ctor/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/stats-base-dists-frechet-ctor?branch=main diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..d4797da --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import Frechet from '../docs/types/index'; +export = Frechet; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..2d90ba0 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,5 @@ +"use strict";var g=function(e,i){return function(){return i||e((i={exports:{}}).exports,i),i.exports}};var l=g(function(A,c){ +var p=require('@stdlib/utils-define-property/dist'),o=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),s=require('@stdlib/utils-define-nonenumerable-read-only-accessor/dist'),h=require('@stdlib/assert-is-positive-number/dist').isPrimitive,m=require('@stdlib/assert-is-number/dist').isPrimitive,f=require('@stdlib/math-base-assert-is-nan/dist'),v=require('@stdlib/stats-base-dists-frechet-entropy/dist'),y=require('@stdlib/stats-base-dists-frechet-kurtosis/dist'),d=require('@stdlib/stats-base-dists-frechet-mean/dist'),q=require('@stdlib/stats-base-dists-frechet-median/dist'),b=require('@stdlib/stats-base-dists-frechet-mode/dist'),w=require('@stdlib/stats-base-dists-frechet-skewness/dist'),E=require('@stdlib/stats-base-dists-frechet-stdev/dist'),P=require('@stdlib/stats-base-dists-frechet-variance/dist'),T=require('@stdlib/stats-base-dists-frechet-cdf/dist'),V=require('@stdlib/stats-base-dists-frechet-logcdf/dist'),F=require('@stdlib/stats-base-dists-frechet-logpdf/dist'),k=require('@stdlib/stats-base-dists-frechet-pdf/dist'),D=require('@stdlib/stats-base-dists-frechet-quantile/dist'),a=require('@stdlib/error-tools-fmtprodmsg/dist');function L(e){return T(e,this.alpha,this.s,this.m)}function M(e){return V(e,this.alpha,this.s,this.m)}function x(e){return F(e,this.alpha,this.s,this.m)}function C(e){return k(e,this.alpha,this.s,this.m)}function O(e){return D(e,this.alpha,this.s,this.m)}function r(){var e,i,n;if(!(this instanceof r))return arguments.length===0?new r:new r(arguments[0],arguments[1],arguments[2]);if(arguments.length){if(e=arguments[0],i=arguments[1],n=arguments[2],!h(e))throw new TypeError(a('10R7d',e));if(!h(i))throw new TypeError(a('10R91',i));if(!m(n)||f(n))throw new TypeError(a('10R8p',n))}else e=1,i=1,n=0;return p(this,"alpha",{configurable:!1,enumerable:!0,get:function(){return e},set:function(t){if(!h(t))throw new TypeError(a('10R8k',t));e=t}}),p(this,"s",{configurable:!1,enumerable:!0,get:function(){return i},set:function(t){if(!h(t))throw new TypeError(a('10R8k',t));i=t}}),p(this,"m",{configurable:!1,enumerable:!0,get:function(){return n},set:function(t){if(!m(t)||f(t))throw new TypeError(a('10R8d',t));n=t}}),this;}s(r.prototype,"entropy",function(){return v(this.alpha,this.s,this.m)});s(r.prototype,"kurtosis",function(){return y(this.alpha,this.s,this.m)});s(r.prototype,"mean",function(){return d(this.alpha,this.s,this.m)});s(r.prototype,"median",function(){return q(this.alpha,this.s,this.m)});s(r.prototype,"mode",function(){return b(this.alpha,this.s,this.m)});s(r.prototype,"skewness",function(){return w(this.alpha,this.s,this.m)});s(r.prototype,"stdev",function(){return E(this.alpha,this.s,this.m)});s(r.prototype,"variance",function(){return P(this.alpha,this.s,this.m)});o(r.prototype,"cdf",L);o(r.prototype,"logcdf",M);o(r.prototype,"logpdf",x);o(r.prototype,"pdf",C);o(r.prototype,"quantile",O);c.exports=r +});var R=l();module.exports=R; +/** @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..3ef80c0 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../lib/main.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/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar defineProperty = require( '@stdlib/utils-define-property' );\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );\nvar isPositive = require( '@stdlib/assert-is-positive-number' ).isPrimitive;\nvar isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar entropy = require( '@stdlib/stats-base-dists-frechet-entropy' );\nvar kurtosis = require( '@stdlib/stats-base-dists-frechet-kurtosis' );\nvar mean = require( '@stdlib/stats-base-dists-frechet-mean' );\nvar median = require( '@stdlib/stats-base-dists-frechet-median' );\nvar mode = require( '@stdlib/stats-base-dists-frechet-mode' );\nvar skewness = require( '@stdlib/stats-base-dists-frechet-skewness' );\nvar stdev = require( '@stdlib/stats-base-dists-frechet-stdev' );\nvar variance = require( '@stdlib/stats-base-dists-frechet-variance' );\nvar cdf = require( '@stdlib/stats-base-dists-frechet-cdf' );\nvar logcdf = require( '@stdlib/stats-base-dists-frechet-logcdf' );\nvar logpdf = require( '@stdlib/stats-base-dists-frechet-logpdf' );\nvar pdf = require( '@stdlib/stats-base-dists-frechet-pdf' );\nvar quantile = require( '@stdlib/stats-base-dists-frechet-quantile' );\nvar format = require( '@stdlib/string-format' );\n\n\n// FUNCTIONS //\n\n/**\n* Evaluates the cumulative distribution function (CDF).\n*\n* @private\n* @param {number} x - input value\n* @returns {Probability} evaluated CDF\n*/\nfunction frechetCDF( x ) {\n\treturn cdf( x, this.alpha, this.s, this.m );\n}\n\n/**\n* Evaluates the natural logarithm of the cumulative distribution function (CDF).\n*\n* @private\n* @param {number} x - input value\n* @returns {number} evaluated logCDF\n*/\nfunction frechetLogCDF( x ) {\n\treturn logcdf( x, this.alpha, this.s, this.m );\n}\n\n/**\n* Evaluates the natural logarithm of the probability density function (PDF).\n*\n* @private\n* @param {number} x - input value\n* @returns {number} evaluated logPDF\n*/\nfunction frechetLogPDF( x ) {\n\treturn logpdf( x, this.alpha, this.s, this.m );\n}\n\n/**\n* Evaluates the probability density function (PDF).\n*\n* @private\n* @param {number} x - input value\n* @returns {number} evaluated PDF\n*/\nfunction frechetPDF( x ) {\n\treturn pdf( x, this.alpha, this.s, this.m );\n}\n\n/**\n* Evaluates the quantile function.\n*\n* @private\n* @param {Probability} p - input probability\n* @returns {number} evaluated quantile function\n*/\nfunction frechetQuantile( p ) {\n\treturn quantile( p, this.alpha, this.s, this.m );\n}\n\n\n// MAIN //\n\n/**\n* Fr\u00E9chet distribution constructor.\n*\n* @constructor\n* @param {number} [alpha=0.0] - shape parameter\n* @param {number} [s=1.0] - scale parameter\n* @param {number} [m=0.0] - location parameter\n* @throws {TypeError} `alpha` must be a positive number\n* @throws {TypeError} `s` must be a positive number\n* @returns {Frechet} distribution instance\n*\n* @example\n* var frechet = new Frechet( 1.0, 1.0, 0.25 );\n*\n* var y = frechet.cdf( 0.8 );\n* // returns ~0.162\n*\n* var mu = frechet.mean;\n* // returns Infinity\n*/\nfunction Frechet() {\n\tvar alpha;\n\tvar s;\n\tvar m;\n\tif ( !(this instanceof Frechet) ) {\n\t\tif ( arguments.length === 0 ) {\n\t\t\treturn new Frechet();\n\t\t}\n\t\treturn new Frechet( arguments[ 0 ], arguments[ 1 ], arguments[ 2 ] );\n\t}\n\tif ( arguments.length ) {\n\t\talpha = arguments[ 0 ];\n\t\ts = arguments[ 1 ];\n\t\tm = arguments[ 2 ];\n\t\tif ( !isPositive( alpha ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Shape parameter must be a positive number. Value: `%s`.', alpha ) );\n\t\t}\n\t\tif ( !isPositive( s ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Scale parameter must be a number. Value: `%s`.', s ) );\n\t\t}\n\t\tif ( !isNumber( m ) || isnan( m ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Location parameter must be a number. Value: `%s`.', m ) );\n\t\t}\n\t} else {\n\t\talpha = 1.0;\n\t\ts = 1.0;\n\t\tm = 0.0;\n\t}\n\tdefineProperty( this, 'alpha', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'get': function get() {\n\t\t\treturn alpha;\n\t\t},\n\t\t'set': function set( value ) {\n\t\t\tif ( !isPositive( value ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid assignment. Must be a positive number. Value: `%s`.', value ) );\n\t\t\t}\n\t\t\talpha = value;\n\t\t}\n\t});\n\tdefineProperty( this, 's', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'get': function get() {\n\t\t\treturn s;\n\t\t},\n\t\t'set': function set( value ) {\n\t\t\tif ( !isPositive( value ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid assignment. Must be a positive number. Value: `%s`.', value ) );\n\t\t\t}\n\t\t\ts = value;\n\t\t}\n\t});\n\tdefineProperty( this, 'm', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'get': function get() {\n\t\t\treturn m;\n\t\t},\n\t\t'set': function set( value ) {\n\t\t\tif ( !isNumber( value ) || isnan( value ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid assignment. Must be a number. Value: `%s`.', value ) );\n\t\t\t}\n\t\t\tm = value;\n\t\t}\n\t});\n\treturn this;\n}\n\n/**\n* Fr\u00E9chet distribution differential entropy.\n*\n* @name entropy\n* @memberof Frechet.prototype\n* @type {number}\n* @see [differential entropy]{@link https://en.wikipedia.org/wiki/Entropy_%28information_theory%29}\n*\n* @example\n* var frechet = new Frechet( 4.0, 12.0, 2.0 );\n*\n* var v = frechet.entropy;\n* // returns ~2.82\n*/\nsetReadOnlyAccessor( Frechet.prototype, 'entropy', function get() {\n\treturn entropy( this.alpha, this.s, this.m );\n});\n\n/**\n* Fr\u00E9chet distribution excess kurtosis.\n*\n* @name kurtosis\n* @memberof Frechet.prototype\n* @type {number}\n* @see [kurtosis]{@link https://en.wikipedia.org/wiki/Kurtosis}\n*\n* @example\n* var frechet = new Frechet( 4.0, 12.0, 2.0 );\n*\n* var v = frechet.kurtosis;\n* // returns Infinity\n*/\nsetReadOnlyAccessor( Frechet.prototype, 'kurtosis', function get() {\n\treturn kurtosis( this.alpha, this.s, this.m );\n});\n\n/**\n* Fr\u00E9chet distribution expected value.\n*\n* @name mean\n* @memberof Frechet.prototype\n* @type {number}\n* @see [expected value]{@link https://en.wikipedia.org/wiki/Expected_value}\n*\n* @example\n* var frechet = new Frechet( 4.0, 12.0, 2.0 );\n*\n* var v = frechet.mean;\n* // returns ~16.705\n*/\nsetReadOnlyAccessor( Frechet.prototype, 'mean', function get() {\n\treturn mean( this.alpha, this.s, this.m );\n});\n\n/**\n* Fr\u00E9chet distribution median.\n*\n* @name median\n* @memberof Frechet.prototype\n* @type {number}\n* @see [median]{@link https://en.wikipedia.org/wiki/Median}\n*\n* @example\n* var frechet = new Frechet( 4.0, 12.0, 2.0 );\n*\n* var v = frechet.median;\n* // returns ~15.151\n*/\nsetReadOnlyAccessor( Frechet.prototype, 'median', function get() {\n\treturn median( this.alpha, this.s, this.m );\n});\n\n/**\n* Fr\u00E9chet distribution mode.\n*\n* @name mode\n* @memberof Frechet.prototype\n* @type {number}\n* @see [mode]{@link https://en.wikipedia.org/wiki/Mode_%28statistics%29}\n*\n* @example\n* var frechet = new Frechet( 4.0, 12.0, 2.0 );\n*\n* var v = frechet.mode;\n* // returns ~13.349\n*/\nsetReadOnlyAccessor( Frechet.prototype, 'mode', function get() {\n\treturn mode( this.alpha, this.s, this.m );\n});\n\n/**\n* Fr\u00E9chet distribution skewness.\n*\n* @name skewness\n* @memberof Frechet.prototype\n* @type {number}\n* @see [skewness]{@link https://en.wikipedia.org/wiki/Skewness}\n*\n* @example\n* var frechet = new Frechet( 4.0, 12.0, 2.0 );\n*\n* var v = frechet.skewness;\n* // returns ~5.605\n*/\nsetReadOnlyAccessor( Frechet.prototype, 'skewness', function get() {\n\treturn skewness( this.alpha, this.s, this.m );\n});\n\n/**\n* Fr\u00E9chet distribution standard deviation.\n*\n* @name stdev\n* @memberof Frechet.prototype\n* @type {PositiveNumber}\n* @see [standard deviation]{@link https://en.wikipedia.org/wiki/Standard_deviation}\n*\n* @example\n* var frechet = new Frechet( 4.0, 12.0, 2.0 );\n*\n* var v = frechet.stdev;\n* // returns ~6.245\n*/\nsetReadOnlyAccessor( Frechet.prototype, 'stdev', function get() {\n\treturn stdev( this.alpha, this.s, this.m );\n});\n\n/**\n* Fr\u00E9chet distribution variance.\n*\n* @name variance\n* @memberof Frechet.prototype\n* @type {PositiveNumber}\n* @see [variance]{@link https://en.wikipedia.org/wiki/Variance}\n*\n* @example\n* var frechet = new Frechet( 4.0, 12.0, 2.0 );\n*\n* var v = frechet.variance;\n* // returns ~38.996\n*/\nsetReadOnlyAccessor( Frechet.prototype, 'variance', function get() {\n\treturn variance( this.alpha, this.s, this.m );\n});\n\n/**\n* Evaluates the cumulative distribution function (CDF).\n*\n* @name cdf\n* @memberof Frechet.prototype\n* @type {Function}\n* @param {number} x - input value\n* @returns {number} evaluated CDF\n* @see [cdf]{@link https://en.wikipedia.org/wiki/Cumulative_distribution_function}\n*\n* @example\n* var frechet = new Frechet( 2.0, 4.0, 3.0 );\n*\n* var v = frechet.cdf( 12.0 );\n* // returns ~0.821\n*/\nsetReadOnly( Frechet.prototype, 'cdf', frechetCDF );\n\n/**\n* Evaluates the natural logarithm of the cumulative distribution function (CDF).\n*\n* @name logcdf\n* @memberof Frechet.prototype\n* @type {Function}\n* @param {number} x - input value\n* @returns {number} evaluated logCDF\n* @see [cdf]{@link https://en.wikipedia.org/wiki/Cumulative_distribution_function}\n*\n* @example\n* var frechet = new Frechet( 2.0, 4.0, 3.0 );\n*\n* var v = frechet.logcdf( 12.0 );\n* // returns ~-0.1975\n*/\nsetReadOnly( Frechet.prototype, 'logcdf', frechetLogCDF );\n\n/**\n* Evaluates the natural logarithm of the probability density function (PDF).\n*\n* @name logpdf\n* @memberof Frechet.prototype\n* @type {Function}\n* @param {number} x - input value\n* @returns {number} evaluated logPDF\n* @see [pdf]{@link https://en.wikipedia.org/wiki/Probability_density_function}\n*\n* @example\n* var frechet = new Frechet( 2.0, 4.0, 3.0 );\n*\n* var v = frechet.logpdf( 2.0 );\n* // returns -Infinity\n*/\nsetReadOnly( Frechet.prototype, 'logpdf', frechetLogPDF );\n\n/**\n* Evaluates the probability density function (PDF).\n*\n* @name pdf\n* @memberof Frechet.prototype\n* @type {Function}\n* @param {number} x - input value\n* @returns {number} evaluated PDF\n* @see [pdf]{@link https://en.wikipedia.org/wiki/Probability_density_function}\n*\n* @example\n* var frechet = new Frechet( 2.0, 4.0, 3.0 );\n*\n* var v = frechet.pdf( 5.5 );\n* // returns ~0.158\n*/\nsetReadOnly( Frechet.prototype, 'pdf', frechetPDF );\n\n/**\n* Evaluates the quantile function.\n*\n* @name quantile\n* @memberof Frechet.prototype\n* @type {Function}\n* @param {Probability} p - input probability\n* @returns {number} evaluated quantile function\n* @see [quantile function]{@link https://en.wikipedia.org/wiki/Quantile_function}\n*\n* @example\n* var frechet = new Frechet( 2.0, 4.0, 3.0 );\n*\n* var v = frechet.quantile( 0.5 );\n* // returns ~7.804\n*/\nsetReadOnly( Frechet.prototype, 'quantile', frechetQuantile );\n\n\n// EXPORTS //\n\nmodule.exports = Frechet;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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* Fr\u00E9chet distribution constructor.\n*\n* @module @stdlib/stats-base-dists-frechet-ctor\n*\n* @example\n* var Frechet = require( '@stdlib/stats-base-dists-frechet-ctor' );\n*\n* var frechet = new Frechet( 1.0, 1.0, 0.5 );\n*\n* var y = frechet.cdf( 0.8 );\n* // returns ~0.036\n*\n* var mu = frechet.mean;\n* // returns Infinity\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAA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ReadOnlyAccessor", "isPositive", "isNumber", "isnan", "entropy", "kurtosis", "mean", "median", "mode", "skewness", "stdev", "variance", "cdf", "logcdf", "logpdf", "pdf", "quantile", "format", "frechetCDF", "x", "frechetLogCDF", "frechetLogPDF", "frechetPDF", "frechetQuantile", "p", "Frechet", "alpha", "s", "m", "value", "main"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 9443684..fb58c64 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 /** * Frechet Distribution. diff --git a/package.json b/package.json index df89200..378cd37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stdlib/stats-base-dists-frechet-ctor", - "version": "0.0.8", + "version": "0.1.0", "description": "Fréchet distribution constructor.", "license": "Apache-2.0", "author": { @@ -37,32 +37,32 @@ "url": "https://github.com/stdlib-js/stdlib/issues" }, "dependencies": { - "@stdlib/assert-is-number": "^0.0.7", - "@stdlib/assert-is-positive-number": "^0.0.7", - "@stdlib/math-base-assert-is-nan": "^0.0.8", - "@stdlib/stats-base-dists-frechet-cdf": "^0.0.7", - "@stdlib/stats-base-dists-frechet-entropy": "^0.0.7", - "@stdlib/stats-base-dists-frechet-kurtosis": "^0.0.7", - "@stdlib/stats-base-dists-frechet-logcdf": "^0.0.7", - "@stdlib/stats-base-dists-frechet-logpdf": "^0.0.7", - "@stdlib/stats-base-dists-frechet-mean": "^0.0.7", - "@stdlib/stats-base-dists-frechet-median": "^0.0.7", - "@stdlib/stats-base-dists-frechet-mode": "^0.0.7", - "@stdlib/stats-base-dists-frechet-pdf": "^0.0.7", - "@stdlib/stats-base-dists-frechet-quantile": "^0.0.7", - "@stdlib/stats-base-dists-frechet-skewness": "^0.0.7", - "@stdlib/stats-base-dists-frechet-stdev": "^0.0.7", - "@stdlib/stats-base-dists-frechet-variance": "^0.0.7", - "@stdlib/string-format": "^0.0.3", - "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.0.7", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7", - "@stdlib/utils-define-property": "^0.0.9" + "@stdlib/assert-is-number": "^0.1.0", + "@stdlib/assert-is-positive-number": "^0.1.0", + "@stdlib/math-base-assert-is-nan": "^0.1.0", + "@stdlib/stats-base-dists-frechet-cdf": "^0.1.0", + "@stdlib/stats-base-dists-frechet-entropy": "^0.1.0", + "@stdlib/stats-base-dists-frechet-kurtosis": "^0.1.0", + "@stdlib/stats-base-dists-frechet-logcdf": "^0.1.0", + "@stdlib/stats-base-dists-frechet-logpdf": "^0.1.0", + "@stdlib/stats-base-dists-frechet-mean": "^0.1.0", + "@stdlib/stats-base-dists-frechet-median": "^0.1.0", + "@stdlib/stats-base-dists-frechet-mode": "^0.1.0", + "@stdlib/stats-base-dists-frechet-pdf": "^0.1.0", + "@stdlib/stats-base-dists-frechet-quantile": "^0.1.0", + "@stdlib/stats-base-dists-frechet-skewness": "^0.1.0", + "@stdlib/stats-base-dists-frechet-stdev": "^0.1.0", + "@stdlib/stats-base-dists-frechet-variance": "^0.1.0", + "@stdlib/string-format": "^0.1.0", + "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.1.0", + "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0", + "@stdlib/utils-define-property": "^0.1.0" }, "devDependencies": { - "@stdlib/assert-has-own-property": "^0.0.7", - "@stdlib/assert-is-function": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/constants-float64-eps": "^0.0.8", + "@stdlib/assert-has-own-property": "^0.1.0", + "@stdlib/assert-is-function": "^0.1.0", + "@stdlib/bench": "^0.1.0", + "@stdlib/constants-float64-eps": "^0.1.0", "@stdlib/random-base-randu": "^0.0.8", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1",