https://github.com/olaszpl/kdtree_quadtree_project
https://github.com/olaszpl/kdtree_quadtree_project
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/olaszpl/kdtree_quadtree_project
- Owner: OlaszPL
- License: mit
- Created: 2024-12-29T18:50:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-24T15:22:55.000Z (12 months ago)
- Last Synced: 2025-02-24T15:41:51.231Z (12 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 26.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KD-Tree & QuadTree Python library
## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Modules](#modules)
- [Testing](#testing)
- [Visualization](#visualization)
- [Documentation](#documentation)
- [License](#license)
## Introduction
This project provides an implementation of KD-tree and QuadTree data structures in Python. It includes tools for building, querying, and visualizing these trees. The project is designed to help understand the functionality and efficiency of KD-tree and QuadTree for various datasets.

## Installation
To install the necessary dependencies, run:
```sh
pip install -r requirements.txt
```
## Usage
To use the KD-tree and QuadTree implementations, you can run the Jupyter Notebook `main.ipynb` (in Polish). This notebook provides a comprehensive interface for testing, visualizing, and comparing these two data structures.
### Running the Notebook
1. Open `main.ipynb` in Jupyter Notebook or JupyterLab (preferred VS Code).
2. Follow the instructions in the notebook cells to run tests, generate visualizations, and compare the performance of KD-tree and QuadTree.
## Modules
### KDTree
- `kdtree.py`: Contains the implementation of the KD-tree data structure.
- `kdtree_test.py`: Contains unit tests for the KD-tree implementation.
- `kdtree_visualizer.py`: Provides visualization tools for the KD-tree.
### QuadTree
- `quad.py`: Contains the implementation of the QuadTree data structure.
### Other Modules
- `automatic_tests.py`: Contains integration tests for both KD-tree and QuadTree.
- `generators.py`: Provides functions to generate various types of point datasets.
- `gui_creator.py`: Provides a graphical user interface for creating points and query ranges.
- `visualizer`: Contains visualization tools written by [_BIT Scientific Group_](https://github.com/aghbit/Algorytmy-Geometryczne) (no additional dependencies than those specified in the [Installation](#installation) are required).
## Testing
To run the unit tests for KD-tree, execute the following command:
```sh
python -m kdtree.kdtree_test
```
To run the integration tests, execute the following command:
```sh
python automatic_tests.py
```
## Visualization
The project includes tools for visualizing the construction and querying of KD-tree and QuadTree. These visualizations can be generated by running the cells in `main.ipynb`.
### KD-tree Visualization
- **Build Visualization**: Shows the process of building the KD-tree.

- **Query Visualization**: Shows the process of querying the KD-tree.

### QuadTree Visualization
- **Build Visualization**: Shows the process of building the QuadTree.

- **Query Visualization**: Shows the process of querying the QuadTree.

## Documentation
The project includes detailed documentation in the form of PDF files (in Polish). You can find the documentation in the `documentation` folder:
- [presentation](documentation/prezentacja.pdf): A presentation about the project.
- [documentation](documentation/dokumentacja.pdf): Detailed documentation of the project.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.