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 -- 特定测试函数的索引。必须在1到12之间。
(int) (dimension) -- 问题的维度。必须是 [2, 10, 20] 之一。
optional) (device (torch.device,) -- 张量将被分配的设备。默认值为 None。
- 抛出:
AssertionError -- 如果维度不是允许的值之一,或者函数未定义。
FileNotFoundError -- 如果未找到该问题所需的数据文件。
- 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 [源代码]¶
平移和旋转函数与速率。