UNPKG

@stdlib/esm

Version:

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

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