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