-
Notifications
You must be signed in to change notification settings - Fork 575
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
Implement C++ style functors as targets for objectives #457
Merged
stevengj
merged 10 commits into
stevengj:master
from
dburov190:implement-cpp-style-functor
Aug 17, 2022
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4f6183c
Implement C++ style functors as targets for objectives
dburov190 a6de367
Implement CMake macro for adding cpp tests
dburov190 976fb1d
Create a test for functor-type objectives
dburov190 02e8bb0
Sub myfunc_data* with void* (attempt to fix SWIG compilation)
dburov190 546c463
Use zero-initialization instead of explicit NULL assignments
dburov190 44a173a
Explicitly require C++11 standard for C++ API
dburov190 fc9cc0c
Replace NLOPT_CXX11 with NLOPT_CXX throughout the library
dburov190 6f13f3c
Use alloc_myfunc_data_with_nulls instead of new operator
dburov190 4415dd6
Split allocation of myfunc_data into static and non-static parts
dburov190 ec34b86
Return myfunc_data* instead of void* in allocation methods
dburov190 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,9 +46,11 @@ static const char nlopt_algorithm_names[NLOPT_NUM_ALGORITHMS][256] = { | |
#ifdef NLOPT_CXX | ||
"StoGO (global, derivative-based)", | ||
"StoGO with randomized search (global, derivative-based)", | ||
"AGS (global, no-derivative)" | ||
#else | ||
"StoGO (NOT COMPILED)", | ||
"StoGO randomized (NOT COMPILED)", | ||
"AGS (NOT COMPILED)" | ||
#endif | ||
"original L-BFGS code by Nocedal et al. (NOT COMPILED)", | ||
"Limited-memory BFGS (L-BFGS) (local, derivative-based)", | ||
|
@@ -83,11 +85,6 @@ static const char nlopt_algorithm_names[NLOPT_NUM_ALGORITHMS][256] = { | |
"Sequential Quadratic Programming (SQP) (local, derivative)", | ||
"CCSA (Conservative Convex Separable Approximations) with simple quadratic approximations (local, derivative)", | ||
"ESCH evolutionary strategy", | ||
#ifdef NLOPT_CXX11 | ||
"AGS (global, no-derivative)" | ||
#else | ||
"AGS (NOT COMPILED)" | ||
#endif | ||
Comment on lines
-86
to
-90
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR broke |
||
}; | ||
|
||
const char *NLOPT_STDCALL nlopt_algorithm_name(nlopt_algorithm a) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The missing
,
at the end of these items cause them to be merged with the item after which causes there to be one too few items in this array.