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

Parameterised type #37

Closed
wants to merge 12 commits into from

Conversation

aahaselgrove
Copy link
Contributor

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.

wildart and others added 2 commits August 28, 2018 13:27
`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.
@coveralls
Copy link

coveralls commented Sep 18, 2019

Coverage Status

Coverage decreased (-22.8%) to 77.212% when pulling 0cd421d on aahaselgrove:parameterised_type into c7fb224 on wildart:master.

`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
@aahaselgrove
Copy link
Contributor Author

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.

@wildart
Copy link
Owner

wildart commented Apr 23, 2020

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.

@wildart
Copy link
Owner

wildart commented May 2, 2020

Implemented in new api, see Docs/Dev/Population

@wildart wildart closed this May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants