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

lib crashes if lambda is passed as 0 #119

Closed
beniz opened this issue Feb 12, 2015 · 3 comments
Closed

lib crashes if lambda is passed as 0 #119

beniz opened this issue Feb 12, 2015 · 3 comments
Assignees
Labels

Comments

@beniz
Copy link
Collaborator

beniz commented Feb 12, 2015

Example:

 ./test_functions -fname rosenbrock -dim 20 -lambda 0
Floating point exception
@beniz beniz added the bug label Feb 12, 2015
@beniz beniz self-assigned this Feb 12, 2015
@beniz
Copy link
Collaborator Author

beniz commented Feb 12, 2015

Made a simple fix available, that uses default value if lambda<2. This has the advantage of not compromising a quick run, and the drawback of not informing him/her of the mistake.

@nikohansen
Copy link
Collaborator

Makes sense to me, one could consider firing a warning in verbose mode.

@beniz
Copy link
Collaborator Author

beniz commented Feb 13, 2015

one could consider firing a warning in verbose mode

Just FTR, this is tricky because the default value of lambda is set in the Parameters constructor, and the verbose/non-verbose mode is undecided at this stage. So in practice it is possible to set a warning message, but not to condition it upon the verbosity on/off option. For now I'd see this as an 'autocorrect' for a user mistake.

@beniz beniz closed this as completed Feb 13, 2015
andrewsali pushed a commit to andrewsali/libcmaes that referenced this issue Jan 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants