@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 2.22 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 e from"./../../../../utils/define-nonenumerable-read-only-property.js";import r from"./../../../../utils/define-nonenumerable-read-only-accessor.js";import o from"./../../../../assert/is-positive-number.js";import i from"./entropy.js";import n from"./kurtosis.js";import s from"./mean.js";import u from"./mode.js";import p from"./skewness.js";import f from"./stdev.js";import m from"./variance.js";import d from"./cdf.js";import a from"./pdf.js";import h from"./quantile.js";var l=t,c=e,y=r,v=o.isPrimitive,b=i,j=n,w=s,g=u,k=p,E=f,T=m,V=d,q=a,M=h;function x(t){return V(t,this.d1,this.d2)}function D(t){return q(t,this.d1,this.d2)}function N(t){return M(t,this.d1,this.d2)}function P(){var t,e;if(!(this instanceof P))return 0===arguments.length?new P:new P(arguments[0],arguments[1]);if(arguments.length){if(e=arguments[1],!v(t=arguments[0]))throw new TypeError("invalid argument. Numerator degrees of freedom `d1` must be a positive number. Value: `"+t+"`");if(!v(e))throw new TypeError("invalid argument. Denominator degrees of freedom `d2` must be a positive number. Value: `"+e+"`")}else t=1,e=1;return l(this,"d1",{configurable:!1,enumerable:!0,get:function(){return t},set:function(e){if(!v(e))throw new TypeError("invalid value. Must be a positive number. Value: `"+e+"`");t=e}}),l(this,"d2",{configurable:!1,enumerable:!0,get:function(){return e},set:function(t){if(!v(t))throw new TypeError("invalid value. Must be a positive number. Value: `"+t+"`");e=t}}),this}y(P.prototype,"entropy",(function(){return b(this.d1,this.d2)})),y(P.prototype,"kurtosis",(function(){return j(this.d1,this.d2)})),y(P.prototype,"mean",(function(){return w(this.d1,this.d2)})),y(P.prototype,"mode",(function(){return g(this.d1,this.d2)})),y(P.prototype,"skewness",(function(){return k(this.d1,this.d2)})),y(P.prototype,"stdev",(function(){return E(this.d1,this.d2)})),y(P.prototype,"variance",(function(){return T(this.d1,this.d2)})),c(P.prototype,"cdf",x),c(P.prototype,"pdf",D),c(P.prototype,"quantile",N);var z=P;export default z;
//# sourceMappingURL=ctor.js.map