Questions tagged [kdtree]

A k-d-tree (k-dimensional tree) is a data structure for storing points in multidimensional space. They can be used to efficiently query for whether a point exists, as well as to do Euclidean nearest-neighbor searches and searches inside of hyperdimensional rectangular regions.

457 questions
-1
votes
1 answer

KD Tree hierarchy

I have pure theoretical question on KD Tree hierarchy. Let's say that we have two dimensional tree with 'left rule'. One of tree nodes has two children which should be sorted by X value. In the same time, both children have the same X value. So,…
VVK
  • 435
  • 2
  • 27
-1
votes
2 answers

Balancing kd-tree any existing algorithm

I'm trying to implement kd-tree but I have problem with one operation - balancing. Is any existing way to balance kd-tree? For example: after inserting new element I'd like to have still balanced tree
-1
votes
1 answer

kd-tree for clustered data

I am looking for a kd-tree for clustered data. I have a large data set and in some areas the data is highly dense. So I need some "balanced" search. When I do a search for n-neighbors with a point next to a dense area I want a result which is…
JaW.
  • 87
  • 2
  • 11
-1
votes
1 answer

Get the smallest element of a kdtree

I want to get the minimum element of a kdtree two-dimensional (x, y). The minimum element is one that for every element (x ', y') of kdtree, x As can be repeated elements x, returns either.
-2
votes
1 answer

What is better way represent a spatial data

I have the following problem in my system : my system is client-server architectural . my application is about recognition building in a city .so i decide to separate the map of the city into grids each grid has an area equal 30 x 30 m . for each…
M.Abulsoud
  • 989
  • 7
  • 23
-2
votes
1 answer

Where is my kd tree traversal code wrong?

I was optimizing my c++ raytracer. I'm tracing single rays through kdtrees. So far I was using Havran's recursive algorithm 'B', which seems antique and overblown for OOP. My new code is as short as possible (and hopefully more easily optimized by…
5-to-9
  • 649
  • 8
  • 16
-3
votes
1 answer

Faster Queries in plane

Problem I have to support Q queries of a set of n 2-D points in Cartesian plane lying in [0,M]x[0,M]. Points are given in advance. Each query ask me to count the number of points enclosed in rectangle (x1,y1)*(x2,y2). (axis aligned…
1 2 3
30
31