optimize/functions: rename Schubert to Shubert

This commit is contained in:
Vladimir Chalupecky
2017-06-16 22:37:08 +02:00
parent a8fc114e6d
commit a606d7a1eb

View File

@@ -302,15 +302,15 @@ func (Schwefel) Func(x []float64) float64 {
return 418.9829*float64(len(x)) - sum return 418.9829*float64(len(x)) - sum
} }
// Schubert implements the Schubert function, a two-dimensional function // Shubert implements the Shubert function, a two-dimensional function
// with many local minima and many global minima. Its typical domain is the // with many local minima and many global minima. Its typical domain is the
// square [-10, 10]^2. // square [-10, 10]^2.
// f(x) = (sum_{i=1}^5 i cos((i+1)*x_0+i)) * (\sum_{i=1}^5 i cos((i+1)*x_1+i)) // f(x) = (sum_{i=1}^5 i cos((i+1)*x_0+i)) * (\sum_{i=1}^5 i cos((i+1)*x_1+i))
// Reference: // Reference:
// https://www.sfu.ca/~ssurjano/shubert.html (obtained June 2017) // https://www.sfu.ca/~ssurjano/shubert.html (obtained June 2017)
type Schubert struct{} type Shubert struct{}
func (Schubert) Func(x []float64) float64 { func (Shubert) Func(x []float64) float64 {
if len(x) != 2 { if len(x) != 2 {
panic(badInputDim) panic(badInputDim)
} }