UNPKG

@stdlib/esm

Version:

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

3 lines 1.93 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 o from"./../../../../utils/define-nonenumerable-read-only-accessor.js";import e from"./../../../../assert/is-probability.js";import n from"./entropy.js";import i from"./kurtosis.js";import p from"./mean.js";import s from"./mode.js";import m from"./median.js";import u from"./skewness.js";import f from"./stdev.js";import a from"./variance.js";import c from"./cdf.js";import l from"./mgf.js";import y from"./pmf.js";import h from"./quantile.js";var d=t,j=r,b=o,v=e.isPrimitive,w=n,g=i,k=p,q=s,E=m,M=u,T=f,V=a,x=c,P=l,z=y,A=h;function B(t){return x(t,this.p)}function C(t){return P(t,this.p)}function D(t){return z(t,this.p)}function F(t){return A(t,this.p)}function G(){var t;if(!(this instanceof G))return 0===arguments.length?new G:new G(arguments[0]);if(arguments.length){if(!v(t=arguments[0]))throw new TypeError("invalid argument. Mean parameter `p` must be a probability. Value: `"+t+"`")}else t=.5;return d(this,"p",{configurable:!1,enumerable:!0,get:function(){return t},set:function(r){if(!v(r))throw new TypeError("invalid value. Must be a probability. Value: `"+r+"`");t=r}}),this}b(G.prototype,"entropy",(function(){return w(this.p)})),b(G.prototype,"kurtosis",(function(){return g(this.p)})),b(G.prototype,"mean",(function(){return k(this.p)})),b(G.prototype,"median",(function(){return E(this.p)})),b(G.prototype,"mode",(function(){return q(this.p)})),b(G.prototype,"skewness",(function(){return M(this.p)})),b(G.prototype,"stdev",(function(){return T(this.p)})),b(G.prototype,"variance",(function(){return V(this.p)})),j(G.prototype,"cdf",B),j(G.prototype,"mgf",C),j(G.prototype,"pmf",D),j(G.prototype,"quantile",F);var H=G;export default H; //# sourceMappingURL=ctor.js.map