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