interval-tree-1d
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -255,3 +255,3 @@ "use strict" | ||
if(r) { return r } | ||
} else if(this.lo > this.mid) { | ||
} else if(lo > this.mid) { | ||
var r = reportRange(this.rightPoints, lo, hi, cb, compareXEnd) | ||
@@ -258,0 +258,0 @@ if(r) { return r } |
{ | ||
"name": "interval-tree-1d", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "1D interval tree data structure", | ||
@@ -5,0 +5,0 @@ "main": "interval-tree.js", |
@@ -5,4 +5,20 @@ interval-tree-1d | ||
**Work in progress** | ||
# Example | ||
```javascript | ||
var createIntervalTree = require("interval-tree-1d") | ||
//Create some random list of intervals | ||
var intervals = [ [1, 2], [-1, 0], [0.5, 1], [-10, 10] ] | ||
//Build tree | ||
var tree = createIntervalTree(intervals) | ||
//Find all intervals containing query point 0.7 | ||
console.log("querying point:", 0.7) | ||
tree.queryPoint(0.7, function(interval) { | ||
console.log(interval) | ||
}) | ||
``` | ||
# API | ||
@@ -9,0 +25,0 @@ |
@@ -19,3 +19,3 @@ var util = require("util") | ||
console.log(util.inspect(t, {depth:10})) | ||
//console.log(util.inspect(t, {depth:10})) | ||
@@ -33,3 +33,2 @@ /* | ||
console.log(i) | ||
}) |
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
12838
55