paradiseo/trunk/paradiseo-mo/doc/html/classmo_rand_impr_select.html
jboisson 57ab34591c Documentation is updated
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@889 331e1502-861f-0410-8da2-ba01fb791d7f
2008-01-16 14:53:30 +00:00

226 lines
15 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ParadisEO-MOMovingObjects: 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.4 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li class="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" title="Definition of a move.">moMove</a> selector (<a class="el" href="classmo_move_select.html" title="Class that describes a move selector (moMove).">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>
<div class="dynheader">
Inheritance diagram for moRandImprSelect&lt; M &gt;:</div>
<div class="dynsection">
<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,112,256,136">
<area doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/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:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_functor_base.html" alt="eoFunctorBase" shape="rect" coords="0,0,256,24">
</map>
</div>
<p>
<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#7af99966b31aa387ecef74fd307a42e8">init</a> (const <a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &amp;_fitness)</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" title="One of the possible moMove selector (moMoveSelect).">moRandImprSelect</a>. <a href="#7af99966b31aa387ecef74fd307a42e8"></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#b20cfd0164266aa75960cba3c1673f69">update</a> (const M &amp;_move, const <a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &amp;_fitness)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="elRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/struct_function.html">Function</a> that updates the fitness and move vectors. <a href="#b20cfd0164266aa75960cba3c1673f69"></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#1bc88f10830960c1d88e22e444c4e670">operator()</a> (M &amp;_move, <a class="el" href="classmo_rand_impr_select.html#3bff2fdb963297430543c82ffb567a5c">Fitness</a> &amp;_fitness)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The move selection. <a href="#1bc88f10830960c1d88e22e444c4e670"></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="d566fa23689861b1d04257e53c71ae20"></a><!-- doxytag: member="moRandImprSelect::initial_fitness" ref="d566fa23689861b1d04257e53c71ae20" 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#d566fa23689861b1d04257e53c71ae20">initial_fitness</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="220d6e3db838b11938e59bc7b29a0db6"></a><!-- doxytag: member="moRandImprSelect::better_fitnesses" ref="220d6e3db838b11938e59bc7b29a0db6" 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#220d6e3db838b11938e59bc7b29a0db6">better_fitnesses</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="8a2e7bd7d7a74d7f7402ef25737b09e1"></a><!-- doxytag: member="moRandImprSelect::better_moves" ref="8a2e7bd7d7a74d7f7402ef25737b09e1" args="" -->
std::vector&lt; M &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmo_rand_impr_select.html#8a2e7bd7d7a74d7f7402ef25737b09e1">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" title="Definition of a move.">moMove</a> selector (<a class="el" href="classmo_move_select.html" title="Class that describes a move selector (moMove).">moMoveSelect</a>).
<p>
All the neighbors are considered. One of them that enables an improvment of the objective function is choosen.
<p>Definition at line <a class="el" href="mo_rand_impr_select_8h-source.html#l00049">49</a> of file <a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="7af99966b31aa387ecef74fd307a42e8"></a><!-- doxytag: member="moRandImprSelect::init" ref="7af99966b31aa387ecef74fd307a42e8" args="(const Fitness &amp;_fitness)" -->
<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>_fitness</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" title="One of the possible moMove selector (moMoveSelect).">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>_fitness</em>&nbsp;</td><td>the current best fitness </td></tr>
</table>
</dl>
<p>Implements <a class="el" href="classmo_move_select.html#58038bd859632c1bd022d23d9792bdca">moMoveSelect&lt; M &gt;</a>.</p>
<p>Definition at line <a class="el" href="mo_rand_impr_select_8h-source.html#l00063">63</a> of file <a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a>.</p>
<p>References <a class="el" href="mo_rand_impr_select_8h-source.html#l00121">moRandImprSelect&lt; M &gt;::better_fitnesses</a>, <a class="el" href="mo_rand_impr_select_8h-source.html#l00124">moRandImprSelect&lt; M &gt;::better_moves</a>, and <a class="el" href="mo_rand_impr_select_8h-source.html#l00118">moRandImprSelect&lt; M &gt;::initial_fitness</a>.</p>
</div>
</div><p>
<a class="anchor" name="b20cfd0164266aa75960cba3c1673f69"></a><!-- doxytag: member="moRandImprSelect::update" ref="b20cfd0164266aa75960cba3c1673f69" args="(const M &amp;_move, const Fitness &amp;_fitness)" -->
<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>_fitness</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:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/struct_function.html">Function</a> 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>_fitness</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#5b4d3b2f030cca80c563c3db0c4af404">moMoveSelect&lt; M &gt;</a>.</p>
<p>Definition at line <a class="el" href="mo_rand_impr_select_8h-source.html#l00079">79</a> of file <a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a>.</p>
<p>References <a class="el" href="mo_rand_impr_select_8h-source.html#l00121">moRandImprSelect&lt; M &gt;::better_fitnesses</a>, <a class="el" href="mo_rand_impr_select_8h-source.html#l00124">moRandImprSelect&lt; M &gt;::better_moves</a>, and <a class="el" href="mo_rand_impr_select_8h-source.html#l00118">moRandImprSelect&lt; M &gt;::initial_fitness</a>.</p>
</div>
</div><p>
<a class="anchor" name="1bc88f10830960c1d88e22e444c4e670"></a><!-- doxytag: member="moRandImprSelect::operator()" ref="1bc88f10830960c1d88e22e444c4e670" args="(M &amp;_move, Fitness &amp;_fitness)" -->
<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>_fitness</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>
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>_fitness</em>&nbsp;</td><td>the reference of the fitness that can be initialised by the function. </td></tr>
</table>
</dl>
<p>Implements <a class="elRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_b_f.html#a03c40b95210569b826df79a2237a0d0">eoBF&lt; M &amp;, M::EOType::Fitness &amp;, void &gt;</a>.</p>
<p>Definition at line <a class="el" href="mo_rand_impr_select_8h-source.html#l00098">98</a> of file <a class="el" href="mo_rand_impr_select_8h-source.html">moRandImprSelect.h</a>.</p>
<p>References <a class="el" href="mo_rand_impr_select_8h-source.html#l00121">moRandImprSelect&lt; M &gt;::better_fitnesses</a>, <a class="el" href="mo_rand_impr_select_8h-source.html#l00124">moRandImprSelect&lt; M &gt;::better_moves</a>, and <a class="elRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_rng.html#f0829d258c74cdc3a8f6cd72c0287cb4">eoRng::random()</a>.</p>
</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="text-align: right;"><small>Generated on Wed Jan 16 15:50:41 2008 for ParadisEO-MOMovingObjects by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>