GriddedRaggedRange2dSetWithOverflow<T> Class

Use GriddedRaggedRange2dSetWithOverflow for searching among many ranges for which:

  • Most ranges are of somewhat consistent size.
  • A modest number of oversizes.
  • Maintain the smallish ones in a GriddedRaggedRange2dSet.
  • Maintain the overflows in a Range2dSearchInterface.

Implements

Methods

Name Description
addRange(range: Readonly<WritableLowAndHighXY>, tag: T): void If possible, insert a range into the set.  
searchRange2d(testRange: Readonly<WritableLowAndHighXY>, handler: (range: Range2d, tag: T) => boolean): boolean * Search for ranges overlapping testRange  
searchXY(x: number, y: number, handler: (range: Range2d, tag: T) => boolean): boolean * Search for ranges containing testRange  
totalRange(result?: Range2d): Range2d Return the overall range of all members.  
visitChildren(initialDepth: number, handler: (depth: number, child: Range2dSearchInterface<T>) => void): void Call the handler on the overflow set, and on each defined block in the grid.  
create<T>(range: Range2d, numXEdge: number, numYEdge: number): undefined | GriddedRaggedRange2dSetWithOverflow<T> Static Create an (empty) set of ranges.  

Defined in

Last Updated: 17 December, 2024