evox.problems.numerical.cec2022
#
模块内容#
类#
CEC 2022 单目标测试套件问题 |
API#
- class evox.problems.numerical.cec2022.CEC2022(problem_number: int, dimension: int, device: torch.device | None = None)[源代码]#
Bases:
evox.core.Problem
CEC 2022 单目标测试套件问题
初始化
从CEC2022测试套件初始化一个单一测试函数实例。
- 参数:
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.
- 抛出:
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] [源代码]#
- sr_func_rate(x: torch.Tensor, sh_rate: float, sh_flag: bool, rot_flag: bool, offset: torch.Tensor, M: torch.Tensor) torch.Tensor [源代码]#
平移和旋转函数与速率。