#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 |
Definition at line 45 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 56 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 66 of file eoRealOp.h.
References eoRealBaseVectorBounds::isBounded(), and eoRealBaseVectorBounds::range().
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 83 of file eoRealOp.h.
bool eoUniformMutation< EOT >::operator() | ( | EOT & | _eo | ) | [inline] |
Do it!
_eo | The indi undergoing the mutation |
Definition at line 96 of file eoRealOp.h.
References eoRng::flip(), eoRealBaseVectorBounds::isMaxBounded(), eoRealBaseVectorBounds::isMinBounded(), eoRealBaseVectorBounds::maximum(), eoRealBaseVectorBounds::minimum(), and eoRng::uniform().