Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityLocation ¶
func (EntityLocation) Compare ¶
func (p EntityLocation) Compare(c kdtree.Comparable, d kdtree.Dim) float64
Compare returns the signed distance of p from the plane passing through c and perpendicular to the dimension d. The concrete type of c must be EntityLocation.
func (EntityLocation) Dims ¶
func (p EntityLocation) Dims() int
Dims returns the number of dimensions described by the receiver.
func (EntityLocation) Distance ¶
func (p EntityLocation) Distance(c kdtree.Comparable) float64
Distance returns the squared Euclidean distance between c and the receiver. The concrete type of c must be EntityLocation.
type EntityLocations ¶
type EntityLocations []EntityLocation
func (EntityLocations) Index ¶
func (p EntityLocations) Index(i int) kdtree.Comparable
func (EntityLocations) Len ¶
func (p EntityLocations) Len() int
type NDistKeeper ¶
NDistKeeper keeps man number and distance
func NewNDistKeeper ¶
func NewNDistKeeper(n int, d float64) *NDistKeeper
NewNDistKeeper returns an NDistKeeper with the maximum value of the heap set to d.
func (*NDistKeeper) Keep ¶
func (k *NDistKeeper) Keep(c kdtree.ComparableDist)
Keep adds c to the heap if its distance is less than or equal to the max value of the heap.
Click to show internal directories.
Click to hide internal directories.