Documentation
¶
Index ¶
- type RTree
- func (tr *RTree) Bounds() (min, max [2]float64)
- func (tr *RTree) Children(parent interface{}, reuseMin [][2]float64, reuseMax [][2]float64, ...) (mins, maxs [][2]float64, datas []interface{}, items []bool)
- 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) 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
func (tr *RTree) Children( parent interface{}, reuseMin [][2]float64, reuseMax [][2]float64, reuseData []interface{}, reuseItem []bool, ) (mins, maxs [][2]float64, datas []interface{}, items []bool)
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.
Click to show internal directories.
Click to hide internal directories.