Paradiseo-eo sources added
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@40 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
bc1f453978
commit
c3aec878e5
3609 changed files with 342772 additions and 0 deletions
349
trunk/paradiseo-eo/doc/html/selectors_8h-source.html
Normal file
349
trunk/paradiseo-eo/doc/html/selectors_8h-source.html
Normal file
|
|
@ -0,0 +1,349 @@
|
|||
<!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>EO: selectors.h Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.3.9.1 -->
|
||||
<div class="qindex"> <form class="search" action="search.php" method="get">
|
||||
<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
|
||||
<div class="nav">
|
||||
<a class="el" href="dir_000000.html">src</a> / <a class="el" href="dir_000011.html">utils</a></div>
|
||||
<h1>selectors.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/* -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
00002 <span class="comment"></span>
|
||||
00003 <span class="comment"> -----------------------------------------------------------------------------</span>
|
||||
00004 <span class="comment"> selectors.h</span>
|
||||
00005 <span class="comment"> A bunch of useful selector functions. They generally have three forms:</span>
|
||||
00006 <span class="comment"></span>
|
||||
00007 <span class="comment"> template <class It></span>
|
||||
00008 <span class="comment"> It select(It begin, It end, params, eoRng& gen = rng);</span>
|
||||
00009 <span class="comment"></span>
|
||||
00010 <span class="comment"> template <class EOT></span>
|
||||
00011 <span class="comment"> const EOT& select(const eoPop<EOT>& pop, params, eoRng& gen = rng);</span>
|
||||
00012 <span class="comment"></span>
|
||||
00013 <span class="comment"> template <class EOT></span>
|
||||
00014 <span class="comment"> EOT& select(eoPop<EOT>& pop, params, eoRng& gen = rng);</span>
|
||||
00015 <span class="comment"></span>
|
||||
00016 <span class="comment"> where select is one of: roulette_wheel, deterministic_tournament</span>
|
||||
00017 <span class="comment"> and stochastic_tournament (at the moment).</span>
|
||||
00018 <span class="comment"></span>
|
||||
00019 <span class="comment"> (c) Maarten Keijzer (mak@dhi.dk) and GeNeura Team, 1999, 2000</span>
|
||||
00020 <span class="comment"></span>
|
||||
00021 <span class="comment"> This library is free software; you can redistribute it and/or</span>
|
||||
00022 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
|
||||
00023 <span class="comment"> License as published by the Free Software Foundation; either</span>
|
||||
00024 <span class="comment"> version 2 of the License, or (at your option) any later version.</span>
|
||||
00025 <span class="comment"></span>
|
||||
00026 <span class="comment"> This library is distributed in the hope that it will be useful,</span>
|
||||
00027 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
|
||||
00028 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
|
||||
00029 <span class="comment"> Lesser General Public License for more details.</span>
|
||||
00030 <span class="comment"></span>
|
||||
00031 <span class="comment"> You should have received a copy of the GNU Lesser General Public</span>
|
||||
00032 <span class="comment"> License along with this library; if not, write to the Free Software</span>
|
||||
00033 <span class="comment"> Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
|
||||
00034 <span class="comment"></span>
|
||||
00035 <span class="comment"> Contact: todos@geneura.ugr.es, http://geneura.ugr.es</span>
|
||||
00036 <span class="comment"> */</span>
|
||||
00037
|
||||
00038 <span class="preprocessor">#ifndef SELECT__H</span>
|
||||
00039 <span class="preprocessor"></span><span class="preprocessor">#define SELECT__H</span>
|
||||
00040 <span class="preprocessor"></span>
|
||||
00041 <span class="preprocessor">#include <stdexcept></span>
|
||||
00042
|
||||
00043 <span class="preprocessor">#include "eoRNG.h"</span>
|
||||
00044 <span class="preprocessor">#include <eoPop.h></span>
|
||||
00049 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00050 <span class="keywordtype">bool</span> minimizing_fitness()
|
||||
00051 {
|
||||
00052 <a class="code" href="struct_dummy.html">EOT</a> eo1; <span class="comment">// Assuming people don't do anything fancy in the default constructor!</span>
|
||||
00053 <a class="code" href="struct_dummy.html">EOT</a> eo2;
|
||||
00054
|
||||
00055 <span class="comment">/* Dear user, when the two line below do not compile you are most</span>
|
||||
00056 <span class="comment"> likely not working with scalar fitness values. In that case we're sorry</span>
|
||||
00057 <span class="comment"> but you cannot use lottery or roulette_wheel selection...</span>
|
||||
00058 <span class="comment"> */</span>
|
||||
00059
|
||||
00060 <span class="preprocessor">#ifdef _MSC_VER</span>
|
||||
00061 <span class="preprocessor"></span> eo1.<a class="code" href="class_e_o.html#a2">fitness</a>( EOT::Fitness(0.0) );
|
||||
00062 eo2.<a class="code" href="class_e_o.html#a2">fitness</a>( EOT::Fitness(1.0) );
|
||||
00063 <span class="preprocessor">#else</span>
|
||||
00064 <span class="preprocessor"></span> eo1.<a class="code" href="class_e_o.html#a2">fitness</a>( <span class="keyword">typename</span> EOT::Fitness(0.0) ); <span class="comment">// tried to cast it to an EOT::Fitness, but for some reason GNU barfs on this</span>
|
||||
00065 eo2.<a class="code" href="class_e_o.html#a2">fitness</a>( <span class="keyword">typename</span> EOT::Fitness(1.0) );
|
||||
00066 <span class="preprocessor">#endif</span>
|
||||
00067 <span class="preprocessor"></span>
|
||||
00068 <span class="keywordflow">return</span> eo2 < eo1; <span class="comment">// check whether we have a minimizing fitness</span>
|
||||
00069 }
|
||||
00070
|
||||
00071 <span class="keyword">inline</span> <span class="keywordtype">double</span> scale_fitness(<span class="keyword">const</span> std::pair<double, double>& _minmax, <span class="keywordtype">double</span> _value)
|
||||
00072 {
|
||||
00073 <span class="keywordflow">if</span> (_minmax.first == _minmax.second)
|
||||
00074 {
|
||||
00075 <span class="keywordflow">return</span> 0.0; <span class="comment">// no differences in fitness, population converged!</span>
|
||||
00076 }
|
||||
00077 <span class="comment">// else</span>
|
||||
00078
|
||||
00079 <span class="keywordflow">return</span> (_value - _minmax.first) / (_minmax.second - _minmax.first);
|
||||
00080 }
|
||||
00081
|
||||
00082 <span class="keyword">template</span> <<span class="keyword">class</span> It>
|
||||
00083 <span class="keywordtype">double</span> sum_fitness(It begin, It end)
|
||||
00084 {
|
||||
00085 <span class="keywordtype">double</span> sum = 0.0;
|
||||
00086
|
||||
00087 <span class="keywordflow">for</span> (; begin != end; ++begin)
|
||||
00088 {
|
||||
00089 <span class="keywordtype">double</span> v = static_cast<double>(begin->fitness());
|
||||
00090 <span class="keywordflow">if</span> (v < 0.0)
|
||||
00091 <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"sum_fitness: negative fitness value encountered"</span>);
|
||||
00092 sum += v;
|
||||
00093 }
|
||||
00094
|
||||
00095 <span class="keywordflow">return</span> sum;
|
||||
00096 }
|
||||
00097
|
||||
00098 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00099 <span class="keywordtype">double</span> sum_fitness(<span class="keyword">const</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop)
|
||||
00100 {
|
||||
00101 <span class="keywordflow">return</span> sum_fitness(_pop.begin(), _pop.end());
|
||||
00102 }
|
||||
00103
|
||||
00104 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00105 <span class="keywordtype">double</span> sum_fitness(<span class="keyword">const</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, std::pair<double, double>& _minmax)
|
||||
00106 {
|
||||
00107 <span class="keywordtype">double</span> rawTotal, scaledTotal;
|
||||
00108
|
||||
00109 <span class="keyword">typename</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>::const_iterator it = _pop.begin();
|
||||
00110
|
||||
00111 _minmax.first = it->fitness();
|
||||
00112 _minmax.second = it++->fitness();
|
||||
00113
|
||||
00114 <span class="keywordflow">for</span>(; it != _pop.end(); ++it)
|
||||
00115 {
|
||||
00116 <span class="keywordtype">double</span> v = static_cast<double>(it->fitness());
|
||||
00117
|
||||
00118 _minmax.first = std::min(_minmax.first, v);
|
||||
00119 _minmax.second = std::max(_minmax.second, v);
|
||||
00120
|
||||
00121 rawTotal += v;
|
||||
00122 }
|
||||
00123
|
||||
00124 <span class="keywordflow">if</span> (minimizing_fitness<EOT>())
|
||||
00125 {
|
||||
00126 std::swap(_minmax.first, _minmax.second);
|
||||
00127 }
|
||||
00128
|
||||
00129 scaledTotal = 0.0;
|
||||
00130
|
||||
00131 <span class="comment">// unfortunately a second loop is neccessary to scale the fitness</span>
|
||||
00132 <span class="keywordflow">for</span> (it = _pop.begin(); it != _pop.end(); ++it)
|
||||
00133 {
|
||||
00134 <span class="keywordtype">double</span> v = scale_fitness(_minmax, static_cast<double>(it->fitness()));
|
||||
00135
|
||||
00136 scaledTotal += v;
|
||||
00137 }
|
||||
00138
|
||||
00139 <span class="keywordflow">return</span> scaledTotal;
|
||||
00140 }
|
||||
00141
|
||||
00142 <span class="keyword">template</span> <<span class="keyword">class</span> It>
|
||||
00143 It roulette_wheel(It _begin, It _end, <span class="keywordtype">double</span> total, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00144 {
|
||||
00145
|
||||
00146 <span class="keywordtype">float</span> roulette = _gen.uniform(total);
|
||||
00147
|
||||
00148 <span class="keywordflow">if</span> (roulette == 0.0) <span class="comment">// covers the case where total==0.0</span>
|
||||
00149 <span class="keywordflow">return</span> _begin + _gen.random(_end - _begin); <span class="comment">// uniform choice</span>
|
||||
00150
|
||||
00151 It i = _begin;
|
||||
00152
|
||||
00153 <span class="keywordflow">while</span> (roulette > 0.0)
|
||||
00154 {
|
||||
00155 roulette -= static_cast<double>(*(i++));
|
||||
00156 }
|
||||
00157
|
||||
00158 <span class="keywordflow">return</span> --i;
|
||||
00159 }
|
||||
00160
|
||||
00161 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00162 <span class="keyword">const</span> <a class="code" href="struct_dummy.html">EOT</a>& roulette_wheel(<span class="keyword">const</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">double</span> total, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00163 {
|
||||
00164 <span class="keywordtype">float</span> roulette = _gen.uniform(total);
|
||||
00165
|
||||
00166 <span class="keywordflow">if</span> (roulette == 0.0) <span class="comment">// covers the case where total==0.0</span>
|
||||
00167 <span class="keywordflow">return</span> _pop[_gen.random(_pop.size())]; <span class="comment">// uniform choice</span>
|
||||
00168
|
||||
00169 <span class="keyword">typename</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>::const_iterator i = _pop.begin();
|
||||
00170
|
||||
00171 <span class="keywordflow">while</span> (roulette > 0.0)
|
||||
00172 {
|
||||
00173 roulette -= static_cast<double>((i++)->fitness());
|
||||
00174 }
|
||||
00175
|
||||
00176 <span class="keywordflow">return</span> *--i;
|
||||
00177 }
|
||||
00178
|
||||
00179 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00180 <a class="code" href="struct_dummy.html">EOT</a>& roulette_wheel(<a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">double</span> total, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00181 {
|
||||
00182 <span class="keywordtype">float</span> roulette = _gen.uniform(total);
|
||||
00183
|
||||
00184 <span class="keywordflow">if</span> (roulette == 0.0) <span class="comment">// covers the case where total==0.0</span>
|
||||
00185 <span class="keywordflow">return</span> _pop[_gen.random(_pop.size())]; <span class="comment">// uniform choice</span>
|
||||
00186
|
||||
00187 <span class="keyword">typename</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>::iterator i = _pop.begin();
|
||||
00188
|
||||
00189 <span class="keywordflow">while</span> (roulette > 0.0)
|
||||
00190 {
|
||||
00191 roulette -= static_cast<double>((i++)->fitness());
|
||||
00192 }
|
||||
00193
|
||||
00194 <span class="keywordflow">return</span> *--i;
|
||||
00195 }
|
||||
00196
|
||||
00197 <span class="keyword">template</span> <<span class="keyword">class</span> It>
|
||||
00198 It deterministic_tournament(It _begin, It _end, <span class="keywordtype">unsigned</span> _t_size, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00199 {
|
||||
00200 It best = _begin + _gen.random(_end - _begin);
|
||||
00201
|
||||
00202 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; i < _t_size - 1; ++i)
|
||||
00203 {
|
||||
00204 It competitor = _begin + _gen.random(_end - _begin);
|
||||
00205
|
||||
00206 <span class="keywordflow">if</span> (*best < *competitor)
|
||||
00207 {
|
||||
00208 best = competitor;
|
||||
00209 }
|
||||
00210 }
|
||||
00211
|
||||
00212 <span class="keywordflow">return</span> best;
|
||||
00213 }
|
||||
00214
|
||||
00215 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00216 <span class="keyword">const</span> <a class="code" href="struct_dummy.html">EOT</a>& deterministic_tournament(<span class="keyword">const</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">unsigned</span> _t_size, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00217 {
|
||||
00218 <span class="keywordflow">return</span> *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen);
|
||||
00219 }
|
||||
00220
|
||||
00221 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00222 <a class="code" href="struct_dummy.html">EOT</a>& deterministic_tournament(<a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">unsigned</span> _t_size, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00223 {
|
||||
00224 <span class="keywordflow">return</span> *deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen);
|
||||
00225 }
|
||||
00226
|
||||
00227 <span class="keyword">template</span> <<span class="keyword">class</span> It>
|
||||
00228 It inverse_deterministic_tournament(It _begin, It _end, <span class="keywordtype">unsigned</span> _t_size, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00229 {
|
||||
00230 It worst = _begin + _gen.random(_end - _begin);
|
||||
00231
|
||||
00232 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 1; i < _t_size; ++i)
|
||||
00233 {
|
||||
00234 It competitor = _begin + _gen.random(_end - _begin);
|
||||
00235
|
||||
00236 <span class="keywordflow">if</span> (competitor == worst)
|
||||
00237 {
|
||||
00238 --i;
|
||||
00239 <span class="keywordflow">continue</span>; <span class="comment">// try again</span>
|
||||
00240 }
|
||||
00241
|
||||
00242 <span class="keywordflow">if</span> (*competitor < *worst)
|
||||
00243 {
|
||||
00244 worst = competitor;
|
||||
00245 }
|
||||
00246 }
|
||||
00247
|
||||
00248 <span class="keywordflow">return</span> worst;
|
||||
00249 }
|
||||
00250
|
||||
00251 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00252 <span class="keyword">const</span> <a class="code" href="struct_dummy.html">EOT</a>& inverse_deterministic_tournament(<span class="keyword">const</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">unsigned</span> _t_size, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00253 {
|
||||
00254 <span class="keywordflow">return</span> *inverse_deterministic_tournament<EOT>(_pop.begin(), _pop.end(), _t_size, _gen);
|
||||
00255 }
|
||||
00256
|
||||
00257 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00258 <a class="code" href="struct_dummy.html">EOT</a>& inverse_deterministic_tournament(<a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">unsigned</span> _t_size, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00259 {
|
||||
00260 <span class="keywordflow">return</span> *inverse_deterministic_tournament(_pop.begin(), _pop.end(), _t_size, _gen);
|
||||
00261 }
|
||||
00262
|
||||
00263 <span class="keyword">template</span> <<span class="keyword">class</span> It>
|
||||
00264 It stochastic_tournament(It _begin, It _end, <span class="keywordtype">double</span> _t_rate, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00265 {
|
||||
00266 It i1 = _begin + _gen.random(_end - _begin);
|
||||
00267 It i2 = _begin + _gen.random(_end - _begin);
|
||||
00268
|
||||
00269 <span class="keywordtype">bool</span> return_better = _gen.flip(_t_rate);
|
||||
00270
|
||||
00271 <span class="keywordflow">if</span> (*i1 < *i2)
|
||||
00272 {
|
||||
00273 <span class="keywordflow">if</span> (return_better) <span class="keywordflow">return</span> i2;
|
||||
00274 <span class="comment">// else</span>
|
||||
00275
|
||||
00276 <span class="keywordflow">return</span> i1;
|
||||
00277 }
|
||||
00278 <span class="keywordflow">else</span>
|
||||
00279 {
|
||||
00280 <span class="keywordflow">if</span> (return_better) <span class="keywordflow">return</span> i1;
|
||||
00281 <span class="comment">// else</span>
|
||||
00282 }
|
||||
00283 <span class="comment">// else</span>
|
||||
00284
|
||||
00285 <span class="keywordflow">return</span> i2;
|
||||
00286 }
|
||||
00287
|
||||
00288 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00289 <span class="keyword">const</span> <a class="code" href="struct_dummy.html">EOT</a>& stochastic_tournament(<span class="keyword">const</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">double</span> _t_rate, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00290 {
|
||||
00291 <span class="keywordflow">return</span> *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen);
|
||||
00292 }
|
||||
00293
|
||||
00294 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00295 <a class="code" href="struct_dummy.html">EOT</a>& stochastic_tournament(<a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">double</span> _t_rate, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00296 {
|
||||
00297 <span class="keywordflow">return</span> *stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen);
|
||||
00298 }
|
||||
00299
|
||||
00300 <span class="keyword">template</span> <<span class="keyword">class</span> It>
|
||||
00301 It inverse_stochastic_tournament(It _begin, It _end, <span class="keywordtype">double</span> _t_rate, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00302 {
|
||||
00303 It i1 = _begin + _gen.random(_end - _begin);
|
||||
00304 It i2 = _begin + _gen.random(_end - _begin);
|
||||
00305
|
||||
00306 <span class="keywordtype">bool</span> return_worse = _gen.flip(_t_rate);
|
||||
00307
|
||||
00308 <span class="keywordflow">if</span> (*i1 < *i2)
|
||||
00309 {
|
||||
00310 <span class="keywordflow">if</span> (return_worse) <span class="keywordflow">return</span> i1;
|
||||
00311 <span class="comment">// else</span>
|
||||
00312
|
||||
00313 <span class="keywordflow">return</span> i2;
|
||||
00314 }
|
||||
00315 <span class="keywordflow">else</span>
|
||||
00316 {
|
||||
00317 <span class="keywordflow">if</span> (return_worse) <span class="keywordflow">return</span> i2;
|
||||
00318 <span class="comment">// else</span>
|
||||
00319 }
|
||||
00320 <span class="comment">// else</span>
|
||||
00321
|
||||
00322 <span class="keywordflow">return</span> i1;
|
||||
00323 }
|
||||
00324
|
||||
00325 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00326 <span class="keyword">const</span> <a class="code" href="struct_dummy.html">EOT</a>& inverse_stochastic_tournament(<span class="keyword">const</span> <a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">double</span> _t_rate, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00327 {
|
||||
00328 <span class="keywordflow">return</span> *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen);
|
||||
00329 }
|
||||
00330
|
||||
00331 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
00332 <a class="code" href="struct_dummy.html">EOT</a>& inverse_stochastic_tournament(<a class="code" href="classeo_pop.html">eoPop<EOT></a>& _pop, <span class="keywordtype">double</span> _t_rate, <a class="code" href="classeo_rng.html">eoRng</a>& _gen = rng)
|
||||
00333 {
|
||||
00334 <span class="keywordflow">return</span> *inverse_stochastic_tournament(_pop.begin(), _pop.end(), _t_rate, _gen);
|
||||
00335 }
|
||||
00336
|
||||
00337
|
||||
00338 <span class="preprocessor">#endif</span>
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 19 05:06:42 2006 for EO by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue