@stdlib/stats-base-dists-triangular-ctor 0.0.7 → 0.1.0

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/LICENSE CHANGED
@@ -175,307 +175,3 @@
175
175
  of your accepting any such warranty or additional liability.
176
176
 
177
177
  END OF TERMS AND CONDITIONS
178
-
179
-
180
-
181
- Boost Software License - Version 1.0 - August 17th, 2003
182
-
183
- Permission is hereby granted, free of charge, to any person or organization
184
- obtaining a copy of the software and accompanying documentation covered by this
185
- license (the "Software") to use, reproduce, display, distribute, execute, and
186
- transmit the Software, and to prepare derivative works of the Software, and to
187
- permit third-parties to whom the Software is furnished to do so, all subject to
188
- the following:
189
-
190
- The copyright notices in the Software and this entire statement, including the
191
- above license grant, this restriction and the following disclaimer, must be
192
- included in all copies of the Software, in whole or in part, and all derivative
193
- works of the Software, unless such copies or derivative works are solely in the
194
- form of machine-executable object code generated by a source language processor.
195
-
196
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
197
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
198
- FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
199
- COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES
200
- OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
201
- OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
202
-
203
-
204
-
205
-
206
- DEPENDENCIES
207
-
208
- The library links against the following external libraries, which have their own
209
- licenses:
210
-
211
- * OpenBLAS <https://raw.githubusercontent.com/xianyi/OpenBLAS/
212
- def146efed8d5908ea04e22668feeab7099599a0/LICENSE>
213
-
214
- Copyright (c) 2011-2014, The OpenBLAS Project
215
- All rights reserved.
216
-
217
- Redistribution and use in source and binary forms, with or without
218
- modification, are permitted provided that the following conditions are
219
- met:
220
-
221
- 1. Redistributions of source code must retain the above copyright
222
- notice, this list of conditions and the following disclaimer.
223
-
224
- 2. Redistributions in binary form must reproduce the above copyright
225
- notice, this list of conditions and the following disclaimer in
226
- the documentation and/or other materials provided with the
227
- distribution.
228
-
229
- 3. Neither the name of the OpenBLAS project nor the names of
230
- its contributors may be used to endorse or promote products
231
- derived from this software without specific prior written
232
- permission.
233
-
234
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
235
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
236
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
237
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
238
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
239
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
240
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
242
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
243
- THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
244
-
245
-
246
- * Electron <https://raw.githubusercontent.com/electron/electron/
247
- c4cfb3e7110266b9d7ad80e1ae097c4db564501c/LICENSE>
248
-
249
- Copyright (c) 2013-2017 GitHub Inc.
250
-
251
- Permission is hereby granted, free of charge, to any person obtaining
252
- a copy of this software and associated documentation files (the
253
- "Software"), to deal in the Software without restriction, including
254
- without limitation the rights to use, copy, modify, merge, publish,
255
- distribute, sublicense, and/or sell copies of the Software, and to
256
- permit persons to whom the Software is furnished to do so, subject to
257
- the following conditions:
258
-
259
- The above copyright notice and this permission notice shall be
260
- included in all copies or substantial portions of the Software.
261
-
262
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
263
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
264
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
265
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
266
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
267
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
268
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
269
-
270
-
271
- * Boost <http://www.boost.org/LICENSE_1_0.txt>
272
-
273
- Boost Software License - Version 1.0 - August 17th, 2003
274
-
275
- Permission is hereby granted, free of charge, to any person or organization
276
- obtaining a copy of the software and accompanying documentation covered by
277
- this license (the "Software") to use, reproduce, display, distribute,
278
- execute, and transmit the Software, and to prepare derivative works of the
279
- Software, and to permit third-parties to whom the Software is furnished to
280
- do so, all subject to the following:
281
-
282
- The copyright notices in the Software and this entire statement, including
283
- the above license grant, this restriction and the following disclaimer,
284
- must be included in all copies of the Software, in whole or in part, and
285
- all derivative works of the Software, unless such copies or derivative
286
- works are solely in the form of machine-executable object code generated by
287
- a source language processor.
288
-
289
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
290
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
291
- FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
292
- SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
293
- FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
294
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
295
- DEALINGS IN THE SOFTWARE.
296
-
297
-
298
- * Cephes <http://www.netlib.org/cephes/readme>
299
-
300
- Copyright (c) 1984-2000 Stephen L. Moshier
301
-
302
- Some software in this archive may be from the book _Methods and Programs for
303
- Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989)
304
- or from the Cephes Mathematical Library, a commercial product. In either event,
305
- it is copyrighted by the author. What you see here may be used freely but it
306
- comes with no support or guarantee.
307
-
308
- Stephen L. Moshier
309
- moshier@na-net.ornl.gov
310
-
311
-
312
-
313
- ATTRIBUTION
314
-
315
- The library contains implementations from the following external libraries,
316
- which have their own licenses:
317
-
318
- * FreeBSD <https://svnweb.freebsd.org/>
319
-
320
- Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved.
321
-
322
- Developed at SunPro, a Sun Microsystems, Inc. business.
323
- Permission to use, copy, modify, and distribute this
324
- software is freely granted, provided that this notice
325
- is preserved.
326
-
327
-
328
- * FDLIBM <http://www.netlib.org/fdlibm/>
329
-
330
- Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
331
-
332
- Developed at SunPro, a Sun Microsystems, Inc. business.
333
- Permission to use, copy, modify, and distribute this
334
- software is freely granted, provided that this notice
335
- is preserved.
336
-
337
-
338
- * Go <https://raw.githubusercontent.com/golang/go/master/LICENSE>
339
-
340
- Copyright (c) 2009 The Go Authors. All rights reserved.
341
-
342
- Redistribution and use in source and binary forms, with or without
343
- modification, are permitted provided that the following conditions are
344
- met:
345
-
346
- * Redistributions of source code must retain the above copyright
347
- notice, this list of conditions and the following disclaimer.
348
- * Redistributions in binary form must reproduce the above
349
- copyright notice, this list of conditions and the following disclaimer
350
- in the documentation and/or other materials provided with the
351
- distribution.
352
- * Neither the name of Google Inc. nor the names of its
353
- contributors may be used to endorse or promote products derived from
354
- this software without specific prior written permission.
355
-
356
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
357
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
358
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
359
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
360
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
361
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
362
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
363
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
364
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
365
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
366
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
367
-
368
-
369
- * SLATEC Common Mathematical Library <http://www.netlib.no/netlib/slatec/>
370
-
371
- Public domain.
372
-
373
-
374
- * ESLint <https://raw.githubusercontent.com/eslint/eslint/master/LICENSE>
375
-
376
- Copyright JS Foundation and other contributors, https://js.foundation
377
-
378
- Permission is hereby granted, free of charge, to any person obtaining a copy
379
- of this software and associated documentation files (the "Software"), to deal
380
- in the Software without restriction, including without limitation the rights
381
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
382
- copies of the Software, and to permit persons to whom the Software is
383
- furnished to do so, subject to the following conditions:
384
-
385
- The above copyright notice and this permission notice shall be included in
386
- all copies or substantial portions of the Software.
387
-
388
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
389
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
390
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
391
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
392
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
393
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
394
- THE SOFTWARE.
395
-
396
-
397
- * StatsFuns.jl <https://raw.githubusercontent.com/JuliaStats/StatsFuns.jl/
398
- e66dd973650c375bc1739c820e5b96bb5bd000a8/LICENSE.md>
399
-
400
- Copyright (c) 2015: Dahua Lin.
401
-
402
- Permission is hereby granted, free of charge, to any person obtaining
403
- a copy of this software and associated documentation files (the
404
- "Software"), to deal in the Software without restriction, including
405
- without limitation the rights to use, copy, modify, merge, publish,
406
- distribute, sublicense, and/or sell copies of the Software, and to
407
- permit persons to whom the Software is furnished to do so, subject to
408
- the following conditions:
409
-
410
- The above copyright notice and this permission notice shall be
411
- included in all copies or substantial portions of the Software.
412
-
413
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
414
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
415
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
416
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
417
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
418
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
419
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
420
-
421
-
422
- * SpecialFunctions.jl <https://raw.githubusercontent.com/JuliaMath/
423
- SpecialFunctions.jl/02a173fbe24a61c4b392aec17a9764ac5727feb1/LICENSE>
424
-
425
- The MIT License (MIT)
426
-
427
- Copyright (c) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others:
428
-
429
- https://github.com/JuliaMath/SpecialFunctions.jl/graphs/contributors
430
-
431
- Permission is hereby granted, free of charge, to any person obtaining a copy
432
- of this software and associated documentation files (the "Software"), to deal
433
- in the Software without restriction, including without limitation the rights
434
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
435
- copies of the Software, and to permit persons to whom the Software is
436
- furnished to do so, subject to the following conditions:
437
-
438
- The above copyright notice and this permission notice shall be included in all
439
- copies or substantial portions of the Software.
440
-
441
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
442
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
443
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
444
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
445
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
446
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
447
- SOFTWARE.
448
-
449
-
450
- * MT19937 <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/
451
- mt19937ar.c>
452
-
453
- Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
454
- All rights reserved.
455
-
456
- Redistribution and use in source and binary forms, with or without
457
- modification, are permitted provided that the following conditions
458
- are met:
459
-
460
- 1. Redistributions of source code must retain the above copyright
461
- notice, this list of conditions and the following disclaimer.
462
-
463
- 2. Redistributions in binary form must reproduce the above copyright
464
- notice, this list of conditions and the following disclaimer in the
465
- documentation and/or other materials provided with the distribution.
466
-
467
- 3. The names of its contributors may not be used to endorse or promote
468
- products derived from this software without specific prior written
469
- permission.
470
-
471
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
472
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
473
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
474
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
475
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
476
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
477
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
478
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
479
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
480
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
481
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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
  # Triangular
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] -->
@@ -368,7 +379,7 @@ See [LICENSE][stdlib-license].
368
379
 
369
380
  ## Copyright
370
381
 
371
- Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
382
+ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
372
383
 
373
384
  </section>
374
385
 
@@ -381,8 +392,8 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
381
392
  [npm-image]: http://img.shields.io/npm/v/@stdlib/stats-base-dists-triangular-ctor.svg
382
393
  [npm-url]: https://npmjs.org/package/@stdlib/stats-base-dists-triangular-ctor
383
394
 
384
- [test-image]: https://github.com/stdlib-js/stats-base-dists-triangular-ctor/actions/workflows/test.yml/badge.svg
385
- [test-url]: https://github.com/stdlib-js/stats-base-dists-triangular-ctor/actions/workflows/test.yml
395
+ [test-image]: https://github.com/stdlib-js/stats-base-dists-triangular-ctor/actions/workflows/test.yml/badge.svg?branch=v0.1.0
396
+ [test-url]: https://github.com/stdlib-js/stats-base-dists-triangular-ctor/actions/workflows/test.yml?query=branch:v0.1.0
386
397
 
387
398
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/stats-base-dists-triangular-ctor/main.svg
388
399
  [coverage-url]: https://codecov.io/github/stdlib-js/stats-base-dists-triangular-ctor?branch=main
@@ -394,19 +405,20 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
394
405
 
395
406
  -->
396
407
 
408
+ [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
409
+ [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
410
+
411
+ [stdlib]: https://github.com/stdlib-js/stdlib
412
+
413
+ [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
414
+
397
415
  [umd]: https://github.com/umdjs/umd
398
416
  [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
399
417
 
400
418
  [deno-url]: https://github.com/stdlib-js/stats-base-dists-triangular-ctor/tree/deno
401
419
  [umd-url]: https://github.com/stdlib-js/stats-base-dists-triangular-ctor/tree/umd
402
420
  [esm-url]: https://github.com/stdlib-js/stats-base-dists-triangular-ctor/tree/esm
403
-
404
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
405
- [chat-url]: https://gitter.im/stdlib-js/stdlib/
406
-
407
- [stdlib]: https://github.com/stdlib-js/stdlib
408
-
409
- [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
421
+ [branches-url]: https://github.com/stdlib-js/stats-base-dists-triangular-ctor/blob/main/branches.md
410
422
 
411
423
  [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/stats-base-dists-triangular-ctor/main/LICENSE
412
424
 
@@ -0,0 +1,3 @@
1
+ /// <reference path="../docs/types/index.d.ts" />
2
+ import Triangular from '../docs/types/index';
3
+ export = Triangular;
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";var c=function(t,i){return function(){return i||t((i={exports:{}}).exports,i),i.exports}};var p=c(function(N,g){
2
+ var f=require('@stdlib/utils-define-property/dist'),h=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),a=require('@stdlib/utils-define-nonenumerable-read-only-accessor/dist'),u=require('@stdlib/assert-is-number/dist').isPrimitive,o=require('@stdlib/math-base-assert-is-nan/dist'),b=require('@stdlib/stats-base-dists-triangular-entropy/dist'),l=require('@stdlib/stats-base-dists-triangular-kurtosis/dist'),d=require('@stdlib/stats-base-dists-triangular-mean/dist'),q=require('@stdlib/stats-base-dists-triangular-median/dist'),y=require('@stdlib/stats-base-dists-triangular-mode/dist'),w=require('@stdlib/stats-base-dists-triangular-skewness/dist'),v=require('@stdlib/stats-base-dists-triangular-stdev/dist'),E=require('@stdlib/stats-base-dists-triangular-variance/dist'),M=require('@stdlib/stats-base-dists-triangular-cdf/dist'),V=require('@stdlib/stats-base-dists-triangular-logcdf/dist'),T=require('@stdlib/stats-base-dists-triangular-logpdf/dist'),R=require('@stdlib/stats-base-dists-triangular-mgf/dist'),x=require('@stdlib/stats-base-dists-triangular-pdf/dist'),F=require('@stdlib/stats-base-dists-triangular-quantile/dist'),s=require('@stdlib/error-tools-fmtprodmsg/dist');function P(t){return M(t,this.a,this.b,this.c)}function k(t){return V(t,this.a,this.b,this.c)}function D(t){return T(t,this.a,this.b,this.c)}function C(t){return R(t,this.a,this.b,this.c)}function L(t){return x(t,this.a,this.b,this.c)}function O(t){return F(t,this.a,this.b,this.c)}function e(){var t,i,n;if(!(this instanceof e))return arguments.length===0?new e:new e(arguments[0],arguments[1],arguments[2]);if(arguments.length){if(t=arguments[0],i=arguments[1],n=arguments[2],!u(t)||o(t))throw new TypeError(s('18d8a',t));if(!u(i)||o(i))throw new TypeError(s('18d8b',i));if(!u(n)||o(n))throw new TypeError(s('18d9B',n));if(!(t<=n&&n<=i))throw new RangeError(s('18d9C',"a <= c <= b",t,i,n))}else t=0,i=1,n=.5;return f(this,"a",{configurable:!1,enumerable:!0,get:function(){return t},set:function(r){if(!u(r)||o(r))throw new TypeError(s('18d8d',r));if(r>i||r>n)throw new RangeError(s('18d9D',r));t=r}}),f(this,"b",{configurable:!1,enumerable:!0,get:function(){return i},set:function(r){if(!u(r)||o(r))throw new TypeError(s('18d8d',r));if(t>r||n>r)throw new RangeError(s('18d9E',r));i=r}}),f(this,"c",{configurable:!1,enumerable:!0,get:function(){return n},set:function(r){if(!u(r)||o(r))throw new TypeError(s('18d8d',r));if(t>r||i<r)throw new RangeError(s('18d9F',r));n=r}}),this;}a(e.prototype,"entropy",function(){return b(this.a,this.b,this.c)});a(e.prototype,"kurtosis",function(){return l(this.a,this.b,this.c)});a(e.prototype,"mean",function(){return d(this.a,this.b,this.c)});a(e.prototype,"median",function(){return q(this.a,this.b,this.c)});a(e.prototype,"mode",function(){return y(this.a,this.b,this.c)});a(e.prototype,"skewness",function(){return w(this.a,this.b,this.c)});a(e.prototype,"stdev",function(){return v(this.a,this.b,this.c)});a(e.prototype,"variance",function(){return E(this.a,this.b,this.c)});h(e.prototype,"cdf",P);h(e.prototype,"logcdf",k);h(e.prototype,"logpdf",D);h(e.prototype,"mgf",C);h(e.prototype,"pdf",L);h(e.prototype,"quantile",O);g.exports=e
3
+ });var A=p();module.exports=A;
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/* 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 isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar entropy = require( '@stdlib/stats-base-dists-triangular-entropy' );\nvar kurtosis = require( '@stdlib/stats-base-dists-triangular-kurtosis' );\nvar mean = require( '@stdlib/stats-base-dists-triangular-mean' );\nvar median = require( '@stdlib/stats-base-dists-triangular-median' );\nvar mode = require( '@stdlib/stats-base-dists-triangular-mode' );\nvar skewness = require( '@stdlib/stats-base-dists-triangular-skewness' );\nvar stdev = require( '@stdlib/stats-base-dists-triangular-stdev' );\nvar variance = require( '@stdlib/stats-base-dists-triangular-variance' );\nvar cdf = require( '@stdlib/stats-base-dists-triangular-cdf' );\nvar logcdf = require( '@stdlib/stats-base-dists-triangular-logcdf' );\nvar logpdf = require( '@stdlib/stats-base-dists-triangular-logpdf' );\nvar mgf = require( '@stdlib/stats-base-dists-triangular-mgf' );\nvar pdf = require( '@stdlib/stats-base-dists-triangular-pdf' );\nvar quantile = require( '@stdlib/stats-base-dists-triangular-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 triangularCDF( x ) {\n\treturn cdf( x, this.a, this.b, this.c );\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 triangularLogCDF( x ) {\n\treturn logcdf( x, this.a, this.b, this.c );\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 triangularLogPDF( x ) {\n\treturn logpdf( x, this.a, this.b, this.c );\n}\n\n/**\n* Evaluates the moment-generating function (MGF).\n*\n* @private\n* @param {number} t - input value\n* @returns {number} evaluated MGF\n*/\nfunction triangularMGF( t ) {\n\treturn mgf( t, this.a, this.b, this.c );\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 triangularPDF( x ) {\n\treturn pdf( x, this.a, this.b, this.c );\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 triangularQuantile( p ) {\n\treturn quantile( p, this.a, this.b, this.c );\n}\n\n\n// MAIN //\n\n/**\n* Triangular distribution constructor.\n*\n* @constructor\n* @param {number} [a=0.0] - minimum support\n* @param {number} [b=1.0] - maximum support\n* @param {number} [c=0.5] - mode\n* @throws {TypeError} `a` must be a number\n* @throws {TypeError} `b` must be a number\n* @throws {TypeError} `c` must be a number\n* @throws {RangeError} `a` must be less than or equal to `b` and `c`\n* @throws {RangeError} `b` must be greater than or equal to `a` and `b`\n* @throws {RangeError} `c` must be greater than or equal to `a` and smaller than or equal to `b`\n* @returns {Triangular} distribution instance\n*\n* @example\n* var triangular = new Triangular( 0.0, 1.0, 0.25 );\n*\n* var y = triangular.cdf( 0.8 );\n* // returns ~0.947\n*\n* var mu = triangular.mean;\n* // returns ~0.417\n*/\nfunction Triangular() {\n\tvar a;\n\tvar b;\n\tvar c;\n\tif ( !(this instanceof Triangular) ) {\n\t\tif ( arguments.length === 0 ) {\n\t\t\treturn new Triangular();\n\t\t}\n\t\treturn new Triangular( arguments[ 0 ], arguments[ 1 ], arguments[ 2 ] );\n\t}\n\tif ( arguments.length ) {\n\t\ta = arguments[ 0 ];\n\t\tb = arguments[ 1 ];\n\t\tc = arguments[ 2 ];\n\t\tif ( !isNumber( a ) || isnan( a ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Minimum support must be a number. Value: `%s`.', a ) );\n\t\t}\n\t\tif ( !isNumber( b ) || isnan( b ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Maximum support must be a number. Value: `%s`.', b ) );\n\t\t}\n\t\tif ( !isNumber( c ) || isnan( c ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Mode must be a number. Value: `%s`.', c ) );\n\t\t}\n\t\tif ( !( a <= c && c <= b ) ) {\n\t\t\tthrow new RangeError( format( 'invalid arguments. Parameters must satisfy the following condition: %s. a: `%f`. b: `%f`. c: `%f`.', 'a <= c <= b', a, b, c ) );\n\t\t}\n\t} else {\n\t\ta = 0.0;\n\t\tb = 1.0;\n\t\tc = 0.5;\n\t}\n\tdefineProperty( this, 'a', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'get': function get() {\n\t\t\treturn a;\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\tif ( value > b || value > c ) {\n\t\t\t\tthrow new RangeError( format( 'invalid assignment. Must be less than or equal to both the maximum support and the mode. Value: `%f`.', value ) );\n\t\t\t}\n\t\t\ta = value;\n\t\t}\n\t});\n\tdefineProperty( this, 'b', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'get': function get() {\n\t\t\treturn b;\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\tif ( a > value || c > value ) {\n\t\t\t\tthrow new RangeError( format( 'invalid assignment. Must be greater than or equal to both the minimum support and the mode. Value: `%f`.', value ) );\n\t\t\t}\n\t\t\tb = value;\n\t\t}\n\t});\n\tdefineProperty( this, 'c', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'get': function get() {\n\t\t\treturn c;\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\tif ( a > value || b < value ) {\n\t\t\t\tthrow new RangeError( format( 'invalid assignment. Must be greater than or equal to the minimum support and less than or equal to the maximum support. Value: `%f`.', value ) );\n\t\t\t}\n\t\t\tc = value;\n\t\t}\n\t});\n\treturn this;\n}\n\n/**\n* Triangular distribution differential entropy.\n*\n* @name entropy\n* @memberof Triangular.prototype\n* @type {number}\n* @see [differential entropy]{@link https://en.wikipedia.org/wiki/Entropy_%28information_theory%29}\n*\n* @example\n* var triangular = new Triangular( 4.0, 12.0, 10.0 );\n*\n* var v = triangular.entropy;\n* // returns ~1.886\n*/\nsetReadOnlyAccessor( Triangular.prototype, 'entropy', function get() {\n\treturn entropy( this.a, this.b, this.c );\n});\n\n/**\n* Triangular distribution excess kurtosis.\n*\n* @name kurtosis\n* @memberof Triangular.prototype\n* @type {number}\n* @see [kurtosis]{@link https://en.wikipedia.org/wiki/Kurtosis}\n*\n* @example\n* var triangular = new Triangular( 4.0, 12.0, 10.0 );\n*\n* var v = triangular.kurtosis;\n* // returns -0.6\n*/\nsetReadOnlyAccessor( Triangular.prototype, 'kurtosis', function get() {\n\treturn kurtosis( this.a, this.b, this.c );\n});\n\n/**\n* Triangular distribution expected value.\n*\n* @name mean\n* @memberof Triangular.prototype\n* @type {number}\n* @see [expected value]{@link https://en.wikipedia.org/wiki/Expected_value}\n*\n* @example\n* var triangular = new Triangular( 4.0, 12.0, 10.0 );\n*\n* var v = triangular.mean;\n* // returns ~8.667\n*/\nsetReadOnlyAccessor( Triangular.prototype, 'mean', function get() {\n\treturn mean( this.a, this.b, this.c );\n});\n\n/**\n* Triangular distribution median.\n*\n* @name median\n* @memberof Triangular.prototype\n* @type {number}\n* @see [median]{@link https://en.wikipedia.org/wiki/Median}\n*\n* @example\n* var triangular = new Triangular( 4.0, 12.0, 10.0 );\n*\n* var v = triangular.median;\n* // returns ~8.899\n*/\nsetReadOnlyAccessor( Triangular.prototype, 'median', function get() {\n\treturn median( this.a, this.b, this.c );\n});\n\n/**\n* Triangular distribution mode.\n*\n* @name mode\n* @memberof Triangular.prototype\n* @type {number}\n* @see [mode]{@link https://en.wikipedia.org/wiki/Mode_%28statistics%29}\n*\n* @example\n* var triangular = new Triangular( 4.0, 12.0, 10.0 );\n*\n* var v = triangular.mode;\n* // returns 10.0\n*/\nsetReadOnlyAccessor( Triangular.prototype, 'mode', function get() {\n\treturn mode( this.a, this.b, this.c );\n});\n\n/**\n* Triangular distribution skewness.\n*\n* @name skewness\n* @memberof Triangular.prototype\n* @type {number}\n* @see [skewness]{@link https://en.wikipedia.org/wiki/Skewness}\n*\n* @example\n* var triangular = new Triangular( 4.0, 12.0, 10.0 );\n*\n* var v = triangular.skewness;\n* // returns ~-0.422\n*/\nsetReadOnlyAccessor( Triangular.prototype, 'skewness', function get() {\n\treturn skewness( this.a, this.b, this.c );\n});\n\n/**\n* Triangular distribution standard deviation.\n*\n* @name stdev\n* @memberof Triangular.prototype\n* @type {PositiveNumber}\n* @see [standard deviation]{@link https://en.wikipedia.org/wiki/Standard_deviation}\n*\n* @example\n* var triangular = new Triangular( 4.0, 12.0, 10.0 );\n*\n* var v = triangular.stdev;\n* // returns ~1.7\n*/\nsetReadOnlyAccessor( Triangular.prototype, 'stdev', function get() {\n\treturn stdev( this.a, this.b, this.c );\n});\n\n/**\n* Triangular distribution variance.\n*\n* @name variance\n* @memberof Triangular.prototype\n* @type {PositiveNumber}\n* @see [variance]{@link https://en.wikipedia.org/wiki/Variance}\n*\n* @example\n* var triangular = new Triangular( 4.0, 12.0, 10.0 );\n*\n* var v = triangular.variance;\n* // returns ~2.889\n*/\nsetReadOnlyAccessor( Triangular.prototype, 'variance', function get() {\n\treturn variance( this.a, this.b, this.c );\n});\n\n/**\n* Evaluates the cumulative distribution function (CDF).\n*\n* @name cdf\n* @memberof Triangular.prototype\n* @type {Function}\n* @param {number} x - input value\n* @returns {Probability} evaluated CDF\n* @see [cdf]{@link https://en.wikipedia.org/wiki/Cumulative_distribution_function}\n*\n* @example\n* var triangular = new Triangular( 2.0, 4.0, 3.0 );\n*\n* var v = triangular.cdf( 3.0 );\n* // returns 0.5\n*/\nsetReadOnly( Triangular.prototype, 'cdf', triangularCDF );\n\n/**\n* Evaluates the natural logarithm of the cumulative distribution function (CDF).\n*\n* @name logcdf\n* @memberof Triangular.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 triangular = new Triangular( 2.0, 4.0, 3.0 );\n*\n* var v = triangular.logcdf( 3.0 );\n* // returns ~-0.693\n*/\nsetReadOnly( Triangular.prototype, 'logcdf', triangularLogCDF );\n\n/**\n* Evaluates the natural logarithm of the probability density function (PDF).\n*\n* @name logpdf\n* @memberof Triangular.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 triangular = new Triangular( 2.0, 4.0, 3.0 );\n*\n* var v = triangular.logpdf( 2.4 );\n* // returns ~-0.916\n*/\nsetReadOnly( Triangular.prototype, 'logpdf', triangularLogPDF );\n\n/**\n* Evaluates the moment-generating function (MGF).\n*\n* @name mgf\n* @memberof Triangular.prototype\n* @type {Function}\n* @param {number} t - input value\n* @returns {number} evaluated MGF\n* @see [mgf]{@link https://en.wikipedia.org/wiki/Moment-generating_function}\n*\n* @example\n* var triangular = new Triangular( 2.0, 4.0, 3.0 );\n*\n* var v = triangular.mgf( 0.5 );\n* // returns ~4.576\n*/\nsetReadOnly( Triangular.prototype, 'mgf', triangularMGF );\n\n/**\n* Evaluates the probability density function (PDF).\n*\n* @name pdf\n* @memberof Triangular.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 triangular = new Triangular( 2.0, 4.0, 3.0 );\n*\n* var v = triangular.pdf( 2.4 );\n* // returns ~0.40\n*/\nsetReadOnly( Triangular.prototype, 'pdf', triangularPDF );\n\n/**\n* Evaluates the quantile function.\n*\n* @name quantile\n* @memberof Triangular.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 triangular = new Triangular( 2.0, 4.0, 3.0 );\n*\n* var v = triangular.quantile( 0.5 );\n* // returns 3.0\n*/\nsetReadOnly( Triangular.prototype, 'quantile', triangularQuantile );\n\n\n// EXPORTS //\n\nmodule.exports = Triangular;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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* Triangular distribution constructor.\n*\n* @module @stdlib/stats-base-dists-triangular-ctor\n*\n* @example\n* var Triangular = require( '@stdlib/stats-base-dists-triangular-ctor' );\n*\n* var triangular = new Triangular( 0.0, 1.0, 0.5 );\n*\n* var y = triangular.cdf( 0.8 );\n* // returns 0.92\n*\n* var mu = triangular.mean;\n* // returns 0.5\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
5
+ "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAwBA,IAAIC,EAAiB,QAAS,+BAAgC,EAC1DC,EAAc,QAA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AAK,EAAG,KAAK,CAAE,CACtC,CAAC,EAgBDT,EAAqB0B,EAAW,UAAW,WAAY,UAAe,CACrE,OAAOhB,EAAU,KAAK,EAAG,KAAK,EAAG,KAAK,CAAE,CACzC,CAAC,EAkBDX,EAAa2B,EAAW,UAAW,MAAOR,CAAc,EAkBxDnB,EAAa2B,EAAW,UAAW,SAAUN,CAAiB,EAkB9DrB,EAAa2B,EAAW,UAAW,SAAUL,CAAiB,EAkB9DtB,EAAa2B,EAAW,UAAW,MAAOJ,CAAc,EAkBxDvB,EAAa2B,EAAW,UAAW,MAAOH,CAAc,EAkBxDxB,EAAa2B,EAAW,UAAW,WAAYF,CAAmB,EAKlE3B,EAAO,QAAU6B,ICvbjB,IAAIK,EAAO,IAKX,OAAO,QAAUA",
6
+ "names": ["require_main", "__commonJSMin", "exports", "module", "defineProperty", "setReadOnly", "setReadOnlyAccessor", "isNumber", "isnan", "entropy", "kurtosis", "mean", "median", "mode", "skewness", "stdev", "variance", "cdf", "logcdf", "logpdf", "mgf", "pdf", "quantile", "format", "triangularCDF", "x", "triangularLogCDF", "triangularLogPDF", "triangularMGF", "triangularPDF", "triangularQuantile", "p", "Triangular", "a", "b", "c", "value", "main"]
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
  * Triangular Distribution.
package/lib/index.js CHANGED
@@ -37,9 +37,9 @@
37
37
 
38
38
  // MODULES //
39
39
 
40
- var ctor = require( './ctor.js' );
40
+ var main = require( './main.js' );
41
41
 
42
42
 
43
43
  // EXPORTS //
44
44
 
45
- module.exports = ctor;
45
+ module.exports = main;
@@ -41,6 +41,7 @@ var logpdf = require( '@stdlib/stats-base-dists-triangular-logpdf' );
41
41
  var mgf = require( '@stdlib/stats-base-dists-triangular-mgf' );
42
42
  var pdf = require( '@stdlib/stats-base-dists-triangular-pdf' );
43
43
  var quantile = require( '@stdlib/stats-base-dists-triangular-quantile' );
44
+ var format = require( '@stdlib/string-format' );
44
45
 
45
46
 
46
47
  // FUNCTIONS //
@@ -121,10 +122,10 @@ function triangularQuantile( p ) {
121
122
  * @param {number} [a=0.0] - minimum support
122
123
  * @param {number} [b=1.0] - maximum support
123
124
  * @param {number} [c=0.5] - mode
124
- * @throws {TypeError} `a` must be a number primitive
125
- * @throws {TypeError} `b` must be a number primitive
126
- * @throws {TypeError} `c` must be a number primitive
127
- * @throws {RangeError} `a` must be smaller than or equal to `b` and `c`
125
+ * @throws {TypeError} `a` must be a number
126
+ * @throws {TypeError} `b` must be a number
127
+ * @throws {TypeError} `c` must be a number
128
+ * @throws {RangeError} `a` must be less than or equal to `b` and `c`
128
129
  * @throws {RangeError} `b` must be greater than or equal to `a` and `b`
129
130
  * @throws {RangeError} `c` must be greater than or equal to `a` and smaller than or equal to `b`
130
131
  * @returns {Triangular} distribution instance
@@ -153,16 +154,16 @@ function Triangular() {
153
154
  b = arguments[ 1 ];
154
155
  c = arguments[ 2 ];
155
156
  if ( !isNumber( a ) || isnan( a ) ) {
156
- throw new TypeError( 'invalid argument. Minimum support `a` must be a number primitive. Value: `' + a + '`' );
157
+ throw new TypeError( format( 'invalid argument. Minimum support must be a number. Value: `%s`.', a ) );
157
158
  }
158
159
  if ( !isNumber( b ) || isnan( b ) ) {
159
- throw new TypeError( 'invalid argument. Maximum support `b` must be a number primitive. Value: `' + b + '`' );
160
+ throw new TypeError( format( 'invalid argument. Maximum support must be a number. Value: `%s`.', b ) );
160
161
  }
161
162
  if ( !isNumber( c ) || isnan( c ) ) {
162
- throw new TypeError( 'invalid argument. Mode `c` must be a number primitive. Value: `' + c + '`' );
163
+ throw new TypeError( format( 'invalid argument. Mode must be a number. Value: `%s`.', c ) );
163
164
  }
164
165
  if ( !( a <= c && c <= b ) ) {
165
- throw new RangeError( 'invalid arguments. Parameters must satisfy `a <= c <= b`. Value: `' + a + ',' + b + ',' + c + '`' );
166
+ throw new RangeError( format( 'invalid arguments. Parameters must satisfy the following condition: %s. a: `%f`. b: `%f`. c: `%f`.', 'a <= c <= b', a, b, c ) );
166
167
  }
167
168
  } else {
168
169
  a = 0.0;
@@ -177,10 +178,10 @@ function Triangular() {
177
178
  },
178
179
  'set': function set( value ) {
179
180
  if ( !isNumber( value ) || isnan( value ) ) {
180
- throw new TypeError( 'invalid value. Must be a number primitive. Value: `' + value + '`' );
181
+ throw new TypeError( format( 'invalid assignment. Must be a number. Value: `%s`.', value ) );
181
182
  }
182
183
  if ( value > b || value > c ) {
183
- throw new RangeError( 'invalid value. Must be smaller than or equal to `b` and `c`. Value: `'+ value + '`' );
184
+ throw new RangeError( format( 'invalid assignment. Must be less than or equal to both the maximum support and the mode. Value: `%f`.', value ) );
184
185
  }
185
186
  a = value;
186
187
  }
@@ -193,10 +194,10 @@ function Triangular() {
193
194
  },
194
195
  'set': function set( value ) {
195
196
  if ( !isNumber( value ) || isnan( value ) ) {
196
- throw new TypeError( 'invalid value. Must be a number primitive. Value: `' + value + '`' );
197
+ throw new TypeError( format( 'invalid assignment. Must be a number. Value: `%s`.', value ) );
197
198
  }
198
199
  if ( a > value || c > value ) {
199
- throw new RangeError( 'invalid value. Must be greater than or equal to `a` and `c`. Value: `'+ value + '`' );
200
+ throw new RangeError( format( 'invalid assignment. Must be greater than or equal to both the minimum support and the mode. Value: `%f`.', value ) );
200
201
  }
201
202
  b = value;
202
203
  }
@@ -209,10 +210,10 @@ function Triangular() {
209
210
  },
210
211
  'set': function set( value ) {
211
212
  if ( !isNumber( value ) || isnan( value ) ) {
212
- throw new TypeError( 'invalid value. Must be a number primitive. Value: `' + value + '`' );
213
+ throw new TypeError( format( 'invalid assignment. Must be a number. Value: `%s`.', value ) );
213
214
  }
214
215
  if ( a > value || b < value ) {
215
- throw new RangeError( 'invalid value. Must be greater than or equal to `a` and smaller than or equal to `b`. Value: `'+ value + '`' );
216
+ throw new RangeError( format( 'invalid assignment. Must be greater than or equal to the minimum support and less than or equal to the maximum support. Value: `%f`.', value ) );
216
217
  }
217
218
  c = value;
218
219
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/stats-base-dists-triangular-ctor",
3
- "version": "0.0.7",
3
+ "version": "0.1.0",
4
4
  "description": "Triangular distribution constructor.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -37,35 +37,37 @@
37
37
  "url": "https://github.com/stdlib-js/stdlib/issues"
38
38
  },
39
39
  "dependencies": {
40
- "@stdlib/assert-is-number": "^0.0.x",
41
- "@stdlib/math-base-assert-is-nan": "^0.0.x",
42
- "@stdlib/stats-base-dists-triangular-cdf": "^0.0.x",
43
- "@stdlib/stats-base-dists-triangular-entropy": "^0.0.x",
44
- "@stdlib/stats-base-dists-triangular-kurtosis": "^0.0.x",
45
- "@stdlib/stats-base-dists-triangular-logcdf": "^0.0.x",
46
- "@stdlib/stats-base-dists-triangular-logpdf": "^0.0.x",
47
- "@stdlib/stats-base-dists-triangular-mean": "^0.0.x",
48
- "@stdlib/stats-base-dists-triangular-median": "^0.0.x",
49
- "@stdlib/stats-base-dists-triangular-mgf": "^0.0.x",
50
- "@stdlib/stats-base-dists-triangular-mode": "^0.0.x",
51
- "@stdlib/stats-base-dists-triangular-pdf": "^0.0.x",
52
- "@stdlib/stats-base-dists-triangular-quantile": "^0.0.x",
53
- "@stdlib/stats-base-dists-triangular-skewness": "^0.0.x",
54
- "@stdlib/stats-base-dists-triangular-stdev": "^0.0.x",
55
- "@stdlib/stats-base-dists-triangular-variance": "^0.0.x",
56
- "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.0.x",
57
- "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x",
58
- "@stdlib/utils-define-property": "^0.0.x"
40
+ "@stdlib/assert-is-number": "^0.1.0",
41
+ "@stdlib/math-base-assert-is-nan": "^0.1.0",
42
+ "@stdlib/stats-base-dists-triangular-cdf": "^0.1.0",
43
+ "@stdlib/stats-base-dists-triangular-entropy": "^0.1.0",
44
+ "@stdlib/stats-base-dists-triangular-kurtosis": "^0.1.0",
45
+ "@stdlib/stats-base-dists-triangular-logcdf": "^0.1.0",
46
+ "@stdlib/stats-base-dists-triangular-logpdf": "^0.1.0",
47
+ "@stdlib/stats-base-dists-triangular-mean": "^0.1.0",
48
+ "@stdlib/stats-base-dists-triangular-median": "^0.1.0",
49
+ "@stdlib/stats-base-dists-triangular-mgf": "^0.1.0",
50
+ "@stdlib/stats-base-dists-triangular-mode": "^0.1.0",
51
+ "@stdlib/stats-base-dists-triangular-pdf": "^0.1.0",
52
+ "@stdlib/stats-base-dists-triangular-quantile": "^0.1.0",
53
+ "@stdlib/stats-base-dists-triangular-skewness": "^0.1.0",
54
+ "@stdlib/stats-base-dists-triangular-stdev": "^0.1.0",
55
+ "@stdlib/stats-base-dists-triangular-variance": "^0.1.0",
56
+ "@stdlib/string-format": "^0.1.0",
57
+ "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.1.0",
58
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0",
59
+ "@stdlib/utils-define-property": "^0.1.0",
60
+ "@stdlib/error-tools-fmtprodmsg": "^0.1.0"
59
61
  },
60
62
  "devDependencies": {
61
- "@stdlib/assert-has-own-property": "^0.0.x",
62
- "@stdlib/assert-is-function": "^0.0.x",
63
- "@stdlib/bench": "^0.0.x",
64
- "@stdlib/constants-float64-eps": "^0.0.x",
65
- "@stdlib/random-base-randu": "^0.0.x",
63
+ "@stdlib/assert-has-own-property": "^0.1.0",
64
+ "@stdlib/assert-is-function": "^0.1.0",
65
+ "@stdlib/bench": "^0.1.0",
66
+ "@stdlib/constants-float64-eps": "^0.1.0",
67
+ "@stdlib/random-base-randu": "^0.0.8",
66
68
  "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
67
69
  "istanbul": "^0.4.1",
68
- "tap-spec": "5.x.x"
70
+ "tap-min": "git+https://github.com/Planeshifter/tap-min.git"
69
71
  },
70
72
  "engines": {
71
73
  "node": ">=0.10.0"
@@ -104,7 +106,7 @@
104
106
  "continuous"
105
107
  ],
106
108
  "funding": {
107
- "type": "patreon",
108
- "url": "https://www.patreon.com/athan"
109
+ "type": "opencollective",
110
+ "url": "https://opencollective.com/stdlib"
109
111
  }
110
112
  }
package/docs/repl.txt DELETED
@@ -1,117 +0,0 @@
1
-
2
- {{alias}}( [a, b, c] )
3
- Returns a triangular distribution object.
4
-
5
- Parameters
6
- ----------
7
- a: number (optional)
8
- Minimum support. Must be smaller than `b` and `c`. Default: `0.0`.
9
-
10
- b: number (optional)
11
- Maximum support. Must be greater than `a` and `c`. Default: `1.0`.
12
-
13
- c: number (optional)
14
- Mode. Must be greater than `a` and smaller than `b`. Default: `0.5`.
15
-
16
- Returns
17
- -------
18
- triangular: Object
19
- Distribution instance.
20
-
21
- triangular.a: number
22
- Minimum support. If set, the value must be smaller or equal to `b` and
23
- `c`.
24
-
25
- triangular.b: number
26
- Maximum support. If set, the value must be greater than or equal to `a`
27
- and `c`.
28
-
29
- triangular.c: number
30
- Mode. If set, the value must be greater than or equal to `a` and smaller
31
- than or equal to `b`.
32
-
33
- triangular.entropy: number
34
- Read-only property which returns the differential entropy.
35
-
36
- triangular.kurtosis: number
37
- Read-only property which returns the excess kurtosis.
38
-
39
- triangular.mean: number
40
- Read-only property which returns the expected value.
41
-
42
- triangular.median: number
43
- Read-only property which returns the median.
44
-
45
- triangular.mode: number
46
- Read-only property which returns the mode.
47
-
48
- triangular.skewness: number
49
- Read-only property which returns the skewness.
50
-
51
- triangular.stdev: number
52
- Read-only property which returns the standard deviation.
53
-
54
- triangular.variance: number
55
- Read-only property which returns the variance.
56
-
57
- triangular.cdf: Function
58
- Evaluates the cumulative distribution function (CDF).
59
-
60
- triangular.logcdf: Function
61
- Evaluates the natural logarithm of the cumulative distribution function
62
- (CDF).
63
-
64
- triangular.logpdf: Function
65
- Evaluates the natural logarithm of the probability density function
66
- (PDF).
67
-
68
- triangular.mgf: Function
69
- Evaluates the moment-generating function (MGF).
70
-
71
- triangular.pdf: Function
72
- Evaluates the probability density function (PDF).
73
-
74
- triangular.quantile: Function
75
- Evaluates the quantile function at probability `p`.
76
-
77
- Examples
78
- --------
79
- > var triangular = {{alias}}( 0.0, 1.0, 0.5 );
80
- > triangular.a
81
- 0.0
82
- > triangular.b
83
- 1.0
84
- > triangular.c
85
- 0.5
86
- > triangular.entropy
87
- ~-0.193
88
- > triangular.kurtosis
89
- -0.6
90
- > triangular.mean
91
- 0.5
92
- > triangular.median
93
- 0.5
94
- > triangular.mode
95
- 0.5
96
- > triangular.skewness
97
- 0.0
98
- > triangular.stdev
99
- ~0.204
100
- > triangular.variance
101
- ~0.042
102
- > triangular.cdf( 0.8 )
103
- 0.92
104
- > triangular.logcdf( 0.8 )
105
- ~-0.083
106
- > triangular.logpdf( 0.8 )
107
- ~-0.223
108
- > triangular.mgf( 0.8 )
109
- ~1.512
110
- > triangular.pdf( 0.8 )
111
- ~0.8
112
- > triangular.quantile( 0.8 )
113
- ~0.684
114
-
115
- See Also
116
- --------
117
-
@@ -1,61 +0,0 @@
1
- /*
2
- * @license Apache-2.0
3
- *
4
- * Copyright (c) 2021 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
- /* tslint:disable:no-unused-expression */
20
-
21
- import Triangular = require( './index' );
22
-
23
-
24
- // TESTS //
25
-
26
- // The function returns a distribution instance...
27
- {
28
- new Triangular(); // $ExpectType Triangular
29
- new Triangular( 1.0, 2.0, 1.5 ); // $ExpectType Triangular
30
- }
31
-
32
- // The compiler throws an error if the function is provided values other than three numbers...
33
- {
34
- new Triangular( true, 2.0, 1.5 ); // $ExpectError
35
- new Triangular( false, 2.0, 1.5 ); // $ExpectError
36
- new Triangular( '5', 2.0, 1.5 ); // $ExpectError
37
- new Triangular( [], 2.0, 1.5 ); // $ExpectError
38
- new Triangular( {}, 2.0, 1.5 ); // $ExpectError
39
- new Triangular( ( x: number ): number => x, 2.0, 1.5 ); // $ExpectError
40
-
41
- new Triangular( 1.0, true, 1.5 ); // $ExpectError
42
- new Triangular( 1.0, false, 1.5 ); // $ExpectError
43
- new Triangular( 1.0, '5', 1.5 ); // $ExpectError
44
- new Triangular( 1.0, [], 1.5 ); // $ExpectError
45
- new Triangular( 1.0, {}, 1.5 ); // $ExpectError
46
- new Triangular( 1.0, ( x: number ): number => x, 1.5 ); // $ExpectError
47
-
48
- new Triangular( 1.0, 2.0, true ); // $ExpectError
49
- new Triangular( 1.0, 2.0, false ); // $ExpectError
50
- new Triangular( 1.0, 2.0, '5' ); // $ExpectError
51
- new Triangular( 1.0, 2.0, [] ); // $ExpectError
52
- new Triangular( 1.0, 2.0, {} ); // $ExpectError
53
- new Triangular( 1.0, 2.0, ( x: number ): number => x ); // $ExpectError
54
- }
55
-
56
- // The compiler throws an error if the function is provided an unsupported number of arguments...
57
- {
58
- new Triangular( 0.0 ); // $ExpectError
59
- new Triangular( 0.0, 2.0 ); // $ExpectError
60
- new Triangular( 0.0, 2.0, 1.5, 1.5 ); // $ExpectError
61
- }