UNPKG

raptor-journey-planner

Version:

Implementation of the Round bAsed Public Transit Optimized Router (Raptor) journey planning algorithm.

20 lines (19 loc) 729 B
import type { StopID } from "../gtfs/GTFS"; import type { RouteID } from "./RouteScanner"; import type { RouteStopIndex } from "./RaptorAlgorithm"; /** * Create a queue for the Raptor algorithm to use on each iteration of the algorithm. */ export declare class QueueFactory { private readonly routesAtStop; private readonly routeStopIndex; constructor(routesAtStop: RoutesIndexedByStop, routeStopIndex: RouteStopIndex); /** * Take the marked stops and return an index of any routes that pass through those stops. */ getQueue(markedStops: StopID[]): RouteQueue; private isStopBefore; } type RouteQueue = Record<RouteID, StopID>; type RoutesIndexedByStop = Record<StopID, RouteID[]>; export {};