public class RouteTopology
extends Object
This represents the topology of a given GTFS route, with branches and common trunks etc.
All trips on this route are interpreted as valid paths through a directed graph.
We then perform a topological sort on the stops, such that all edges point to the right on the
sorted stop list. See:
http://stackoverflow.com/a/17202968/778449
http://stackoverflow.com/a/28531695/778449
All routes are cyclic because they contain multiple directions. So we must group trips by direction.
Should we perhaps be working on the dual graph (of from-to pairs)?
We could also keep track of which trips use each inter-stop segment.