UNPKG

@stdlib/esm

Version:

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

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