Given a set of existing routes in social network, a passenger wants to go from source A to destination B, your need to implement a
method to return the k nearest direct routes (user can follow to travel from A to B) efficiently. The basic requirements are below:
1. k, A, B are arbitrary and can be input by users.
2. Using the searching idea from paper to achieve early termination, without checking all candidates in the dataset. Therefore, a
brute-force method that scans all candidates is not acceptable.
Dataset:
We provide a dataset of real people’s travel routes in Los Angeles. You can find it in the directory “index/la_trips.txt” of the IKNN
code package.
For example,
558483,33.595985412597656,-117.71573638916016
558483,34.05152130126953,-118.29872131347656
558483,33.70815658569336,-117.7821273803711
558483,33.74482345581055,-118.41141510009766
Stores a route of 4 points and the route id is 558483. Each line in the file represents a particular stop’s latitude and longitude of this
route.
Another file called “index/la_points.txt” stores all the unique points covered by those routes after our pre-processing.
#Sales Offer!| Get upto 25% Off: