Skip to main content

Type Alias: KdTreeSearchFilter()<T>

KdTreeSearchFilter<T> = (element, key, distance, queryKey, queryElement) => boolean

Defined in: src/sdk/utils/datastructures/KdTree.ts:24

A filtering function for k-d tree searches.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
elementTA candidate search result.
keyReadonlyFloat64ArrayThe key of the candidate search result.
distancenumberThe distance from the candidate search result's key to the query key.
queryKeyReadonlyFloat64ArrayThe query key.
queryElementT | undefinedThe query element, or undefined if the search was initiated directly from a key.

Returns

boolean

Whether to include the candidate in the final search results.