LibCudaOptimize
1.0
|
Differential Evolution. More...
#include <DE_Optimizer.h>
Public Member Functions | |
DE_Optimizer (EvalFuncPtr fPtr=NULL, unsigned int dn=PROBLEM_DIMENSIONS, unsigned int sn=NUM_SETS, unsigned int pn=NUM_SOLUTIONS) | |
see IOptimizer::IOptimizer | |
virtual bool | init () |
Initialize the optimizer. | |
void | setF (float f) |
set parameter F | |
void | setCR (float cr) |
set crossover rate | |
void | setMutation (DE_MUTATION m) |
set mutation type | |
void | setCrossover (DE_CROSSOVER x) |
Protected Member Functions | |
virtual void | initSolutions (dim3, dim3) |
Initialize solutions. | |
virtual void | fitnessEvaluation (dim3, dim3, bool first=false) |
Evaluate solutions. | |
virtual void | step (dim3, dim3) |
Generate solutions for subsequent fitnessEvaluation. | |
virtual void | update (dim3, dim3, bool first=false) |
Update population according to the algorithm and the results of fitnessEvaluation. | |
virtual void | findBest () |
Updates global best fitnesses, indexes in SolutionSet device memory. |
Differential Evolution.
Definition at line 46 of file DE_Optimizer.h.
virtual void DE_Optimizer::fitnessEvaluation | ( | dim3 | initializationGrid, |
dim3 | initializationBlock, | ||
bool | first = false |
||
) | [protected, virtual] |
Evaluate solutions.
initializationGrid | organization of the CUDA blocks |
initializationBlock | organization of the CUDA threads |
first | it signals if it is the first evaluation of the optimization |
Implements IOptimizer.
virtual void DE_Optimizer::initSolutions | ( | dim3 | initializationGrid, |
dim3 | initializationBlock | ||
) | [protected, virtual] |
Initialize solutions.
initializationGrid | organization of the CUDA blocks |
initializationBlock | organization of the CUDA threads |
Implements IOptimizer.
void DE_Optimizer::setCrossover | ( | DE_CROSSOVER | x | ) | [inline] |
set crossover type
Possible values are:
DE_BINOMIAL
DE_CROSSOVER
Definition at line 90 of file DE_Optimizer.h.
References DE_CROSSOVER_NUM.
void DE_Optimizer::setMutation | ( | DE_MUTATION | m | ) | [inline] |
set mutation type
Possible values are:
DE_RANDOM
DE_BEST
DE_TARGET_TO_BEST
Definition at line 83 of file DE_Optimizer.h.
References DE_MUTATION_NUM.
virtual void DE_Optimizer::step | ( | dim3 | initializationGrid, |
dim3 | initializationBlock | ||
) | [protected, virtual] |
Generate solutions for subsequent fitnessEvaluation.
initializationGrid | organization of the CUDA blocks |
initializationBlock | organization of the CUDA threads |
Implements IOptimizer.
virtual void DE_Optimizer::update | ( | dim3 | initializationGrid, |
dim3 | initializationBlock, | ||
bool | first = false |
||
) | [protected, virtual] |
Update population according to the algorithm and the results of fitnessEvaluation.
initializationGrid | organization of the CUDA blocks |
initializationBlock | organization of the CUDA threads |
first | it signals if it is the first evaluation of the optimization |
Implements IOptimizer.