EvolvingObjects
eoDetUniformMutation< EOT > Class Template Reference

eoDetUniformMutation --> changes exactly k values of the std::vector by uniform choice with range epsilon More...

#include <Tutorial/eoRealOp.h>

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

List of all members.

Public Member Functions

 eoDetUniformMutation (const double &_epsilon, const unsigned &_no=1)
 (Default) Constructor for homogeneous genotype it's there mostly for backward compatibility
 eoDetUniformMutation (eoRealVectorBounds &_bounds, const double &_epsilon, const unsigned &_no=1)
 Constructor with bounds.
 eoDetUniformMutation (eoRealVectorBounds &_bounds, const std::vector< double > &_epsilon, const unsigned &_no=1)
 Constructor with bounds and full std::vector of epsilon.
virtual std::string className () const
 The class name.
bool operator() (EOT &_eo)
 Do it!

Private Attributes

bool homogeneous
eoRealVectorBoundsbounds
std::vector< double > epsilon
unsigned no

Detailed Description

template<class EOT>
class eoDetUniformMutation< EOT >

eoDetUniformMutation --> changes exactly k values of the std::vector by uniform choice with range epsilon

Definition at line 148 of file eoRealOp.h.


Constructor & Destructor Documentation

template<class EOT>
eoDetUniformMutation< EOT >::eoDetUniformMutation ( const double &  _epsilon,
const unsigned &  _no = 1 
) [inline]

(Default) Constructor for homogeneous genotype it's there mostly for backward compatibility

Parameters:
_epsilonthe range for uniform nutation
_nonumber of coordinate to modify

Definition at line 158 of file eoRealOp.h.

template<class EOT>
eoDetUniformMutation< EOT >::eoDetUniformMutation ( eoRealVectorBounds _bounds,
const double &  _epsilon,
const unsigned &  _no = 1 
) [inline]

Constructor with bounds.

Parameters:
_boundsan eoRealVectorBounds that contains the bounds
_epsilonthe range for uniform nutation (to be scaled if necessary)
_nonumber of coordinate to modify

Definition at line 168 of file eoRealOp.h.

References eoRealBaseVectorBounds::isBounded().

template<class EOT>
eoDetUniformMutation< EOT >::eoDetUniformMutation ( eoRealVectorBounds _bounds,
const std::vector< double > &  _epsilon,
const unsigned &  _no = 1 
) [inline]

Constructor with bounds and full std::vector of epsilon.

Parameters:
_boundsan eoRealVectorBounds that contains the bounds
_epsilonthe VECTOR of ranges for uniform mutation
_nonumber of coordinates to modify

Definition at line 185 of file eoRealOp.h.

References eoRealBaseVectorBounds::isBounded().


Member Function Documentation

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

Do it!

Parameters:
_eoThe indi undergoing the mutation

Implements eoUF< EOT &, bool >.

Definition at line 203 of file eoRealOp.h.

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


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