Class RTree
Assembly: Advanced.Algorithms.dll
Syntax
public class RTree : IEnumerable<Polygon>
Constructors
RTree(Int32)
Declaration
public RTree(int maxKeysPerNode)
Parameters
Type |
Name |
Description |
Int32 |
maxKeysPerNode |
|
Properties
Count
Declaration
public int Count { get; }
Property Value
Methods
Clear()
Clear all data in this R-tree.
Declaration
Delete(Polygon)
Time complexity: O(log(n)).
Declaration
public void Delete(Polygon polygon)
Parameters
Type |
Name |
Description |
Polygon |
polygon |
|
Exists(Polygon)
Check if the given polygon exists in this Rtree.
Time complexity: O(1).
Declaration
public bool Exists(Polygon searchPolygon)
Parameters
Type |
Name |
Description |
Polygon |
searchPolygon |
|
Returns
GetEnumerator()
Declaration
public IEnumerator<Polygon> GetEnumerator()
Returns
Type |
Description |
IEnumerator<Polygon> |
|
Insert(Polygon)
Inserts given polygon.
Time complexity: O(log(n)).
Declaration
public void Insert(Polygon newPolygon)
Parameters
Type |
Name |
Description |
Polygon |
newPolygon |
|
RangeSearch(Rectangle)
Returns a list of polygons whose minimum bounded rectangle intersects with given search rectangle.
Declaration
public List<Polygon> RangeSearch(Rectangle searchRectangle)
Parameters
Type |
Name |
Description |
Rectangle |
searchRectangle |
|
Returns