Click here to Skip to main content
15,896,557 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.7K   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: source/Initialization.cpp File 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><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>source/Initialization.cpp File Reference</h1>This file contains declaration of functions for initialization and finalization of the library. <a href="#_details">More...</a>
<p>
<code>#include &quot;<a class="el" href="_initialization_8h.html">Initialization.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_random_8h.html">Random.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_crossover_operations_8h.html">CrossoverOperations.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_mutation_operations_8h.html">MutationOperations.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_fitness_comparators_8h.html">FitnessComparators.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_population_8h.html">Population.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_selection_operations_8h.html">SelectionOperations.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_coupling_operations_8h.html">CouplingOperations.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_replacement_operations_8h.html">ReplacementOperations.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_scaling_operations_8h.html">ScalingOperations.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="_stop_criterias_8h.html">StopCriterias.h</a>&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_initialization_8cpp.html#94b293dc942dac87a1cd63734c23a426">GaInitialize</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function initializes GAL. Main purpose is to initialize global random generators and operation catalogues.  <a href="#94b293dc942dac87a1cd63734c23a426"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_initialization_8cpp.html#7813dc1e6fd2b6783039fc4cdddcaca7">GaFinalize</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>GaFinalize</code> should be call before exiting application, and after work with GAL is done. It releases all acquired memory and resources needed for library.  <a href="#7813dc1e6fd2b6783039fc4cdddcaca7"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">GAL_API <a class="el" href="class_common_1_1_ga_random_integer.html">Common::GaRandomInteger</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_initialization_8cpp.html#7d7d07e379f7f69bd75a5a6968fcd829">GaGlobalRandomIntegerGenerator</a> = 0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Global object used by GAL to generate random integer numbers. It cannot be used prior calling <a class="el" href="_initialization_8h.html#9a9792ae939fce273a9f06b681ccf8f6" title="This function initializes GAL. Main purpose is to initialize global random generators...">GaInitialize</a> and after calling <a class="el" href="_initialization_8h.html#015f356c6a52185833c536d8155099ae" title="GaFinalize should be call before exiting application, and after work with GAL is...">GaFinalize</a>. For more details see GaRandomInteger class.  <a href="#7d7d07e379f7f69bd75a5a6968fcd829"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">GAL_API <a class="el" href="class_common_1_1_ga_random_float.html">Common::GaRandomFloat</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_initialization_8cpp.html#72cf0cf03c5936e223be703f5c06ad07">GaGlobalRandomFloatGenerator</a> = 0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Global object used by GAL to generate random single precision floating point numbers. It cannot be used prior calling <a class="el" href="_initialization_8h.html#9a9792ae939fce273a9f06b681ccf8f6" title="This function initializes GAL. Main purpose is to initialize global random generators...">GaInitialize</a> and after calling <a class="el" href="_initialization_8h.html#015f356c6a52185833c536d8155099ae" title="GaFinalize should be call before exiting application, and after work with GAL is...">GaFinalize</a>. For more details see GaRandomInteger class.  <a href="#72cf0cf03c5936e223be703f5c06ad07"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">GAL_API <a class="el" href="class_common_1_1_ga_random_double.html">Common::GaRandomDouble</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_initialization_8cpp.html#f9593910b4aa2f12f24dccce964a0ba8">GaGlobalRandomDoubleGenerator</a> = 0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Global object used by GAL to generate random double precision floating point numbers. It cannot be used prior calling <a class="el" href="_initialization_8h.html#9a9792ae939fce273a9f06b681ccf8f6" title="This function initializes GAL. Main purpose is to initialize global random generators...">GaInitialize</a> and after calling <a class="el" href="_initialization_8h.html#015f356c6a52185833c536d8155099ae" title="GaFinalize should be call before exiting application, and after work with GAL is...">GaFinalize</a>. For more details see GaRandomInteger class.  <a href="#f9593910b4aa2f12f24dccce964a0ba8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">GAL_API <a class="el" href="class_common_1_1_ga_random_bool.html">Common::GaRandomBool</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_initialization_8cpp.html#37a11b446675a098e181fd0cf216bca1">GaGlobalRandomBoolGenerator</a> = 0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Global object used by GAL to generate random Boolean values. It cannot be used prior calling <a class="el" href="_initialization_8h.html#9a9792ae939fce273a9f06b681ccf8f6" title="This function initializes GAL. Main purpose is to initialize global random generators...">GaInitialize</a> and after calling <a class="el" href="_initialization_8h.html#015f356c6a52185833c536d8155099ae" title="GaFinalize should be call before exiting application, and after work with GAL is...">GaFinalize</a>. For more details see GaRandomInteger class.  <a href="#37a11b446675a098e181fd0cf216bca1"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This file contains declaration of functions for initialization and finalization of the library. 
<p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="7813dc1e6fd2b6783039fc4cdddcaca7"></a><!-- doxytag: member="Initialization.cpp::GaFinalize" ref="7813dc1e6fd2b6783039fc4cdddcaca7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GaFinalize           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>GaFinalize</code> should be call before exiting application, and after work with GAL is done. It releases all acquired memory and resources needed for library. 
<p>
Objects which were instantiated by the user, except those objects which was added to global operation catalogues, must be destroyed prior calling <code>GaFinalize</code>. Note that any object of operation which was added to global catalogues will be deleted after <code>GaFinalize</code> call. 
</div>
</div><p>
<a class="anchor" name="94b293dc942dac87a1cd63734c23a426"></a><!-- doxytag: member="Initialization.cpp::GaInitialize" ref="94b293dc942dac87a1cd63734c23a426" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GaInitialize           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function initializes GAL. Main purpose is to initialize global random generators and operation catalogues. 
<p>
No library feature should be called before calling <code>GaInitialize</code>. 
</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="37a11b446675a098e181fd0cf216bca1"></a><!-- doxytag: member="Initialization.cpp::GaGlobalRandomBoolGenerator" ref="37a11b446675a098e181fd0cf216bca1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GAL_API <a class="el" href="class_common_1_1_ga_random_bool.html">Common::GaRandomBool</a>* <a class="el" href="_initialization_8cpp.html#37a11b446675a098e181fd0cf216bca1">GaGlobalRandomBoolGenerator</a> = 0          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Global object used by GAL to generate random Boolean values. It cannot be used prior calling <a class="el" href="_initialization_8h.html#9a9792ae939fce273a9f06b681ccf8f6" title="This function initializes GAL. Main purpose is to initialize global random generators...">GaInitialize</a> and after calling <a class="el" href="_initialization_8h.html#015f356c6a52185833c536d8155099ae" title="GaFinalize should be call before exiting application, and after work with GAL is...">GaFinalize</a>. For more details see GaRandomInteger class. 
<p>

</div>
</div><p>
<a class="anchor" name="f9593910b4aa2f12f24dccce964a0ba8"></a><!-- doxytag: member="Initialization.cpp::GaGlobalRandomDoubleGenerator" ref="f9593910b4aa2f12f24dccce964a0ba8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GAL_API <a class="el" href="class_common_1_1_ga_random_double.html">Common::GaRandomDouble</a>* <a class="el" href="_initialization_8cpp.html#f9593910b4aa2f12f24dccce964a0ba8">GaGlobalRandomDoubleGenerator</a> = 0          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Global object used by GAL to generate random double precision floating point numbers. It cannot be used prior calling <a class="el" href="_initialization_8h.html#9a9792ae939fce273a9f06b681ccf8f6" title="This function initializes GAL. Main purpose is to initialize global random generators...">GaInitialize</a> and after calling <a class="el" href="_initialization_8h.html#015f356c6a52185833c536d8155099ae" title="GaFinalize should be call before exiting application, and after work with GAL is...">GaFinalize</a>. For more details see GaRandomInteger class. 
<p>

</div>
</div><p>
<a class="anchor" name="72cf0cf03c5936e223be703f5c06ad07"></a><!-- doxytag: member="Initialization.cpp::GaGlobalRandomFloatGenerator" ref="72cf0cf03c5936e223be703f5c06ad07" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GAL_API <a class="el" href="class_common_1_1_ga_random_float.html">Common::GaRandomFloat</a>* <a class="el" href="_initialization_8cpp.html#72cf0cf03c5936e223be703f5c06ad07">GaGlobalRandomFloatGenerator</a> = 0          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Global object used by GAL to generate random single precision floating point numbers. It cannot be used prior calling <a class="el" href="_initialization_8h.html#9a9792ae939fce273a9f06b681ccf8f6" title="This function initializes GAL. Main purpose is to initialize global random generators...">GaInitialize</a> and after calling <a class="el" href="_initialization_8h.html#015f356c6a52185833c536d8155099ae" title="GaFinalize should be call before exiting application, and after work with GAL is...">GaFinalize</a>. For more details see GaRandomInteger class. 
<p>

</div>
</div><p>
<a class="anchor" name="7d7d07e379f7f69bd75a5a6968fcd829"></a><!-- doxytag: member="Initialization.cpp::GaGlobalRandomIntegerGenerator" ref="7d7d07e379f7f69bd75a5a6968fcd829" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GAL_API <a class="el" href="class_common_1_1_ga_random_integer.html">Common::GaRandomInteger</a>* <a class="el" href="_initialization_8cpp.html#7d7d07e379f7f69bd75a5a6968fcd829">GaGlobalRandomIntegerGenerator</a> = 0          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Global object used by GAL to generate random integer numbers. It cannot be used prior calling <a class="el" href="_initialization_8h.html#9a9792ae939fce273a9f06b681ccf8f6" title="This function initializes GAL. Main purpose is to initialize global random generators...">GaInitialize</a> and after calling <a class="el" href="_initialization_8h.html#015f356c6a52185833c536d8155099ae" title="GaFinalize should be call before exiting application, and after work with GAL is...">GaFinalize</a>. For more details see GaRandomInteger class. 
<p>

</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