moHC(3)

NAME
moHC - Hill Climbing (HC).

SYNOPSIS

#include <moHC.h>

Inherits moAlgo< M::EOType >.

  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 26 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 53 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 67 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 82 of file moHC.h.

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

Author

Generated automatically by Doxygen for PARADISEO-MO from the source code.