Jagged Array data structure is used here to optimize calculations of ball collisions within a 1D hallway. Field is split up into bins, and balls are randomly dispersed. If two or more balls share a position, a collision occurs and the balls are pushed in opposite directions, into the next bin. Excecution of the program compares the usage of a Jagged Array against an exhaustive approach, which tests each ball against every other, checking if any share a common position. Commented out classes contain the Jagged Array structure and testing tools using integers as the elements.
-
Notifications
You must be signed in to change notification settings - Fork 0
ojaroker/JaggedArray
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published