UNPKG

connection-scan-algorithm

Version:
33 lines (32 loc) 1.06 kB
import { ConnectionIndex } from "../csa/ConnectionScanAlgorithm"; import { Journey } from "./Journey"; import { StopID } from "../gtfs/Gtfs"; /** * Creates journeys from the connection index created by the connection scan algorithm. */ export declare class JourneyFactory { /** * Extract a result for each destination in the list. */ getJourneys(connections: ConnectionIndex, destinations: StopID[]): Journey[]; /** * Iterate backwards from the destination to the origin collecting connections into legs */ private getLegs; /** * Convert a list of connections into a Transfer or a TimetableLeg */ private toLeg; /** * Check for any redundant legs and replace them with new legs from the trip. */ private getCompactedLegs; /** * Try to create a new leg from the trip, ensuring the new leg departs the origin no earlier than the given * departure time. */ private getStopTimes; private getJourney; private getDepartureTime; private getArrivalTime; }