Skip to content

Daniel-Higgins/HashTable-Comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

HashTable-Comparison

This java application compares Businesses based on reviews (word frequency in hash tables), checks to make sure a business exists with a Btree, and finds the shortest path from one business (node) to the nearest cluster head (node). First, the application reads businesses and reviews from JSON files from YELP and creates objects based on business id. Each business has its own hashtable that will be compared to every other business hashtable created and finds the closest similar business to the business typed in from the user. A Btree is used to make sure a given business exists and once the btree is created it is written to a file as an object. The hashcode for every business is stored into the Btree of integers as well as written to a file with all the data/attributes for that business. All the attributes for a given hashtable is stored in a folder called "data" and the file name is the integer hashcode. Object output/input stream is used to write and read to each file. Finally, within every business is a cluster head (business). Dijkstra's algorithm is implemented (spanning tree) to find the shortest path from a given business to the nearest cluster head.

About

This java application compares Businesses based on reviews (word frequency in hash tables), checks to make sure a business exists with a Btree, and finds the shortest path from one business (node) to the nearest cluster head, based on location.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages