|
Unfit
3.1.1
Data fitting and optimization software
|
Public Member Functions | |
| void | AccessGeneratePopulation (GenericCostFunction &CostFunction) |
| std::pair< unsigned, unsigned > | AccessGetMatingPair () |
| void | AccessReproduce (GenericCostFunction &CostFunction) |
| void | AccessCrossOver (const std::vector< double > &parent_1, const std::vector< double > &parent_2, std::vector< double > &offspring_1, std::vector< double > &offspring_2) |
| void | AccessInitialiseBounds () |
| void | AccessGeneratorSeed (unsigned seed) |
| double | AccessDistributionsGenerator (unsigned i) |
| std::vector< std::vector< double > > | AccessPopulation () const |
| void | AccessMutateGenes (GenericCostFunction &CostFunction) |
| void | SetDimensions (unsigned dimensions) |
| std::vector< double > | AccessRanks () |
| bool | AssignPopulation (GenericCostFunction &CostFunction, const std::vector< std::vector< double >> &chromosomes) |
Public Member Functions inherited from Unfit::GeneticAlgorithm | |
| GeneticAlgorithm () | |
| virtual | ~GeneticAlgorithm () |
| int | FindMin (GenericCostFunction &CostFunction, std::vector< double > &coordinates) override |
| A method to find a minimum point of a function using a Genetic Algorithm 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 GeneticAlgorithm class.
|
inline |
A function to access the private method (CrossOver) in the GeneticAlgorithm class.
| parent_1 | The first parent of the mating pair |
| parent_2 | The second parent of the mating pair |
| offspring_1 | The first offspring from the mating pair |
| offspring_2 | The second offspring from the mating pair |
|
inline |
A function to access the private random number generation method in the GeneticAlgorithm class.
| i | The index of the cost function parameter |
|
inline |
A function to access the private method (GeneratePopulation) in the GeneticAlgorithm class.
| CostFunction | The equation to be used to calculate the cost |
|
inline |
A function to access the private random number generator method in the GeneticAlgorithm class and change its seed.
| seed | The new seed |
|
inline |
A function to access the private method (GetMatingPairs) in the GeneticAlgorithm class.
|
inline |
A function to access the private method (InitialiseBounds) in the GeneticAlgorithm class.
|
inline |
A function to access the private method (MutateGenes) in the GeneticAlgorithm class.
| CostFunction | The function to calculate the cost of a chromosome |
|
inline |
A function to access the private vector (population) in the GeneticAlgorithm class.
|
inline |
A function to access the private variable (ranks_) in the GeneticAlgorithm class.
|
inline |
A function to access the private method (Reproduce) in the GeneticAlgorithm class.
| CostFunction | The equation to be used to calculate the cost |
|
inline |
A function to set a whole population; for testing purposes only.
| CostFunction | Returns the residuals of the model |
| chromosomes | The intended population |
|
inline |
A function to set the private variable (dimensions_) in the GeneticAlgorithm class.
| dimensions | The requested number of dimensions |
1.8.13