Documentation
¶
Index ¶
- func DistributedTriangleVectors(objectives, populationSize int) [][]float64
- func EqualInterval(length int, min, max float64) (interval [][]float64)
- func EuclideanDistance(a, b []float64) float64
- func IdentityMatrix(n int) [][]float64
- func Includes(arr []int, val int) bool
- func IncreasingIntsN(n int) []int
- func Middle(a, b []float64) []float64
- func MiddleVector(a, b []float64) []float64
- func Min(floats ...float64) (min float64)
- func NearestNeighbour(arr []Vector, i, T int) []int
- func Normalise(a []float64) []float64
- func Remove(arr []int, i int) []int
- func Sum(arr []float64) float64
- func SumInt(arr []int) int
- func Zeros2DFloat64(outerLength, innerLength int) [][]float64
- type Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DistributedTriangleVectors ¶
DistributedTriangleVectors creates a n*m matrix where n = objectives and m = population size. The algorithm creates new vertices in the n dimensional space until the row number is bigger than m. With this approach an even distribution is not always possible, but a good distribution can be reached.
func EqualInterval ¶
func EuclideanDistance ¶
func IdentityMatrix ¶
func IncreasingIntsN ¶
func MiddleVector ¶
func NearestNeighbour ¶
NearestNeighbour calculates the closest T vectors for vector i in the set arr. NOTE the implementation makes the assumption that the vector i is it's own closest neighbour. The MOEA/D framework also makes this assumption
func Zeros2DFloat64 ¶
Zeros2DFloat64 creates a new 2D array with dimension defined by outerlength and innerlength. All values are set to 0
Types ¶
type Vector ¶
type Vector struct { Size int // contains filtered or unexported fields }
func UniformDistributedVectors ¶
UniformDistributedVectors generates a set of uniformly distributed vectors