|
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 ah_domain_error_if, K2Tree< T >::contains(), Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), Aleph::Point::get_y(), K2Tree< T >::insert(), K2Tree< T >::nearest(), K2Tree< T >::range(), and y.