EvolvingObjects
eoUniformMutation< EOT > Class Template Reference

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>

Inheritance diagram for eoUniformMutation< EOT >:
eoMonOp< EOT > eoOp< EOT > eoUF< EOT &, bool > eoFunctorBase unary_function

List of all members.

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
eoRealVectorBoundsbounds
std::vector< double > epsilon
std::vector< double > p_change

Detailed Description

template<class EOT>
class eoUniformMutation< EOT >

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.


Constructor & Destructor Documentation

template<class EOT>
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.

Parameters:
_epsilonthe range for uniform nutation
_p_changethe probability to change a given coordinate

Definition at line 58 of file eoRealOp.h.

template<class EOT>
eoUniformMutation< EOT >::eoUniformMutation ( eoRealVectorBounds _bounds,
const double &  _epsilon,
const double &  _p_change = 1.0 
) [inline]

Constructor with bounds.

Parameters:
_boundsan eoRealVectorBounds that contains the bounds
_epsilonthe range for uniform mutation - a double to be scaled
_p_changethe one probability to change all coordinates

Definition at line 68 of file eoRealOp.h.

References eoRealBaseVectorBounds::isBounded().

template<class EOT>
eoUniformMutation< EOT >::eoUniformMutation ( eoRealVectorBounds _bounds,
const std::vector< double > &  _epsilon,
const std::vector< double > &  _p_change 
) [inline]

Constructor with bounds.

Parameters:
_boundsan eoRealVectorBounds that contains the bounds
_epsilonthe VECTOR of ranges for uniform mutation
_p_changethe VECTOR of probabilities for each coordinates

Definition at line 85 of file eoRealOp.h.


Member Function Documentation

template<class EOT>
bool eoUniformMutation< EOT >::operator() ( EOT &  _eo) [inline, virtual]

Do it!

Parameters:
_eoThe indi undergoing the mutation

Implements eoUF< EOT &, bool >.

Definition at line 98 of file eoRealOp.h.

References eoRng::flip(), eoRealBaseVectorBounds::minimum(), and eoRng::uniform().


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