use of org.opentripplanner.routing.vertextype.PatternArriveVertex in project OpenTripPlanner by opentripplanner.
the class Graph method index.
/**
* Perform indexing on vertices, edges, and timetables, and create transient data structures.
* This used to be done in readObject methods upon deserialization, but stand-alone mode now
* allows passing graphs from graphbuilder to server in memory, without a round trip through
* serialization.
* TODO: do we really need a factory for different street vertex indexes?
*/
public void index(StreetVertexIndexFactory indexFactory) {
streetIndex = indexFactory.newIndex(this);
LOG.debug("street index built.");
LOG.debug("Rebuilding edge and vertex indices.");
rebuildVertexAndEdgeIndices();
Set<TripPattern> tableTripPatterns = Sets.newHashSet();
for (PatternArriveVertex pav : Iterables.filter(this.getVertices(), PatternArriveVertex.class)) {
tableTripPatterns.add(pav.getTripPattern());
}
for (TripPattern ttp : tableTripPatterns) {
// skip frequency-based patterns with no table (null)
if (ttp != null)
ttp.scheduledTimetable.finish();
}
// TODO: Move this ^ stuff into the graph index
this.index = new GraphIndex(this);
}
Aggregations