UNPKG

minotor

Version:

A lightweight client-side transit routing library.

25 lines (24 loc) 1.1 kB
import { StopsIndex } from '../stops/stopsIndex.js'; import { Timetable } from '../timetable/timetable.js'; import { AccessFinder } from './access.js'; import { RangeQuery } from './query.js'; import { RangeResult } from './rangeResult.js'; import { Raptor } from './raptor.js'; export declare class RangeRouter { private readonly timetable; private readonly stopsIndex; private readonly accessFinder; private readonly raptor; constructor(timetable: Timetable, stopsIndex: StopsIndex, accessFinder: AccessFinder, raptor: Raptor); /** * Range RAPTOR: finds all Pareto-optimal journeys within the departure-time * window `[query.departureTime, query.lastDepartureTime]`. * * A journey is Pareto-optimal iff no journey departing no earlier arrives no * later. Runs are ordered latest-departure-first in the returned result. * * @param query A {@link RangeQuery} with both `departureTime` and `lastDepartureTime` set. * @returns A {@link RangeResult} exposing the full Pareto frontier. */ rangeRoute(query: RangeQuery): RangeResult; }