paradiseo/trunk/paradiseo-mo/doc/latex/classmo_rand_impr_select.tex
jboisson b1520dda65 moILS has been added, berlin52.tsp too, moComparator, moFitComparator, ...
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@606 331e1502-861f-0410-8da2-ba01fb791d7f
2007-09-20 09:42:11 +00:00

124 lines
5.8 KiB
TeX

\section{moRandImprSelect$<$ M $>$ Class Template Reference}
\label{classmo_rand_impr_select}\index{moRandImprSelect@{moRandImprSelect}}
One of the possible \doxyref{moMove}{p.}{classmo_move} selector (\doxyref{moMoveSelect}{p.}{classmo_move_select}).
{\tt \#include $<$moRandImprSelect.h$>$}
Inheritance diagram for moRandImprSelect$<$ M $>$::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classmo_rand_impr_select}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item
typedef M::EOType::Fitness {\bf Fitness}\label{classmo_rand_impr_select_3bff2fdb963297430543c82ffb567a5c}
\begin{CompactList}\small\item\em Alias for the fitness. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item
void {\bf init} (const {\bf Fitness} \&\_\-\_\-fit)
\begin{CompactList}\small\item\em Procedure which all that needs a \doxyref{moRandImprSelect}{p.}{classmo_rand_impr_select}. \item\end{CompactList}\item
bool {\bf update} (const M \&\_\-\_\-move, const {\bf Fitness} \&\_\-\_\-fit)
\begin{CompactList}\small\item\em Function that updates the fitness and move vectors. \item\end{CompactList}\item
void {\bf operator()} (M \&\_\-\_\-move, {\bf Fitness} \&\_\-\_\-fit) throw (EmptySelection)
\begin{CompactList}\small\item\em The move selection. \item\end{CompactList}\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item
{\bf Fitness} {\bf init\_\-fit}\label{classmo_rand_impr_select_d153c277a0a2ea95ac484210d445b40e}
\begin{CompactList}\small\item\em Fitness of the current solution. \item\end{CompactList}\item
std::vector$<$ {\bf Fitness} $>$ {\bf vect\_\-better\_\-fit}\label{classmo_rand_impr_select_05c7c3b858e8a25632f2f5c86b0c97a3}
\begin{CompactList}\small\item\em Candidate fitnesse vector. \item\end{CompactList}\item
std::vector$<$ M $>$ {\bf vect\_\-better\_\-moves}\label{classmo_rand_impr_select_2ace12bd179144fa71d56324694201f5}
\begin{CompactList}\small\item\em Candidate move vector. \item\end{CompactList}\end{CompactItemize}
\subsection{Detailed Description}
\subsubsection*{template$<$class M$>$ class moRandImprSelect$<$ M $>$}
One of the possible \doxyref{moMove}{p.}{classmo_move} selector (\doxyref{moMoveSelect}{p.}{classmo_move_select}).
All the neighbors are considered. One of them that enables an improvment of the objective function is choosen.
Definition at line 25 of file moRandImprSelect.h.
\subsection{Member Function Documentation}
\index{moRandImprSelect@{moRandImprSelect}!init@{init}}
\index{init@{init}!moRandImprSelect@{moRandImprSelect}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ void {\bf moRandImprSelect}$<$ M $>$::init (const {\bf Fitness} \& {\em \_\-\_\-fit})\hspace{0.3cm}{\tt [inline, virtual]}}\label{classmo_rand_impr_select_a19726a1509cff874801615d63a3b5d9}
Procedure which all that needs a \doxyref{moRandImprSelect}{p.}{classmo_rand_impr_select}.
Give a value to the initialise fitness. Clean the move and fitness vectors.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-\_\-fit}]the current best fitness \end{description}
\end{Desc}
Implements {\bf moMoveSelect$<$ M $>$} \doxyref{}{p.}{classmo_move_select_bca4c43f13d26eca7163aeb272a4a52e}.
Definition at line 40 of file moRandImprSelect.h.
References moRandImprSelect$<$ M $>$::init\_\-fit, moRandImprSelect$<$ M $>$::vect\_\-better\_\-fit, and moRandImprSelect$<$ M $>$::vect\_\-better\_\-moves.\index{moRandImprSelect@{moRandImprSelect}!update@{update}}
\index{update@{update}!moRandImprSelect@{moRandImprSelect}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ bool {\bf moRandImprSelect}$<$ M $>$::update (const M \& {\em \_\-\_\-move}, const {\bf Fitness} \& {\em \_\-\_\-fit})\hspace{0.3cm}{\tt [inline, virtual]}}\label{classmo_rand_impr_select_60ae5548560caee7e28d5ed2446186c9}
Function that updates the fitness and move vectors.
if a move give a better fitness than the initial fitness, it is saved and the fitness too.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-\_\-move}]a new move. \item[{\em \_\-\_\-fit}]a new fitness associated to the new move. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]TRUE. \end{Desc}
Implements {\bf moMoveSelect$<$ M $>$} \doxyref{}{p.}{classmo_move_select_7c157b6e64fd417acf6e900059204eb1}.
Definition at line 56 of file moRandImprSelect.h.
References moRandImprSelect$<$ M $>$::init\_\-fit, moRandImprSelect$<$ M $>$::vect\_\-better\_\-fit, and moRandImprSelect$<$ M $>$::vect\_\-better\_\-moves.\index{moRandImprSelect@{moRandImprSelect}!operator()@{operator()}}
\index{operator()@{operator()}!moRandImprSelect@{moRandImprSelect}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ void {\bf moRandImprSelect}$<$ M $>$::operator() (M \& {\em \_\-\_\-move}, {\bf Fitness} \& {\em \_\-\_\-fit}) throw ({\bf EmptySelection})\hspace{0.3cm}{\tt [inline]}}\label{classmo_rand_impr_select_5ee57f77a450c0a9ce50bfccf3ad2a55}
The move selection.
One the saved move is randomly chosen.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-\_\-move}]the reference of the move that can be initialised by the function. \item[{\em \_\-\_\-fit}]the reference of the fitness that can be initialised by the function. \end{description}
\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em \doxyref{EmptySelection}{p.}{class_empty_selection}}]If no move which improves the current fitness are found. \end{description}
\end{Desc}
Definition at line 77 of file moRandImprSelect.h.
References moRandImprSelect$<$ M $>$::vect\_\-better\_\-fit, and moRandImprSelect$<$ M $>$::vect\_\-better\_\-moves.
The documentation for this class was generated from the following file:\begin{CompactItemize}
\item
moRandImprSelect.h\end{CompactItemize}