Documentation ¶
Index ¶
- Variables
- type Config
- type Item
- type Tree
- func (me *Tree) CollectInside(bounds geom.Rect, collection map[Item]bool)
- func (me *Tree) CollectIntersect(bounds geom.Rect, collection map[Item]bool)
- func (me *Tree) Do(foo func(x Item))
- func (me *Tree) Enumerate(collection map[Item]bool)
- func (me *Tree) Find(element Item) (found Item, ok bool)
- func (me *Tree) FindOrInsert(element Item) (found Item, inserted bool)
- func (me *Tree) Insert(element Item) (inserted bool)
- func (me *Tree) IsBig(bounds geom.Rect) bool
- func (me *Tree) Items() (rch <-chan Item)
- func (me *Tree) Iterate() (rch <-chan Item)
- func (me *Tree) Remove(element Item) (removed bool)
- func (me *Tree) RemoveInside(bounds geom.Rect, collection map[Item]bool)
- func (me *Tree) RemoveIntersect(bounds geom.Rect, collection map[Item]bool)
- func (me *Tree) Size() int
- func (me *Tree) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = false
View Source
var Indent = 0
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SplitCount int "Exclusive upper bound before splitting a node" SplitSizeRatio float64 "Elements must be small enough to split" Height int "Max depth of search tree" }
func ConfigDefault ¶
func ConfigDefault() (cfg Config)
type Tree ¶
type Tree struct { Count int //a promise that nothing added will be outside this bounds UpperBounds geom.Rect //smallest rect that contains all current items Bounds geom.Rect Partition geom.Coord Subtrees [4]*Tree Elements map[Item]bool BigElements map[Item]bool // contains filtered or unexported fields }
func (*Tree) CollectInside ¶
func (*Tree) CollectIntersect ¶
func (*Tree) RemoveInside ¶
func (*Tree) RemoveIntersect ¶
Click to show internal directories.
Click to hide internal directories.