Documentation ¶
Index ¶
- type PTree
- func (tr *PTree) Children(parent interface{}, reuse []child.Child) (children []child.Child)
- func (tr *PTree) Delete(point [2]float64, data interface{})
- func (tr *PTree) InBounds(point [2]float64) bool
- func (tr *PTree) Insert(point [2]float64, data interface{})
- func (tr *PTree) Len() int
- func (tr *PTree) MinBounds() (min, max [2]float64)
- func (tr *PTree) Scan(iter func(point [2]float64, data interface{}) bool)
- func (tr *PTree) Search(min, max [2]float64, iter func(point [2]float64, data interface{}) bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PTree ¶
type PTree struct {
// contains filtered or unexported fields
}
PTree is a tree for storing points.
func (*PTree) 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 (*PTree) InBounds ¶
InBounds return true if the point can be contained in the tree's maximum bounding rectangle.
Click to show internal directories.
Click to hide internal directories.