trRouting
trRouting copied to clipboard
Create a proper initialization class for journey parsing (forward and reverse journey)
If, by this, you mean refactor the getSchedules() method of the cache fetcher so that it does not have the responsibility to
1- Read the cache (that one is OK of course) 2- Fill a 10-ish elements vector with each connection data 3- Same for reverse 4- Put those connections at the right place 5- Sort the connections
Then absolutely! Those connections are probably algorithm specific too, meaning that each algorithm may organize them differently for different purposes.
I'll add that those 5 steps all in the cache_fetcher's getSchedules() make it much harder to write simple unit tests, as each of those steps need to be done manually in unit tests and that is error-prone.
If I misunderstood this issue title and am highjacking this issue, just let me know, I'll open another one for this.