test_functions module¶
This module contains basic implementations of simple optimization problems.
This module defines some basic fitness functions to test the evolutionary process.
-
test_functions.
booth_test
(x: Union[int, float], y: Union[int, float]) → Union[int, float][source]¶ The Booth function.
This function computes the Booth function in 3D.
- Parameters
x (float) – The value along the x-axis.
y (float) – The value along the y-axis.
- Returns
The value along the z-axis for the Booth function, i.e. Booth(x,y).
- Return type
z (float)
-
test_functions.
bukin_test
(x: Union[int, float], y: Union[int, float]) → Union[int, float][source]¶ The Bukin function.
This function computes the Bukin function in 3D.
- Parameters
x (float) – The value along the x-axis.
y (float) – The value along the y-axis.
- Returns
The value along the z-axis for the Bukin function, i.e. Bukin(x,y).
- Return type
z (float)
-
test_functions.
easom_test
(x: Union[int, float], y: Union[int, float]) → Union[int, float][source]¶ The Easom function.
This function computes the Easom function in 3D.
- Parameters
x (float) – The value along the x-axis.
y (float) – The value along the y-axis.
- Returns
The value along the z-axis for the Easom function, i.e. Easom(x,y).
- Return type
z (float)
-
test_functions.
gp_test
(x: Union[int, float], y: Union[int, float]) → Union[int, float][source]¶ The Goldstein-Price function.
This function computes the Goldstein-Price function in 3D.
- Parameters
x (float) – The value along the x-axis.
y (float) – The value along the y-axis.
- Returns
The value along the z-axis for the Goldstein-Price function, i.e. Goldstein-Price(x,y).
- Return type
z (float)
-
test_functions.
rosenbrock_test
(*args: Union[int, float, List[Union[int, float]]]) → Union[int, float][source]¶ The Rosenbrock function.
This function computes the Rosenbrock function in 3D.
- Parameters
*args (float) – The parameters of the Rosenbrock function.
- Returns
The value of the Rosenbrock function i.e. Rosenbrock(x, y, …).
- Return type
result (float)