135 lines
3.5 KiB
Groff
135 lines
3.5 KiB
Groff
.TH "moRandImprSelect" 3 "18 Dec 2006" "Version 0.1" "PARADISEO-MO" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
moRandImprSelect \- One of the possible \fBmoMove\fP selector (\fBmoMoveSelect\fP).
|
|
|
|
.PP
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
\fC#include <moRandImprSelect.h>\fP
|
|
.PP
|
|
Inherits \fBmoMoveSelect< M >< M >\fP.
|
|
.PP
|
|
.SS "Public Types"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "typedef M::EOType::Fitness \fBFitness\fP"
|
|
.br
|
|
.RI "\fIAlias for the fitness. \fP"
|
|
.in -1c
|
|
.SS "Public Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "void \fBinit\fP (const \fBFitness\fP &__fit)"
|
|
.br
|
|
.RI "\fIProcedure which all that needs a \fBmoRandImprSelect\fP. \fP"
|
|
.ti -1c
|
|
.RI "bool \fBupdate\fP (const M &__move, const \fBFitness\fP &__fit)"
|
|
.br
|
|
.RI "\fIFunction that updates the fitness and move vectors. \fP"
|
|
.ti -1c
|
|
.RI "void \fBoperator()\fP (M &__move, \fBFitness\fP &__fit) throw (EmptySelection)"
|
|
.br
|
|
.RI "\fIThe move selection. \fP"
|
|
.in -1c
|
|
.SS "Private Attributes"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBFitness\fP \fBinit_fit\fP"
|
|
.br
|
|
.RI "\fIFitness of the current solution. \fP"
|
|
.ti -1c
|
|
.RI "std::vector< \fBFitness\fP > \fBvect_better_fit\fP"
|
|
.br
|
|
.RI "\fICandidate fitnesse vector. \fP"
|
|
.ti -1c
|
|
.RI "std::vector< M > \fBvect_better_moves\fP"
|
|
.br
|
|
.RI "\fICandidate move vector. \fP"
|
|
.in -1c
|
|
.SH "Detailed Description"
|
|
.PP
|
|
|
|
.SS "template<class M> class moRandImprSelect< M >"
|
|
One of the possible \fBmoMove\fP selector (\fBmoMoveSelect\fP).
|
|
|
|
All the neighbors are considered. One of them that enables an improvment of the objective function is choosen.
|
|
.PP
|
|
Definition at line 25 of file moRandImprSelect.h.
|
|
.SH "Member Function Documentation"
|
|
.PP
|
|
.SS "template<class M> void \fBmoRandImprSelect\fP< M >::init (const \fBFitness\fP & __fit)\fC [inline, virtual]\fP"
|
|
.PP
|
|
Procedure which all that needs a \fBmoRandImprSelect\fP.
|
|
.PP
|
|
Give a value to the initialise fitness. Clean the move and fitness vectors.
|
|
.PP
|
|
\fBParameters:\fP
|
|
.RS 4
|
|
\fI__fit\fP the current best fitness
|
|
.RE
|
|
.PP
|
|
|
|
.PP
|
|
Implements \fBmoMoveSelect< M >\fP.
|
|
.PP
|
|
Definition at line 40 of file moRandImprSelect.h.
|
|
.PP
|
|
References moRandImprSelect< M >::init_fit, moRandImprSelect< M >::vect_better_fit, and moRandImprSelect< M >::vect_better_moves.
|
|
.SS "template<class M> bool \fBmoRandImprSelect\fP< M >::update (const M & __move, const \fBFitness\fP & __fit)\fC [inline, virtual]\fP"
|
|
.PP
|
|
Function that updates the fitness and move vectors.
|
|
.PP
|
|
if a move give a better fitness than the initial fitness, it is saved and the fitness too.
|
|
.PP
|
|
\fBParameters:\fP
|
|
.RS 4
|
|
\fI__move\fP a new move.
|
|
.br
|
|
\fI__fit\fP a new fitness associated to the new move.
|
|
.RE
|
|
.PP
|
|
\fBReturns:\fP
|
|
.RS 4
|
|
TRUE.
|
|
.RE
|
|
.PP
|
|
|
|
.PP
|
|
Implements \fBmoMoveSelect< M >\fP.
|
|
.PP
|
|
Definition at line 56 of file moRandImprSelect.h.
|
|
.PP
|
|
References moRandImprSelect< M >::init_fit, moRandImprSelect< M >::vect_better_fit, and moRandImprSelect< M >::vect_better_moves.
|
|
.SS "template<class M> void \fBmoRandImprSelect\fP< M >::operator() (M & __move, \fBFitness\fP & __fit) throw (\fBEmptySelection\fP)\fC [inline]\fP"
|
|
.PP
|
|
The move selection.
|
|
.PP
|
|
One the saved move is randomly chosen.
|
|
.PP
|
|
\fBParameters:\fP
|
|
.RS 4
|
|
\fI__move\fP the reference of the move that can be initialised by the function.
|
|
.br
|
|
\fI__fit\fP the reference of the fitness that can be initialised by the function.
|
|
.RE
|
|
.PP
|
|
\fBExceptions:\fP
|
|
.RS 4
|
|
\fI\fBEmptySelection\fP\fP If no move which improves the current fitness are found.
|
|
.RE
|
|
.PP
|
|
|
|
.PP
|
|
Definition at line 77 of file moRandImprSelect.h.
|
|
.PP
|
|
References moRandImprSelect< M >::vect_better_fit, and moRandImprSelect< M >::vect_better_moves.
|
|
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for PARADISEO-MO from the source code.
|