- Main Page
- Namespaces
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# moNoFitImprSolContinue< EOT > Class Template Reference

One possible stop criterion for a solution-based heuristic. More...

`#include <moNoFitImprSolContinue.h>`

Inheritance diagram for moNoFitImprSolContinue< EOT >:

List of all members.

## Public Types
typedef EOT::Fitness | Fitness
| Alias for the fitness.
## Public Member Functions
| moNoFitImprSolContinue (unsigned int __maxNumberOfIterationWithoutImprovement)
| Basic constructor.
bool | operator() (const EOT &__sol)
| Function that activates the stopping criterion.
void | init ()
| Procedure which allows to initialise all the stuff needed.
## Private Attributes
unsigned int | maxNumberOfIterationsWithoutImprovement
| Maximum number of iterations without improvement allowed.
bool | firstFitnessSaved
| Flag that this is the first time that the fitness is used.
Fitness | fitness
| Current Fitness.
unsigned int | counter
| The iteration couter.

## Detailed Description

### template<class EOT>
class moNoFitImprSolContinue< EOT >

One possible stop criterion for a solution-based heuristic.

The stop criterion corresponds to a maximum number of iterations without improvement.

Definition at line 21 of file moNoFitImprSolContinue.h.

## Constructor & Destructor Documentation

template<class EOT>

moNoFitImprSolContinue< EOT >::moNoFitImprSolContinue | ( | unsigned int | __maxNumberOfIterationWithoutImprovement | ) | `[inline]`

Basic constructor.

Parameters:

  | __maxNumberOfIterationWithoutImprovement | The number of iterations without fitness improvement to reach for stop.

Definition at line 33 of file moNoFitImprSolContinue.h.

## Member Function Documentation

template<class EOT>

bool moNoFitImprSolContinue< EOT >::operator() | ( | const EOT & | __sol | ) | `[inline]`

Function that activates the stopping criterion.

Indicates if the fitness has not been improved since a given number of iterations (after a minimum of iterations).

Parameters:

  | __sol | the current solution.

Returns:
  true or false.

Definition at line 43 of file moNoFitImprSolContinue.h.

References moNoFitImprSolContinue< EOT >::counter, moNoFitImprSolContinue< EOT >::firstFitnessSaved, moNoFitImprSolContinue< EOT >::fitness, and moNoFitImprSolContinue< EOT >::maxNumberOfIterationsWithoutImprovement.

template<class EOT>

void moNoFitImprSolContinue< EOT >::init | ( |  | ) | `[inline, virtual]`

Procedure which allows to initialise all the stuff needed.

It can be also used to reinitialize all the needed things.

Implements moSolContinue< EOT >.

Definition at line 77 of file moNoFitImprSolContinue.h.

References moNoFitImprSolContinue< EOT >::counter, and moNoFitImprSolContinue< EOT >::firstFitnessSaved.

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

- moNoFitImprSolContinue.h