Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@types/kd-tree-javascript
Advanced tools
npm install --save @types/kd-tree-javascript
This package contains type definitions for kd-tree-javascript (https://github.com/ubilabs/kd-tree-javascript#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/kd-tree-javascript.
export class kdTree<T> {
// Create a new tree from a list of points, a distance function, and a
// list of dimensions.
constructor(points: T[], distance: (a: T, b: T) => number, dimensions: Array<keyof T>);
// Query the nearest *count* neighbors to a point, with an optional
// maximal search distance.
// Result is an array with *count* elements.
// Each element is an array with two components: the searched point and
// the distance to it.
nearest(point: T, count: number, maxDistance?: number): Array<[T, number]>;
// Insert a new point into the tree. Must be consistent with previous
// contents.
insert(point: T): void;
// Remove a point from the tree by reference.
remove(point: T): void;
// Get an approximation of how unbalanced the tree is.
// The higher this number, the worse query performance will be.
// It indicates how many times worse it is than the optimal tree.
// Minimum is 1. Unreliable for small trees.
balanceFactor(): number;
}
These definitions were written by .
FAQs
TypeScript definitions for kd-tree-javascript
We found that @types/kd-tree-javascript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.