paradiseo/trunk/paradiseo-mo/doc/html/classmo_first_impr_select.html

220 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: moFirstImprSelect&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.4.7 -->
<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>moFirstImprSelect&lt; M &gt; Class Template Reference</h1><!-- doxytag: class="moFirstImprSelect" --><!-- doxytag: inherits="moMoveSelect" -->One possible <a class="el" href="classmo_move_select.html">moMoveSelect</a>.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="mo_first_impr_select_8h-source.html">moFirstImprSelect.h</a>&gt;</code>
<p>
<p>Inheritance diagram for moFirstImprSelect&lt; M &gt;:
<p><center><img src="classmo_first_impr_select.png" usemap="#moFirstImprSelect< M >_map" border="0" alt=""></center>
<map name="moFirstImprSelect< M >_map">
<area href="classmo_move_select.html" alt="moMoveSelect< M >" shape="rect" coords="0,112,256,136">
<area doxygen="eo.doxytag:../../../paradiseo-eo/doc/html/" href="../../../paradiseo-eo/doc/html/classeo_b_f.html" alt="eoBF< M &, M::EOType::Fitness &, void >" shape="rect" coords="0,56,256,80">
<area doxygen="eo.doxytag:../../../paradiseo-eo/doc/html/" href="../../../paradiseo-eo/doc/html/classeo_functor_base.html" alt="eoFunctorBase" shape="rect" coords="0,0,256,24">
</map>
<a href="classmo_first_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="64763ce3e6d2873266624382b407fa5a"></a><!-- doxytag: member="moFirstImprSelect::Fitness" ref="64763ce3e6d2873266624382b407fa5a" args="" -->
typedef M::EOType::Fitness&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_first_impr_select.html#64763ce3e6d2873266624382b407fa5a">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">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_first_impr_select.html#4c5ce18ede46247a439c68f6954a4055">init</a> (const <a class="el" href="classmo_first_impr_select.html#64763ce3e6d2873266624382b407fa5a">Fitness</a> &amp;__fit)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Procedure which initialise the exploration. <a href="#4c5ce18ede46247a439c68f6954a4055"></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_first_impr_select.html#7ba0882728daedc75c249647c070ccf0">update</a> (const M &amp;__move, const typename M::EOType::Fitness &amp;__fit)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="elRef" doxygen="eo.doxytag:../../../paradiseo-eo/doc/html/" href="../../../paradiseo-eo/doc/html/struct_function.html">Function</a> that indicates if the current move has not improved the fitness. <a href="#7ba0882728daedc75c249647c070ccf0"></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_first_impr_select.html#3be12cf4cbaed00df7c4fa735b2c0a95">operator()</a> (M &amp;__move, <a class="el" href="classmo_first_impr_select.html#64763ce3e6d2873266624382b407fa5a">Fitness</a> &amp;__fit) throw (EmptySelection)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Procedure which saved the best move and fitness. <a href="#3be12cf4cbaed00df7c4fa735b2c0a95"></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="a99c0586ba07449234705c17a258d58c"></a><!-- doxytag: member="moFirstImprSelect::valid" ref="a99c0586ba07449234705c17a258d58c" args="" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_first_impr_select.html#a99c0586ba07449234705c17a258d58c">valid</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allow to know if at least one move has improved the solution. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dfed419a608dd7c41f07fa1f1279cb8c"></a><!-- doxytag: member="moFirstImprSelect::best_move" ref="dfed419a608dd7c41f07fa1f1279cb8c" args="" -->
M&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_first_impr_select.html#dfed419a608dd7c41f07fa1f1279cb8c">best_move</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Best stored movement. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ce7ba63e8cc3a9164f4e546477e98ca8"></a><!-- doxytag: member="moFirstImprSelect::init_fit" ref="ce7ba63e8cc3a9164f4e546477e98ca8" args="" -->
<a class="el" href="classmo_first_impr_select.html#64763ce3e6d2873266624382b407fa5a">Fitness</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_first_impr_select.html#ce7ba63e8cc3a9164f4e546477e98ca8">init_fit</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initial fitness. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e1190347b76ec6fe717be32354b4a9a9"></a><!-- doxytag: member="moFirstImprSelect::best_fit" ref="e1190347b76ec6fe717be32354b4a9a9" args="" -->
<a class="el" href="classmo_first_impr_select.html#64763ce3e6d2873266624382b407fa5a">Fitness</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_first_impr_select.html#e1190347b76ec6fe717be32354b4a9a9">best_fit</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Best stored fitness. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class M&gt;<br>
class moFirstImprSelect&lt; M &gt;</h3>
One possible <a class="el" href="classmo_move_select.html">moMoveSelect</a>.
<p>
The neighborhood is explored until a move enables an improvment of the current solution.
<p>
<p>
Definition at line <a class="el" href="mo_first_impr_select_8h-source.html#l00023">23</a> of file <a class="el" href="mo_first_impr_select_8h-source.html">moFirstImprSelect.h</a>.<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="4c5ce18ede46247a439c68f6954a4055"></a><!-- doxytag: member="moFirstImprSelect::init" ref="4c5ce18ede46247a439c68f6954a4055" 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">virtual void <a class="el" href="classmo_first_impr_select.html">moFirstImprSelect</a>&lt; M &gt;::init </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classmo_first_impr_select.html#64763ce3e6d2873266624382b407fa5a">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 initialise the exploration.
<p>
It save the current fitness as the initial value for the fitness.
<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_first_impr_select_8h-source.html#l00035">35</a> of file <a class="el" href="mo_first_impr_select_8h-source.html">moFirstImprSelect.h</a>.
<p>
References <a class="el" href="mo_first_impr_select_8h-source.html#l00097">moFirstImprSelect&lt; M &gt;::init_fit</a>, and <a class="el" href="mo_first_impr_select_8h-source.html#l00091">moFirstImprSelect&lt; M &gt;::valid</a>.
</div>
</div><p>
<a class="anchor" name="7ba0882728daedc75c249647c070ccf0"></a><!-- doxytag: member="moFirstImprSelect::update" ref="7ba0882728daedc75c249647c070ccf0" args="(const M &amp;__move, const typename M::EOType::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_first_impr_select.html">moFirstImprSelect</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 typename M::EOType::Fitness &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]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<a class="elRef" doxygen="eo.doxytag:../../../paradiseo-eo/doc/html/" href="../../../paradiseo-eo/doc/html/struct_function.html">Function</a> that indicates if the current move has not improved the fitness.
<p>
If the given fitness enables an improvment, the move (<a class="el" href="classmo_move.html">moMove</a>) should be applied to the current solution.<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 move. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>__fit</em>&nbsp;</td><td>a fitness linked to the move. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>TRUE if the move does not improve the fitness. </dd></dl>
<p>
Definition at line <a class="el" href="mo_first_impr_select_8h-source.html#l00052">52</a> of file <a class="el" href="mo_first_impr_select_8h-source.html">moFirstImprSelect.h</a>.
<p>
References <a class="el" href="mo_first_impr_select_8h-source.html#l00100">moFirstImprSelect&lt; M &gt;::best_fit</a>, <a class="el" href="mo_first_impr_select_8h-source.html#l00094">moFirstImprSelect&lt; M &gt;::best_move</a>, <a class="el" href="mo_first_impr_select_8h-source.html#l00097">moFirstImprSelect&lt; M &gt;::init_fit</a>, and <a class="el" href="mo_first_impr_select_8h-source.html#l00091">moFirstImprSelect&lt; M &gt;::valid</a>.
</div>
</div><p>
<a class="anchor" name="3be12cf4cbaed00df7c4fa735b2c0a95"></a><!-- doxytag: member="moFirstImprSelect::operator()" ref="3be12cf4cbaed00df7c4fa735b2c0a95" 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_first_impr_select.html">moFirstImprSelect</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_first_impr_select.html#64763ce3e6d2873266624382b407fa5a">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, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Procedure which saved the best move and fitness.
<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 current move (result of the procedure). </td></tr>
<tr><td valign="top"></td><td valign="top"><em>__fit</em>&nbsp;</td><td>the current fitness (result of the procedure). </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 has improved the fitness. </td></tr>
</table>
</dl>
<p>
Implements <a class="elRef" doxygen="eo.doxytag:../../../paradiseo-eo/doc/html/" href="../../../paradiseo-eo/doc/html/classeo_b_f.html#a03c40b95210569b826df79a2237a0d0">eoBF&lt; M &amp;, M::EOType::Fitness &amp;, void &gt;</a>.
<p>
Definition at line <a class="el" href="mo_first_impr_select_8h-source.html#l00076">76</a> of file <a class="el" href="mo_first_impr_select_8h-source.html">moFirstImprSelect.h</a>.
<p>
References <a class="el" href="mo_first_impr_select_8h-source.html#l00100">moFirstImprSelect&lt; M &gt;::best_fit</a>, <a class="el" href="mo_first_impr_select_8h-source.html#l00094">moFirstImprSelect&lt; M &gt;::best_move</a>, and <a class="el" href="mo_first_impr_select_8h-source.html#l00091">moFirstImprSelect&lt; M &gt;::valid</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="mo_first_impr_select_8h-source.html">moFirstImprSelect.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Thu Jul 5 12:04:05 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.4.7 </small></address>
</body>
</html>