In-memory immutable r-tree with the minimal bounding rectangle (MBR).
In-memory immutable r-tree with the minimal bounding rectangle (MBR).
- Type Params
- A
a type of values being put in the tree
- Companion
- object
Value members
Abstract methods
Returns a distance to the nearest R-tree entry for the given point.
Returns a distance to the nearest R-tree entry for the given point.
Search distance can be limited by the maxDist
parameter.
- Value Params
- distCalc
a distance calculator provided according to geometry of indexed entries
- f
the function that receives found values and their distances and returns the current maximum distance
- maxDist
an exclusive limit of the distance (infinity by default)
- x
x value of the given point
- y
y value of the given point
- Returns
the distance to a found entry or initially submitted value of maxDist
Appends a prettified string representation of the r-tree.
Appends a prettified string representation of the r-tree.
- Value Params
- indent
a size of indent step for each level or 0 if indenting is not required
- sb
a string builder to append to
- Returns
the provided string builder
Call the provided f
function with entries whose MBR contains the given point.
Call the provided f
function with entries whose MBR contains the given point.
- Value Params
- f
the function that receives found values
- x
x value of the given point
- y
y value of the given point
Call the provided f
function with entries whose MBR intersects with the given point.
Call the provided f
function with entries whose MBR intersects with the given point.
- Value Params
- f
the function that receives found values
- maxX
x value of the upper right point of the given rectangle
- maxY
y value of the upper right point of the given rectangle
- minX
x value of the lower left point of the given rectangle
- minY
y value of the lower left point of the given rectangle
Concrete methods
Returns a sequence of up to the specified number of nearest R-tree entries for the given point.
Returns a sequence of up to the specified number of nearest R-tree entries for the given point.
Search distance can be limited by the maxDist
parameter.
- Value Params
- distCalc
a distance calculator provided according to geometry of indexed entries
- k
a maximum number of nearest entries to collect
- maxDist
an exclusive limit of the distance (infinity by default)
- x
x value of the given point
- y
y value of the given point
- Returns
a sequence of the nearest entries
Returns an option of the nearest R-tree entry for the given point.
Returns an option of the nearest R-tree entry for the given point.
Search distance can be limited by the maxDist
parameter.
- Value Params
- distCalc
a distance calculator provided according to geometry of indexed entries
- maxDist
an exclusive limit of the distance (infinity by default)
- x
x value of the given point
- y
y value of the given point
- Returns
an option of the nearest entry
Returns a sequence of all entries in the R-tree whose MBR contains the given point.
Returns a sequence of all entries in the R-tree whose MBR contains the given point.
- Value Params
- x
x value of the given point
- y
y value of the given point
- Returns
a sequence of found values
Returns a sequence of all entries in the R-tree whose MBR intersects the given rectangle.
Returns a sequence of all entries in the R-tree whose MBR intersects the given rectangle.
- Value Params
- maxX
x value of the upper right point of the given rectangle
- maxY
y value of the upper right point of the given rectangle
- minX
x value of the lower left point of the given rectangle
- minY
y value of the lower left point of the given rectangle
- Returns
a sequence of found values