Documentation ¶
Index ¶
- type RTree
- func (tr *RTree) Bounds() (min, max []float64)
- func (tr *RTree) Complexity() float64
- func (tr *RTree) Count() int
- func (tr *RTree) Insert(min, max []float64, item interface{})
- func (tr *RTree) IsEmpty() bool
- func (tr *RTree) KNN(min, max []float64, center bool, ...) bool
- func (tr *RTree) Load(mins, maxs [][]float64, items []interface{})
- func (tr *RTree) Remove(min, max []float64, item interface{})
- func (tr *RTree) Scan(iter func(item interface{}) bool) bool
- func (tr *RTree) Search(min, max []float64, iter func(item interface{}) bool) bool
- func (tr *RTree) Traverse(iter func(min, max []float64, level int, item interface{}) bool) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RTree ¶
type RTree struct {
// contains filtered or unexported fields
}
RTree is an R-tree
func (*RTree) Complexity ¶
Complexity returns the complexity of the R-tree. The higher the value, the more complex the tree. The value of 1 is the lowest.
func (*RTree) KNN ¶
func (tr *RTree) KNN(min, max []float64, center bool, iter func(item interface{}, dist float64) bool) bool
KNN returns items nearest to farthest. The dist param is the "box distance".
Click to show internal directories.
Click to hide internal directories.