the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+2
@@ -0,0 +1,2 @@
|
||||
export type CompareFunction<T> = (a: T, b: T) => number;
|
||||
export declare function quickselect<T>(arr: T[], k: number, left: number, right: number, compare: CompareFunction<T>): void;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
export type Node = {
|
||||
children: Node[];
|
||||
height: number;
|
||||
leaf: boolean;
|
||||
minX: number;
|
||||
minY: number;
|
||||
maxX: number;
|
||||
maxY: number;
|
||||
};
|
||||
export declare class RBush {
|
||||
private _maxEntries;
|
||||
private _minEntries;
|
||||
private data;
|
||||
constructor(maxEntries: number);
|
||||
search(bbox: Node): Node[];
|
||||
collides(bbox: Node): boolean;
|
||||
load(data: Node[]): void;
|
||||
insert(item: Node): void;
|
||||
clear(): void;
|
||||
remove(item: Node): void;
|
||||
private toBBox;
|
||||
private compareMinX;
|
||||
private compareMinY;
|
||||
private _all;
|
||||
private _build;
|
||||
private _chooseSubtree;
|
||||
private _insert;
|
||||
private _split;
|
||||
private _splitRoot;
|
||||
private _chooseSplitIndex;
|
||||
private _chooseSplitAxis;
|
||||
private _allDistMargin;
|
||||
private _adjustParentBBoxes;
|
||||
private _condense;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { FeatureId, GeoJSONStoreFeatures } from "../store";
|
||||
export declare class SpatialIndex {
|
||||
private tree;
|
||||
private idToNode;
|
||||
private nodeToId;
|
||||
constructor(options?: {
|
||||
maxEntries: number;
|
||||
});
|
||||
private setMaps;
|
||||
private toBBox;
|
||||
insert(feature: GeoJSONStoreFeatures): void;
|
||||
load(features: GeoJSONStoreFeatures[]): void;
|
||||
update(feature: GeoJSONStoreFeatures): void;
|
||||
remove(featureId: FeatureId): void;
|
||||
clear(): void;
|
||||
search(feature: GeoJSONStoreFeatures): FeatureId[];
|
||||
collides(feature: GeoJSONStoreFeatures): boolean;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Reference in new issue
Block a user