Documentation ¶
Index ¶
- type Point
- type Points
- func (p *Points) CullByCompanions(n int) *Points
- func (p *Points) CullByDistanceFromOrigin() *Points
- func (p *Points) CullByMinDistance(min float64) *Points
- func (p *Points) Length() int
- func (p *Points) MinAvgMax() (min, avg, max float64)
- func (p *Points) SetNeighbors(n int)
- func (p *Points) SortByDistanceDesc(n int) *Points
- func (p *Points) SortByDistanceOrigin() *Points
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
type Point struct {
X, Y, Z float64
Neighbors struct {
// contains filtered or unexported fields
}
// contains filtered or unexported fields
}
func ClusteredPoint ¶
func ClusteredPoint() *Point
func SpherePoint ¶
func SpherePoint() *Point
func UniformPoint ¶
func UniformPoint() *Point
func (*Point) AvgDistance ¶
func (*Point) DistanceTo ¶
type Points ¶
type Points struct {
Points []*Point
}
func (*Points) CullByCompanions ¶
CullByCompanions culls out the systems that are closest to each other.
func (*Points) CullByDistanceFromOrigin ¶
CullByDistanceFromOrigin culls out the systems that are farthest from the origin
func (*Points) CullByMinDistance ¶
CullByMinDistance culls out the systems that are closest to each other
func (*Points) MinAvgMax ¶
MinAvgMax returns the minimum, average, and maximum average distances between neighbors
func (*Points) SetNeighbors ¶
func (*Points) SortByDistanceDesc ¶
SortByDistanceDesc sorts the points by average distance from neighbors, descending. N is the number of neighbors to use for distance.
func (*Points) SortByDistanceOrigin ¶
SortByDistanceOrigin sorts the points by distance from origin, ascending.
Click to show internal directories.
Click to hide internal directories.