Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initialization for potentially-used cec2014 vars #562

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/problems/cec2014.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ void cec2014::weierstrass_func(const double *x, double *f, const unsigned nx, co

unsigned i, j, k_max;
double sum, sum2, a, b;
sum2 = 0.0;
a = 0.5;
b = 3.0;
k_max = 20;
Expand Down Expand Up @@ -1295,6 +1296,7 @@ void cec2014::oszfunc(const double *x, double *xosz, const unsigned nx) const
unsigned i;
int sx;
double c1, c2, xx;
xx = 0.0;
for (i = 0; i < nx; i++) {
if (i == 0 || i == nx - 1) {
if (x[i] != 0) {
Expand Down
Loading