UNPKG

@stdlib/esm

Version:

ES module distribution for Stdlib, a standard library for JavaScript and Node.js.

3 lines 2.62 kB
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import t from"./../../../../utils/define-property.js";import r from"./../../../../utils/define-nonenumerable-read-only-property.js";import e from"./../../../../utils/define-nonenumerable-read-only-accessor.js";import o from"./../../../../assert/is-positive-number.js";import i from"./entropy.js";import n from"./kurtosis.js";import s from"./mean.js";import a from"./median.js";import m from"./mode.js";import p from"./skewness.js";import u from"./stdev.js";import f from"./variance.js";import l from"./cdf.js";import d from"./logcdf.js";import h from"./logpdf.js";import b from"./mgf.js";import c from"./pdf.js";import y from"./quantile.js";var k=t,v=r,j=e,g=o.isPrimitive,w=i,E=n,T=s,V=a,q=m,M=p,S=u,x=f,P=l,z=d,A=h,B=b,C=c,D=y;function F(t){return P(t,this.k,this.lambda)}function G(t){return z(t,this.k,this.lambda)}function H(t){return A(t,this.k,this.lambda)}function I(t){return B(t,this.k,this.lambda)}function J(t){return C(t,this.k,this.lambda)}function K(t){return D(t,this.k,this.lambda)}function L(){var t,r;if(!(this instanceof L))return 0===arguments.length?new L:new L(arguments[0],arguments[1]);if(arguments.length){if(t=arguments[1],!g(r=arguments[0]))throw new TypeError("invalid argument. Shape parameter `k` must be a positive number. Value: `"+r+"`");if(!g(t))throw new TypeError("invalid argument. Scale parameter `lambda` must be a positive number. Value: `"+t+"`")}else r=1,t=1;return k(this,"k",{configurable:!1,enumerable:!0,get:function(){return r},set:function(t){if(!g(t))throw new TypeError("invalid value. Must be a positive number. Value: `"+t+"`");r=t}}),k(this,"lambda",{configurable:!1,enumerable:!0,get:function(){return t},set:function(r){if(!g(r))throw new TypeError("invalid value. Must be a positive number. Value: `"+r+"`");t=r}}),this}j(L.prototype,"entropy",(function(){return w(this.k,this.lambda)})),j(L.prototype,"kurtosis",(function(){return E(this.k,this.lambda)})),j(L.prototype,"mean",(function(){return T(this.k,this.lambda)})),j(L.prototype,"median",(function(){return V(this.k,this.lambda)})),j(L.prototype,"mode",(function(){return q(this.k,this.lambda)})),j(L.prototype,"skewness",(function(){return M(this.k,this.lambda)})),j(L.prototype,"stdev",(function(){return S(this.k,this.lambda)})),j(L.prototype,"variance",(function(){return x(this.k,this.lambda)})),v(L.prototype,"cdf",F),v(L.prototype,"logcdf",G),v(L.prototype,"logpdf",H),v(L.prototype,"mgf",I),v(L.prototype,"pdf",J),v(L.prototype,"quantile",K);var N=L;export default N; //# sourceMappingURL=ctor.js.map