andreip/NNS
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
# Petre Andrei-Nicuale Pentru a cauta mai eficient in planul xOy, am construit un K-D tree. Mai exact, am creat arborele considerat ca nivelele pare sunt asociate axelor x, iar cele impare, axelor y. Apoi adaugarea se face ca la arbori binari de cautare , dar comparand, in functie de nivel, cu coordonata x, respectiv y. Odata construit, parcurg arborele pentru fiecare coordonata si obtin un cel mai aproape, pe care il updatez pana ajung in frunza. Asta se face in complexitate logaritmica. Apoi, la descarcarea stivei, se verifica daca cercul cu raza r = distanta intre "request" si "cel mai aproape" intersecteaza axa nodului curent, iar daca da, inseamna ca poate fi un nod mai aproape ca "cel mai aproape", altfel, trecem mai departe (cel mai aproape se updateaza continuu). O posibila optimizare ar fi sa se formeze mereu arborele echilibrat. Asta s-ar putea face mai usor, alegand nodurile in ordine random, dar ar necesita, in momentul de fata, utilizare de memorie suplimentara.
About
Nearest neighbour search - K-D tree
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published