17
17
the design pattern stated above.
18
18
19
19
Function list:
20
- - Ackley's, ackley_func
21
- - Beale, beale_func
22
- - Booth, booth_func
23
- - Bukin's No 6, bukin6_func
24
- - Cross-in-Tray, crossintray_func
25
- - Easom, easom_func
26
- - Eggholder, eggholder_func
27
- - Goldstein, goldstein_func
28
- - Himmelblau's, himmelblau_func
29
- - Holder Table, holdertable_func
30
- - Levi, levi_func
31
- - Matyas, matyas_func
32
- - Rastrigin, rastrigin_func
33
- - Rosenbrock, rosenbrock_func
34
- - Schaffer No 2, schaffer2_func
35
- - Sphere, sphere_func
36
- - Three Hump Camel, threehump_func
20
+ - Ackley's, ackley
21
+ - Beale, beale
22
+ - Booth, booth
23
+ - Bukin's No 6, bukin6
24
+ - Cross-in-Tray, crossintray
25
+ - Easom, easom
26
+ - Eggholder, eggholder
27
+ - Goldstein, goldstein
28
+ - Himmelblau's, himmelblau
29
+ - Holder Table, holdertable
30
+ - Levi, levi
31
+ - Matyas, matyas
32
+ - Rastrigin, rastrigin
33
+ - Rosenbrock, rosenbrock
34
+ - Schaffer No 2, schaffer2
35
+ - Sphere, sphere
36
+ - Three Hump Camel, threehump
37
37
"""
38
38
39
39
# Import from __future__
45
45
import numpy as np
46
46
47
47
48
- def ackley_func (x ):
48
+ def ackley (x ):
49
49
"""Ackley's objective function.
50
50
51
51
Has a global minimum of `0` at :code:`f(0,0,...,0)` with a search
@@ -81,7 +81,7 @@ def ackley_func(x):
81
81
return j
82
82
83
83
84
- def beale_func (x ):
84
+ def beale (x ):
85
85
"""Beale objective function.
86
86
87
87
Only takes two dimensions and has a global minimum of `0` at
@@ -124,7 +124,7 @@ def beale_func(x):
124
124
return j
125
125
126
126
127
- def booth_func (x ):
127
+ def booth (x ):
128
128
"""Booth's objective function.
129
129
130
130
Only takes two dimensions and has a global minimum of `0` at
@@ -161,7 +161,7 @@ def booth_func(x):
161
161
return j
162
162
163
163
164
- def bukin6_func (x ):
164
+ def bukin6 (x ):
165
165
"""Bukin N. 6 Objective Function
166
166
167
167
Only takes two dimensions and has a global minimum of `0` at
@@ -210,7 +210,7 @@ def bukin6_func(x):
210
210
return j
211
211
212
212
213
- def crossintray_func (x ):
213
+ def crossintray (x ):
214
214
"""Cross-in-tray objective function.
215
215
216
216
Only takes two dimensions and has a four equal global minimums
@@ -264,7 +264,7 @@ def crossintray_func(x):
264
264
return j
265
265
266
266
267
- def easom_func (x ):
267
+ def easom (x ):
268
268
"""Easom objective function.
269
269
270
270
Only takes two dimensions and has a global minimum of
@@ -312,7 +312,7 @@ def easom_func(x):
312
312
return j
313
313
314
314
315
- def eggholder_func (x ):
315
+ def eggholder (x ):
316
316
"""Eggholder objective function.
317
317
318
318
Only takes two dimensions and has a global minimum of
@@ -359,7 +359,7 @@ def eggholder_func(x):
359
359
return j
360
360
361
361
362
- def goldstein_func (x ):
362
+ def goldstein (x ):
363
363
"""Goldstein-Price's objective function.
364
364
365
365
Only takes two dimensions and has a global minimum at
@@ -424,7 +424,7 @@ def goldstein_func(x):
424
424
return j
425
425
426
426
427
- def himmelblau_func (x ):
427
+ def himmelblau (x ):
428
428
"""Himmelblau's objective function
429
429
430
430
Only takes two dimensions and has a four equal global minimums
@@ -470,7 +470,7 @@ def himmelblau_func(x):
470
470
return j
471
471
472
472
473
- def holdertable_func (x ):
473
+ def holdertable (x ):
474
474
"""Holder Table objective function
475
475
476
476
Only takes two dimensions and has a four equal global minimums
@@ -520,7 +520,7 @@ def holdertable_func(x):
520
520
return j
521
521
522
522
523
- def levi_func (x ):
523
+ def levi (x ):
524
524
"""Levi objective function
525
525
526
526
Only takes two dimensions and has a global minimum at
@@ -569,7 +569,7 @@ def levi_func(x):
569
569
return j
570
570
571
571
572
- def matyas_func (x ):
572
+ def matyas (x ):
573
573
"""Matyas objective function
574
574
575
575
Only takes two dimensions and has a global minimum at
@@ -599,7 +599,7 @@ def matyas_func(x):
599
599
return j
600
600
601
601
602
- def rastrigin_func (x ):
602
+ def rastrigin (x ):
603
603
"""Rastrigin objective function.
604
604
605
605
Has a global minimum at :code:`f(0,0,...,0)` with a search
@@ -632,7 +632,7 @@ def rastrigin_func(x):
632
632
return j
633
633
634
634
635
- def rosenbrock_func (x ):
635
+ def rosenbrock (x ):
636
636
"""Rosenbrock objective function.
637
637
638
638
Also known as the Rosenbrock's valley or Rosenbrock's banana
@@ -658,7 +658,7 @@ def rosenbrock_func(x):
658
658
return r
659
659
660
660
661
- def schaffer2_func (x ):
661
+ def schaffer2 (x ):
662
662
"""Schaffer N.2 objective function
663
663
664
664
Only takes two dimensions and has a global minimum at
@@ -703,7 +703,7 @@ def schaffer2_func(x):
703
703
return j
704
704
705
705
706
- def sphere_func (x ):
706
+ def sphere (x ):
707
707
"""Sphere objective function.
708
708
709
709
Has a global minimum at :code:`0` and with a search domain of
@@ -724,7 +724,7 @@ def sphere_func(x):
724
724
return j
725
725
726
726
727
- def threehump_func (x ):
727
+ def threehump (x ):
728
728
"""Three-hump camel objective function
729
729
730
730
Only takes two dimensions and has a global minimum of `0` at
0 commit comments