Documentation ¶
Index ¶
- type RTree
- func (tr *RTree) Bounds() (min, max [2]float64)
- func (tr *RTree) Children(parent interface{}, reuse []child.Child) []child.Child
- func (tr *RTree) Delete(min, max [2]float64, data interface{})
- func (tr *RTree) Insert(min, max [2]float64, value interface{})
- func (tr *RTree) Len() int
- func (tr *RTree) Replace(oldMin, oldMax [2]float64, oldData interface{}, newMin, newMax [2]float64, ...)
- func (tr *RTree) Scan(iter func(min, max [2]float64, data interface{}) bool)
- func (tr *RTree) Search(min, max [2]float64, iter func(min, max [2]float64, value interface{}) 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 ...
func (*RTree) Children ¶ added in v1.0.0
Children is a utility function that returns all children for parent node. If parent node is nil then the root nodes should be returned. The min, max, data, and items slices all must have the same lengths. And, each element from all slices must be associated. Returns true for `items` when the the item at the leaf level. The reuse buffers are empty length slices that can optionally be used to avoid extra allocations.
func (*RTree) Replace ¶ added in v1.2.0
func (tr *RTree) Replace( oldMin, oldMax [2]float64, oldData interface{}, newMin, newMax [2]float64, newData interface{}, )
Replace an item in the structure. This is effectively just a Delete followed by an Insert.
Click to show internal directories.
Click to hide internal directories.