Convert streetSet to streetMap in `Graph` class
sbaldu opened this issue · comments
I think that it would be easier to work with the streets in the graph if they were contained in a map instead of a set. This would be a quick change to make.
This became apparent while implementing the dijkstra algorithm, because finding a street in the set by its index would require to use std::find_if
every time, which would become costly.
An alternative would be to keep using sets and working with iterators instead of indexes, but this would require a rework of the adjacency matrix