import { Position } from "geojson"; /** * Vertex key, a unique identifier for a vertex of a graph */ export declare type Key = string; /** * Edge from A to B, containing its vertex keys and associated properties */ export declare type Edge = [Key, Key, TProperties]; /** * A topology of coordinates and their connecting edges */ export declare type Topology = { vertices: Coordinates; edges: Edge[]; }; /** * A graph vertex, containing the edges * connecting it to other vertices; * edges are described as a lookup withthe target vertex's * key associated to the edge's weight */ export declare type Vertex = Record; /** * A set of vertices, indexed by their keys. */ export declare type Vertices = Record; /** * */ export declare type Coordinates = Record; export declare type PathFinderGraph = { vertices: Vertices; edgeData: Record>; sourceCoordinates: Coordinates; compactedVertices: Vertices; compactedCoordinates: Record>; compactedEdges: Record>; }; export declare type PathFinderOptions = { tolerance?: number; key?: (coordinates: Position) => string; compact?: boolean; /** * Calculate weight for an edge from a node at position a to a node at position b * @param {Position} a coordinate of node A * @param {Position} b coordinate of node B * @param {Properties} properties the properties associated with the network's LineString from a to b * @returns the weight of the edge, zero indicates the edge is not passable */ weight?: (a: Position, b: Position, properties: TProperties) => number | { forward: number; backward: number; } | undefined; progress?: (type: string, completed: number, total: number) => void; } & ({ edgeDataReducer: (seed: TEdgeReduce, modifier: TEdgeReduce) => TEdgeReduce; edgeDataSeed: (properties: TProperties) => TEdgeReduce; } | {}); export declare type Path = { path: Position[]; weight: number; edgeDatas: (TEdgeReduce | undefined)[] | undefined; };