Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intersection not implemented as a heap #1

Open
sss04 opened this issue Sep 9, 2021 · 0 comments
Open

Intersection not implemented as a heap #1

sss04 opened this issue Sep 9, 2021 · 0 comments

Comments

@sss04
Copy link
Collaborator

sss04 commented Sep 9, 2021

Streets currently store intersections as a list:

self.intersections = []

This should be changed to a heapq to allow sorting. When it is, the below code should be changed.
The below code also assumes only one intersection - which is not generalizable.

lastIntersection = street.intersections[0] # TODO actually get the last intersection once it's a heap

nearestIntersection = currStreet.intersections[0] # TODO(sssai) actually get the nearest intersection once it's a heap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant