git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@26 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
bbad098cba
commit
c782670053
315 changed files with 0 additions and 46407 deletions
|
|
@ -1,65 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "moMoveSelect.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, 2003-2006
|
||||
|
||||
/* TEXT LICENCE
|
||||
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#ifndef __moMoveSelect_h
|
||||
#define __moMoveSelect_h
|
||||
|
||||
#include <eoFunctor.h>
|
||||
|
||||
//! Special class that describes the case of no selection.
|
||||
/*!
|
||||
This class is used as an exception that can be thrown if a solution selector has completly failed.
|
||||
*/
|
||||
class EmptySelection
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
//! Class that describes a move selector (moMove).
|
||||
/*!
|
||||
It iteratively considers some moves (moMove) and their
|
||||
associated fitnesses. The best move is so regularly updated.
|
||||
At any time, it could be accessed.
|
||||
*/
|
||||
template < class M > class moMoveSelect:public eoBF < M &, typename M::EOType::Fitness &,
|
||||
void >
|
||||
{
|
||||
public:
|
||||
//! Alias for the fitness
|
||||
typedef
|
||||
typename
|
||||
M::EOType::Fitness
|
||||
Fitness;
|
||||
|
||||
//! Procedure which initialises all that the move selector needs including the initial fitness.
|
||||
/*!
|
||||
In order to know the fitness of the solution,
|
||||
for which the neighborhood will
|
||||
be soon explored
|
||||
|
||||
\param __fit the current fitness.
|
||||
*/
|
||||
virtual void
|
||||
init (const Fitness & __fit) = 0;
|
||||
|
||||
//! Function which updates the best solutions.
|
||||
/*!
|
||||
\param __move a new move.
|
||||
\param __fit a fitness linked to the new move.
|
||||
\return a boolean that expresses the need to resume the exploration.
|
||||
*/
|
||||
virtual
|
||||
bool
|
||||
update (const M & __move, const Fitness & __fit) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue