Skip to content

Commit

Permalink
fix issue 2
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhichang committed Oct 17, 2017
1 parent 18c7585 commit 5ce0888
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bkdtree_intersect.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,18 @@ func (bkd *BkdTree) intersectNode(visitor IntersectVisitor, data []byte,
if err != nil {
return
}
for _, child := range node.Children {
lowVal := lowP.Vals[node.SplitDim]
highVal := highP.Vals[node.SplitDim]
for i, child := range node.Children {
if child.NumPoints <= 0 {
continue
}
if i < int(node.NumStrips)-1 && node.SplitValues[i] < lowVal {
continue
}
if i != 0 && node.SplitValues[i-1] > highVal {
continue
}
if child.Offset < meta.PointsOffEnd {
//leaf node
pae := PointArrayExt{
Expand Down

0 comments on commit 5ce0888

Please sign in to comment.