-
Notifications
You must be signed in to change notification settings - Fork 59
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
Parameterised type #37
Conversation
`initPopulation` was a heavily overloaded parameter, with a variety of types corresponding to a range of possible behaviours. This commit: - Removes the option to pass a vector representing the search space. This is specific and unclear, and behaviour can easily be easily represented by one of the other options - Restricts `initPopulation` to be a vector of individuals (where an individual is a single member of the population) - Adds a new parameter `creation` to represent a function to create an individual. Default behaviour has not been changed, but is now represented by a creation function.
ee377cb
to
486e2be
Compare
486e2be
to
eea4d41
Compare
`initPopulation` was a heavily overloaded parameter, with a variety of types corresponding to a range of possible behaviours. This commit: - Removes the option to pass a vector representing the search space. This is specific and unclear, and behaviour can easily be easily represented by one of the other options - Restricts `initPopulation` to be a vector of individuals (where an individual is a single member of the population) - Adds a new parameter `creation` to represent a function to create an individual. Default behaviour has not been changed, but is now represented by a creation function.
The `getIndividual` function was performing unnecessary work, so is factored out in this commit. Instead, a sample individual is passed as a parameter. This has the added benefit of making it clear to a reader what kind of data is being worked with. Note: n-queens P increased to 200 due to flaky test. of accessing members
of accessing members
eea4d41
to
0cd421d
Compare
Note that I have made a number of PRs over the last couple of days, and I have been rebasing this one on top of those. I have done this because this is probably the most controversial, and hence the other PRs should be addressed first. |
I'm rewriting the package interface to provide more modular solution for existing and new implementations, see #49. It's very much follows the Optim.jl package design. The new API will provide ability to initialize population separately, and move the bulk of the computations into the dedicated function allowing various implementations, e.g. thread-parallel or multicore, without modifying core parts of the package. |
Implemented in new api, see Docs/Dev/Population |
The
getIndividual
function was performing unnecessary work, so isfactored out in this commit. Instead, a sample individual is passed
as a parameter. This has the added benefit of making it clear to a
reader what kind of data is being worked with.
Note: n-queens P increased to 200 due to flaky test.