UNPKG

@stdlib/esm

Version:

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

3 lines 2.5 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 i from"./../../../../assert/is-positive-integer.js";import o from"./../../../../assert/is-positive-number.js";import n from"./entropy.js";import s from"./kurtosis.js";import a from"./mean.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 h from"./logpdf.js";import d from"./mgf.js";import b from"./pdf.js";import c from"./quantile.js";var y=t,v=r,k=e,j=i.isPrimitive,g=o.isPrimitive,w=n,E=s,T=a,V=m,q=p,M=u,P=f,x=l,R=h,S=d,z=b,A=c;function B(t){return x(t,this.k,this.lambda)}function C(t){return R(t,this.k,this.lambda)}function D(t){return S(t,this.k,this.lambda)}function F(t){return z(t,this.k,this.lambda)}function G(t){return A(t,this.k,this.lambda)}function H(){var t,r;if(!(this instanceof H))return 0===arguments.length?new H:new H(arguments[0],arguments[1]);if(arguments.length){if(t=arguments[1],!j(r=arguments[0]))throw new TypeError("invalid argument. Shape parameter `k` must be a positive integer. Value: `"+r+"`");if(!g(t))throw new TypeError("invalid argument. Rate parameter `lambda` must be a positive number. Value: `"+t+"`")}else r=1,t=1;return y(this,"k",{configurable:!1,enumerable:!0,get:function(){return r},set:function(t){if(!j(t))throw new TypeError("invalid value. Must be a positive integer. Value: `"+t+"`");r=t}}),y(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}k(H.prototype,"entropy",(function(){return w(this.k,this.lambda)})),k(H.prototype,"kurtosis",(function(){return E(this.k,this.lambda)})),k(H.prototype,"mean",(function(){return T(this.k,this.lambda)})),k(H.prototype,"mode",(function(){return V(this.k,this.lambda)})),k(H.prototype,"skewness",(function(){return q(this.k,this.lambda)})),k(H.prototype,"stdev",(function(){return M(this.k,this.lambda)})),k(H.prototype,"variance",(function(){return P(this.k,this.lambda)})),v(H.prototype,"cdf",B),v(H.prototype,"logpdf",C),v(H.prototype,"mgf",D),v(H.prototype,"pdf",F),v(H.prototype,"quantile",G);var I=H;export default I; //# sourceMappingURL=ctor.js.map