computeScheduleGroups
fun computeScheduleGroups(segments: List<RouteSegment>, maxGroups: Int = PublicTransportRouteComposableDefaults.SCHEDULE_MAX_VISIBLE_GROUPS): List<ScheduleGroup>
Groups transports from the first public transport segment by their schedule.
Transports with identical schedules (same interval period or same precise time) and the same transport type are combined into a single ScheduleGroup.
Return
List of ScheduleGroup containing transports with matching schedules, limited to maxGroups. Returns empty list if no public transport segments or no schedule information is available.
Parameters
segments
List of route segments to extract schedules from.
maxGroups
Maximum number of groups to return. Defaults to PublicTransportRouteComposableDefaults.SCHEDULE_MAX_VISIBLE_GROUPS.