This is a utility program to test whether Spatial Hashing or Quad Trees have a faster overall performance and helping a programmer make a choice between the two algorithms. This includes a result visualizer, timing logger, and other similar tools.
There are three key components to getting this program to run and getting to benchmarking of the two algorithms.
- Create the data by executing
DataGeneration.java
- First it will ask for the maximum samples for the maximum amount of entities to test. It will then generate tests with entities from 1 to the max.
- Then it will ask how many tests per sample giving you a more accurate representation per quantity of entities as you increase.
- Test area is the size of the square of the entities to be placed on.
- Object size is the size of each entity
- Finally a test file will be made that can be shared and passed around to know what data was tested against. It is also used to allow resuming of tests
- Benchmark by running
Benchmark.java
- After choosing what algorithm to test it will export the data required for reviewing the results.
- This program is single threaded so it is important to run this it a computer with a powerful process
- The results will be exported in a similarly labeled
.CSV
- Review results with
ReviewResults.java
- This is not required to properly test data but provides insight into how the algorithm works
- Once you select the test you can view any result of any test.
If you are interested in seeing what this program yielded and how it functioned please read my paper here. The paper goes over the time complexities of both algorithms, limitations, advantages, and situations when to use each algorithm. If you plan to use the information from my paper I would love to hear from you!
- GSON - For serialization of test data
- JGoodies Form Layout - Review result layout file
- Lombok - Easy setter and getter generation