/usr/share/doc/python-pyevolve-doc/html/module_g1dlist.html is in python-pyevolve-doc 0.6~rc1+svn398+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>G1DList – the 1D list chromosome — Pyevolve v0.6 final documentation</title>
<link rel="stylesheet" href="_static/default_patch.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.6 final',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: false
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="Pyevolve v0.6 final documentation" href="index.html" />
<link rel="up" title="pyevolve – the main pyevolve namespace" href="module_pyevolve.html" />
<link rel="next" title="G2DList – the 2D list chromosome" href="module_g2dlist.html" />
<link rel="prev" title="G2DBinaryString – the classical binary string chromosome" href="module_g2dbinarystring.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="module_g2dlist.html" title="G2DList – the 2D list chromosome"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="module_g2dbinarystring.html" title="G2DBinaryString – the classical binary string chromosome"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Pyevolve v0.6 final documentation</a> »</li>
<li><a href="modules.html" >Modules</a> »</li>
<li><a href="module_pyevolve.html" accesskey="U"><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">pyevolve</span></tt> – the main pyevolve namespace</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<span class="target" id="module-G1DList"></span><div class="section" id="g1dlist-the-1d-list-chromosome">
<h1><a class="reference internal" href="#module-G1DList" title="G1DList"><tt class="xref py py-mod docutils literal"><span class="pre">G1DList</span></tt></a> – the 1D list chromosome<a class="headerlink" href="#g1dlist-the-1d-list-chromosome" title="Permalink to this headline">¶</a></h1>
<p>This is the 1D List representation, this list can carry real
numbers or integers or any kind of object, by default, we have
genetic operators for integer and real lists, which can be found
on the respective modules.</p>
<div class="section" id="default-parameters">
<h2>Default Parameters<a class="headerlink" href="#default-parameters" title="Permalink to this headline">¶</a></h2>
<p><em>Initializator</em></p>
<blockquote>
<div><p><a class="reference internal" href="module_initializators.html#Initializators.G1DListInitializatorInteger" title="Initializators.G1DListInitializatorInteger"><tt class="xref py py-func docutils literal"><span class="pre">Initializators.G1DListInitializatorInteger()</span></tt></a></p>
<p>The Integer Initializator for G1DList</p>
</div></blockquote>
<p><em>Mutator</em></p>
<blockquote>
<div><p><a class="reference internal" href="module_mutators.html#Mutators.G1DListMutatorSwap" title="Mutators.G1DListMutatorSwap"><tt class="xref py py-func docutils literal"><span class="pre">Mutators.G1DListMutatorSwap()</span></tt></a></p>
<p>The Swap Mutator for G1DList</p>
</div></blockquote>
<p><em>Crossover</em></p>
<blockquote>
<div><p><a class="reference internal" href="module_crossovers.html#Crossovers.G1DListCrossoverSinglePoint" title="Crossovers.G1DListCrossoverSinglePoint"><tt class="xref py py-func docutils literal"><span class="pre">Crossovers.G1DListCrossoverSinglePoint()</span></tt></a></p>
<p>The Single Point Crossover for G1DList</p>
</div></blockquote>
</div>
<div class="section" id="class">
<h2>Class<a class="headerlink" href="#class" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="G1DList.G1DList">
<em class="property">class </em><tt class="descclassname">G1DList.</tt><tt class="descname">G1DList</tt><big>(</big><em>size=10</em>, <em>cloning=False</em><big>)</big><a class="headerlink" href="#G1DList.G1DList" title="Permalink to this definition">¶</a></dt>
<dd><p>G1DList Class - The 1D List chromosome representation</p>
<p>Inheritance diagram for <a class="reference internal" href="#G1DList.G1DList" title="G1DList.G1DList"><tt class="xref py py-class docutils literal"><span class="pre">G1DList.G1DList</span></tt></a>:</p>
<p class="graphviz">
<img src="_images/inheritance-1d06080f42073bc6f9632515d207723781fb4793.png" alt="Inheritance diagram of G1DList.G1DList" usemap="#inheritance5861dbbb5d" class="inheritance"/>
<map id="inheritance5861dbbb5d" name="inheritance5861dbbb5d">
<area shape="rect" id="node1" href="module_genomebase.html#GenomeBase.G1DBase" title="GenomeBase.G1DBase" alt="" coords="19,5,192,43"/>
<area shape="rect" id="node2" href="#G1DList.G1DList" title="G1DList.G1DList" alt="" coords="255,35,380,74"/>
<area shape="rect" id="node3" href="module_genomebase.html#GenomeBase.GenomeBase" title="GenomeBase.GenomeBase" alt="" coords="5,66,205,105"/>
</map>
</p>
<p>This chromosome class extends the <a class="reference internal" href="module_genomebase.html#GenomeBase.GenomeBase" title="GenomeBase.GenomeBase"><tt class="xref py py-class docutils literal"><span class="pre">GenomeBase.GenomeBase</span></tt></a>
and <a class="reference internal" href="module_genomebase.html#GenomeBase.G1DBase" title="GenomeBase.G1DBase"><tt class="xref py py-class docutils literal"><span class="pre">GenomeBase.G1DBase</span></tt></a> classes.</p>
<p><strong>Examples</strong></p>
<blockquote>
<div><dl class="docutils">
<dt>The instantiation</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">g</span> <span class="o">=</span> <span class="n">G1DList</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt>Compare</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">genome2</span> <span class="o">=</span> <span class="n">genome1</span><span class="o">.</span><span class="n">clone</span><span class="p">()</span>
<span class="gp">>>> </span><span class="n">genome2</span> <span class="o">==</span> <span class="n">genome1</span>
<span class="go">True</span>
</pre></div>
</div>
</dd>
<dt>Multiply</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">genome</span> <span class="o">=</span> <span class="n">population</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="gp">>>> </span><span class="n">genome</span>
<span class="go">(...)</span>
<span class="go">[1, 2, 3, 4]</span>
<span class="gp">>>> </span><span class="n">genome_result</span> <span class="o">=</span> <span class="n">genome</span> <span class="o">*</span> <span class="mi">2</span>
<span class="gp">>>> </span><span class="n">genome_result</span>
<span class="go">(...)</span>
<span class="go">[2, 2, 6, 8]</span>
</pre></div>
</div>
</dd>
<dt>Add</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">genome</span>
<span class="go">(...)</span>
<span class="go">[1, 2, 3, 4]</span>
<span class="gp">>>> </span><span class="n">genome_result</span> <span class="o">=</span> <span class="n">genome</span> <span class="o">+</span> <span class="mi">2</span>
<span class="go">(...)</span>
<span class="go">[3, 4, 5, 6]</span>
</pre></div>
</div>
</dd>
<dt>Iteration</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">genome</span><span class="p">:</span>
<span class="gp">>>> </span> <span class="k">print</span> <span class="n">i</span>
<span class="go">1</span>
<span class="go">2</span>
<span class="go">3</span>
<span class="go">4</span>
</pre></div>
</div>
</dd>
<dt>Size, slice, get/set, append</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="nb">len</span><span class="p">(</span><span class="n">genome</span><span class="p">)</span>
<span class="go">4</span>
<span class="gp">>>> </span><span class="n">genome</span>
<span class="go">(...)</span>
<span class="go">[1, 2, 3, 4]</span>
<span class="gp">>>> </span><span class="n">genome</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">1</span><span class="p">]</span>
<span class="go">[1, 2]</span>
<span class="gp">>>> </span><span class="n">genome</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="mi">666</span>
<span class="gp">>>> </span><span class="n">genome</span>
<span class="go">(...)</span>
<span class="go">[1, 666, 3, 4]</span>
<span class="gp">>>> </span><span class="n">genome</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="mi">99</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">genome</span>
<span class="go">(...)</span>
<span class="go">[1, 666, 3, 4, 99]</span>
</pre></div>
</div>
</dd>
</dl>
</div></blockquote>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>size</strong> – the 1D list size</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="G1DList.G1DList.append">
<tt class="descname">append</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#G1DList.G1DList.append" title="Permalink to this definition">¶</a></dt>
<dd><p>Appends an item to the end of the list</p>
<dl class="docutils">
<dt>Example:</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">genome</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="mi">44</span><span class="p">)</span>
</pre></div>
</div>
</dd>
</dl>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> – value to be added</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.clearList">
<tt class="descname">clearList</tt><big>(</big><big>)</big><a class="headerlink" href="#G1DList.G1DList.clearList" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove all genes from Genome</p>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.clone">
<tt class="descname">clone</tt><big>(</big><big>)</big><a class="headerlink" href="#G1DList.G1DList.clone" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new instace copy of the genome</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">the G1DList clone instance</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.copy">
<tt class="descname">copy</tt><big>(</big><em>g</em><big>)</big><a class="headerlink" href="#G1DList.G1DList.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Copy genome to ‘g’</p>
<dl class="docutils">
<dt>Example:</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">genome_origin</span><span class="o">.</span><span class="n">copy</span><span class="p">(</span><span class="n">genome_destination</span><span class="p">)</span>
</pre></div>
</div>
</dd>
</dl>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>g</strong> – the destination G1DList instance</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="G1DList.G1DList.crossover">
<tt class="descname">crossover</tt><a class="headerlink" href="#G1DList.G1DList.crossover" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the reproduction function slot, the crossover. You
can change the default crossover method using:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">genome</span><span class="o">.</span><span class="n">crossover</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">Crossovers</span><span class="o">.</span><span class="n">G1DListCrossoverUniform</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.evaluate">
<tt class="descname">evaluate</tt><big>(</big><em>**args</em><big>)</big><a class="headerlink" href="#G1DList.G1DList.evaluate" title="Permalink to this definition">¶</a></dt>
<dd><p>Called to evaluate genome</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> – this parameters will be passes to the evaluator</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="G1DList.G1DList.evaluator">
<tt class="descname">evaluator</tt><a class="headerlink" href="#G1DList.G1DList.evaluator" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the <a class="reference internal" href="intro.html#term-evaluation-function"><em class="xref std std-term">evaluation function</em></a> slot, you can add
a function with the <em>set</em> method:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">genome</span><span class="o">.</span><span class="n">evaluator</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">eval_func</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.getFitnessScore">
<tt class="descname">getFitnessScore</tt><big>(</big><big>)</big><a class="headerlink" href="#G1DList.G1DList.getFitnessScore" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the Fitness Score of the genome</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">genome fitness score</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.getInternalList">
<tt class="descname">getInternalList</tt><big>(</big><big>)</big><a class="headerlink" href="#G1DList.G1DList.getInternalList" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the internal list of the genome</p>
<p>... note:: this method was created to solve performance issues
:rtype: the internal list</p>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.getListSize">
<tt class="descname">getListSize</tt><big>(</big><big>)</big><a class="headerlink" href="#G1DList.G1DList.getListSize" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the list supposed size</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">this is different from what the len(obj) returns</p>
</div>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.getParam">
<tt class="descname">getParam</tt><big>(</big><em>key</em>, <em>nvl=None</em><big>)</big><a class="headerlink" href="#G1DList.G1DList.getParam" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an internal parameter</p>
<dl class="docutils">
<dt>Example:</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">genome</span><span class="o">.</span><span class="n">getParam</span><span class="p">(</span><span class="s">"rangemax"</span><span class="p">)</span>
<span class="go">100</span>
</pre></div>
</div>
</dd>
</dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">All the individuals of the population shares this parameters and uses
the same instance of this dict.</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>key</strong> – the key of param</li>
<li><strong>nvl</strong> – if the key doesn’t exist, the nvl will be returned</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.getRawScore">
<tt class="descname">getRawScore</tt><big>(</big><big>)</big><a class="headerlink" href="#G1DList.G1DList.getRawScore" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the Raw Score of the genome</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">genome raw score</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="G1DList.G1DList.initializator">
<tt class="descname">initializator</tt><a class="headerlink" href="#G1DList.G1DList.initializator" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the initialization function of the genome, you
can change the default initializator using the function slot:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">genome</span><span class="o">.</span><span class="n">initializator</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">Initializators</span><span class="o">.</span><span class="n">G1DListInitializatorAllele</span><span class="p">)</span>
</pre></div>
</div>
<p>In this example, the initializator <a class="reference internal" href="module_initializators.html#Initializators.G1DListInitializatorAllele" title="Initializators.G1DListInitializatorAllele"><tt class="xref py py-func docutils literal"><span class="pre">Initializators.G1DListInitializatorAllele()</span></tt></a>
will be used to create the initial population.</p>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.initialize">
<tt class="descname">initialize</tt><big>(</big><em>**args</em><big>)</big><a class="headerlink" href="#G1DList.G1DList.initialize" title="Permalink to this definition">¶</a></dt>
<dd><p>Called to initialize genome</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> – this parameters will be passed to the initializator</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.mutate">
<tt class="descname">mutate</tt><big>(</big><em>**args</em><big>)</big><a class="headerlink" href="#G1DList.G1DList.mutate" title="Permalink to this definition">¶</a></dt>
<dd><p>Called to mutate the genome</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> – this parameters will be passed to the mutator</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">the number of mutations returned by mutation operator</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="G1DList.G1DList.mutator">
<tt class="descname">mutator</tt><a class="headerlink" href="#G1DList.G1DList.mutator" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the mutator function slot, you can change the default
mutator using the slot <em>set</em> function:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">genome</span><span class="o">.</span><span class="n">mutator</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">Mutators</span><span class="o">.</span><span class="n">G1DListMutatorSwap</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.remove">
<tt class="descname">remove</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#G1DList.G1DList.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an item from the list</p>
<dl class="docutils">
<dt>Example:</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">genome</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="mi">44</span><span class="p">)</span>
</pre></div>
</div>
</dd>
</dl>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> – value to be added</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.resetStats">
<tt class="descname">resetStats</tt><big>(</big><big>)</big><a class="headerlink" href="#G1DList.G1DList.resetStats" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear score and fitness of genome</p>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.resumeString">
<tt class="descname">resumeString</tt><big>(</big><big>)</big><a class="headerlink" href="#G1DList.G1DList.resumeString" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a resumed string representation of the Genome</p>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.setInternalList">
<tt class="descname">setInternalList</tt><big>(</big><em>lst</em><big>)</big><a class="headerlink" href="#G1DList.G1DList.setInternalList" title="Permalink to this definition">¶</a></dt>
<dd><p>Assigns a list to the internal list of the chromosome</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>lst</strong> – the list to assign the internal list of the chromosome</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="G1DList.G1DList.setParams">
<tt class="descname">setParams</tt><big>(</big><em>**args</em><big>)</big><a class="headerlink" href="#G1DList.G1DList.setParams" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the internal params</p>
<dl class="docutils">
<dt>Example:</dt>
<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">genome</span><span class="o">.</span><span class="n">setParams</span><span class="p">(</span><span class="n">rangemin</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">rangemax</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">gauss_mu</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">gauss_sigma</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
</pre></div>
</div>
</dd>
</dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">All the individuals of the population shares this parameters and uses
the same instance of this dict.</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> – this params will saved in every chromosome for genetic op. use</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">G1DList</span></tt> – the 1D list chromosome</a><ul>
<li><a class="reference internal" href="#default-parameters">Default Parameters</a></li>
<li><a class="reference internal" href="#class">Class</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="module_g2dbinarystring.html"
title="previous chapter"><tt class="docutils literal docutils literal"><span class="pre">G2DBinaryString</span></tt> – the classical binary string chromosome</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="module_g2dlist.html"
title="next chapter"><tt class="docutils literal"><span class="pre">G2DList</span></tt> – the 2D list chromosome</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="module_g2dlist.html" title="G2DList – the 2D list chromosome"
>next</a> |</li>
<li class="right" >
<a href="module_g2dbinarystring.html" title="G2DBinaryString – the classical binary string chromosome"
>previous</a> |</li>
<li><a href="index.html">Pyevolve v0.6 final documentation</a> »</li>
<li><a href="modules.html" >Modules</a> »</li>
<li><a href="module_pyevolve.html" ><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">pyevolve</span></tt> – the main pyevolve namespace</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2010, Christian S. Perone.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>
|