import type { GTFSFeed, StopID, Transfer, Trip } from "@gb-transit/gtfs-loader"; import { type StopIdx, type Timetable } from "./Timetable.js"; /** * Build the timetable the algorithm scans, and the tables that turn its integers back into the * feed's trips, transfers and stops. * * The trips of a route are laid out in departure order and the scan relies on it to walk backwards * to the earliest reachable trip, so they are sorted here rather than by the caller. * * If a date is given the trips are filtered to those running on it first, which makes planning * faster at the cost of only being able to plan for that date. */ export declare function createNetwork(feed: GTFSFeed, date?: Date): Network; /** * The timetable the algorithm scans, and the tables that turn the integers it works in back into * the feed's trips, transfers and stops. */ export interface Network { timetable: Timetable; /** Stop index to stop id, used to name a stop in a result */ stopIds: StopID[]; /** Stop id to stop index, used to translate a query's origins */ stopIndex: Map; /** Feed stop id to the code of the station it belongs to */ stations: Map; /** Global trip index to the feed's trip, in the route major order the calendar is bit packed in */ trips: Trip[]; /** Transfer index to the feed's transfer */ transfers: Transfer[]; }