UNPKG

@softchef/cdk-iot-device-management

Version:

IoT device management is composed of things, thing types, thing groups, jobs, files API services. The constructs can be used independently, that are based on full-managed service to create an API Gateway & Lambda function.

28 lines (22 loc) 631 B
/** * Mnemonist VPTree Typings * ========================= */ type DistanceFunction<T> = (a: T, b: T) => number; type QueryMatch<T> = {distance: number, item: T}; export default class VPTree<T> { // Members distance: DistanceFunction<T>; size: number; D: number; // Constructor constructor(distance: DistanceFunction<T>, items: Iterable<T>); // Methods nearestNeighbors(k: number, query: T): Array<QueryMatch<T>>; neighbors(radius: number, query: T): Array<QueryMatch<T>>; // Statics static from<I>( iterable: Iterable<I> | {[key: string] : I}, distance: DistanceFunction<I> ): VPTree<I>; }