@flatten-js/interval-tree
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -206,3 +206,3 @@ 'use strict'; | ||
const comparable_less_than = this.item.key.constructor.comparable_less_than; // static method | ||
let high = this.left.max.high ? this.left.max.high : this.left.max; | ||
let high = this.left.max.high !== undefined ? this.left.max.high : this.left.max; | ||
return comparable_less_than(high, search_node.item.key.low); | ||
@@ -214,3 +214,3 @@ } | ||
const comparable_less_than = this.item.key.constructor.comparable_less_than; // static method | ||
let low = this.right.max.low ? this.right.max.low : this.right.item.key.low; | ||
let low = this.right.max.low !== undefined ? this.right.max.low : this.right.item.key.low; | ||
return comparable_less_than(search_node.item.key.high, low); | ||
@@ -217,0 +217,0 @@ } |
@@ -202,3 +202,3 @@ /** | ||
const comparable_less_than = this.item.key.constructor.comparable_less_than; // static method | ||
let high = this.left.max.high ? this.left.max.high : this.left.max; | ||
let high = this.left.max.high !== undefined ? this.left.max.high : this.left.max; | ||
return comparable_less_than(high, search_node.item.key.low); | ||
@@ -210,3 +210,3 @@ } | ||
const comparable_less_than = this.item.key.constructor.comparable_less_than; // static method | ||
let low = this.right.max.low ? this.right.max.low : this.right.item.key.low; | ||
let low = this.right.max.low !== undefined ? this.right.max.low : this.right.item.key.low; | ||
return comparable_less_than(search_node.item.key.high, low); | ||
@@ -213,0 +213,0 @@ } |
@@ -208,3 +208,3 @@ (function (global, factory) { | ||
const comparable_less_than = this.item.key.constructor.comparable_less_than; // static method | ||
let high = this.left.max.high ? this.left.max.high : this.left.max; | ||
let high = this.left.max.high !== undefined ? this.left.max.high : this.left.max; | ||
return comparable_less_than(high, search_node.item.key.low); | ||
@@ -216,3 +216,3 @@ } | ||
const comparable_less_than = this.item.key.constructor.comparable_less_than; // static method | ||
let low = this.right.max.low ? this.right.max.low : this.right.item.key.low; | ||
let low = this.right.max.low !== undefined ? this.right.max.low : this.right.item.key.low; | ||
return comparable_less_than(search_node.item.key.high, low); | ||
@@ -219,0 +219,0 @@ } |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ import React from 'react'; |
@@ -0,0 +0,0 @@ import React from 'react'; |
@@ -0,0 +0,0 @@ import React from 'react'; |
@@ -0,0 +0,0 @@ const IntervalTree = require("@flatten-js/interval-tree").default; |
@@ -0,0 +0,0 @@ // Type definitions for flatten-interval-tree library v1.0.2 |
export {default as Node} from './src/classes/node'; | ||
export {default as Interval} from './src/classes/interval'; | ||
export {default} from './src/classes/intervalTree.js'; |
{ | ||
"name": "@flatten-js/interval-tree", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Interval search tree", | ||
@@ -5,0 +5,0 @@ "main": "dist/main.cjs.js", |
@@ -0,0 +0,0 @@ # Interval Tree |
@@ -0,0 +0,0 @@ export default { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -72,3 +72,3 @@ /** | ||
const comparable_less_than = this.item.key.constructor.comparable_less_than; // static method | ||
let high = this.left.max.high ? this.left.max.high : this.left.max; | ||
let high = this.left.max.high !== undefined ? this.left.max.high : this.left.max; | ||
return comparable_less_than(high, search_node.item.key.low); | ||
@@ -80,3 +80,3 @@ } | ||
const comparable_less_than = this.item.key.constructor.comparable_less_than; // static method | ||
let low = this.right.max.low ? this.right.max.low : this.right.item.key.low; | ||
let low = this.right.max.low !== undefined ? this.right.max.low : this.right.item.key.low; | ||
return comparable_less_than(search_node.item.key.high, low); | ||
@@ -83,0 +83,0 @@ } |
@@ -0,0 +0,0 @@ /** |
@@ -209,3 +209,9 @@ /** | ||
expect(resp2).to.be.deep.equal(["val2"]); | ||
}) | ||
}); | ||
it('Low or high can be 0', function () { | ||
let tree = new IntervalTree(); | ||
let ints = [[0,0],[0,0],[1,1],[0,0]]; | ||
for (let i=0; i < ints.length; i++) tree.insert(ints[i],"val"+i); | ||
expect(tree.search([0,0])).to.deep.equal(['val0','val1','val3']); | ||
}); | ||
}); |
@@ -0,0 +0,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
4044
1696991