cec2020: implement Schaffer func
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b785da87e9
commit
3922e86625
@ -162,8 +162,13 @@ func SchwefelModified(x []float64) float64 {
|
||||
return 418.9829*fnx - sum
|
||||
}
|
||||
|
||||
// Schaffer is the "Expanded Schaffer's Function" of CEC2020.
|
||||
func Schaffer(x []float64) float64 { return 0 }
|
||||
// Schaffer is the Schaffer's function.
|
||||
func Schaffer(x, y float64) float64 {
|
||||
return 0.5 + (math.Pow(math.Sin(math.Sqrt(math.Pow(x, 2)+math.Pow(y, 2))-0.5), 2) / (1 + 0.001*(math.Pow(x, 2)+math.Pow(y, 2))))
|
||||
}
|
||||
|
||||
// SchafferExpanded is the "Expanded Schaffer's Function" of CEC2020.
|
||||
func SchafferExpanded(x []float64) float64 { return 0 }
|
||||
|
||||
// Weierstrass is the "Weierstrass Function" of CEC2020 with a=0.5, b=3 and
|
||||
// kmax=20.
|
||||
|
Loading…
Reference in New Issue
Block a user