# {py:mod}`evox.problems.numerical` ```{py:module} evox.problems.numerical ``` ```{autodoc2-docstring} evox.problems.numerical :allowtitles: ``` ## Submodules ```{toctree} :titlesonly: :maxdepth: 1 evox.problems.numerical.basic evox.problems.numerical.cec2022 evox.problems.numerical.dtlz ``` ## Package Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`Ackley ` - ```{autodoc2-docstring} evox.problems.numerical.basic.Ackley :summary: ``` * - {py:obj}`Griewank ` - ```{autodoc2-docstring} evox.problems.numerical.basic.Griewank :summary: ``` * - {py:obj}`Rastrigin ` - ```{autodoc2-docstring} evox.problems.numerical.basic.Rastrigin :summary: ``` * - {py:obj}`Rosenbrock ` - ```{autodoc2-docstring} evox.problems.numerical.basic.Rosenbrock :summary: ``` * - {py:obj}`Schwefel ` - ```{autodoc2-docstring} evox.problems.numerical.basic.Schwefel :summary: ``` * - {py:obj}`Sphere ` - ```{autodoc2-docstring} evox.problems.numerical.basic.Sphere :summary: ``` * - {py:obj}`Ellipsoid ` - ```{autodoc2-docstring} evox.problems.numerical.basic.Ellipsoid :summary: ``` * - {py:obj}`CEC2022 ` - ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022 :summary: ``` * - {py:obj}`DTLZ1 ` - * - {py:obj}`DTLZ2 ` - * - {py:obj}`DTLZ3 ` - * - {py:obj}`DTLZ4 ` - * - {py:obj}`DTLZ5 ` - * - {py:obj}`DTLZ6 ` - * - {py:obj}`DTLZ7 ` - ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`ackley_func ` - ```{autodoc2-docstring} evox.problems.numerical.basic.ackley_func :summary: ``` * - {py:obj}`griewank_func ` - ```{autodoc2-docstring} evox.problems.numerical.basic.griewank_func :summary: ``` * - {py:obj}`rastrigin_func ` - ```{autodoc2-docstring} evox.problems.numerical.basic.rastrigin_func :summary: ``` * - {py:obj}`rosenbrock_func ` - ```{autodoc2-docstring} evox.problems.numerical.basic.rosenbrock_func :summary: ``` * - {py:obj}`schwefel_func ` - ```{autodoc2-docstring} evox.problems.numerical.basic.schwefel_func :summary: ``` * - {py:obj}`sphere_func ` - ```{autodoc2-docstring} evox.problems.numerical.basic.sphere_func :summary: ``` * - {py:obj}`ellipsoid_func ` - ```{autodoc2-docstring} evox.problems.numerical.basic.ellipsoid_func :summary: ``` ```` ### API `````{py:class} Ackley(a: float = 20.0, b: float = 0.2, c: float = 2 * torch.pi, **kwargs) :canonical: evox.problems.numerical.basic.Ackley Bases: {py:obj}`evox.problems.numerical.basic.ShiftAffineNumericalProblem` ```{autodoc2-docstring} evox.problems.numerical.basic.Ackley ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} evox.problems.numerical.basic.Ackley.__init__ ``` ````{py:method} _true_evaluate(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.Ackley._true_evaluate ```{autodoc2-docstring} evox.problems.numerical.basic.Ackley._true_evaluate ``` ```` ````` `````{py:class} Griewank(**kwargs) :canonical: evox.problems.numerical.basic.Griewank Bases: {py:obj}`evox.problems.numerical.basic.ShiftAffineNumericalProblem` ```{autodoc2-docstring} evox.problems.numerical.basic.Griewank ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} evox.problems.numerical.basic.Griewank.__init__ ``` ````{py:method} _true_evaluate(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.Griewank._true_evaluate ```{autodoc2-docstring} evox.problems.numerical.basic.Griewank._true_evaluate ``` ```` ````` `````{py:class} Rastrigin(**kwargs) :canonical: evox.problems.numerical.basic.Rastrigin Bases: {py:obj}`evox.problems.numerical.basic.ShiftAffineNumericalProblem` ```{autodoc2-docstring} evox.problems.numerical.basic.Rastrigin ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} evox.problems.numerical.basic.Rastrigin.__init__ ``` ````{py:method} _true_evaluate(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.Rastrigin._true_evaluate ```{autodoc2-docstring} evox.problems.numerical.basic.Rastrigin._true_evaluate ``` ```` ````` `````{py:class} Rosenbrock(**kwargs) :canonical: evox.problems.numerical.basic.Rosenbrock Bases: {py:obj}`evox.problems.numerical.basic.ShiftAffineNumericalProblem` ```{autodoc2-docstring} evox.problems.numerical.basic.Rosenbrock ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} evox.problems.numerical.basic.Rosenbrock.__init__ ``` ````{py:method} _true_evaluate(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.Rosenbrock._true_evaluate ```{autodoc2-docstring} evox.problems.numerical.basic.Rosenbrock._true_evaluate ``` ```` ````` `````{py:class} Schwefel(**kwargs) :canonical: evox.problems.numerical.basic.Schwefel Bases: {py:obj}`evox.problems.numerical.basic.ShiftAffineNumericalProblem` ```{autodoc2-docstring} evox.problems.numerical.basic.Schwefel ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} evox.problems.numerical.basic.Schwefel.__init__ ``` ````{py:method} _true_evaluate(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.Schwefel._true_evaluate ```{autodoc2-docstring} evox.problems.numerical.basic.Schwefel._true_evaluate ``` ```` ````` `````{py:class} Sphere(**kwargs) :canonical: evox.problems.numerical.basic.Sphere Bases: {py:obj}`evox.problems.numerical.basic.ShiftAffineNumericalProblem` ```{autodoc2-docstring} evox.problems.numerical.basic.Sphere ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} evox.problems.numerical.basic.Sphere.__init__ ``` ````{py:method} _true_evaluate(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.Sphere._true_evaluate ```{autodoc2-docstring} evox.problems.numerical.basic.Sphere._true_evaluate ``` ```` ````` `````{py:class} Ellipsoid(**kwargs) :canonical: evox.problems.numerical.basic.Ellipsoid Bases: {py:obj}`evox.problems.numerical.basic.ShiftAffineNumericalProblem` ```{autodoc2-docstring} evox.problems.numerical.basic.Ellipsoid ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} evox.problems.numerical.basic.Ellipsoid.__init__ ``` ````{py:method} _true_evaluate(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.Ellipsoid._true_evaluate ```{autodoc2-docstring} evox.problems.numerical.basic.Ellipsoid._true_evaluate ``` ```` ````` `````{py:class} CEC2022(problem_number: int, dimension: int, device: torch.device | None = None) :canonical: evox.problems.numerical.cec2022.CEC2022 Bases: {py:obj}`evox.core.Problem` ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022 ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.__init__ ``` ````{py:method} shift(x: torch.Tensor, offset: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.shift ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.shift ``` ```` ````{py:method} rotate(x: torch.Tensor, M: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.rotate ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.rotate ``` ```` ````{py:method} cut(x: torch.Tensor, Gp: typing.List[float], sh_flag: bool, rot_flag: bool, offset: torch.Tensor, M: torch.Tensor) -> typing.List[torch.Tensor] :canonical: evox.problems.numerical.cec2022.CEC2022.cut ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cut ``` ```` ````{py:method} sr_func_rate(x: torch.Tensor, sh_rate: float, sh_flag: bool, rot_flag: bool, offset: torch.Tensor, M: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.sr_func_rate ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.sr_func_rate ``` ```` ````{py:method} cf_cal(x: torch.Tensor, fit: typing.List[torch.Tensor], delta: typing.List[int], bias: typing.List[int]) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cf_cal ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cf_cal ``` ```` ````{py:method} cec2022_f1(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f1 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f1 ``` ```` ````{py:method} cec2022_f2(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f2 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f2 ``` ```` ````{py:method} cec2022_f3(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f3 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f3 ``` ```` ````{py:method} cec2022_f4(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f4 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f4 ``` ```` ````{py:method} cec2022_f5(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f5 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f5 ``` ```` ````{py:method} cec2022_f6(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f6 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f6 ``` ```` ````{py:method} cec2022_f7(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f7 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f7 ``` ```` ````{py:method} cec2022_f8(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f8 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f8 ``` ```` ````{py:method} cec2022_f9(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f9 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f9 ``` ```` ````{py:method} cec2022_f10(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f10 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f10 ``` ```` ````{py:method} cec2022_f11(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f11 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f11 ``` ```` ````{py:method} cec2022_f12(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.cec2022_f12 ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.cec2022_f12 ``` ```` ````{py:method} levy_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.levy_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.levy_func ``` ```` ````{py:method} bent_cigar_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.bent_cigar_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.bent_cigar_func ``` ```` ````{py:method} hgbat_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.hgbat_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.hgbat_func ``` ```` ````{py:method} katsuura_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.katsuura_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.katsuura_func ``` ```` ````{py:method} modified_schwefel_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.modified_schwefel_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.modified_schwefel_func ``` ```` ````{py:method} schaffer_F7_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.schaffer_F7_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.schaffer_F7_func ``` ```` ````{py:method} escaffer6_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.escaffer6_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.escaffer6_func ``` ```` ````{py:method} happycat_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.happycat_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.happycat_func ``` ```` ````{py:method} grie_rosen_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.grie_rosen_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.grie_rosen_func ``` ```` ````{py:method} discus_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.discus_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.discus_func ``` ```` ````{py:method} ellips_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.ellips_func ```{autodoc2-docstring} evox.problems.numerical.cec2022.CEC2022.ellips_func ``` ```` ````{py:method} evaluate(pop: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.cec2022.CEC2022.evaluate ```` ````` `````{py:class} DTLZ1(d: int = 7, m: int = 3, ref_num: int = 1000) :canonical: evox.problems.numerical.dtlz.DTLZ1 Bases: {py:obj}`evox.problems.numerical.dtlz.DTLZ` ````{py:method} evaluate(X: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.dtlz.DTLZ1.evaluate ```` ````` `````{py:class} DTLZ2(d: int = 12, m: int = 3, ref_num: int = 1000) :canonical: evox.problems.numerical.dtlz.DTLZ2 Bases: {py:obj}`evox.problems.numerical.dtlz.DTLZ` ````{py:method} evaluate(X: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.dtlz.DTLZ2.evaluate ```` ````{py:method} pf() :canonical: evox.problems.numerical.dtlz.DTLZ2.pf ```` ````` `````{py:class} DTLZ3(d: int = 12, m: int = 3, ref_num: int = 1000) :canonical: evox.problems.numerical.dtlz.DTLZ3 Bases: {py:obj}`evox.problems.numerical.dtlz.DTLZ2` ````{py:method} evaluate(X: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.dtlz.DTLZ3.evaluate ```` ````` `````{py:class} DTLZ4(d: int = 12, m: int = 3, ref_num: int = 1000) :canonical: evox.problems.numerical.dtlz.DTLZ4 Bases: {py:obj}`evox.problems.numerical.dtlz.DTLZ2` ````{py:method} evaluate(X: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.dtlz.DTLZ4.evaluate ```` ````` `````{py:class} DTLZ5(d: int = 12, m: int = 3, ref_num: int = 1000) :canonical: evox.problems.numerical.dtlz.DTLZ5 Bases: {py:obj}`evox.problems.numerical.dtlz.DTLZ` ````{py:method} evaluate(X: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.dtlz.DTLZ5.evaluate ```` ````{py:method} pf() :canonical: evox.problems.numerical.dtlz.DTLZ5.pf ```` ````` `````{py:class} DTLZ6(d: int = 12, m: int = 3, ref_num: int = 1000) :canonical: evox.problems.numerical.dtlz.DTLZ6 Bases: {py:obj}`evox.problems.numerical.dtlz.DTLZ` ````{py:method} evaluate(X: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.dtlz.DTLZ6.evaluate ```` ````{py:method} pf() :canonical: evox.problems.numerical.dtlz.DTLZ6.pf ```` ````` `````{py:class} DTLZ7(d: int = 21, m: int = 3, ref_num: int = 1000) :canonical: evox.problems.numerical.dtlz.DTLZ7 Bases: {py:obj}`evox.problems.numerical.dtlz.DTLZ` ````{py:method} evaluate(X: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.dtlz.DTLZ7.evaluate ```` ````{py:method} pf() :canonical: evox.problems.numerical.dtlz.DTLZ7.pf ```` ````` ````{py:function} ackley_func(a: float, b: float, c: float, x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.ackley_func ```{autodoc2-docstring} evox.problems.numerical.basic.ackley_func ``` ```` ````{py:function} griewank_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.griewank_func ```{autodoc2-docstring} evox.problems.numerical.basic.griewank_func ``` ```` ````{py:function} rastrigin_func(x: torch.Tensor) -> torch.Tensor :canonical: evox.problems.numerical.basic.rastrigin_func ```{autodoc2-docstring} evox.problems.numerical.basic.rastrigin_func ``` ```` ````{py:function} rosenbrock_func(x) :canonical: evox.problems.numerical.basic.rosenbrock_func ```{autodoc2-docstring} evox.problems.numerical.basic.rosenbrock_func ``` ```` ````{py:function} schwefel_func(x) :canonical: evox.problems.numerical.basic.schwefel_func ```{autodoc2-docstring} evox.problems.numerical.basic.schwefel_func ``` ```` ````{py:function} sphere_func(x) :canonical: evox.problems.numerical.basic.sphere_func ```{autodoc2-docstring} evox.problems.numerical.basic.sphere_func ``` ```` ````{py:function} ellipsoid_func(x: torch.Tensor) :canonical: evox.problems.numerical.basic.ellipsoid_func ```{autodoc2-docstring} evox.problems.numerical.basic.ellipsoid_func ``` ````