EvolvingObjects
|
eoUniformMutation --> changes all values of the std::vector by uniform choice with range epsilon with probability p_change per variable More...
#include <Tutorial/eoRealOp.h>
Public Member Functions | |
eoUniformMutation (const double &_epsilon, const double &_p_change=1.0) | |
Constructor without bounds == unbounded variables :-) not very clean, but who's doing unbounded optimization anyway? and it's there mostly for backward compatibility. | |
eoUniformMutation (eoRealVectorBounds &_bounds, const double &_epsilon, const double &_p_change=1.0) | |
Constructor with bounds. | |
eoUniformMutation (eoRealVectorBounds &_bounds, const std::vector< double > &_epsilon, const std::vector< double > &_p_change) | |
Constructor with bounds. | |
virtual std::string | className () const |
The class name. | |
bool | operator() (EOT &_eo) |
Do it! | |
Private Attributes | |
bool | homogeneous |
eoRealVectorBounds & | bounds |
std::vector< double > | epsilon |
std::vector< double > | p_change |
eoUniformMutation --> changes all values of the std::vector by uniform choice with range epsilon with probability p_change per variable
Definition at line 47 of file eoRealOp.h.
eoUniformMutation< EOT >::eoUniformMutation | ( | const double & | _epsilon, |
const double & | _p_change = 1.0 |
||
) | [inline] |
Constructor without bounds == unbounded variables :-) not very clean, but who's doing unbounded optimization anyway? and it's there mostly for backward compatibility.
_epsilon | the range for uniform nutation |
_p_change | the probability to change a given coordinate |
Definition at line 58 of file eoRealOp.h.
eoUniformMutation< EOT >::eoUniformMutation | ( | eoRealVectorBounds & | _bounds, |
const double & | _epsilon, | ||
const double & | _p_change = 1.0 |
||
) | [inline] |
Constructor with bounds.
_bounds | an eoRealVectorBounds that contains the bounds |
_epsilon | the range for uniform mutation - a double to be scaled |
_p_change | the one probability to change all coordinates |
Definition at line 68 of file eoRealOp.h.
References eoRealBaseVectorBounds::isBounded().
eoUniformMutation< EOT >::eoUniformMutation | ( | eoRealVectorBounds & | _bounds, |
const std::vector< double > & | _epsilon, | ||
const std::vector< double > & | _p_change | ||
) | [inline] |
Constructor with bounds.
_bounds | an eoRealVectorBounds that contains the bounds |
_epsilon | the VECTOR of ranges for uniform mutation |
_p_change | the VECTOR of probabilities for each coordinates |
Definition at line 85 of file eoRealOp.h.
bool eoUniformMutation< EOT >::operator() | ( | EOT & | _eo | ) | [inline, virtual] |
Do it!
_eo | The indi undergoing the mutation |
Implements eoUF< EOT &, bool >.
Definition at line 98 of file eoRealOp.h.
References eoRng::flip(), eoRealBaseVectorBounds::minimum(), and eoRng::uniform().