import { type GridRoutingInstrumentation } from './routerInstrumentation.js'; import type { ContainerRoutingTopology, GridOrientation, GridSide, RouterPoint } from './types.js'; export type RouterTupleCost = [ length: number, bends: number, boundaryTransitions: number, endpointCandidateRank: number ]; export interface RouterSearchResult { points: RouterPoint[]; vertexIds: number[]; cost: RouterTupleCost; } export interface RouterSearchCaps { maxExpandedStates?: number; maxInvocationExpandedStates?: number; maxEstimatedBytes?: number; } export interface RouterSearchBudget { expandedStates: number; } export interface RouterSearchOptions { metrics?: GridRoutingInstrumentation; caps?: RouterSearchCaps; endpointCandidateRank?: number; recordOutcome?: boolean; budget?: RouterSearchBudget; initialOrientation?: GridOrientation; initialSide?: GridSide; initialLength?: number; targetOrientation?: GridOrientation; targetSide?: GridSide; targetLength?: number; topologyValidated?: boolean; workspace?: RouterSearchWorkspace; heuristic?: 'bend-aware' | 'zero'; queueOrder?: 'canonical' | 'reverse'; estimatedBytesBase?: number; arcAllowed?: (from: RouterPoint, to: RouterPoint) => boolean; } export declare class RouterSearchWorkspace { stateVertices: Int32Array; orientations: Uint8Array; gLengths: Float64Array; gBends: Float64Array; gBoundaryTransitions: Float64Array; fLengths: Float64Array; fBends: Float64Array; predecessors: Int32Array; depths: Int32Array; ancestor4: Int32Array; best: Int32Array; heapChildren: Int32Array; heapSiblings: Int32Array; heapPairs: number[]; touchedBestIndices: number[]; constructor(); reset(vertexCount: number): void; setBest(index: number, state: number): void; ensureStateCapacity(required: number): void; estimatedBytes(): number; } export declare function assertSearchBudgetAvailable(options: Pick): void; export declare function compareTupleCost(a: RouterTupleCost, b: RouterTupleCost): number; export declare function findShortestRoute(topology: Pick & Partial>, sourceId: number, targetId: number, options?: RouterSearchOptions): RouterSearchResult | undefined;