@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 2.45 kB
JavaScript
// 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 e from"./../../../../utils/define-nonenumerable-read-only-property.js";import r from"./../../../../utils/define-nonenumerable-read-only-accessor.js";import i from"./../../../../assert/is-positive-number.js";import o from"./entropy.js";import n from"./kurtosis.js";import a from"./mean.js";import s from"./mode.js";import p from"./quantile.js";import u from"./skewness.js";import f from"./stdev.js";import m from"./variance.js";import h from"./cdf.js";import l from"./logpdf.js";import b from"./mgf.js";import c from"./pdf.js";var y=t,d=e,v=r,j=i.isPrimitive,g=o,w=n,k=a,E=s,T=p,V=u,q=f,M=m,x=h,P=l,R=b,S=c;function z(t){return x(t,this.alpha,this.beta)}function A(t){return P(t,this.alpha,this.beta)}function B(t){return R(t,this.alpha,this.beta)}function C(t){return S(t,this.alpha,this.beta)}function D(t){return T(t,this.alpha,this.beta)}function F(){var t,e;if(!(this instanceof F))return 0===arguments.length?new F:new F(arguments[0],arguments[1]);if(arguments.length){if(e=arguments[1],!j(t=arguments[0]))throw new TypeError("invalid argument. Shape parameter `alpha` must be a positive number. Value: `"+t+"`");if(!j(e))throw new TypeError("invalid argument. Rate parameter `beta` must be a positive number. Value: `"+e+"`")}else t=1,e=1;return y(this,"alpha",{configurable:!1,enumerable:!0,get:function(){return t},set:function(e){if(!j(e))throw new TypeError("invalid value. Must be a positive number. Value: `"+e+"`");t=e}}),y(this,"beta",{configurable:!1,enumerable:!0,get:function(){return e},set:function(t){if(!j(t))throw new TypeError("invalid value. Must be a positive number. Value: `"+t+"`");e=t}}),this}v(F.prototype,"entropy",(function(){return g(this.alpha,this.beta)})),v(F.prototype,"kurtosis",(function(){return w(this.alpha,this.beta)})),v(F.prototype,"mean",(function(){return k(this.alpha,this.beta)})),v(F.prototype,"mode",(function(){return E(this.alpha,this.beta)})),v(F.prototype,"skewness",(function(){return V(this.alpha,this.beta)})),v(F.prototype,"stdev",(function(){return q(this.alpha,this.beta)})),v(F.prototype,"variance",(function(){return M(this.alpha,this.beta)})),d(F.prototype,"cdf",z),d(F.prototype,"logpdf",A),d(F.prototype,"mgf",B),d(F.prototype,"pdf",C),d(F.prototype,"quantile",D);var G=F;export default G;
//# sourceMappingURL=ctor.js.map