import type { LatLngBoundsLike } from "../geo.js"; import { type HeatFieldGrid, type HeatFieldInput, type PackedHeatPoints } from "./heat-field.js"; import type { HeatFieldWebGpuProfile } from "./heat-field-webgpu.js"; import type { AdaptiveIsolineLevelSelection } from "./adaptive-isoline-levels.js"; import { type HeatIsolineBuildOptions, type HeatIsolineRing } from "./heat-isolines.js"; export type HeatMode = "heatmap" | "isolines" | "both"; export type HeatBackend = "auto" | "wasm" | "webgpu"; export type HeatEvaluation = "static" | "zoom"; export type ResolvedHeatBackend = "js" | "wasm" | "webgpu"; export type HeatPoint = HeatFieldInput; export type HeatGrid = HeatFieldGrid; export type HeatContour = HeatIsolineRing; export interface HeatOptions extends Omit { mode?: HeatMode; backend?: HeatBackend; /** Absolute contour interval, or `"auto"` for adaptive levels. */ step?: "auto" | number; /** * `"sum"` accumulates the weights that land in a cell, so a dense area reads hotter than a * sparse one carrying the same values. `"mean"` divides by the mass of the same kernel, which * removes density from the answer: values come back in the units of the weights themselves. * Costs a second field pass. Default `"sum"`. */ fieldModel?: "sum" | "mean"; /** * Mean model only. Cells whose kernel gathered less than this fraction of the densest cell's * mass keep a floor under the divisor, so a lone point cannot read as a full-strength average * in empty space. Default 0.05. */ meanSupport?: number; /** `auto` starts considering WebGPU at this many points. Default 100000. */ webgpuThreshold?: number; } export interface HeatProfile { requestedBackend: HeatBackend; backend: ResolvedHeatBackend; mode: HeatMode; points: number; cols: number; rows: number; fieldMs: number; contoursMs: number; readbackMs: number; totalMs: number; /** Weighted grid aggregation + separable Gaussian KDE. */ fieldModel: "clustered-gaussian" | "clustered-gaussian-mean"; /** Actual absolute interval selected for uniformly-spaced contours. */ isolineStep?: number; fallbackReason?: string; webgpu?: HeatFieldWebGpuProfile; /** Spatial diagnostics for adaptive automatic contour levels. */ levelSelection?: AdaptiveIsolineLevelSelection; } export interface HeatResult { field: HeatGrid; rings: HeatContour[]; thresholds: number[]; levelSelection?: AdaptiveIsolineLevelSelection; profile: HeatProfile; } export interface HeatSupport { wasm: boolean; webgpu: boolean; } /** Report the accelerated backends available in the current runtime. */ export declare function heatSupport(): Promise; export declare function heatFieldWebGpuAvailable(): boolean; export declare function heatFieldWebGpuSupported(): Promise; export declare function buildHeat(points: Iterable, bounds: LatLngBoundsLike, options?: HeatOptions): Promise; export declare function buildPackedHeat(points: PackedHeatPoints, bounds: LatLngBoundsLike, options?: HeatOptions): Promise; //# sourceMappingURL=heat.d.ts.map