Skip to content

Commit

Permalink
Cleaning up compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Sep 17, 2024
1 parent 361a2ec commit c9d5ea8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/apex/nelder_mead.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Variable {
void * value; // for the client to get the values
size_t maxlen;
Variable () = delete;
Variable (VariableType vtype, void * ptr) : vtype(vtype), current_index(0),
Variable (VariableType vtype, void * ptr) : limits({0.0,0.0}), vtype(vtype), current_index(0),
best_index(0), current_value(0), best_value(0), value(ptr), maxlen(0) { }
void set_current_value() {
if (vtype == VariableType::continuous) {
Expand Down
4 changes: 0 additions & 4 deletions src/apex/nelder_mead_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ template <typename T = double> class Searcher {
case SIMPLEX: {
// return the next simplex point
return simplex[current_simplex_index].vec();
break;
}
case REFLECTION: {
// Calculate the reflection point
Expand All @@ -291,7 +290,6 @@ template <typename T = double> class Searcher {
x_r.enforce_max(maximum_limits);
// return the reflection point
return x_r.vec();
break;
}
case EXPANSION: {
// Calculate the Expansion point
Expand All @@ -303,7 +301,6 @@ template <typename T = double> class Searcher {
x_e.enforce_max(maximum_limits);
// return the expansion point
return x_e.vec();
break;
}
case CONTRACTION: {
// Compute the contraction point
Expand All @@ -320,7 +317,6 @@ template <typename T = double> class Searcher {
}
// return the contraction point
return x_c.vec();
break;
}
default: {
assert(false);
Expand Down

0 comments on commit c9d5ea8

Please sign in to comment.