evox.problems.numerical.cec2022
¶
Module Contents¶
Classes¶
The CEC 2022 single-objective test suite Problem |
API¶
- class evox.problems.numerical.cec2022.CEC2022(problem_number: int, dimension: int, device: torch.device | None = None)[source]¶
Bases:
evox.core.Problem
The CEC 2022 single-objective test suite Problem
Initialization
Initialize a single test function instance from the CEC2022 test suite.
- Parameters:
problem_number – The index for the specific test function to be used. Must be ranged from 1 to 12.
(int) (dimension) – The dimensionality of the problem. Must be one of [2, 10, 20].
optional) (device (torch.device,) – The device on which tensors will be allocated. Defaults to None.
- Raises:
AssertionError – If the dimension is not one of the allowed values or if the function is not defined.
FileNotFoundError – If the necessary data files for the problem are not found.
- cut(x: torch.Tensor, Gp: List[float], sh_flag: bool, rot_flag: bool, offset: torch.Tensor, M: torch.Tensor) List[torch.Tensor] [source]¶
- sr_func_rate(x: torch.Tensor, sh_rate: float, sh_flag: bool, rot_flag: bool, offset: torch.Tensor, M: torch.Tensor) torch.Tensor [source]¶
Shift and rotate function with rate.
- cf_cal(x: torch.Tensor, fit: List[torch.Tensor], delta: List[int], bias: List[int]) torch.Tensor [source]¶