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

use sets in route and service indexing on schedule graph #70

Merged
merged 1 commit into from Mar 26, 2021

Conversation

KasiaKoz
Copy link
Collaborator

Fixes a brain fart that had gone too far.
Nodes and edges of a schedule object have 'routes' and 'services' data saved on them to be able to extract subgraphs given a route or a service. There is no need for this to be a list of service or route IDs, and because lists are ordered, it makes it annoying to test when changes are made that would disrupt the order. We don't care about the order, and those IDs should only feature once per node or edge, so it makes more sense to use sets. Especially as there are instances where we convert those lists to sets to perform an operation and make it a list again.... >_>

@KasiaKoz KasiaKoz requested a review from mfitz March 24, 2021 11:58
Copy link
Contributor

@mfitz mfitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I do enjoy a good set. Just a lovely, lovely data structure :-)

@KasiaKoz KasiaKoz merged commit c79607b into master Mar 26, 2021
@KasiaKoz KasiaKoz deleted the schedule-graph-setify branch March 26, 2021 12:05
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

Successfully merging this pull request may close these issues.

None yet

2 participants