- Main Page
- Namespaces
- Classes
- Files

- Search for |

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

# moHC< M > Class Template Reference

Hill Climbing (HC). More...

`#include <moHC.h>`

Inheritance diagram for moHC< M >:

List of all members.

## Public Member Functions
| moHC (moMoveInit< M > &__move_init, moNextMove< M > &__next_move, moMoveIncrEval< M > &__incr_eval, moMoveSelect< M > &__move_select, eoEvalFunc< EOT > &__full_eval)
| Full constructor.
| moHC (moMoveExpl< M > &__move_expl, eoEvalFunc< EOT > &__full_eval)
| Light constructor.
bool | operator() (EOT &__sol)
| Function which launches the HC.
## Private Types
typedef M::EOType | EOT
| Alias for the type.
typedef EOT::Fitness | Fitness
| Alias for the fitness.
## Private Attributes
moMoveExpl< M > & | move_expl
| Complete exploration of the neighborhood.
eoEvalFunc< EOT > & | full_eval
| A full evaluation function.

## Detailed Description

### template<class M>
class moHC< M >

Hill Climbing (HC).

Class which describes the algorithm for a hill climbing.

Definition at line 50 of file moHC.h.

## Constructor & Destructor Documentation

template<class M>

moHC< M >::moHC | ( | moMoveInit< M > & | __move_init,
|  | moNextMove< M > & | __next_move,
|  | moMoveIncrEval< M > & | __incr_eval,
|  | moMoveSelect< M > & | __move_select,
|  | eoEvalFunc< EOT > & | __full_eval |
| ) |  |  | `[inline]`

Full constructor.

All the boxes are given in order the HC to use a moHCMoveLoopExpl.

Parameters:

  | __move_init | a move initialiser.
  | __next_move | a neighborhood explorer.
  | __incr_eval | a (generally) efficient evaluation function.
  | __move_select | a move selector.
  | __full_eval | a full evaluation function.

Definition at line 77 of file moHC.h.

template<class M>

moHC< M >::moHC | ( | moMoveExpl< M > & | __move_expl,
|  | eoEvalFunc< EOT > & | __full_eval |
| ) |  |  | `[inline]`

Light constructor.

This constructor allow to use another moMoveExpl (generally not a moHCMoveLoopExpl).

Parameters:

  | __move_expl | a complete explorer.
  | __full_eval | a full evaluation function.

Definition at line 91 of file moHC.h.

## Member Function Documentation

template<class M>

bool moHC< M >::operator() | ( | EOT & | __sol | ) | `[inline, virtual]`

Function which launches the HC.

The HC has to improve a current solution. As the moSA and the mo TS, it can be used for HYBRIDATION in an evolutionnary algorithm.

Parameters:

  | __sol | a current solution to improve.

Returns:
  TRUE.

Implements eoUF< M::EOType &, bool >.

Definition at line 106 of file moHC.h.

References moHC< M >::full_eval, and moHC< M >::move_expl.

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

- moHC.h