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

189 lines
13 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: moBestImprSelect&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>moBestImprSelect&lt; M &gt; Class Template Reference</h1><!-- doxytag: class="moBestImprSelect" --><!-- doxytag: inherits="moMoveSelect" -->One of the 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_best_impr_select_8h-source.html">moBestImprSelect.h</a>&gt;</code>
<p>
<p>Inheritance diagram for moBestImprSelect&lt; M &gt;:
<p><center><img src="classmo_best_impr_select.png" usemap="#moBestImprSelect< M >_map" border="0" alt=""></center>
<map name="moBestImprSelect< 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_best_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="c4ae17435221fb0a8e8acd285210cfcb"></a><!-- doxytag: member="moBestImprSelect::Fitness" ref="c4ae17435221fb0a8e8acd285210cfcb" args="" -->
typedef M::EOType::Fitness&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_best_impr_select.html#c4ae17435221fb0a8e8acd285210cfcb">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"><a class="anchor" name="2d2abf9aa17dc77cbb4f41810ab7b956"></a><!-- doxytag: member="moBestImprSelect::init" ref="2d2abf9aa17dc77cbb4f41810ab7b956" args="(const Fitness &amp;__fit)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_best_impr_select.html#2d2abf9aa17dc77cbb4f41810ab7b956">init</a> (const <a class="el" href="classmo_best_impr_select.html#c4ae17435221fb0a8e8acd285210cfcb">Fitness</a> &amp;__fit)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Procedure which initialise the exploration. <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_best_impr_select.html#d10e3e6f8a0277731e95ef506d064d6d">update</a> (const M &amp;__move, const <a class="el" href="classmo_best_impr_select.html#c4ae17435221fb0a8e8acd285210cfcb">Fitness</a> &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="#d10e3e6f8a0277731e95ef506d064d6d"></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_best_impr_select.html#169773d4d127acd782cf379f758222da">operator()</a> (M &amp;__move, <a class="el" href="classmo_best_impr_select.html#c4ae17435221fb0a8e8acd285210cfcb">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="#169773d4d127acd782cf379f758222da"></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="352b14d206b0772eb9f40efb7beb0f13"></a><!-- doxytag: member="moBestImprSelect::first_time" ref="352b14d206b0772eb9f40efb7beb0f13" args="" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_best_impr_select.html#352b14d206b0772eb9f40efb7beb0f13">first_time</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allowing to know if at least one move has been generated. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd86f70519f954c07ff0d8a2a3a8ff6a"></a><!-- doxytag: member="moBestImprSelect::best_move" ref="bd86f70519f954c07ff0d8a2a3a8ff6a" args="" -->
M&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_best_impr_select.html#bd86f70519f954c07ff0d8a2a3a8ff6a">best_move</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The best move. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dcac897424b5805f146bb1dbb429f2fe"></a><!-- doxytag: member="moBestImprSelect::best_fit" ref="dcac897424b5805f146bb1dbb429f2fe" args="" -->
<a class="el" href="classmo_best_impr_select.html#c4ae17435221fb0a8e8acd285210cfcb">Fitness</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_best_impr_select.html#dcac897424b5805f146bb1dbb429f2fe">best_fit</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The best fitness. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class M&gt;<br>
class moBestImprSelect&lt; M &gt;</h3>
One of the possible <a class="el" href="classmo_move_select.html">moMoveSelect</a>.
<p>
All neighbors are considered, and the movement which enables the best improvement is selected.
<p>
<p>
Definition at line <a class="el" href="mo_best_impr_select_8h-source.html#l00022">22</a> of file <a class="el" href="mo_best_impr_select_8h-source.html">moBestImprSelect.h</a>.<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="d10e3e6f8a0277731e95ef506d064d6d"></a><!-- doxytag: member="moBestImprSelect::update" ref="d10e3e6f8a0277731e95ef506d064d6d" 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_best_impr_select.html">moBestImprSelect</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_best_impr_select.html#c4ae17435221fb0a8e8acd285210cfcb">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>
<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>) and the fitness linked to this move are saved.<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>
Implements <a class="el" href="classmo_move_select.html#7c157b6e64fd417acf6e900059204eb1">moMoveSelect&lt; M &gt;</a>.
<p>
Definition at line <a class="el" href="mo_best_impr_select_8h-source.html#l00047">47</a> of file <a class="el" href="mo_best_impr_select_8h-source.html">moBestImprSelect.h</a>.
<p>
References <a class="el" href="mo_best_impr_select_8h-source.html#l00089">moBestImprSelect&lt; M &gt;::best_fit</a>, <a class="el" href="mo_best_impr_select_8h-source.html#l00086">moBestImprSelect&lt; M &gt;::best_move</a>, and <a class="el" href="mo_best_impr_select_8h-source.html#l00083">moBestImprSelect&lt; M &gt;::first_time</a>.
</div>
</div><p>
<a class="anchor" name="169773d4d127acd782cf379f758222da"></a><!-- doxytag: member="moBestImprSelect::operator()" ref="169773d4d127acd782cf379f758222da" 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_best_impr_select.html">moBestImprSelect</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_best_impr_select.html#c4ae17435221fb0a8e8acd285210cfcb">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_best_impr_select_8h-source.html#l00068">68</a> of file <a class="el" href="mo_best_impr_select_8h-source.html">moBestImprSelect.h</a>.
<p>
References <a class="el" href="mo_best_impr_select_8h-source.html#l00089">moBestImprSelect&lt; M &gt;::best_fit</a>, <a class="el" href="mo_best_impr_select_8h-source.html#l00086">moBestImprSelect&lt; M &gt;::best_move</a>, and <a class="el" href="mo_best_impr_select_8h-source.html#l00083">moBestImprSelect&lt; M &gt;::first_time</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="mo_best_impr_select_8h-source.html">moBestImprSelect.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>