https://github.com/shgnplaatjies/verticaladjacenciesusinglinesweeping
A program to find vertical adjacencies in a list of non-overlapping orthogonal rectangles using line sweeping to generate an event point schedule.
https://github.com/shgnplaatjies/verticaladjacenciesusinglinesweeping
Last synced: 29 days ago
JSON representation
A program to find vertical adjacencies in a list of non-overlapping orthogonal rectangles using line sweeping to generate an event point schedule.
- Host: GitHub
- URL: https://github.com/shgnplaatjies/verticaladjacenciesusinglinesweeping
- Owner: shgnplaatjies
- Created: 2023-06-04T10:35:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T11:07:40.000Z (about 1 year ago)
- Last Synced: 2025-02-06T10:53:34.476Z (3 months ago)
- Language: Python
- Size: 3.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vertical Adjacencies using Line Sweeping
This repository contains Python scripts for generating data, computing vertical adjacencies of rectangles using a brute force approach, and measuring the performance of the algorithm.
## Contents
- `graph_gen.py`: Generates sample data of rectangles and saves the results in CSV files.
- `rectangledata.py`: Generates rectangles data for testing.
- `brute_force.py`: Implements a brute force approach to compute vertical adjacencies between rectangles.
- `timings.csv`: Stores the timing results of the algorithm for different input sizes.
- `adjacencies.csv`: Stores the computed vertical adjacencies of rectangles for different input sizes.
- `rectangles.csv`: Stores the generated rectangles data for different input sizes.## Usage
### 1. Generate Sample Data
To generate sample data for testing, run the following command:
```bash
python graph_gen.py
```### 2. Compute Vertical Adjacencies
To compute vertical adjacencies using a brute force approach, execute the following command:
```bash
python brute_force.py
```### 3. Analyze Performance
The performance of the algorithm is measured and stored in `timings.csv`. You can analyze the timing results to understand the algorithm's efficiency.
## Dependencies
- Python 3.x
- NumPy
- Matplotlib
- CSV module## Research:


