UNPKG

@stdlib/esm

Version:

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

3 lines 2.76 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-integer.js";import o from"./entropy.js";import n from"./kurtosis.js";import s from"./mean.js";import u from"./median.js";import a from"./skewness.js";import p from"./stdev.js";import m from"./variance.js";import f from"./cdf.js";import l from"./logcdf.js";import h from"./logpmf.js";import b from"./mgf.js";import c from"./pmf.js";import g from"./quantile.js";var y=t,d=r,v=e,w=i.isPrimitive,j=o,E=n,M=s,V=u,q=a,k=p,T=m,x=f,R=l,P=h,z=b,A=c,B=g;function C(t){return x(t,this.a,this.b)}function D(t){return R(t,this.a,this.b)}function F(t){return P(t,this.a,this.b)}function G(t){return z(t,this.a,this.b)}function H(t){return A(t,this.a,this.b)}function I(t){return B(t,this.a,this.b)}function J(){var t,r;if(!(this instanceof J))return 0===arguments.length?new J:new J(arguments[0],arguments[1]);if(arguments.length){if(r=arguments[1],!w(t=arguments[0]))throw new TypeError("invalid argument. Minimum support `a` must be an integer. Value: `"+t+"`");if(!w(r))throw new TypeError("invalid argument. Maximum support `b` must be an integer. Value: `"+r+"`");if(t>r)throw new RangeError("invalid arguments. Minimum support `a` must be less than or equal to maximum support `b`. Value: `"+t+","+r+"`")}else t=0,r=1;return y(this,"a",{configurable:!1,enumerable:!0,get:function(){return t},set:function(e){if(!w(e))throw new TypeError("invalid value. Must be an integer. Value: `"+e+"`");if(e>r)throw new RangeError("invalid value. Must be smaller than or equal to `b`. Value: `"+e+"`");t=e}}),y(this,"b",{configurable:!1,enumerable:!0,get:function(){return r},set:function(e){if(!w(e))throw new TypeError("invalid value. Must be an integer. Value: `"+e+"`");if(t>e)throw new RangeError("invalid value. Must be greater than or equal to `a`. Value: `"+e+"`");r=e}}),this}v(J.prototype,"entropy",(function(){return j(this.a,this.b)})),v(J.prototype,"kurtosis",(function(){return E(this.a,this.b)})),v(J.prototype,"mean",(function(){return M(this.a,this.b)})),v(J.prototype,"median",(function(){return V(this.a,this.b)})),v(J.prototype,"skewness",(function(){return q(this.a,this.b)})),v(J.prototype,"stdev",(function(){return k(this.a,this.b)})),v(J.prototype,"variance",(function(){return T(this.a,this.b)})),d(J.prototype,"cdf",C),d(J.prototype,"logcdf",D),d(J.prototype,"logpmf",F),d(J.prototype,"mgf",G),d(J.prototype,"pmf",H),d(J.prototype,"quantile",I);var K=J;export default K; //# sourceMappingURL=ctor.js.map