@stdlib/stats-base-dists-rayleigh-mean 0.0.8 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CITATION.cff ADDED
@@ -0,0 +1,30 @@
1
+ cff-version: 1.2.0
2
+ title: stdlib
3
+ message: >-
4
+ If you use this software, please cite it using the
5
+ metadata from this file.
6
+
7
+ type: software
8
+
9
+ authors:
10
+ - name: The Stdlib Authors
11
+ url: https://github.com/stdlib-js/stdlib/graphs/contributors
12
+
13
+ repository-code: https://github.com/stdlib-js/stdlib
14
+ url: https://stdlib.io
15
+
16
+ abstract: |
17
+ Standard library for JavaScript and Node.js.
18
+
19
+ keywords:
20
+ - JavaScript
21
+ - Node.js
22
+ - TypeScript
23
+ - standard library
24
+ - scientific computing
25
+ - numerical computing
26
+ - statistical computing
27
+
28
+ license: Apache-2.0 AND BSL-1.0
29
+
30
+ date-released: 2016
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2022 The Stdlib Authors.
1
+ Copyright (c) 2016-2023 The Stdlib Authors.
package/README.md CHANGED
@@ -18,6 +18,17 @@ limitations under the License.
18
18
 
19
19
  -->
20
20
 
21
+
22
+ <details>
23
+ <summary>
24
+ About stdlib...
25
+ </summary>
26
+ <p>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.</p>
27
+ <p>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.</p>
28
+ <p>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.</p>
29
+ <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
30
+ </details>
31
+
21
32
  # Mean
22
33
 
23
34
  [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
@@ -169,7 +180,7 @@ See [LICENSE][stdlib-license].
169
180
 
170
181
  ## Copyright
171
182
 
172
- Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
183
+ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
173
184
 
174
185
  </section>
175
186
 
@@ -182,8 +193,8 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
182
193
  [npm-image]: http://img.shields.io/npm/v/@stdlib/stats-base-dists-rayleigh-mean.svg
183
194
  [npm-url]: https://npmjs.org/package/@stdlib/stats-base-dists-rayleigh-mean
184
195
 
185
- [test-image]: https://github.com/stdlib-js/stats-base-dists-rayleigh-mean/actions/workflows/test.yml/badge.svg?branch=v0.0.8
186
- [test-url]: https://github.com/stdlib-js/stats-base-dists-rayleigh-mean/actions/workflows/test.yml?query=branch:v0.0.8
196
+ [test-image]: https://github.com/stdlib-js/stats-base-dists-rayleigh-mean/actions/workflows/test.yml/badge.svg?branch=v0.1.1
197
+ [test-url]: https://github.com/stdlib-js/stats-base-dists-rayleigh-mean/actions/workflows/test.yml?query=branch:v0.1.1
187
198
 
188
199
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/stats-base-dists-rayleigh-mean/main.svg
189
200
  [coverage-url]: https://codecov.io/github/stdlib-js/stats-base-dists-rayleigh-mean?branch=main
@@ -196,7 +207,7 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
196
207
  -->
197
208
 
198
209
  [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
199
- [chat-url]: https://gitter.im/stdlib-js/stdlib/
210
+ [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
200
211
 
201
212
  [stdlib]: https://github.com/stdlib-js/stdlib
202
213
 
@@ -0,0 +1,3 @@
1
+ /// <reference path="../docs/types/index.d.ts" />
2
+ import mean from '../docs/types/index';
3
+ export = mean;
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";var u=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var n=u(function(q,t){
2
+ var i=require('@stdlib/math-base-assert-is-nan/dist'),a=require('@stdlib/constants-float64-sqrt-half-pi/dist');function s(r){return i(r)||r<0?NaN:r*a}t.exports=s
3
+ });var c=n();module.exports=c;
4
+ /** @license Apache-2.0 */
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../lib/main.js", "../lib/index.js"],
4
+ "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 isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar SQRT_HALF_PI = require( '@stdlib/constants-float64-sqrt-half-pi' );\n\n\n// MAIN //\n\n/**\n* Returns the expected value of a Rayleigh distribution.\n*\n* @param {NonNegativeNumber} sigma - scale parameter\n* @returns {NonNegativeNumber} expected value\n*\n* @example\n* var v = mean( 9.0 );\n* // returns ~11.28\n*\n* @example\n* var v = mean( 2.0 );\n* // returns ~2.507\n*\n* @example\n* var v = mean( -0.2 );\n* // returns NaN\n*\n* @example\n* var v = mean( NaN );\n* // returns NaN\n*/\nfunction mean( sigma ) {\n\tif ( isnan( sigma ) || sigma < 0.0 ) {\n\t\treturn NaN;\n\t}\n\treturn sigma * SQRT_HALF_PI;\n}\n\n\n// EXPORTS //\n\nmodule.exports = mean;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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* Rayleigh distribution expected value.\n*\n* @module @stdlib/stats-base-dists-rayleigh-mean\n*\n* @example\n* var mean = require( '@stdlib/stats-base-dists-rayleigh-mean' );\n*\n* var v = mean( 11.0 );\n* // returns ~13.786\n*\n* v = mean( 4.5 );\n* // returns ~5.64\n*/\n\n// MODULES //\n\nvar mean = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = mean;\n"],
5
+ "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAQ,QAAS,iCAAkC,EACnDC,EAAe,QAAS,wCAAyC,EA2BrE,SAASC,EAAMC,EAAQ,CACtB,OAAKH,EAAOG,CAAM,GAAKA,EAAQ,EACvB,IAEDA,EAAQF,CAChB,CAKAF,EAAO,QAAUG,ICvBjB,IAAIE,EAAO,IAKX,OAAO,QAAUA",
6
+ "names": ["require_main", "__commonJSMin", "exports", "module", "isnan", "SQRT_HALF_PI", "mean", "sigma", "mean"]
7
+ }
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- // TypeScript Version: 2.0
19
+ // TypeScript Version: 4.1
20
20
 
21
21
  /**
22
22
  * Returns the expected value of a Rayleigh distribution.
package/lib/index.js CHANGED
@@ -35,7 +35,7 @@
35
35
 
36
36
  // MODULES //
37
37
 
38
- var mean = require( './mean.js' );
38
+ var mean = require( './main.js' );
39
39
 
40
40
 
41
41
  // EXPORTS //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/stats-base-dists-rayleigh-mean",
3
- "version": "0.0.8",
3
+ "version": "0.1.1",
4
4
  "description": "Rayleigh distribution expected value.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -37,17 +37,17 @@
37
37
  "url": "https://github.com/stdlib-js/stdlib/issues"
38
38
  },
39
39
  "dependencies": {
40
- "@stdlib/constants-float64-sqrt-half-pi": "^0.0.x",
41
- "@stdlib/math-base-assert-is-nan": "^0.0.x"
40
+ "@stdlib/constants-float64-sqrt-half-pi": "^0.1.1",
41
+ "@stdlib/math-base-assert-is-nan": "^0.1.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@stdlib/bench": "^0.0.x",
45
- "@stdlib/constants-float64-eps": "^0.0.x",
46
- "@stdlib/constants-float64-ninf": "^0.0.x",
47
- "@stdlib/random-base-randu": "^0.0.x",
44
+ "@stdlib/bench": "^0.1.0",
45
+ "@stdlib/constants-float64-eps": "^0.1.0",
46
+ "@stdlib/constants-float64-ninf": "^0.1.0",
47
+ "@stdlib/random-base-randu": "^0.1.0",
48
48
  "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
49
49
  "istanbul": "^0.4.1",
50
- "tap-spec": "5.x.x"
50
+ "tap-min": "git+https://github.com/Planeshifter/tap-min.git"
51
51
  },
52
52
  "engines": {
53
53
  "node": ">=0.10.0",
@@ -80,7 +80,7 @@
80
80
  "continuous"
81
81
  ],
82
82
  "funding": {
83
- "type": "patreon",
84
- "url": "https://www.patreon.com/athan"
83
+ "type": "opencollective",
84
+ "url": "https://opencollective.com/stdlib"
85
85
  }
86
86
  }
package/docs/repl.txt DELETED
@@ -1,28 +0,0 @@
1
-
2
- {{alias}}( σ )
3
- Returns the expected value of a Rayleigh distribution.
4
-
5
- If provided `NaN` as any argument, the function returns `NaN`.
6
-
7
- If provided `σ <= 0`, the function returns `NaN`.
8
-
9
- Parameters
10
- ----------
11
- σ: number
12
- Scale parameter.
13
-
14
- Returns
15
- -------
16
- out: number
17
- Expected value.
18
-
19
- Examples
20
- --------
21
- > var v = {{alias}}( 11.0 )
22
- ~13.786
23
- > v = {{alias}}( 4.5 )
24
- ~5.64
25
-
26
- See Also
27
- --------
28
-
@@ -1,44 +0,0 @@
1
- /*
2
- * @license Apache-2.0
3
- *
4
- * Copyright (c) 2019 The Stdlib Authors.
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- import mean = require( './index' );
20
-
21
-
22
- // TESTS //
23
-
24
- // The function returns a number...
25
- {
26
- mean( 0.3 ); // $ExpectType number
27
- }
28
-
29
- // The function does not compile if provided a value other than a number...
30
- {
31
- mean( true ); // $ExpectError
32
- mean( false ); // $ExpectError
33
- mean( null ); // $ExpectError
34
- mean( undefined ); // $ExpectError
35
- mean( '5' ); // $ExpectError
36
- mean( [] ); // $ExpectError
37
- mean( {} ); // $ExpectError
38
- mean( ( x: number ): number => x ); // $ExpectError
39
- }
40
-
41
- // The function does not compile if provided insufficient arguments...
42
- {
43
- mean(); // $ExpectError
44
- }
File without changes