Click here to Skip to main content
15,895,084 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 439.5K   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: Algorithm 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>
<div class="contents">
<h1>Algorithm Namespace Reference</h1>Contains interfaces, classes and datatypes that are used by implementations of genetic algorithms.  
<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_algorithm_1_1_ga_algorithm_params.html">GaAlgorithmParams</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Interface for parameters of genetic algorithm.  <a href="class_algorithm_1_1_ga_algorithm_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_algorithm_1_1_ga_algorithm.html">GaAlgorithm</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Interface for genetic algorithms.  <a href="class_algorithm_1_1_ga_algorithm.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_algorithm_1_1_ga_base_algorithm.html">GaBaseAlgorithm</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This class implements control of algorithm's execution and its state. It also provides synchronization for multithreading control of algorithm.  <a href="class_algorithm_1_1_ga_base_algorithm.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_algorithm_1_1_ga_stop_criteria_params.html">GaStopCriteriaParams</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Interface for parameters of stop criteria operation.  <a href="class_algorithm_1_1_ga_stop_criteria_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_algorithm_1_1_ga_stop_criteria.html">GaStopCriteria</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This class is interface for stop criteria of genetic algorithm.  <a href="class_algorithm_1_1_ga_stop_criteria.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_algorithm_1_1_ga_multithreading_algorithm_params.html">GaMultithreadingAlgorithmParams</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This class should be used (directly or by inheritance) by genetic algorithms which use multiple threads for parallel execution of work.  <a href="class_algorithm_1_1_ga_multithreading_algorithm_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_algorithm_1_1_ga_multithreading_algorithm.html">GaMultithreadingAlgorithm</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This class implements features to allow parallel execution of some operations of genetic algorithm. It runs multiple threads which execute work which can be done in parallel, one control thread which controls workers and executes all operations which must be executed sequentially.  <a href="class_algorithm_1_1_ga_multithreading_algorithm.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_algorithm_1_1_simple_algorithms.html">SimpleAlgorithms</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Contains implementation of simple genetic algorithms. <br></td></tr>

<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_algorithm_1_1_stop_criterias.html">StopCriterias</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Contains implementation of stop criterias used by genetic algorithms. <br></td></tr>

<p>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <br>
<a class="el" href="class_common_1_1_ga_operation_parameters_pair.html">GaOperationParametersPair</a><br>
&lt; <a class="el" href="class_algorithm_1_1_ga_stop_criteria.html">GaStopCriteria</a>, <br>
<a class="el" href="class_algorithm_1_1_ga_stop_criteria_params.html">GaStopCriteriaParams</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_algorithm.html#37ef0f4461f0c3f6f47da326677d8100">GaStopCriteriaPair</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>GaStopCriteriaCatalogue</code> type is instance of GaCatalogue template class and represents catalogue of stop criterias. Detailed description can be found in specification of GaCatalogue template class.  <a href="#37ef0f4461f0c3f6f47da326677d8100"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="class_common_1_1_ga_catalogue.html">GaCatalogue</a><br>
&lt; <a class="el" href="class_algorithm_1_1_ga_stop_criteria.html">GaStopCriteria</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_algorithm.html#dc3cf1951b24aca0281381d43bb8f16f">GaStopCriteriaCatalogue</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>GaStopCriteriaPair</code> type is instance of GaOperationParametersPair template class and represents pair of stop criteria and its parameters. Detailed description can be found in specification of GaOperationParametersPair template class.  <a href="#dc3cf1951b24aca0281381d43bb8f16f"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_algorithm.html#5d4798297c77fd815852296e6efec5cf">GaAlgorithmThreadType</a> { <a class="el" href="namespace_algorithm.html#5d4798297c77fd815852296e6efec5cfb07f588d95b1ecd0e87a65a910937b70">GATT_CONTROL</a> =  0, 
<a class="el" href="namespace_algorithm.html#5d4798297c77fd815852296e6efec5cfddcc534093d3569c970a3f9b96488e63">GATT_WORK</a> =  1
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This enumeration is used to identify type of thread which is used for execution by the genetic algorithm.  <a href="namespace_algorithm.html#5d4798297c77fd815852296e6efec5cf">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfb">GaAlgorithmState</a> { <br>
&nbsp;&nbsp;<a class="el" href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfb9893b8665abfc9071a1ea187dc3bf5b8">GAS_UNINITIALIZED</a> =  0x1, 
<a class="el" href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfbfa9e8988e6c92a796007798b5c55ea98">GAS_USER_STOPED</a> =  0x2, 
<a class="el" href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfbc432a0b68adc8a55972ba0af8d4feb08">GAS_CRITERIA_STOPPED</a> =  0x4, 
<a class="el" href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfb61f09bfd36affdcd7fd07a72f1d60f76">GAS_PAUSED</a> =  0x8, 
<br>
&nbsp;&nbsp;<a class="el" href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfb4b858ce542be65b9428c7ea1fb3b15c5">GAS_RUNNING</a> =  0x10, 
<a class="el" href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfb3523dc6dd2e1856a8608f9f5b7478daa">GAS_NOT_RUNNING</a> =  0xF, 
<a class="el" href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfb85043569eacc8656fe6f2dd6bc7cd528">GAS_STOPPED</a> =  0x6
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This enumeration defines states of an algorithm.  <a href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfb">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Contains interfaces, classes and datatypes that are used by implementations of genetic algorithms. 
<p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="dc3cf1951b24aca0281381d43bb8f16f"></a><!-- doxytag: member="Algorithm::GaStopCriteriaCatalogue" ref="dc3cf1951b24aca0281381d43bb8f16f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="class_common_1_1_ga_catalogue.html">GaCatalogue</a>&lt;<a class="el" href="class_algorithm_1_1_ga_stop_criteria.html">GaStopCriteria</a>&gt; <a class="el" href="class_common_1_1_ga_catalogue.html">Algorithm::GaStopCriteriaCatalogue</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>GaStopCriteriaPair</code> type is instance of GaOperationParametersPair template class and represents pair of stop criteria and its parameters. Detailed description can be found in specification of GaOperationParametersPair template class. 
<p>

</div>
</div><p>
<a class="anchor" name="37ef0f4461f0c3f6f47da326677d8100"></a><!-- doxytag: member="Algorithm::GaStopCriteriaPair" ref="37ef0f4461f0c3f6f47da326677d8100" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="class_common_1_1_ga_operation_parameters_pair.html">GaOperationParametersPair</a>&lt;<a class="el" href="class_algorithm_1_1_ga_stop_criteria.html">GaStopCriteria</a>, <a class="el" href="class_algorithm_1_1_ga_stop_criteria_params.html">GaStopCriteriaParams</a>&gt; <a class="el" href="class_common_1_1_ga_operation_parameters_pair.html">Algorithm::GaStopCriteriaPair</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>GaStopCriteriaCatalogue</code> type is instance of GaCatalogue template class and represents catalogue of stop criterias. Detailed description can be found in specification of GaCatalogue template class. 
<p>

</div>
</div><p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="a58c687815e8ac4491235b5a9a40dcfb"></a><!-- doxytag: member="Algorithm::GaAlgorithmState" ref="a58c687815e8ac4491235b5a9a40dcfb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="namespace_algorithm.html#a58c687815e8ac4491235b5a9a40dcfb">Algorithm::GaAlgorithmState</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This enumeration defines states of an algorithm. 
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="a58c687815e8ac4491235b5a9a40dcfb9893b8665abfc9071a1ea187dc3bf5b8"></a><!-- doxytag: member="GAS_UNINITIALIZED" ref="a58c687815e8ac4491235b5a9a40dcfb9893b8665abfc9071a1ea187dc3bf5b8" args="" -->GAS_UNINITIALIZED</em>&nbsp;</td><td>
algorithm its populations and other control and data structures is not initialized. 
<p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="a58c687815e8ac4491235b5a9a40dcfbfa9e8988e6c92a796007798b5c55ea98"></a><!-- doxytag: member="GAS_USER_STOPED" ref="a58c687815e8ac4491235b5a9a40dcfbfa9e8988e6c92a796007798b5c55ea98" args="" -->GAS_USER_STOPED</em>&nbsp;</td><td>
algorithm execution is stopped by the user. 
<p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="a58c687815e8ac4491235b5a9a40dcfbc432a0b68adc8a55972ba0af8d4feb08"></a><!-- doxytag: member="GAS_CRITERIA_STOPPED" ref="a58c687815e8ac4491235b5a9a40dcfbc432a0b68adc8a55972ba0af8d4feb08" args="" -->GAS_CRITERIA_STOPPED</em>&nbsp;</td><td>
algorithm reached given criteria and it is stopped. 
<p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="a58c687815e8ac4491235b5a9a40dcfb61f09bfd36affdcd7fd07a72f1d60f76"></a><!-- doxytag: member="GAS_PAUSED" ref="a58c687815e8ac4491235b5a9a40dcfb61f09bfd36affdcd7fd07a72f1d60f76" args="" -->GAS_PAUSED</em>&nbsp;</td><td>
temporary paused, but it can resume execution at any time. 
<p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="a58c687815e8ac4491235b5a9a40dcfb4b858ce542be65b9428c7ea1fb3b15c5"></a><!-- doxytag: member="GAS_RUNNING" ref="a58c687815e8ac4491235b5a9a40dcfb4b858ce542be65b9428c7ea1fb3b15c5" args="" -->GAS_RUNNING</em>&nbsp;</td><td>
algorithm is running. 
<p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="a58c687815e8ac4491235b5a9a40dcfb3523dc6dd2e1856a8608f9f5b7478daa"></a><!-- doxytag: member="GAS_NOT_RUNNING" ref="a58c687815e8ac4491235b5a9a40dcfb3523dc6dd2e1856a8608f9f5b7478daa" args="" -->GAS_NOT_RUNNING</em>&nbsp;</td><td>
used for testing of state of an algorithm and includes all states except running state. 
<p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="a58c687815e8ac4491235b5a9a40dcfb85043569eacc8656fe6f2dd6bc7cd528"></a><!-- doxytag: member="GAS_STOPPED" ref="a58c687815e8ac4491235b5a9a40dcfb85043569eacc8656fe6f2dd6bc7cd528" args="" -->GAS_STOPPED</em>&nbsp;</td><td>
used to test an algorithm, for one of two possible stopped states. 
<p>
</td></tr>
</table>
</dl>

</div>
</div><p>
<a class="anchor" name="5d4798297c77fd815852296e6efec5cf"></a><!-- doxytag: member="Algorithm::GaAlgorithmThreadType" ref="5d4798297c77fd815852296e6efec5cf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="namespace_algorithm.html#5d4798297c77fd815852296e6efec5cf">Algorithm::GaAlgorithmThreadType</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This enumeration is used to identify type of thread which is used for execution by the genetic algorithm. 
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="5d4798297c77fd815852296e6efec5cfb07f588d95b1ecd0e87a65a910937b70"></a><!-- doxytag: member="GATT_CONTROL" ref="5d4798297c77fd815852296e6efec5cfb07f588d95b1ecd0e87a65a910937b70" args="" -->GATT_CONTROL</em>&nbsp;</td><td>
represents control thread. 
<p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="5d4798297c77fd815852296e6efec5cfddcc534093d3569c970a3f9b96488e63"></a><!-- doxytag: member="GATT_WORK" ref="5d4798297c77fd815852296e6efec5cfddcc534093d3569c970a3f9b96488e63" args="" -->GATT_WORK</em>&nbsp;</td><td>
represents worker thread. 
<p>
</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