d3-quadtree
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,1 +0,1 @@ | ||
var version = "0.1.0"; export * from "../index"; export {version}; | ||
var version = "0.1.1"; export * from "../index"; export {version}; |
@@ -245,3 +245,3 @@ (function (global, factory) { | ||
var version = "0.1.0"; | ||
var version = "0.1.1"; | ||
@@ -248,0 +248,0 @@ exports.version = version; |
@@ -1,1 +0,1 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("d3-quadtree",["exports"],t):t(n.d3_quadtree={})}(this,function(n){"use strict";function t(n){return n[0]}function e(n){return n[1]}function u(n){return function(){return n}}function i(){this.x=null,this.y=null,this.leaf=!0,this.point=null,this.nodes=[]}function r(n,t,e,u,i,f){if(!n(t,e,u,i,f)){var o=.5*(e+i),l=.5*(u+f),a=t.nodes;a[0]&&r(n,a[0],e,u,o,l),a[1]&&r(n,a[1],o,u,i,l),a[2]&&r(n,a[2],e,l,o,f),a[3]&&r(n,a[3],o,l,i,f)}}function f(n,t,e,u,i,r,f){var o,l=1/0;return function a(n,s,c,d,h){if(!(s>r||c>f||u>d||i>h)){if(v=n.point){var v,p=t-n.x,y=e-n.y,x=p*p+y*y;if(l>x){var g=Math.sqrt(l=x);u=t-g,i=e-g,r=t+g,f=e+g,o=v}}for(var b=n.nodes,m=.5*(s+d),q=.5*(c+h),N=t>=m,k=e>=q,w=k<<1|N,M=w+4;M>w;++w)if(n=b[3&w])switch(3&w){case 0:a(n,s,c,m,q);break;case 1:a(n,m,c,d,q);break;case 2:a(n,s,q,m,h);break;case 3:a(n,m,q,d,h)}}}(n,u,i,r,f),o}function o(){function n(n){function t(n,t,u,i,r,f,o,l){if(!isNaN(u)&&!isNaN(i))if(n.leaf){var a=n.x,s=n.y;if(null!=a)if(Math.abs(a-u)+Math.abs(s-i)<.01)e(n,t,u,i,r,f,o,l);else{var c=n.point;n.x=n.y=n.point=null,e(n,c,a,s,r,f,o,l),e(n,t,u,i,r,f,o,l)}else n.x=u,n.y=i,n.point=t}else e(n,t,u,i,r,f,o,l)}function e(n,e,u,r,f,o,l,a){var s=.5*(f+l),c=.5*(o+a),d=u>=s,h=r>=c,v=h<<1|d;n.leaf=!1,n=n.nodes[v]||(n.nodes[v]=new i),d?f=s:l=s,h?o=c:a=c,t(n,e,u,r,f,o,l,a)}var h,v,p,y,x,g,b,m,q,N="function"==typeof c?c:u(c),k="function"==typeof d?d:u(d);if(n||(n=[]),null!=o)g=o,b=a,m=l,q=s;else for(m=q=-(g=b=1/0),v=[],p=[],x=n.length,y=0;x>y;++y){var w=+N(h=n[y],y),M=+k(h,y);g>w&&(g=w),b>M&&(b=M),w>m&&(m=w),M>q&&(q=M),v.push(w),p.push(M)}var F=m-g,j=q-b;isFinite(F)&&isFinite(j)&&(F>j?q=b+F:m=g+j);var z=new i;if(z.add=function(n){return t(z,n,+N(n,++y),+k(n,y),g,b,m,q),z},z.visit=function(n){return r(n,z,g,b,m,q),z},z.find=function(n,t){return f(z,n,t,g,b,m,q)},y=-1,null==o){for(;++y<x;)t(z,n[y],v[y],p[y],g,b,m,q);--y}else n.forEach(z.add);return v=p=n=h=null,z}var o,l,a,s,c=t,d=e;return n.x=function(t){return arguments.length?(c=t,n):c},n.y=function(t){return arguments.length?(d=t,n):d},n.extent=function(t){return arguments.length?(null==t?o=a=l=s=null:(o=+t[0][0],a=+t[0][1],l=+t[1][0],s=+t[1][1]),n):null==o?null:[[o,a],[l,s]]},n.size=function(t){return arguments.length?(null==t?o=a=l=s=null:(o=a=0,l=+t[0],s=+t[1]),n):null==o?null:[l-o,s-a]},n}var l="0.1.0";n.version=l,n.quadtree=o}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("d3-quadtree",["exports"],t):t(n.d3_quadtree={})}(this,function(n){"use strict";function t(n){return n[0]}function e(n){return n[1]}function u(n){return function(){return n}}function i(){this.x=null,this.y=null,this.leaf=!0,this.point=null,this.nodes=[]}function r(n,t,e,u,i,f){if(!n(t,e,u,i,f)){var o=.5*(e+i),l=.5*(u+f),a=t.nodes;a[0]&&r(n,a[0],e,u,o,l),a[1]&&r(n,a[1],o,u,i,l),a[2]&&r(n,a[2],e,l,o,f),a[3]&&r(n,a[3],o,l,i,f)}}function f(n,t,e,u,i,r,f){var o,l=1/0;return function a(n,s,c,d,h){if(!(s>r||c>f||u>d||i>h)){if(v=n.point){var v,p=t-n.x,y=e-n.y,x=p*p+y*y;if(l>x){var g=Math.sqrt(l=x);u=t-g,i=e-g,r=t+g,f=e+g,o=v}}for(var b=n.nodes,m=.5*(s+d),q=.5*(c+h),N=t>=m,k=e>=q,w=k<<1|N,M=w+4;M>w;++w)if(n=b[3&w])switch(3&w){case 0:a(n,s,c,m,q);break;case 1:a(n,m,c,d,q);break;case 2:a(n,s,q,m,h);break;case 3:a(n,m,q,d,h)}}}(n,u,i,r,f),o}function o(){function n(n){function t(n,t,u,i,r,f,o,l){if(!isNaN(u)&&!isNaN(i))if(n.leaf){var a=n.x,s=n.y;if(null!=a)if(Math.abs(a-u)+Math.abs(s-i)<.01)e(n,t,u,i,r,f,o,l);else{var c=n.point;n.x=n.y=n.point=null,e(n,c,a,s,r,f,o,l),e(n,t,u,i,r,f,o,l)}else n.x=u,n.y=i,n.point=t}else e(n,t,u,i,r,f,o,l)}function e(n,e,u,r,f,o,l,a){var s=.5*(f+l),c=.5*(o+a),d=u>=s,h=r>=c,v=h<<1|d;n.leaf=!1,n=n.nodes[v]||(n.nodes[v]=new i),d?f=s:l=s,h?o=c:a=c,t(n,e,u,r,f,o,l,a)}var h,v,p,y,x,g,b,m,q,N="function"==typeof c?c:u(c),k="function"==typeof d?d:u(d);if(n||(n=[]),null!=o)g=o,b=a,m=l,q=s;else for(m=q=-(g=b=1/0),v=[],p=[],x=n.length,y=0;x>y;++y){var w=+N(h=n[y],y),M=+k(h,y);g>w&&(g=w),b>M&&(b=M),w>m&&(m=w),M>q&&(q=M),v.push(w),p.push(M)}var F=m-g,j=q-b;isFinite(F)&&isFinite(j)&&(F>j?q=b+F:m=g+j);var z=new i;if(z.add=function(n){return t(z,n,+N(n,++y),+k(n,y),g,b,m,q),z},z.visit=function(n){return r(n,z,g,b,m,q),z},z.find=function(n,t){return f(z,n,t,g,b,m,q)},y=-1,null==o){for(;++y<x;)t(z,n[y],v[y],p[y],g,b,m,q);--y}else n.forEach(z.add);return v=p=n=h=null,z}var o,l,a,s,c=t,d=e;return n.x=function(t){return arguments.length?(c=t,n):c},n.y=function(t){return arguments.length?(d=t,n):d},n.extent=function(t){return arguments.length?(null==t?o=a=l=s=null:(o=+t[0][0],a=+t[0][1],l=+t[1][0],s=+t[1][1]),n):null==o?null:[[o,a],[l,s]]},n.size=function(t){return arguments.length?(null==t?o=a=l=s=null:(o=a=0,l=+t[0],s=+t[1]),n):null==o?null:[l-o,s-a]},n}var l="0.1.1";n.version=l,n.quadtree=o}); |
{ | ||
"name": "d3-quadtree", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Two-dimensional recursive spatial subdivision.", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"d3-array": "~0.6.1", | ||
"d3-array": "~0.7.0", | ||
"faucet": "0.0", | ||
@@ -30,0 +30,0 @@ "rollup": "0.20.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package