UNPKG

@stdlib/esm

Version:

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

3 lines 1.09 kB
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import r from"./../../../utils/define-nonenumerable-read-only-property.js";import e from"./../../../math/base/assert/is-negative-zero.js";import t from"./../../../math/base/assert/is-nan.js";var a=[701,301,132,57,23,10,4,1],n=e,o=t,f=a,i=f.length;function s(r,e,t,a,s,m){var u,v,l,p,d,h,b,g,j,y;if(r<=0||0===e)return t;for(e<0&&(a*=-1,m*=-1),u=a<0?(1-r)*a:0,v=m<0?(1-r)*m:0,g=0;g<i;g++)for(j=p=f[g];j<r;j++)if(d=t[u+j*a],!o(d)){for(h=s[v+j*m],l=n(d),y=j;y>=p&&(!((b=t[u+(y-p)*a])<=d)||l&&b===d);y-=p)t[u+y*a]=b,s[v+y*m]=s[v+(y-p)*m];t[u+y*a]=d,s[v+y*m]=h}return t}var m=e,u=t,v=a,l=v.length;function p(r,e,t,a,n,o,f,i){var s,p,d,h,b,g,j,y;if(r<=0||0===e)return t;for(e<0&&(n-=(r-1)*(a*=-1),i-=(r-1)*(f*=-1)),g=0;g<l;g++)for(j=p=v[g];j<r;j++)if(d=t[n+j*a],!u(d)){for(h=o[i+j*f],s=m(d),y=j;y>=p&&(!((b=t[n+(y-p)*a])<=d)||s&&b===d);y-=p)t[n+y*a]=b,o[i+y*f]=o[i+(y-p)*f];t[n+y*a]=d,o[i+y*f]=h}return t}var d=r,h=s,b=p;d(h,"ndarray",b);var g=h;export default g; //# sourceMappingURL=gsort2sh.js.map