# 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 >:

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
eoRealVectorBounds & | bounds
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 45 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:

  | _epsilon | the range for uniform nutation
  | _p_change | the probability to change a given coordinate

Definition at line 56 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:

  | _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().

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

Constructor with bounds.

Parameters:

  | _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.

## Member Function Documentation

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

Do it!

Parameters:

  | _eo | The indi undergoing the mutation

Implements eoUF< EOT &, bool >.

Definition at line 96 of file eoRealOp.h.

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

The documentation for this class was generated from the following file:

- eoRealOp.h