@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 2.16 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-positive-number.js";import o from"./../../../../assert/is-number.js";import n from"./../../../../assert/is-nan.js";import m from"./entropy.js";import a from"./median.js";import s from"./mode.js";import u from"./cdf.js";import p from"./logcdf.js";import f from"./logpdf.js";import l from"./pdf.js";import h from"./quantile.js";var c=t,d=r,g=e,y=i.isPrimitive,b=o.isPrimitive,v=n,j=m,x=a,w=s,E=u,T=p,V=f,q=l,M=h;function P(t){return E(t,this.x0,this.gamma)}function L(t){return T(t,this.x0,this.gamma)}function S(t){return V(t,this.x0,this.gamma)}function k(t){return q(t,this.x0,this.gamma)}function z(t){return M(t,this.x0,this.gamma)}function A(){var t,r;if(!(this instanceof A))return 0===arguments.length?new A:new A(arguments[0],arguments[1]);if(arguments.length){if(t=arguments[1],!b(r=arguments[0])||v(r))throw new TypeError("invalid argument. Location parameter `x0` must be a number primitive. Value: `"+r+"`");if(!y(t))throw new TypeError("invalid argument. Scale parameter `gamma` must be a positive number. Value: `"+t+"`")}else r=0,t=1;return c(this,"x0",{configurable:!1,enumerable:!0,get:function(){return r},set:function(t){if(!b(t)||v(t))throw new TypeError("invalid value. Must be a number primitive. Value: `"+t+"`");r=t}}),c(this,"gamma",{configurable:!1,enumerable:!0,get:function(){return t},set:function(r){if(!y(r))throw new TypeError("invalid value. Must be a positive number. Value: `"+r+"`");t=r}}),this}g(A.prototype,"entropy",(function(){return j(this.x0,this.gamma)})),g(A.prototype,"median",(function(){return x(this.x0,this.gamma)})),g(A.prototype,"mode",(function(){return w(this.x0,this.gamma)})),d(A.prototype,"cdf",P),d(A.prototype,"logcdf",L),d(A.prototype,"logpdf",S),d(A.prototype,"pdf",k),d(A.prototype,"quantile",z);var B=A;export default B;
//# sourceMappingURL=ctor.js.map