|
Unfit
3.1.1
Data fitting and optimization software
|
Public Member Functions | |
| void | AccessChaosEnhancement (unsigned enhancement_strategy) |
| std::vector< double > | AccessGenerateTrialParticle (std::size_t member) |
| void | AccessUpdatePopulationMember (GenericCostFunction &CostFunction, std::size_t member) |
| void | SetBestParticle (std::vector< double > &particle) |
| void | SetDimensions (std::size_t dimensions) |
Public Member Functions inherited from Unfit::ParticleSwarm | |
| ParticleSwarm () | |
| virtual | ~ParticleSwarm () |
| int | FindMin (GenericCostFunction &CostFunction, std::vector< double > &coordinates) override |
| A method to find the minimum of a model/function using a Particle Swarm approach. More... | |
| void | Reset () override |
Public Member Functions inherited from Unfit::GenericOptimizer | |
| GenericOptimizer () | |
| virtual | ~GenericOptimizer () |
| void | ResetGenericOptimizer () |
| virtual double | GetCost (std::size_t index=0) const noexcept |
| virtual bool | GetIsPopulationBased () const noexcept |
| virtual std::size_t | GetNumberOfIterations () const noexcept |
| virtual std::size_t | GetNumberOfFunctionEvaluations () const noexcept |
| virtual std::vector< std::vector< double > > | GetPopulation () const |
| virtual std::vector< double > | GetSolution (std::size_t index=0) const |
| virtual void | SetPopulation (const std::vector< std::vector< double >> &population) |
Additional Inherited Members | |
Public Attributes inherited from Unfit::GenericOptimizer | |
| Unfit::Bounds | bounds |
| Unfit::Options | options |
Protected Member Functions inherited from Unfit::GenericOptimizer | |
| virtual bool | CalculateCost (GenericCostFunction &CostFunction, std::vector< double > &x) |
| void | GeneratePopulation (GenericCostFunction &CostFunction, std::size_t dimensions) |
| void | GenerateRandomEngines () |
| virtual bool | IsConverged (const std::vector< double > &best_member, std::size_t truncated_index=0) const |
| Checks to see if the population has converged. More... | |
| virtual void | PrintInitialOutput (double best_cost) const |
| virtual void | PrintIterationOutput (double best_cost) const |
| virtual void | PrintFinalOutput () const |
| virtual void | SortPopulation () noexcept |
Protected Attributes inherited from Unfit::GenericOptimizer | |
| std::vector< std::vector< double > > | population_ |
| std::vector< std::mt19937 > | random_engines_ |
| std::atomic< std::size_t > | function_evaluations_ |
| std::atomic< std::size_t > | iterations_ |
| bool | is_population_based_ |
This class is designed solely to provide the functionality to access the private methods and member variables of the ParticleSwarm class.
|
inline |
This method provides access to the private method ChaosEnhancement from the ParticleSwarm class for testing purposes.
| enhancement_strategy | An index (1-12) to select the chaotic map |
|
inline |
This method provides access to the private method GenerateTrialParticle from the ParticleSwarm class for testing purposes.
| member | The population member for which we will create a new trial particle |
|
inline |
This method provides access to the private method UpdatePopulationMember from the ParticleSwarm class for testing purposes.
| CostFunction | The function with which the cost of the new member will be calculated |
| member | The member to be updated |
|
inline |
This method allows the best particle to be set directly for testing purposes. The best particle is private to the ParticleSwarm class.
| particle | The particle (including cost) to use as the best particle |
|
inline |
This method allows the number of dimensions to be set directly for testing purposes. The number of dimensions is private to the ParticleSwarm class.
| dimensions | The required number of dimensions |
1.8.13