rtree

Types

Dim = static[int]
Ext[RT] = tuple[a, b: RT]
Box[D; RT] = array[D, Ext[RT]]
BoxCenter[D; RT] = array[D, RT]
L[D; RT; LT] = tuple[b: Box[D, RT], l: LT]
RTree[M; D; RT; LT] = ref object of RootRef
  root: H[M, D, RT, LT]
  bigM: int
  m: int
RStarTree[M; D; RT; LT] = ref object of RTree[M, D, RT, LT]
  firstOverflow: array[32, bool]
  p: int

Procs

proc newRTree[M, D: Dim; RT, LT](minFill: range[30 .. 50] = 40): RTree[M, D, RT, LT]
proc newRStarTree[M, D: Dim; RT, LT](minFill: range[30 .. 50] = 40): RStarTree[M, D, RT, LT]
proc search[M, D: Dim; RT, LT](t: RTree[M, D, RT, LT]; b: Box[D, RT]): seq[L[D, RT, LT]]
proc searchObj[M, D: Dim; RT, LT](t: RTree[M, D, RT, LT]; b: Box[D, RT]): seq[LT]
proc insert[M, D: Dim; RT, LT](t: RTree[M, D, RT, LT];
                          leaf: N[M, D, RT, LT] | L[D, RT, LT]; level: int = 0)
proc insert[M, D: Dim; RT, LT](t: RStarTree[M, D, RT, LT]; leaf: L[D, RT, LT])
proc delete[M, D: Dim; RT, LT](t: RTree[M, D, RT, LT]; leaf: L[D, RT, LT]): bool {...}{.discardable.}
proc newRTree[M, D: Dim; RT, LT](records: seq[L[D, RT, LT]];
                            minFill: range[30 .. 50] = 40): RTree[M, D, RT, LT]
proc newRStarTree[M, D: Dim; RT, LT](records: seq[L[D, RT, LT]];
                                minFill: range[30 .. 50] = 40): RStarTree[M, D, RT, LT]
proc `<`(a, b: RTRef): bool
proc findNearestBox[M, D: Dim; RT, LT](t: RTree[M, D, RT, LT];
                                  queryObject: BoxCenter[D, RT]): L[D, RT, LT]
proc findNearest[M, D: Dim; RT, LT](t: RTree[M, D, RT, LT]; queryObject: BoxCenter[D, RT];
    dst: proc (queryObject: BoxCenter[D, RT]; l: L[D, RT, LT]): RT): L[D, RT, LT]

Iterators

iterator findNearestBox[M, D: Dim; RT, LT](t: RTree[M, D, RT, LT];
                                      queryObject: BoxCenter[D, RT]): L[D, RT, LT]
iterator findNearest[M, D: Dim; RT, LT](t: RTree[M, D, RT, LT];
                                   queryObject: BoxCenter[D, RT]; dst: proc (
    queryObject: BoxCenter[D, RT]; l: L[D, RT, LT]): RT): L[D, RT, LT]