Decorator for cost functions #228
Labels
documentation
Documentation improvements or fixes
enhancement
Feature requests
unit tests
Test-related changes
v.1.1.0
In pipeline for next version
Is your feature request related to a problem? Please describe.
Until now the cost function had to return the shape
(n_particles, )
which has caused some problems in using the package.Describe the solution you'd like
I propose a decorator so we can just mark the cost function:
This lets the user write a "strategy" that has to be applied to all the particles in the swarm in order to compute the cost.
Describe alternatives you've considered
N/A
Additional context
The
hypothesis
module has something similar where users can create custom strategies for the testing by using a decoratorThe text was updated successfully, but these errors were encountered: