EvolvingObjects
eoRandomRealWeightUp Class Reference

Update an inertia weight by assigning it an (uniform) random value. More...

#include <eoRandomRealWeightUp.h>

Inheritance diagram for eoRandomRealWeightUp:
eoWeightUpdater< double > eoUF< double &, void > eoFunctorBase unary_function

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

eoRandomRealWeightUp::eoRandomRealWeightUp ( double  _min,
double  _max 
) [inline]

Default constructor.

Parameters:
_min- The minimum bound for the weight
_max- The maximum bound for the weight

Definition at line 49 of file eoRandomRealWeightUp.h.


Member Function Documentation

void eoRandomRealWeightUp::operator() ( double &  _weight) [inline, virtual]

Generate an real random number in [min,max] and assign it to _weight.

Parameters:
_weight- The assigned (real) weight

Implements eoUF< double &, void >.

Definition at line 67 of file eoRandomRealWeightUp.h.

References eoRng::uniform().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends