paradiseo/trunk/paradiseo-mo/docs/html/classmo_rand_impr_select.html
jboisson a40fc756aa moSimple(Move/Solution)TabuList are added
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@281 331e1502-861f-0410-8da2-ba01fb791d7f
2007-04-19 13:23:06 +00:00

221 lines
14 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>PARADISEO-MO: moRandImprSelect&lt; M &gt; Class Template Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li id="current"><a href="classes.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<form action="search.php" method="get">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul></div>
<h1>moRandImprSelect&lt; M &gt; Class Template Reference</h1><!-- doxytag: class="moRandImprSelect" --><!-- doxytag: inherits="moMoveSelect" -->One of the possible <a class="el" href="classmo_move.html">moMove</a> selector (<a class="el" href="classmo_move_select.html">moMoveSelect</a>).
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a>&gt;</code>
<p>
<p>Inheritance diagram for moRandImprSelect&lt; M &gt;:
<p><center><img src="classmo_rand_impr_select.png" usemap="#moRandImprSelect< M >_map" border="0" alt=""></center>
<map name="moRandImprSelect< M >_map">
<area href="classmo_move_select.html" alt="moMoveSelect< M >" shape="rect" coords="0,0,151,24">
</map>
<a href="classmo_rand_impr_select-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3bff2fdb963297430543c82ffb567a5c"></a><!-- doxytag: member="moRandImprSelect::Fitness" ref="3bff2fdb963297430543c82ffb567a5c" args="" -->
typedef M::EOType::Fitness&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Alias for the fitness. <br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_rand_impr_select.html#a19726a1509cff874801615d63a3b5d9">init</a> (const <a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &amp;__fit)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Procedure which all that needs a <a class="el" href="classmo_rand_impr_select.html">moRandImprSelect</a>. <a href="#a19726a1509cff874801615d63a3b5d9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_rand_impr_select.html#60ae5548560caee7e28d5ed2446186c9">update</a> (const M &amp;__move, const <a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &amp;__fit)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function that updates the fitness and move vectors. <a href="#60ae5548560caee7e28d5ed2446186c9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_rand_impr_select.html#5ee57f77a450c0a9ce50bfccf3ad2a55">operator()</a> (M &amp;__move, <a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &amp;__fit) throw (EmptySelection)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The move selection. <a href="#5ee57f77a450c0a9ce50bfccf3ad2a55"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d153c277a0a2ea95ac484210d445b40e"></a><!-- doxytag: member="moRandImprSelect::init_fit" ref="d153c277a0a2ea95ac484210d445b40e" args="" -->
<a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_rand_impr_select.html#d153c277a0a2ea95ac484210d445b40e">init_fit</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fitness of the current solution. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05c7c3b858e8a25632f2f5c86b0c97a3"></a><!-- doxytag: member="moRandImprSelect::vect_better_fit" ref="05c7c3b858e8a25632f2f5c86b0c97a3" args="" -->
std::vector&lt; <a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_rand_impr_select.html#05c7c3b858e8a25632f2f5c86b0c97a3">vect_better_fit</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Candidate fitnesse vector. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2ace12bd179144fa71d56324694201f5"></a><!-- doxytag: member="moRandImprSelect::vect_better_moves" ref="2ace12bd179144fa71d56324694201f5" args="" -->
std::vector&lt; M &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_rand_impr_select.html#2ace12bd179144fa71d56324694201f5">vect_better_moves</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Candidate move vector. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class M&gt;<br>
class moRandImprSelect&lt; M &gt;</h3>
One of the possible <a class="el" href="classmo_move.html">moMove</a> selector (<a class="el" href="classmo_move_select.html">moMoveSelect</a>).
<p>
All the neighbors are considered. One of them that enables an improvment of the objective function is choosen.
<p>
<p>
Definition at line <a class="el" href="mo_rand_impr_select_8h-source.html#l00025">25</a> of file <a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a>.<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a19726a1509cff874801615d63a3b5d9"></a><!-- doxytag: member="moRandImprSelect::init" ref="a19726a1509cff874801615d63a3b5d9" args="(const Fitness &amp;__fit)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class M&gt; </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classmo_rand_impr_select.html">moRandImprSelect</a>&lt; M &gt;::init </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &amp;&nbsp;</td>
<td class="paramname"> <em>__fit</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Procedure which all that needs a <a class="el" href="classmo_rand_impr_select.html">moRandImprSelect</a>.
<p>
Give a value to the initialise fitness. Clean the move and fitness vectors.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>__fit</em>&nbsp;</td><td>the current best fitness </td></tr>
</table>
</dl>
<p>
Implements <a class="el" href="classmo_move_select.html#bca4c43f13d26eca7163aeb272a4a52e">moMoveSelect&lt; M &gt;</a>.
<p>
Definition at line <a class="el" href="mo_rand_impr_select_8h-source.html#l00040">40</a> of file <a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a>.
<p>
References <a class="el" href="mo_rand_impr_select_8h-source.html#l00095">moRandImprSelect&lt; M &gt;::init_fit</a>, <a class="el" href="mo_rand_impr_select_8h-source.html#l00098">moRandImprSelect&lt; M &gt;::vect_better_fit</a>, and <a class="el" href="mo_rand_impr_select_8h-source.html#l00101">moRandImprSelect&lt; M &gt;::vect_better_moves</a>.
</div>
</div><p>
<a class="anchor" name="60ae5548560caee7e28d5ed2446186c9"></a><!-- doxytag: member="moRandImprSelect::update" ref="60ae5548560caee7e28d5ed2446186c9" args="(const M &amp;__move, const Fitness &amp;__fit)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class M&gt; </div>
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classmo_rand_impr_select.html">moRandImprSelect</a>&lt; M &gt;::update </td>
<td>(</td>
<td class="paramtype">const M &amp;&nbsp;</td>
<td class="paramname"> <em>__move</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &amp;&nbsp;</td>
<td class="paramname"> <em>__fit</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Function that updates the fitness and move vectors.
<p>
if a move give a better fitness than the initial fitness, it is saved and the fitness too.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>__move</em>&nbsp;</td><td>a new move. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>__fit</em>&nbsp;</td><td>a new fitness associated to the new move. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE. </dd></dl>
<p>
Implements <a class="el" href="classmo_move_select.html#7c157b6e64fd417acf6e900059204eb1">moMoveSelect&lt; M &gt;</a>.
<p>
Definition at line <a class="el" href="mo_rand_impr_select_8h-source.html#l00056">56</a> of file <a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a>.
<p>
References <a class="el" href="mo_rand_impr_select_8h-source.html#l00095">moRandImprSelect&lt; M &gt;::init_fit</a>, <a class="el" href="mo_rand_impr_select_8h-source.html#l00098">moRandImprSelect&lt; M &gt;::vect_better_fit</a>, and <a class="el" href="mo_rand_impr_select_8h-source.html#l00101">moRandImprSelect&lt; M &gt;::vect_better_moves</a>.
</div>
</div><p>
<a class="anchor" name="5ee57f77a450c0a9ce50bfccf3ad2a55"></a><!-- doxytag: member="moRandImprSelect::operator()" ref="5ee57f77a450c0a9ce50bfccf3ad2a55" args="(M &amp;__move, Fitness &amp;__fit)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class M&gt; </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classmo_rand_impr_select.html">moRandImprSelect</a>&lt; M &gt;::operator() </td>
<td>(</td>
<td class="paramtype">M &amp;&nbsp;</td>
<td class="paramname"> <em>__move</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &amp;&nbsp;</td>
<td class="paramname"> <em>__fit</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> throw (<a class="el" href="class_empty_selection.html">EmptySelection</a>)<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The move selection.
<p>
One the saved move is randomly chosen.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>__move</em>&nbsp;</td><td>the reference of the move that can be initialised by the function. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>__fit</em>&nbsp;</td><td>the reference of the fitness that can be initialised by the function. </td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="class_empty_selection.html">EmptySelection</a></em>&nbsp;</td><td>If no move which improves the current fitness are found. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="mo_rand_impr_select_8h-source.html#l00077">77</a> of file <a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a>.
<p>
References <a class="el" href="mo_rand_impr_select_8h-source.html#l00098">moRandImprSelect&lt; M &gt;::vect_better_fit</a>, and <a class="el" href="mo_rand_impr_select_8h-source.html#l00101">moRandImprSelect&lt; M &gt;::vect_better_moves</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Thu Apr 19 15:16:09 2007 for PARADISEO-MO by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>