File tree Expand file tree Collapse file tree
application/src/main/java/org/opentripplanner/routing/graphfinder Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 * This utility encapsulates the direction-dependent ordering: for depart-after searches the chain
1515 * yields edges in reverse chronological order (newest first), while for arriveBy searches the chain
1616 * already yields edges in chronological order.
17+ * <p>
1718 * Implementation note: an earlier design relied on {@link org.opentripplanner.astar.model.GraphPath}
18- * to extract the list of edges in chronological order / reverse chronological order.
19- * The current implementation is optimized for reducing memory allocation.
19+ * which allocates a {@code LinkedList<State>} and, for depart-after searches, a full reversed copy
20+ * of the state chain via {@code State.reverse()}. This implementation avoids both by collecting
21+ * only the edges into a single {@code ArrayList} and reversing it in place.
2022 */
2123class ChronologicalGraphPath {
2224
You can’t perform that action at this time.
0 commit comments