Documentation
¶
Index ¶
- type IndexType
- type OneD
- func (tr *OneD[I, T]) Bounds() (min, max I)
- func (tr *OneD[I, T]) Clear()
- func (tr *OneD[I, T]) Copy() *OneD[I, T]
- func (tr *OneD[I, T]) Delete(min, max I, data T)
- func (tr *OneD[I, T]) Insert(min, max I, data T)
- func (tr *OneD[I, T]) Len() int
- func (tr *OneD[I, T]) Nearby(algo func(min, max I, data T, item bool) (dist float64), ...)
- func (tr *OneD[I, T]) Replace(oldMin, oldMax I, oldData T, newMin, newMax I, newData T)
- func (tr *OneD[I, T]) Scan(iter func(min, max I, data T) bool)
- func (tr *OneD[I, T]) Search(min, max I, iter func(min, max I, data T) bool)
- type ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OneD ¶
OneD is an RTree of one ValueType that only takes a single index
func (*OneD[I, T]) Bounds ¶
func (tr *OneD[I, T]) Bounds() (min, max I)
Bounds returns the minimum bounding box
func (*OneD[I, T]) Copy ¶
Copy the tree. This is a copy-on-write operation and is very fast because it only performs a shadowed copy.
func (*OneD[I, T]) Delete ¶
func (tr *OneD[I, T]) Delete(min, max I, data T)
Delete an item from the structure
func (*OneD[I, T]) Insert ¶
func (tr *OneD[I, T]) Insert(min, max I, data T)
Insert an item into the structure
func (*OneD[I, T]) Nearby ¶
func (tr *OneD[I, T]) Nearby( algo func(min, max I, data T, item bool) (dist float64), iter func(min, max I, data T, dist float64) bool, )
Nearby performs a kNN-type operation on the index
func (*OneD[I, T]) Replace ¶
func (tr *OneD[I, T]) Replace( oldMin, oldMax I, oldData T, newMin, newMax I, newData T, )
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
Click to show internal directories.
Click to hide internal directories.