|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Educational examples for 2D spatial trees (k-d trees) More...
Go to the source code of this file.
Functions | |
| int | main () |
Educational examples for 2D spatial trees (k-d trees)
Binary search tree for 2D points (k-d tree with k=2) Alternates splitting on X and Y coordinates Enables efficient spatial queries in 2D space
g++ -std=c++20 -I.. -o tpl_2dtree_example tpl_2dtree_example.cc -lm ./tpl_2dtree_example
Definition in file tpl_2dtree_example.cc.
| int main | ( | ) |
Definition at line 47 of file tpl_2dtree_example.cc.
References K2Tree< T >::contains(), Point::get_x(), Point::get_y(), K2Tree< T >::insert(), Aleph::DynList< T >::insert(), Aleph::maps(), K2Tree< T >::nearest(), K2Tree< T >::range(), and y.