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