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