opfunu.utils package

opfunu.utils.operator module

opfunu.utils.operator.ackley_func(x)[source]
opfunu.utils.operator.bent_cigar_func(x)[source]
opfunu.utils.operator.calculate_weight(x, delta=1.0)[source]
opfunu.utils.operator.chebyshev_func(x)[source]

The following was converted from the cec2019 C code Storn’s Tchebychev - a 2nd ICEO function - generalized version

opfunu.utils.operator.different_powers_func(x)[source]
opfunu.utils.operator.discus_func(x)[source]
opfunu.utils.operator.doubledip(x, c, s)[source]
opfunu.utils.operator.elliptic_func(x)[source]
opfunu.utils.operator.expanded_griewank_rosenbrock_func(x)

This is based on the CEC version which unrolls the griewank and rosenbrock functions for better performance

opfunu.utils.operator.expanded_scaffer_f6_func(x)
opfunu.utils.operator.expanded_schaffer_f6_func(x)[source]

This is a direct conversion of the CEC2021 C-Code for the Expanded Schaffer F6 Function

opfunu.utils.operator.f8f2_func(x)[source]
opfunu.utils.operator.fractal_1d_func(x)[source]
opfunu.utils.operator.generate_diagonal_matrix(size, alpha=10)[source]
opfunu.utils.operator.grie_rosen_cec_func(x)[source]

This is based on the CEC version which unrolls the griewank and rosenbrock functions for better performance

opfunu.utils.operator.griewank_func(x)[source]
opfunu.utils.operator.gz_func(x)[source]
opfunu.utils.operator.happy_cat_func(x, shift=0.0)[source]
opfunu.utils.operator.hgbat_func(x, shift=0.0)[source]
opfunu.utils.operator.inverse_hilbert_func(x)[source]

This is a direct conversion of the cec2019 C code for python optimized to use numpy

opfunu.utils.operator.katsuura_func(x)[source]
opfunu.utils.operator.lennard_jones_func(x)[source]

This version is a direct python conversion from the C-Code of CEC2019 implementation. Find the atomic configuration with minimum energy (Lennard-Jones potential) Valid for any dimension, D = 3 * k, k = 2, 3, 4, …, 25. k is the number of atoms in 3-D space.

opfunu.utils.operator.levy_func(x, shift=0.0)[source]
opfunu.utils.operator.lunacek_bi_rastrigin_func(x, miu0=2.5, d=1, shift=0.0)[source]
opfunu.utils.operator.modified_schwefel_func(x)[source]

This is a direct conversion of the CEC2021 C-Code for the Modified Schwefel F11 Function

opfunu.utils.operator.non_continuous_expanded_scaffer_func(x)[source]
opfunu.utils.operator.non_continuous_rastrigin_func(x)[source]
opfunu.utils.operator.rastrigin_func(x)[source]
opfunu.utils.operator.rosenbrock_func(x, shift=0.0)[source]
opfunu.utils.operator.rotated_expanded_scaffer_func(x)[source]
opfunu.utils.operator.rotated_expanded_schaffer_func(x)[source]
opfunu.utils.operator.rounder(x, condition)[source]
opfunu.utils.operator.scaffer_func(x)[source]
opfunu.utils.operator.schaffer_f7_func(x)[source]
opfunu.utils.operator.schwefel_12_func(x)[source]
opfunu.utils.operator.sphere_func(x)[source]
opfunu.utils.operator.sphere_noise_func(x)[source]
opfunu.utils.operator.tasy_func(x, beta=0.5)[source]
opfunu.utils.operator.tosz_func(x)[source]
opfunu.utils.operator.twist_func(x)[source]
opfunu.utils.operator.weierstrass_func(x, a=0.5, b=3.0, k_max=20)[source]
opfunu.utils.operator.weierstrass_norm_func(x, a=0.5, b=3.0, k_max=20)[source]

This function matches CEC2005 description of F11 except for addition of the bias and follows the C implementation

opfunu.utils.operator.zakharov_func(x)[source]

opfunu.utils.visualize module

opfunu.utils.visualize.plot_2d(func, n_space=1000, cmap=<matplotlib.colors.LinearSegmentedColormap object>, XYZ=None, ax=None, show=True)[source]
opfunu.utils.visualize.plot_3d(func, n_space=1000, cmap=<matplotlib.colors.LinearSegmentedColormap object>, XYZ=None, ax=None, show=True)[source]
opfunu.utils.visualize.plot_latex_formula(latex)[source]