143 lines
12 KiB
HTML
143 lines
12 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: peoEA.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.6 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="main.html"><span>Main 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> <u>S</u>earch for </label></td>
|
|
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</li>
|
|
</ul></div>
|
|
<h1>peoEA.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
|
<a name="l00002"></a>00002
|
|
<a name="l00003"></a>00003 <span class="comment">// "peoEA.h"</span>
|
|
<a name="l00004"></a>00004
|
|
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team, LIFL, August 2005</span>
|
|
<a name="l00006"></a>00006
|
|
<a name="l00007"></a>00007 <span class="comment">/* This library is free software; you can redistribute it and/or</span>
|
|
<a name="l00008"></a>00008 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
|
|
<a name="l00009"></a>00009 <span class="comment"> License as published by the Free Software Foundation; either</span>
|
|
<a name="l00010"></a>00010 <span class="comment"> version 2 of the License, or (at your option) any later version.</span>
|
|
<a name="l00011"></a>00011 <span class="comment"> </span>
|
|
<a name="l00012"></a>00012 <span class="comment"> This library is distributed in the hope that it will be useful,</span>
|
|
<a name="l00013"></a>00013 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
|
|
<a name="l00014"></a>00014 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
|
|
<a name="l00015"></a>00015 <span class="comment"> Lesser General Public License for more details.</span>
|
|
<a name="l00016"></a>00016 <span class="comment"> </span>
|
|
<a name="l00017"></a>00017 <span class="comment"> You should have received a copy of the GNU Lesser General Public</span>
|
|
<a name="l00018"></a>00018 <span class="comment"> License along with this library; if not, write to the Free Software</span>
|
|
<a name="l00019"></a>00019 <span class="comment"> Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
|
|
<a name="l00020"></a>00020 <span class="comment"> </span>
|
|
<a name="l00021"></a>00021 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr</span>
|
|
<a name="l00022"></a>00022 <span class="comment">*/</span>
|
|
<a name="l00023"></a>00023
|
|
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef __peoEA_h</span>
|
|
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define __peoEA_h</span>
|
|
<a name="l00026"></a>00026 <span class="preprocessor"></span>
|
|
<a name="l00027"></a>00027 <span class="preprocessor">#include <eoContinue.h></span>
|
|
<a name="l00028"></a>00028 <span class="preprocessor">#include <eoEvalFunc.h></span>
|
|
<a name="l00029"></a>00029 <span class="preprocessor">#include <eoSelect.h></span>
|
|
<a name="l00030"></a>00030 <span class="preprocessor">#include <eoPopEvalFunc.h></span>
|
|
<a name="l00031"></a>00031 <span class="preprocessor">#include <eoReplacement.h></span>
|
|
<a name="l00032"></a>00032
|
|
<a name="l00033"></a>00033 <span class="preprocessor">#include "peoPopEval.h"</span>
|
|
<a name="l00034"></a>00034 <span class="preprocessor">#include "peoTransform.h"</span>
|
|
<a name="l00035"></a>00035 <span class="preprocessor">#include "core/runner.h"</span>
|
|
<a name="l00036"></a>00036 <span class="preprocessor">#include "core/peo_debug.h"</span>
|
|
<a name="l00037"></a>00037
|
|
<a name="l00039"></a>00039
|
|
<a name="l00069"></a><a class="code" href="classpeo_e_a.html">00069</a> <span class="keyword">template</span> < <span class="keyword">class</span> EOT > <span class="keyword">class </span><a class="code" href="classpeo_e_a.html">peoEA</a> : <span class="keyword">public</span> <a class="code" href="class_runner.html">Runner</a> {
|
|
<a name="l00070"></a>00070
|
|
<a name="l00071"></a>00071 <span class="keyword">public</span>:
|
|
<a name="l00072"></a>00072
|
|
<a name="l00084"></a>00084 <a class="code" href="classpeo_e_a.html#dbfc4f8907bef234602149229f132371">peoEA</a>(
|
|
<a name="l00085"></a>00085 eoContinue< EOT >& __cont,
|
|
<a name="l00086"></a>00086 <a class="code" href="classpeo_pop_eval.html">peoPopEval< EOT ></a>& __pop_eval,
|
|
<a name="l00087"></a>00087 eoSelect< EOT >& __select,
|
|
<a name="l00088"></a>00088 <a class="code" href="classpeo_transform.html">peoTransform< EOT ></a>& __trans,
|
|
<a name="l00089"></a>00089 eoReplacement< EOT >& __replace
|
|
<a name="l00090"></a>00090 );
|
|
<a name="l00091"></a>00091
|
|
<a name="l00094"></a>00094 <span class="keywordtype">void</span> <a class="code" href="classpeo_e_a.html#6ab8c321d29350634143a2a01cf2ad24">run</a>();
|
|
<a name="l00095"></a>00095
|
|
<a name="l00099"></a>00099 <span class="keywordtype">void</span> <a class="code" href="classpeo_e_a.html#3c709e3b2491147d26fee36138644613">operator()</a>( eoPop< EOT >& __pop );
|
|
<a name="l00100"></a>00100
|
|
<a name="l00101"></a>00101 <span class="keyword">private</span>:
|
|
<a name="l00102"></a>00102
|
|
<a name="l00103"></a>00103
|
|
<a name="l00104"></a><a class="code" href="classpeo_e_a.html#5f015eebf42f176b9fe322488c446c2a">00104</a> eoContinue< EOT >& <a class="code" href="classpeo_e_a.html#5f015eebf42f176b9fe322488c446c2a">cont</a>;
|
|
<a name="l00105"></a><a class="code" href="classpeo_e_a.html#9140259f50c9186edcb062b023624c96">00105</a> <a class="code" href="classpeo_pop_eval.html">peoPopEval< EOT ></a>& <a class="code" href="classpeo_e_a.html#9140259f50c9186edcb062b023624c96">pop_eval</a>;
|
|
<a name="l00106"></a><a class="code" href="classpeo_e_a.html#2d8428d69fdd6aefefbaf543fdd46d19">00106</a> eoSelect< EOT >& <a class="code" href="classpeo_e_a.html#2d8428d69fdd6aefefbaf543fdd46d19">select</a>;
|
|
<a name="l00107"></a><a class="code" href="classpeo_e_a.html#713c77935eb8aafebfb9488cfaa4a363">00107</a> <a class="code" href="classpeo_transform.html">peoTransform< EOT ></a>& <a class="code" href="classpeo_e_a.html#713c77935eb8aafebfb9488cfaa4a363">trans</a>;
|
|
<a name="l00108"></a><a class="code" href="classpeo_e_a.html#9bd2d4356cf7e69e3141dc269213aa8a">00108</a> eoReplacement< EOT >& <a class="code" href="classpeo_e_a.html#9bd2d4356cf7e69e3141dc269213aa8a">replace</a>;
|
|
<a name="l00109"></a><a class="code" href="classpeo_e_a.html#c0b110e410bc16283e8339f24b733772">00109</a> eoPop< EOT >* <a class="code" href="classpeo_e_a.html#c0b110e410bc16283e8339f24b733772">pop</a>;
|
|
<a name="l00110"></a>00110 };
|
|
<a name="l00111"></a>00111
|
|
<a name="l00112"></a>00112
|
|
<a name="l00113"></a><a class="code" href="classpeo_e_a.html#dbfc4f8907bef234602149229f132371">00113</a> <span class="keyword">template</span> < <span class="keyword">class</span> EOT > <a class="code" href="classpeo_e_a.html#dbfc4f8907bef234602149229f132371">peoEA< EOT > :: peoEA</a>(
|
|
<a name="l00114"></a>00114
|
|
<a name="l00115"></a>00115 eoContinue< EOT >& __cont,
|
|
<a name="l00116"></a>00116 <a class="code" href="classpeo_pop_eval.html">peoPopEval< EOT ></a>& __pop_eval,
|
|
<a name="l00117"></a>00117 eoSelect< EOT >& __select,
|
|
<a name="l00118"></a>00118 <a class="code" href="classpeo_transform.html">peoTransform< EOT ></a>& __trans,
|
|
<a name="l00119"></a>00119 eoReplacement< EOT >& __replace
|
|
<a name="l00120"></a>00120
|
|
<a name="l00121"></a>00121 ) : cont( __cont ), pop_eval( __pop_eval ), select( __select ), trans( __trans ), replace( __replace )
|
|
<a name="l00122"></a>00122 {
|
|
<a name="l00123"></a>00123
|
|
<a name="l00124"></a>00124 <a class="code" href="classpeo_e_a.html#713c77935eb8aafebfb9488cfaa4a363">trans</a>.setOwner( *<span class="keyword">this</span> );
|
|
<a name="l00125"></a>00125 <a class="code" href="classpeo_e_a.html#9140259f50c9186edcb062b023624c96">pop_eval</a>.setOwner( *<span class="keyword">this</span> );
|
|
<a name="l00126"></a>00126 }
|
|
<a name="l00127"></a>00127
|
|
<a name="l00128"></a>00128
|
|
<a name="l00129"></a><a class="code" href="classpeo_e_a.html#3c709e3b2491147d26fee36138644613">00129</a> <span class="keyword">template</span>< <span class="keyword">class</span> EOT > <span class="keywordtype">void</span> <a class="code" href="classpeo_e_a.html#3c709e3b2491147d26fee36138644613">peoEA< EOT > :: operator ()</a>( eoPop< EOT >& __pop ) {
|
|
<a name="l00130"></a>00130
|
|
<a name="l00131"></a>00131 <a class="code" href="classpeo_e_a.html#c0b110e410bc16283e8339f24b733772">pop</a> = &__pop;
|
|
<a name="l00132"></a>00132 }
|
|
<a name="l00133"></a>00133
|
|
<a name="l00134"></a>00134
|
|
<a name="l00135"></a><a class="code" href="classpeo_e_a.html#6ab8c321d29350634143a2a01cf2ad24">00135</a> <span class="keyword">template</span>< <span class="keyword">class</span> EOT > <span class="keywordtype">void</span> <a class="code" href="classpeo_e_a.html#6ab8c321d29350634143a2a01cf2ad24">peoEA< EOT > :: run</a>() {
|
|
<a name="l00136"></a>00136
|
|
<a name="l00137"></a>00137 printDebugMessage( <span class="stringliteral">"performing the first evaluation of the population."</span> );
|
|
<a name="l00138"></a>00138 <a class="code" href="classpeo_e_a.html#9140259f50c9186edcb062b023624c96">pop_eval</a>( *<a class="code" href="classpeo_e_a.html#c0b110e410bc16283e8339f24b733772">pop</a> );
|
|
<a name="l00139"></a>00139
|
|
<a name="l00140"></a>00140 <span class="keywordflow">do</span> {
|
|
<a name="l00141"></a>00141
|
|
<a name="l00142"></a>00142 eoPop< EOT > off;
|
|
<a name="l00143"></a>00143
|
|
<a name="l00144"></a>00144 printDebugMessage( <span class="stringliteral">"performing the selection step."</span> );
|
|
<a name="l00145"></a>00145 <a class="code" href="classpeo_e_a.html#2d8428d69fdd6aefefbaf543fdd46d19">select</a>( *<a class="code" href="classpeo_e_a.html#c0b110e410bc16283e8339f24b733772">pop</a>, off );
|
|
<a name="l00146"></a>00146 <a class="code" href="classpeo_e_a.html#713c77935eb8aafebfb9488cfaa4a363">trans</a>( off );
|
|
<a name="l00147"></a>00147
|
|
<a name="l00148"></a>00148 printDebugMessage( <span class="stringliteral">"performing the evaluation of the population."</span> );
|
|
<a name="l00149"></a>00149 <a class="code" href="classpeo_e_a.html#9140259f50c9186edcb062b023624c96">pop_eval</a>( off );
|
|
<a name="l00150"></a>00150
|
|
<a name="l00151"></a>00151 printDebugMessage( <span class="stringliteral">"performing the replacement of the population."</span> );
|
|
<a name="l00152"></a>00152 <a class="code" href="classpeo_e_a.html#9bd2d4356cf7e69e3141dc269213aa8a">replace</a>( *<a class="code" href="classpeo_e_a.html#c0b110e410bc16283e8339f24b733772">pop</a>, off );
|
|
<a name="l00153"></a>00153
|
|
<a name="l00154"></a>00154 printDebugMessage( <span class="stringliteral">"deciding of the continuation."</span> );
|
|
<a name="l00155"></a>00155
|
|
<a name="l00156"></a>00156 } <span class="keywordflow">while</span> ( <a class="code" href="classpeo_e_a.html#5f015eebf42f176b9fe322488c446c2a">cont</a>( *<a class="code" href="classpeo_e_a.html#c0b110e410bc16283e8339f24b733772">pop</a> ) );
|
|
<a name="l00157"></a>00157 }
|
|
<a name="l00158"></a>00158
|
|
<a name="l00159"></a>00159
|
|
<a name="l00160"></a>00160 <span class="preprocessor">#endif</span>
|
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Dec 20 13:45:48 2006 for ParadisEO by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
|
|
</body>
|
|
</html>
|