From 0f32f0414322413f72ea94ead11b183545431c36 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 1 Feb 2023 23:26:37 +0100 Subject: [PATCH] add cec2020 package (wip) --- bench/cec2020/benchFunctions.go | 30 +++++++++++++++++++++++++++++ bench/cec2020/contants.go | 11 +++++++++++ bench/cec2020/helperFunctions.go | 33 ++++++++++++++++++++++++++++++++ bench/cec2020/vars.go | 9 +++++++++ 4 files changed, 83 insertions(+) create mode 100644 bench/cec2020/benchFunctions.go create mode 100644 bench/cec2020/contants.go create mode 100644 bench/cec2020/helperFunctions.go create mode 100644 bench/cec2020/vars.go diff --git a/bench/cec2020/benchFunctions.go b/bench/cec2020/benchFunctions.go new file mode 100644 index 0000000..b5cf890 --- /dev/null +++ b/bench/cec2020/benchFunctions.go @@ -0,0 +1,30 @@ +// Copyright 2023 wanderer +// SPDX-License-Identifier: GPL-3.0-or-later + +package cec2020 + +// void sphere_func (double *, double *, int , double *,double *, int, int); // Sphere +// void ellips_func(double *, double *, int , double *,double *, int, int); // Ellipsoidal +// void bent_cigar_func(double *, double *, int , double *,double *, int, int); // Discus +// void discus_func(double *, double *, int , double *,double *, int, int); // Bent_Cigar +// void dif_powers_func(double *, double *, int , double *,double *, int, int); // Different Powers +// void rosenbrock_func (double *, double *, int , double *,double *, int, int); // Rosenbrock's +// void schaffer_F7_func (double *, double *, int , double *,double *, int, int); // Schwefel's F7 +// void ackley_func (double *, double *, int , double *,double *, int, int); // Ackley's +// void rastrigin_func (double *, double *, int , double *,double *, int, int); // Rastrigin's +// void weierstrass_func (double *, double *, int , double *,double *, int, int); // Weierstrass's +// void griewank_func (double *, double *, int , double *,double *, int, int); // Griewank's +// void schwefel_func (double *, double *, int , double *,double *, int, int); // Schwefel's +// void katsuura_func (double *, double *, int , double *,double *, int, int); // Katsuura +// void bi_rastrigin_func (double *, double *, int , double *,double *, int, int); // Lunacek Bi_rastrigin +// void grie_rosen_func (double *, double *, int , double *,double *, int, int); // Griewank-Rosenbrock +// void escaffer6_func (double *, double *, int , double *,double *, int, int); // Expanded Schaffer's F6 +// void step_rastrigin_func (double *, double *, int , double *,double *, int, int); // Noncontinuous Rastrigin's +// void happycat_func (double *, double *, int , double *,double *, int, int); // HappyCat +// void hgbat_func (double *, double *, int , double *,double *, int, int); // HGBat +// +// // New functions Noor Changes +// void sum_diff_pow_func(double *, double *, int , double *,double *, int, int); // Sum of different power +// void zakharov_func(double *, double *, int , double *,double *, int, int); // ZAKHAROV +// void levy_func(double *, double *, int , double *,double *, int, int); // Levy +// void dixon_price_func(double *, double *, int , double *,double *, int, int); // Dixon and Price diff --git a/bench/cec2020/contants.go b/bench/cec2020/contants.go new file mode 100644 index 0000000..fc16dd2 --- /dev/null +++ b/bench/cec2020/contants.go @@ -0,0 +1,11 @@ +// Copyright 2023 wanderer +// SPDX-License-Identifier: GPL-3.0-or-later + +package cec2020 + +/* +#define INF 1.0e99 +#define EPS 1.0e-14 +#define E 2.7182818284590452353602874713526625 +#define PI 3.1415926535897932384626433832795029 +*/ diff --git a/bench/cec2020/helperFunctions.go b/bench/cec2020/helperFunctions.go new file mode 100644 index 0000000..2534b86 --- /dev/null +++ b/bench/cec2020/helperFunctions.go @@ -0,0 +1,33 @@ +// Copyright 2023 wanderer +// SPDX-License-Identifier: GPL-3.0-or-later + +package cec2020 + +// void hf01 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 1 +// void hf02 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 2 +// void hf03 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 3 +// void hf04 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 4 +// void hf05 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 5 +// void hf06 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 6 +// void hf07 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 7 +// void hf08 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 8 +// void hf09 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 9 +// void hf10 (double *, double *, int, double *,double *, int *,int, int); // Hybrid Function 10 +// +// void cf01 (double *, double *, int , double *,double *, int); // Composition Function 1 +// void cf02 (double *, double *, int , double *,double *, int); // Composition Function 2 +// void cf03 (double *, double *, int , double *,double *, int); // Composition Function 3 +// void cf04 (double *, double *, int , double *,double *, int); // Composition Function 4 +// void cf05 (double *, double *, int , double *,double *, int); // Composition Function 5 +// void cf06 (double *, double *, int , double *,double *, int); // Composition Function 6 +// void cf07 (double *, double *, int , double *,double *, int); // Composition Function 7 +// void cf08 (double *, double *, int , double *,double *, int); // Composition Function 8 +// void cf09 (double *, double *, int , double *,double *, int *, int); // Composition Function 9/ +// void cf10 (double *, double *, int , double *,double *, int *, int); // Composition Function 10 + +// void shiftfunc (double*,double*,int,double*); +// void rotatefunc (double*,double*,int, double*); +// void sr_func (double *, double *, int, double*, double*, double, int, int); // shift and rotate +// void asyfunc (double *, double *x, int, double); +// void oszfunc (double *, double *, int); +// void cf_cal(double *, double *, int, double *,double *,double *,double *,int); diff --git a/bench/cec2020/vars.go b/bench/cec2020/vars.go new file mode 100644 index 0000000..1f3ef75 --- /dev/null +++ b/bench/cec2020/vars.go @@ -0,0 +1,9 @@ +// Copyright 2023 wanderer +// SPDX-License-Identifier: GPL-3.0-or-later + +package cec2020 + +/* +extern double *OShift,*M,*y,*z,*x_bound; +extern int ini_flag,n_flag,func_flag,*SS; +*/