Documentation ¶
Index ¶
- type DebrisFactory
- type RangeItem
- type RangeTree
- func (r *RangeTree) Find(item RangeItem) RangeItem
- func (r *RangeTree) GetAdjacentItem(item RangeItem) (prev RangeItem, next RangeItem)
- func (r *RangeTree) GetAt(index int) RangeItem
- func (r *RangeTree) GetOverlaps(item RangeItem) []RangeItem
- func (r *RangeTree) GetWithIndex(item RangeItem) (RangeItem, int)
- func (r *RangeTree) Len() int
- func (r *RangeTree) Remove(item RangeItem) RangeItem
- func (r *RangeTree) ScanRange(start RangeItem, f func(_ RangeItem) bool)
- func (r *RangeTree) Update(item RangeItem) []RangeItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebrisFactory ¶
DebrisFactory is the factory that generates some debris when updating items.
type RangeTree ¶
type RangeTree struct {
// contains filtered or unexported fields
}
RangeTree is the tree contains RangeItems.
func NewRangeTree ¶
func NewRangeTree(degree int, factory DebrisFactory) *RangeTree
NewRangeTree is the constructor of the range tree.
func (*RangeTree) GetAdjacentItem ¶
GetAdjacentItem returns the adjacent range item.
func (*RangeTree) GetOverlaps ¶
GetOverlaps returns the range items that has some intersections with the given items.
func (*RangeTree) GetWithIndex ¶
GetWithIndex returns index and item for the given item.
Click to show internal directories.
Click to hide internal directories.