|
EvolvingObjects
|
Update an inertia weight by assigning it an (uniform) random value. More...
#include <eoRandomRealWeightUp.h>
Public Member Functions | |
| eoRandomRealWeightUp (double _min, double _max) | |
| Default constructor. | |
| void | operator() (double &_weight) |
| Generate an real random number in [min,max] and assign it to _weight. | |
Protected Attributes | |
| double | min |
| double | max |
Update an inertia weight by assigning it an (uniform) random value.
The weight is a basic feature to evaluate the velocity of a particle in swarm optimization.
Definition at line 40 of file eoRandomRealWeightUp.h.
| eoRandomRealWeightUp::eoRandomRealWeightUp | ( | double | _min, |
| double | _max | ||
| ) | [inline] |
Default constructor.
| _min | - The minimum bound for the weight |
| _max | - The maximum bound for the weight |
Definition at line 49 of file eoRandomRealWeightUp.h.
| void eoRandomRealWeightUp::operator() | ( | double & | _weight | ) | [inline, virtual] |
Generate an real random number in [min,max] and assign it to _weight.
| _weight | - The assigned (real) weight |
Implements eoUF< double &, void >.
Definition at line 67 of file eoRandomRealWeightUp.h.
References eoRng::uniform().