paradiseo/trunk/paradiseo-peo/doc/html/peoParaPopEval_8h-source.html
legrand 39cd826ea3 new design for the doc and the sources: licence ...
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@661 331e1502-861f-0410-8da2-ba01fb791d7f
2007-10-08 09:26:25 +00:00

254 lines
26 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-PEOMovingObjects: peoParaPopEval.h Source File</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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="classes.html"><span>Classes</span></a></li>
<li id="current"><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>
<h1>peoParaPopEval.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* </span>
<a name="l00002"></a>00002 <span class="comment">* &lt;peoParaPopEval.h&gt;</span>
<a name="l00003"></a>00003 <span class="comment">* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007</span>
<a name="l00004"></a>00004 <span class="comment">* (C) OPAC Team, LIFL, 2002-2007</span>
<a name="l00005"></a>00005 <span class="comment">*</span>
<a name="l00006"></a>00006 <span class="comment">* Sebastien Cahon, Alexandru-Adrian Tantar</span>
<a name="l00007"></a>00007 <span class="comment">*</span>
<a name="l00008"></a>00008 <span class="comment">* This software is governed by the CeCILL license under French law and</span>
<a name="l00009"></a>00009 <span class="comment">* abiding by the rules of distribution of free software. You can use,</span>
<a name="l00010"></a>00010 <span class="comment">* modify and/ or redistribute the software under the terms of the CeCILL</span>
<a name="l00011"></a>00011 <span class="comment">* license as circulated by CEA, CNRS and INRIA at the following URL</span>
<a name="l00012"></a>00012 <span class="comment">* "http://www.cecill.info".</span>
<a name="l00013"></a>00013 <span class="comment">*</span>
<a name="l00014"></a>00014 <span class="comment">* As a counterpart to the access to the source code and rights to copy,</span>
<a name="l00015"></a>00015 <span class="comment">* modify and redistribute granted by the license, users are provided only</span>
<a name="l00016"></a>00016 <span class="comment">* with a limited warranty and the software's author, the holder of the</span>
<a name="l00017"></a>00017 <span class="comment">* economic rights, and the successive licensors have only limited liability.</span>
<a name="l00018"></a>00018 <span class="comment">*</span>
<a name="l00019"></a>00019 <span class="comment">* In this respect, the user's attention is drawn to the risks associated</span>
<a name="l00020"></a>00020 <span class="comment">* with loading, using, modifying and/or developing or reproducing the</span>
<a name="l00021"></a>00021 <span class="comment">* software by the user in light of its specific status of free software,</span>
<a name="l00022"></a>00022 <span class="comment">* that may mean that it is complicated to manipulate, and that also</span>
<a name="l00023"></a>00023 <span class="comment">* therefore means that it is reserved for developers and experienced</span>
<a name="l00024"></a>00024 <span class="comment">* professionals having in-depth computer knowledge. Users are therefore</span>
<a name="l00025"></a>00025 <span class="comment">* encouraged to load and test the software's suitability as regards their</span>
<a name="l00026"></a>00026 <span class="comment">* requirements in conditions enabling the security of their systems and/or</span>
<a name="l00027"></a>00027 <span class="comment">* data to be ensured and, more generally, to use and operate it in the</span>
<a name="l00028"></a>00028 <span class="comment">* same conditions as regards security.</span>
<a name="l00029"></a>00029 <span class="comment">* The fact that you are presently reading this means that you have had</span>
<a name="l00030"></a>00030 <span class="comment">* knowledge of the CeCILL license and that you accept its terms.</span>
<a name="l00031"></a>00031 <span class="comment">*</span>
<a name="l00032"></a>00032 <span class="comment">* ParadisEO WebSite : http://paradiseo.gforge.inria.fr</span>
<a name="l00033"></a>00033 <span class="comment">* Contact: paradiseo-help@lists.gforge.inria.fr</span>
<a name="l00034"></a>00034 <span class="comment">*</span>
<a name="l00035"></a>00035 <span class="comment">*/</span>
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#ifndef __peoParaPopEval_h</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define __peoParaPopEval_h</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="preprocessor">#include &lt;queue&gt;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &lt;eoEvalFunc.h&gt;</span>
<a name="l00042"></a>00042
<a name="l00043"></a>00043 <span class="preprocessor">#include "core/messaging.h"</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include "core/peo_debug.h"</span>
<a name="l00045"></a>00045 <span class="preprocessor">#include "peoAggEvalFunc.h"</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include "peoNoAggEvalFunc.h"</span>
<a name="l00047"></a>00047
<a name="l00048"></a>00048
<a name="l00050"></a>00050
<a name="l00054"></a><a class="code" href="classpeoParaPopEval.html">00054</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <span class="keyword">class </span><a class="code" href="classpeoParaPopEval.html">peoParaPopEval</a> : <span class="keyword">public</span> <a class="code" href="classpeoPopEval.html">peoPopEval</a>&lt; EOT &gt; {
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="keyword">public</span>:
<a name="l00057"></a>00057
<a name="l00058"></a>00058 <span class="keyword">using</span> <a class="code" href="classpeoPopEval.html">peoPopEval&lt; EOT &gt;</a><a class="code" href="classService.html#7e2ae35a9070a05dcd46488df649896d"> :: requestResourceRequest</a>;
<a name="l00059"></a>00059 <span class="keyword">using</span> <a class="code" href="classpeoPopEval.html">peoPopEval&lt; EOT &gt;</a><a class="code" href="classCommunicable.html#3306a9adb11a0ab5af342c0db9f7bb2a"> :: resume</a>;
<a name="l00060"></a>00060 <span class="keyword">using</span> <a class="code" href="classpeoPopEval.html">peoPopEval&lt; EOT &gt;</a><a class="code" href="classCommunicable.html#cb53e6534b947bc889aa181d9dbbd13b"> :: stop</a>;
<a name="l00061"></a>00061 <span class="keyword">using</span> <a class="code" href="classpeoPopEval.html">peoPopEval&lt; EOT &gt;</a><a class="code" href="classService.html#0dae00309c51a7b7069788142aed799f"> :: getOwner</a>;
<a name="l00062"></a>00062
<a name="l00067"></a>00067 <a class="code" href="classpeoParaPopEval.html#bcb540510a7038520bec41a7af332daf">peoParaPopEval</a>( <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_eval_func.html">eoEvalFunc&lt; EOT &gt;</a>&amp; __eval_func );
<a name="l00068"></a>00068
<a name="l00073"></a>00073 <a class="code" href="classpeoParaPopEval.html#bcb540510a7038520bec41a7af332daf">peoParaPopEval</a>( <span class="keyword">const</span> std :: vector&lt; eoEvalFunc &lt; EOT &gt;* &gt;&amp; __funcs, <a class="code" href="classpeoAggEvalFunc.html">peoAggEvalFunc&lt; EOT &gt;</a>&amp; __merge_eval );
<a name="l00074"></a>00074
<a name="l00078"></a>00078 <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#aeaa4fca4f8650e453e308838b4a2cb5">operator()</a>( <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_pop.html">eoPop&lt; EOT &gt;</a>&amp; __pop );
<a name="l00079"></a>00079
<a name="l00082"></a>00082 <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#fea632bd645ab11182782fd3c038d6d8">packData</a>();
<a name="l00083"></a>00083
<a name="l00086"></a>00086 <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#410bf4c173e2f36df82251cb16ce1b05">unpackData</a>();
<a name="l00087"></a>00087
<a name="l00089"></a>00089 <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#3af76378611eac5a36da9a0a00aeeb6c">execute</a>();
<a name="l00090"></a>00090
<a name="l00093"></a>00093 <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#24bb4ae84b0b9f64e7170e3d2b0e1223">packResult</a>();
<a name="l00094"></a>00094
<a name="l00097"></a>00097 <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#fd7f0afe9cba30be39269d16097e190e">unpackResult</a>();
<a name="l00098"></a>00098
<a name="l00101"></a>00101 <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#1f78c3cec2940af08a059cc1aa96a9c8">notifySendingData</a>();
<a name="l00102"></a>00102
<a name="l00105"></a>00105 <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#b77031fc4807921ffaf7cf6b669a7665">notifySendingAllResourceRequests</a>();
<a name="l00106"></a>00106
<a name="l00107"></a>00107 <span class="keyword">private</span>:
<a name="l00108"></a>00108
<a name="l00109"></a>00109
<a name="l00110"></a><a class="code" href="classpeoParaPopEval.html#6d69b8f73c0b5d72baf75d6e53f025b7">00110</a> <span class="keyword">const</span> std :: vector&lt; eoEvalFunc &lt; EOT &gt;* &gt;&amp; <a class="code" href="classpeoParaPopEval.html#6d69b8f73c0b5d72baf75d6e53f025b7">funcs</a>;
<a name="l00111"></a><a class="code" href="classpeoParaPopEval.html#f0e8af3ee442d2b6baf0bd122226be3c">00111</a> std :: vector&lt; eoEvalFunc &lt; EOT &gt;* &gt; <a class="code" href="classpeoParaPopEval.html#f0e8af3ee442d2b6baf0bd122226be3c">one_func</a>;
<a name="l00112"></a>00112
<a name="l00113"></a><a class="code" href="classpeoParaPopEval.html#b48bcd4e9f92f364118304535c089456">00113</a> <a class="code" href="classpeoAggEvalFunc.html">peoAggEvalFunc&lt; EOT &gt;</a>&amp; <a class="code" href="classpeoParaPopEval.html#b48bcd4e9f92f364118304535c089456">merge_eval</a>;
<a name="l00114"></a><a class="code" href="classpeoParaPopEval.html#bf255dd5861e27108c2abae7309d7690">00114</a> <a class="code" href="classpeoNoAggEvalFunc.html">peoNoAggEvalFunc&lt; EOT &gt;</a> <a class="code" href="classpeoParaPopEval.html#bf255dd5861e27108c2abae7309d7690">no_merge_eval</a>;
<a name="l00115"></a>00115
<a name="l00116"></a><a class="code" href="classpeoParaPopEval.html#af76cd18368a0f6185878f37f0b5f272">00116</a> std :: queue&lt; EOT* &gt;<a class="code" href="classpeoParaPopEval.html#af76cd18368a0f6185878f37f0b5f272">tasks</a>;
<a name="l00117"></a>00117
<a name="l00118"></a><a class="code" href="classpeoParaPopEval.html#80e7e34bb1bb2d12f1f2eed3feac6ecf">00118</a> std :: map&lt; EOT*, std :: pair&lt; unsigned, unsigned &gt; &gt; <a class="code" href="classpeoParaPopEval.html#80e7e34bb1bb2d12f1f2eed3feac6ecf">progression</a>;
<a name="l00119"></a>00119
<a name="l00120"></a><a class="code" href="classpeoParaPopEval.html#87abb090c0de39f0ccc36af1f07cca0c">00120</a> <span class="keywordtype">unsigned</span> <a class="code" href="classpeoParaPopEval.html#87abb090c0de39f0ccc36af1f07cca0c">num_func</a>;
<a name="l00121"></a>00121
<a name="l00122"></a><a class="code" href="classpeoParaPopEval.html#fb6941e0455515a908eb82342b995163">00122</a> EOT <a class="code" href="classpeoParaPopEval.html#fb6941e0455515a908eb82342b995163">sol</a>;
<a name="l00123"></a>00123
<a name="l00124"></a><a class="code" href="classpeoParaPopEval.html#60cafeab376262af675fdff43434c8d8">00124</a> EOT *<a class="code" href="classpeoParaPopEval.html#60cafeab376262af675fdff43434c8d8">ad_sol</a>;
<a name="l00125"></a>00125
<a name="l00126"></a><a class="code" href="classpeoParaPopEval.html#b528ad9dd9006c3dd57f149a3843e57d">00126</a> <span class="keywordtype">unsigned</span> <a class="code" href="classpeoParaPopEval.html#b528ad9dd9006c3dd57f149a3843e57d">total</a>;
<a name="l00127"></a>00127 };
<a name="l00128"></a>00128
<a name="l00129"></a>00129
<a name="l00130"></a><a class="code" href="classpeoParaPopEval.html#bcb540510a7038520bec41a7af332daf">00130</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <a class="code" href="classpeoParaPopEval.html#bcb540510a7038520bec41a7af332daf">peoParaPopEval&lt; EOT &gt; :: peoParaPopEval</a>( <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_eval_func.html">eoEvalFunc&lt; EOT &gt;</a>&amp; __eval_func ) :
<a name="l00131"></a>00131
<a name="l00132"></a>00132 funcs( one_func ), merge_eval( no_merge_eval )
<a name="l00133"></a>00133 {
<a name="l00134"></a>00134
<a name="l00135"></a>00135 <a class="code" href="classpeoParaPopEval.html#f0e8af3ee442d2b6baf0bd122226be3c">one_func</a>.push_back( &amp;__eval_func );
<a name="l00136"></a>00136 }
<a name="l00137"></a>00137
<a name="l00138"></a>00138
<a name="l00139"></a><a class="code" href="classpeoParaPopEval.html#1cc13a1ec366f95d219d682eccb455bc">00139</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <a class="code" href="classpeoParaPopEval.html#bcb540510a7038520bec41a7af332daf">peoParaPopEval&lt; EOT &gt; :: peoParaPopEval</a>(
<a name="l00140"></a>00140
<a name="l00141"></a>00141 <span class="keyword">const</span> std :: vector&lt; <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_eval_func.html">eoEvalFunc&lt; EOT &gt;</a>* &gt;&amp; __funcs,
<a name="l00142"></a>00142 <a class="code" href="classpeoAggEvalFunc.html">peoAggEvalFunc&lt; EOT &gt;</a>&amp; __merge_eval
<a name="l00143"></a>00143
<a name="l00144"></a>00144 ) : funcs( __funcs ), merge_eval( __merge_eval )
<a name="l00145"></a>00145 {
<a name="l00146"></a>00146
<a name="l00147"></a>00147 }
<a name="l00148"></a>00148
<a name="l00149"></a>00149
<a name="l00150"></a><a class="code" href="classpeoParaPopEval.html#aeaa4fca4f8650e453e308838b4a2cb5">00150</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#aeaa4fca4f8650e453e308838b4a2cb5">peoParaPopEval&lt; EOT &gt;::operator()</a>( <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_pop.html">eoPop&lt; EOT &gt;</a>&amp; __pop ) {
<a name="l00151"></a>00151
<a name="l00152"></a>00152 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> i = 0; i &lt; __pop.size(); i++ ) {
<a name="l00153"></a>00153
<a name="l00154"></a>00154 __pop[ i ].fitness( <span class="keyword">typename</span> EOT :: Fitness() );
<a name="l00155"></a>00155
<a name="l00156"></a>00156 <a class="code" href="classpeoParaPopEval.html#80e7e34bb1bb2d12f1f2eed3feac6ecf">progression</a>[ &amp;__pop[ i ] ].first = <a class="code" href="classpeoParaPopEval.html#6d69b8f73c0b5d72baf75d6e53f025b7">funcs</a>.size() - 1;
<a name="l00157"></a>00157 <a class="code" href="classpeoParaPopEval.html#80e7e34bb1bb2d12f1f2eed3feac6ecf">progression</a>[ &amp;__pop[ i ] ].second = <a class="code" href="classpeoParaPopEval.html#6d69b8f73c0b5d72baf75d6e53f025b7">funcs</a>.size();
<a name="l00158"></a>00158
<a name="l00159"></a>00159 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> j = 0; j &lt; <a class="code" href="classpeoParaPopEval.html#6d69b8f73c0b5d72baf75d6e53f025b7">funcs</a>.size(); j++ ) {
<a name="l00160"></a>00160 <span class="comment">/* Queuing the 'invalid' solution and its associated owner */</span>
<a name="l00161"></a>00161 <a class="code" href="classpeoParaPopEval.html#af76cd18368a0f6185878f37f0b5f272">tasks</a>.push( &amp;__pop[ i ] );
<a name="l00162"></a>00162 }
<a name="l00163"></a>00163 }
<a name="l00164"></a>00164
<a name="l00165"></a>00165 <a class="code" href="classpeoParaPopEval.html#b528ad9dd9006c3dd57f149a3843e57d">total</a> = <a class="code" href="classpeoParaPopEval.html#6d69b8f73c0b5d72baf75d6e53f025b7">funcs</a>.size() * __pop.size();
<a name="l00166"></a>00166 <a class="code" href="classService.html#7e2ae35a9070a05dcd46488df649896d">requestResourceRequest</a>( <a class="code" href="classpeoParaPopEval.html#6d69b8f73c0b5d72baf75d6e53f025b7">funcs</a>.size() * __pop.size() );
<a name="l00167"></a>00167 <a class="code" href="classCommunicable.html#cb53e6534b947bc889aa181d9dbbd13b">stop</a>();
<a name="l00168"></a>00168 }
<a name="l00169"></a>00169
<a name="l00170"></a>00170
<a name="l00171"></a><a class="code" href="classpeoParaPopEval.html#fea632bd645ab11182782fd3c038d6d8">00171</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#fea632bd645ab11182782fd3c038d6d8">peoParaPopEval&lt; EOT &gt; :: packData</a>() {
<a name="l00172"></a>00172
<a name="l00173"></a>00173 <span class="comment">// printDebugMessage ("debut pakc data");</span>
<a name="l00174"></a>00174 pack( <a class="code" href="classpeoParaPopEval.html#80e7e34bb1bb2d12f1f2eed3feac6ecf">progression</a>[ <a class="code" href="classpeoParaPopEval.html#af76cd18368a0f6185878f37f0b5f272">tasks</a>.front() ].first-- );
<a name="l00175"></a>00175
<a name="l00176"></a>00176 <span class="comment">/* Packing the contents :-) of the solution */</span>
<a name="l00177"></a>00177 pack( *<a class="code" href="classpeoParaPopEval.html#af76cd18368a0f6185878f37f0b5f272">tasks</a>.front() );
<a name="l00178"></a>00178
<a name="l00179"></a>00179 <span class="comment">/* Packing the addresses of both the solution and the owner */</span>
<a name="l00180"></a>00180 pack( <a class="code" href="classpeoParaPopEval.html#af76cd18368a0f6185878f37f0b5f272">tasks</a>.front() );
<a name="l00181"></a>00181 <a class="code" href="classpeoParaPopEval.html#af76cd18368a0f6185878f37f0b5f272">tasks</a>.pop( );
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183
<a name="l00184"></a>00184
<a name="l00185"></a><a class="code" href="classpeoParaPopEval.html#410bf4c173e2f36df82251cb16ce1b05">00185</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#410bf4c173e2f36df82251cb16ce1b05">peoParaPopEval&lt; EOT &gt; :: unpackData</a>() {
<a name="l00186"></a>00186
<a name="l00187"></a>00187 unpack( <a class="code" href="classpeoParaPopEval.html#87abb090c0de39f0ccc36af1f07cca0c">num_func</a> );
<a name="l00188"></a>00188 <span class="comment">/* Unpacking the solution */</span>
<a name="l00189"></a>00189 unpack( <a class="code" href="classpeoParaPopEval.html#fb6941e0455515a908eb82342b995163">sol</a> );
<a name="l00190"></a>00190 <span class="comment">/* Unpacking the @ of that one */</span>
<a name="l00191"></a>00191 unpack( <a class="code" href="classpeoParaPopEval.html#60cafeab376262af675fdff43434c8d8">ad_sol</a> );
<a name="l00192"></a>00192 }
<a name="l00193"></a>00193
<a name="l00194"></a>00194
<a name="l00195"></a><a class="code" href="classpeoParaPopEval.html#3af76378611eac5a36da9a0a00aeeb6c">00195</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#3af76378611eac5a36da9a0a00aeeb6c">peoParaPopEval&lt; EOT &gt; :: execute</a>() {
<a name="l00196"></a>00196
<a name="l00197"></a>00197 <span class="comment">/* Computing the fitness of the solution */</span>
<a name="l00198"></a>00198 <a class="code" href="classpeoParaPopEval.html#6d69b8f73c0b5d72baf75d6e53f025b7">funcs</a>[ <a class="code" href="classpeoParaPopEval.html#87abb090c0de39f0ccc36af1f07cca0c">num_func</a> ]-&gt;operator()( <a class="code" href="classpeoParaPopEval.html#fb6941e0455515a908eb82342b995163">sol</a> );
<a name="l00199"></a>00199 }
<a name="l00200"></a>00200
<a name="l00201"></a>00201
<a name="l00202"></a><a class="code" href="classpeoParaPopEval.html#24bb4ae84b0b9f64e7170e3d2b0e1223">00202</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#24bb4ae84b0b9f64e7170e3d2b0e1223">peoParaPopEval&lt; EOT &gt; :: packResult</a>() {
<a name="l00203"></a>00203
<a name="l00204"></a>00204 <span class="comment">/* Packing the fitness of the solution */</span>
<a name="l00205"></a>00205 pack( <a class="code" href="classpeoParaPopEval.html#fb6941e0455515a908eb82342b995163">sol</a>.fitness() );
<a name="l00206"></a>00206 <span class="comment">/* Packing the @ of the individual */</span>
<a name="l00207"></a>00207 pack( <a class="code" href="classpeoParaPopEval.html#60cafeab376262af675fdff43434c8d8">ad_sol</a> );
<a name="l00208"></a>00208 }
<a name="l00209"></a>00209
<a name="l00210"></a>00210
<a name="l00211"></a><a class="code" href="classpeoParaPopEval.html#fd7f0afe9cba30be39269d16097e190e">00211</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#fd7f0afe9cba30be39269d16097e190e">peoParaPopEval&lt; EOT &gt; :: unpackResult</a>() {
<a name="l00212"></a>00212
<a name="l00213"></a>00213 <span class="keyword">typename</span> EOT :: Fitness fit;
<a name="l00214"></a>00214
<a name="l00215"></a>00215 <span class="comment">/* Unpacking the computed fitness */</span>
<a name="l00216"></a>00216 unpack( fit );
<a name="l00217"></a>00217
<a name="l00218"></a>00218 <span class="comment">/* Unpacking the @ of the associated individual */</span>
<a name="l00219"></a>00219 unpack( <a class="code" href="classpeoParaPopEval.html#60cafeab376262af675fdff43434c8d8">ad_sol</a> );
<a name="l00220"></a>00220
<a name="l00221"></a>00221
<a name="l00222"></a>00222 <span class="comment">/* Associating the fitness the local solution */</span>
<a name="l00223"></a>00223 <a class="code" href="classpeoParaPopEval.html#b48bcd4e9f92f364118304535c089456">merge_eval</a>( *<a class="code" href="classpeoParaPopEval.html#60cafeab376262af675fdff43434c8d8">ad_sol</a>, fit );
<a name="l00224"></a>00224
<a name="l00225"></a>00225 <a class="code" href="classpeoParaPopEval.html#80e7e34bb1bb2d12f1f2eed3feac6ecf">progression</a>[ <a class="code" href="classpeoParaPopEval.html#60cafeab376262af675fdff43434c8d8">ad_sol</a> ].second--;
<a name="l00226"></a>00226
<a name="l00227"></a>00227 <span class="comment">/* Notifying the container of the termination of the evaluation */</span>
<a name="l00228"></a>00228 <span class="keywordflow">if</span> ( !<a class="code" href="classpeoParaPopEval.html#80e7e34bb1bb2d12f1f2eed3feac6ecf">progression</a>[ <a class="code" href="classpeoParaPopEval.html#60cafeab376262af675fdff43434c8d8">ad_sol</a> ].second ) {
<a name="l00229"></a>00229
<a name="l00230"></a>00230 <a class="code" href="classpeoParaPopEval.html#80e7e34bb1bb2d12f1f2eed3feac6ecf">progression</a>.erase( <a class="code" href="classpeoParaPopEval.html#60cafeab376262af675fdff43434c8d8">ad_sol</a> );
<a name="l00231"></a>00231 }
<a name="l00232"></a>00232
<a name="l00233"></a>00233 <a class="code" href="classpeoParaPopEval.html#b528ad9dd9006c3dd57f149a3843e57d">total</a>--;
<a name="l00234"></a>00234 <span class="keywordflow">if</span> ( !<a class="code" href="classpeoParaPopEval.html#b528ad9dd9006c3dd57f149a3843e57d">total</a> ) {
<a name="l00235"></a>00235
<a name="l00236"></a>00236 <a class="code" href="classService.html#0dae00309c51a7b7069788142aed799f">getOwner</a>()-&gt;<a class="code" href="classThread.html#e197c46f8f62ecce6d2a7fe95bdc5b38">setActive</a>();
<a name="l00237"></a>00237 <a class="code" href="classCommunicable.html#3306a9adb11a0ab5af342c0db9f7bb2a">resume</a>();
<a name="l00238"></a>00238 }
<a name="l00239"></a>00239 }
<a name="l00240"></a>00240
<a name="l00241"></a>00241
<a name="l00242"></a><a class="code" href="classpeoParaPopEval.html#1f78c3cec2940af08a059cc1aa96a9c8">00242</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#1f78c3cec2940af08a059cc1aa96a9c8">peoParaPopEval&lt; EOT &gt; :: notifySendingData</a>() {
<a name="l00243"></a>00243
<a name="l00244"></a>00244 }
<a name="l00245"></a>00245
<a name="l00246"></a>00246
<a name="l00247"></a><a class="code" href="classpeoParaPopEval.html#b77031fc4807921ffaf7cf6b669a7665">00247</a> <span class="keyword">template</span>&lt; <span class="keyword">class</span> EOT &gt; <span class="keywordtype">void</span> <a class="code" href="classpeoParaPopEval.html#b77031fc4807921ffaf7cf6b669a7665">peoParaPopEval&lt; EOT &gt; :: notifySendingAllResourceRequests</a>() {
<a name="l00248"></a>00248
<a name="l00249"></a>00249 <a class="code" href="classService.html#0dae00309c51a7b7069788142aed799f">getOwner</a>()-&gt;<a class="code" href="classThread.html#20632ffe9ddfa2a478afb0c84dc1096b">setPassive</a>();
<a name="l00250"></a>00250 }
<a name="l00251"></a>00251
<a name="l00252"></a>00252
<a name="l00253"></a>00253 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 11:16:46 2007 for ParadisEO-PEOMovingObjects 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>