Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Sampling without replacement in jDE - #113

Open
neduard wants to merge 4 commits into
esa:masterfrom
neduard:issue95_sampling_without_replacement_jde
Open

Sampling without replacement in jDE#113
neduard wants to merge 4 commits into
esa:masterfrom
neduard:issue95_sampling_without_replacement_jde

Conversation

@neduard

@neduard neduard commented Mar 8, 2015

Copy link
Copy Markdown

Inspired from #95 (comment)
When taking population samples in jDE, if the population size (NP) is small enough, we apply a sampling without replacement algorithm, otherwise we revert to previous behaviour.

Testing was done by make tests and a custom test bench:
https://github.com/neduard/pagmo/blob/development/my_tutorials/myjdedev.cpp

This patch addresses issue #95

Comment thread src/algorithm/jde.cpp

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we include everything in the evolve() method. Would it be a good idea to separate the sampling algorithm (both for small and large NP) into a separate function?

@krzysztof

Copy link
Copy Markdown

@neduard Putting it into an external function is not necessary as it's so far the only place we use sampling wo replacement. Otherwise it would go in pagmo::util. Patch is fine as it is for now.

@landscape-bot

Copy link
Copy Markdown

Code Health
Code quality remained the same when pulling 255ba78 on neduard:issue95_sampling_without_replacement_jde into 6ec99bc on esa:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants