Click here to Skip to main content
15,886,799 members
Articles / Desktop Programming / MFC

Genetic Algorithm Library

Rate me:
Please Sign up or sign in to vote.
4.93/5 (175 votes)
7 Apr 2012GPL358 min read 437.9K   34.7K   555  
A framework for genetic algorithms
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Genetic Algorithm Library: Population::ReplacementOperations Namespace 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.5 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="namespaces.html"><span>Namespace List</span></a></li>
      <li><a href="namespacemembers.html"><span>Namespace&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespace_population.html">Population</a>::<a class="el" href="namespace_population_1_1_replacement_operations.html">ReplacementOperations</a>
  </div>
</div>
<div class="contents">
<h1>Population::ReplacementOperations Namespace Reference</h1>Contains implementation of some basic replacement operations.  
<a href="#_details">More...</a>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_worst.html">GaReplaceWorst</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code><a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_worst.html" title="GaReplaceWorst replaces chromosomes with worst fitness values in population. If population...">GaReplaceWorst</a></code> replaces chromosomes with worst fitness values in population. If population is sorted this operation can replace any number of chromosomes, if it is not sorted this operation can only replace chromosomes which are stored in the worst chromosome sorted group of population. This replacement operation use <a class="el" href="class_population_1_1_ga_replacement_params.html" title="This class is base for parameters of replacement operation.">GaReplacementParams</a> class for parameters.  <a href="class_population_1_1_replacement_operations_1_1_ga_replace_worst.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_elitism_params.html">GaReplaceElitismParams</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This class should be used (directly or by inheritance) by replacement operations which can unintentionally remove the best chromosomes from population.  <a href="class_population_1_1_replacement_operations_1_1_ga_replace_elitism_params.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_random.html">GaReplaceRandom</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code><a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_random.html" title="GaReplaceRandom randomly chooses chromosomes which are going to be replaced. This...">GaReplaceRandom</a></code> randomly chooses chromosomes which are going to be replaced. This operation saves best chromosomes from replacement if specified in parameters. This replacement operation use <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_elitism_params.html" title="This class should be used (directly or by inheritance) by replacement operations...">GaReplaceElitismParams</a> class for parameters.  <a href="class_population_1_1_replacement_operations_1_1_ga_replace_random.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_parents.html">GaReplaceParents</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code><a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_parents.html" title="GaReplaceParents replaces chromosomes which are marked as parents by coupling operation...">GaReplaceParents</a></code> replaces chromosomes which are marked as parents by coupling operation to offspring chromosomes. This operation saves the best chromosomes from replacement if specified in parameters. This replacement operation use <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_elitism_params.html" title="This class should be used (directly or by inheritance) by replacement operations...">GaReplaceElitismParams</a> class for parameters.  <a href="class_population_1_1_replacement_operations_1_1_ga_replace_parents.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_best.html">GaReplaceBest</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code><a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_best.html" title="GaReplaceBest replaces chromosomes with best fitness values in population. If population...">GaReplaceBest</a></code> replaces chromosomes with best fitness values in population. If population is sorted this operation can replace any number of chromosomes, if it is not sorted this operation can only replace chromosomes which are stored in the best chromosome sorted group of population. This replacement operation use <a class="el" href="class_population_1_1_ga_replacement_params.html" title="This class is base for parameters of replacement operation.">GaReplacementParams</a> class for parameters.  <a href="class_population_1_1_replacement_operations_1_1_ga_replace_best.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_population_1_1_replacement_operations.html#4545005dc7a0c48bcf16e48b61d02b75">RemoveDuplicates</a> (const <a class="el" href="class_population_1_1_ga_coupling_result_set.html">GaCouplingResultSet</a> &amp;input)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>RemoveDuplicates</code> method removes duplicates of chromosomes in input from coupling operation if it is required.  <a href="#4545005dc7a0c48bcf16e48b61d02b75"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Contains implementation of some basic replacement operations. 
<p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="4545005dc7a0c48bcf16e48b61d02b75"></a><!-- doxytag: member="Population::ReplacementOperations::RemoveDuplicates" ref="4545005dc7a0c48bcf16e48b61d02b75" args="(const GaCouplingResultSet &amp;input)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GACALL Population::ReplacementOperations::RemoveDuplicates           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_population_1_1_ga_coupling_result_set.html">GaCouplingResultSet</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>input</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>RemoveDuplicates</code> method removes duplicates of chromosomes in input from coupling operation if it is required. 
<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>input</em>&nbsp;</td><td>intput buffer that should be cleared.</td></tr>
  </table>
</dl>

</div>
</div><p>
</div>
<br/><a href="http://www.coolsoft-sd.com/ProductVersion.aspx?vid=9">Genetic Algorithm Library</a><br/><a href="http://www.coolsoft-sd.com/">Coolsoft Software Development</a>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer
Serbia Serbia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions