Skip to content

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.

Notifications You must be signed in to change notification settings

ProjectBarks/quadtree-versus-spatialhash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quadtree Versus SpatialHash

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.

How To Use

There are three key components to getting this program to run and getting to benchmarking of the two algorithms.

  1. 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
  2. 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
  1. 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.

My own Findings

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!

Libraries and Tools Used

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages