Documentation ¶
Overview ¶
Package intervalrtree a tree is an R-tree index for one-dimensional intervals.
Index ¶
- type BranchNode
- type IRNode
- type LeafNode
- type LeafNodes
- type Node
- type SortedPackedIntervalRTree
- func (s *SortedPackedIntervalRTree) Insert(queryEnv *envelope.Envelope, item interface{}) error
- func (s *SortedPackedIntervalRTree) Query(queryEnv *envelope.Envelope) interface{}
- func (s *SortedPackedIntervalRTree) QueryVisitor(queryEnv *envelope.Envelope, visitor index.ItemVisitor) error
- func (s *SortedPackedIntervalRTree) Remove(itemEnv *envelope.Envelope, item interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchNode ¶
type BranchNode struct { *IRNode // contains filtered or unexported fields }
BranchNode define interval R-tree branch node.
func (*BranchNode) Query ¶
func (in *BranchNode) Query(queryMin, queryMax float64, visitor index.ItemVisitor)
Query Search for intervals in the index which intersect the given closed interval and apply the visitor to them.
type IRNode ¶
type IRNode struct {
// contains filtered or unexported fields
}
IRNode define interval R-tree node.
func (*IRNode) IsIntersects ¶
IsIntersects ...
type LeafNode ¶
type LeafNode struct { *IRNode // contains filtered or unexported fields }
LeafNode define interval R-tree leaf node.
type Node ¶
type Node interface { Max() float64 Min() float64 Query(queryMin, queryMax float64, visitor index.ItemVisitor) }
Node define Node interface
type SortedPackedIntervalRTree ¶
type SortedPackedIntervalRTree struct {
// contains filtered or unexported fields
}
SortedPackedIntervalRTree A static index on a set of 1-dimensional intervals,
using an R-Tree packed based on the order of the interval midpoints. It supports range searching, where the range is an interval of the real line (which may be a single point). A common use is to index 1-dimensional intervals which are the projection of 2-D objects onto an axis of the coordinate system.
func (*SortedPackedIntervalRTree) Insert ¶
func (s *SortedPackedIntervalRTree) Insert(queryEnv *envelope.Envelope, item interface{}) error
Insert Adds an item to the index which is associated with the given interval
func (*SortedPackedIntervalRTree) Query ¶
func (s *SortedPackedIntervalRTree) Query(queryEnv *envelope.Envelope) interface{}
Query Search for intervals in the index which intersect the given closed interval and apply the visitor to them.
func (*SortedPackedIntervalRTree) QueryVisitor ¶
func (s *SortedPackedIntervalRTree) QueryVisitor(queryEnv *envelope.Envelope, visitor index.ItemVisitor) error
QueryVisitor Search for intervals in the index which intersect the given closed interval and apply the visitor to them.