Documentation
¶
Index ¶
- type PRTree
- func (tr *PRTree) Bounds() (min, max [2]float64)
- func (tr *PRTree) Children(parent interface{}, reuse []child.Child) (children []child.Child)
- func (tr *PRTree) Delete(min, max [2]float64, data interface{})
- func (tr *PRTree) Insert(min, max [2]float64, data interface{})
- func (tr *PRTree) Len() int
- func (tr *PRTree) Replace(oldMin, oldMax [2]float64, oldData interface{}, newMin, newMax [2]float64, ...)
- func (tr *PRTree) Scan(iter func(min, max [2]float64, data interface{}) bool)
- func (tr *PRTree) Search(min, max [2]float64, iter func(min, max [2]float64, data interface{}) bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PRTree ¶
type PRTree struct {
// contains filtered or unexported fields
}
PRTree is a tree for storing points and rects
func (*PRTree) Children ¶
Children returns all children for parent node. If parent node is nil then the root nodes should be returned. The reuse buffer is an empty length slice that can optionally be used to avoid extra allocations.
func (*PRTree) Replace ¶
func (tr *PRTree) 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. But for some structures it may be possible to optimize the operation to avoid multiple passes