Click here to Skip to main content
15,896,063 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.6K   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: Chromosome::GaChromosomeParamsBlock Class 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 class="current"><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="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespace_chromosome.html">Chromosome</a>::<a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html">GaChromosomeParamsBlock</a>
  </div>
</div>
<div class="contents">
<h1>Chromosome::GaChromosomeParamsBlock Class Reference</h1><!-- doxytag: class="Chromosome::GaChromosomeParamsBlock" -->This class represent base for chromosome's configuration block (CCB). CCB stores entire setup of chromosome. <code><a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html" title="This class represent base for chromosome&#39;s configuration block (CCB). CCB stores...">GaChromosomeParamsBlock</a></code> class stores only pointer to chromosomes' parameters.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;source/Chromosome.h&gt;</code>
<p>
Inherited by <a class="el" href="class_chromosome_1_1_ga_chromosome_operations_block.html">Chromosome::GaChromosomeOperationsBlock</a>.
<p>

<p>
<a href="class_chromosome_1_1_ga_chromosome_params_block-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html#66a177b0cb12d834120c9670c08796fc">GaChromosomeParamsBlock</a> (<a class="el" href="class_chromosome_1_1_ga_chromosome_params.html">GaChromosomeParams</a> *parameters)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes CCB with pointer to chromosomes' parameters.  <a href="#66a177b0cb12d834120c9670c08796fc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html#112ea3a7faca02c7882d6ff545bb09ef">GaChromosomeParamsBlock</a> (const <a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html">GaChromosomeParamsBlock</a> &amp;rhs)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is copy constructor. The constructor doesn't create copy of parameters' object, it only copies pointer to chromosomes' parameters.  <a href="#112ea3a7faca02c7882d6ff545bb09ef"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html#497ada1acfb3591d2230ba862786865c">GaChromosomeParamsBlock</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes empty CCB.  <a href="#497ada1acfb3591d2230ba862786865c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="class_chromosome_1_1_ga_chromosome_params.html">GaChromosomeParams</a> &amp;GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html#1c0b2e1407e9f620a94a73a41ba91502">GetParameters</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#1c0b2e1407e9f620a94a73a41ba91502"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html#8a63bfb91b39f4544f80f5374d8dc7a1">SetParameters</a> (<a class="el" href="class_chromosome_1_1_ga_chromosome_params.html">GaChromosomeParams</a> *params)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>SetParameters</code> method sets pointer to chromosomes' parameters.  <a href="#8a63bfb91b39f4544f80f5374d8dc7a1"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_chromosome_1_1_ga_chromosome_params.html">GaChromosomeParams</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html#3aca9502cb0a5ff3720ed15f0832b940">_parameters</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to chromosomes' parameters.  <a href="#3aca9502cb0a5ff3720ed15f0832b940"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Friends</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_chromosome_1_1_ga_chromosome_params_block.html#2054c73de1a8604ee6d2cea80be46ba3">GaDefaultChromosome</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class represent base for chromosome's configuration block (CCB). CCB stores entire setup of chromosome. <code><a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html" title="This class represent base for chromosome&#39;s configuration block (CCB). CCB stores...">GaChromosomeParamsBlock</a></code> class stores only pointer to chromosomes' parameters. 
<p>
This class has no built-in synchronizator, so <code>LOCK_OBJECT</code> and <code>LOCK_THIS_OBJECT</code> macros cannot be used with instances of this class. No public or private methods are thread-safe. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="66a177b0cb12d834120c9670c08796fc"></a><!-- doxytag: member="Chromosome::GaChromosomeParamsBlock::GaChromosomeParamsBlock" ref="66a177b0cb12d834120c9670c08796fc" args="(GaChromosomeParams *parameters)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Chromosome::GaChromosomeParamsBlock::GaChromosomeParamsBlock           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_chromosome_1_1_ga_chromosome_params.html">GaChromosomeParams</a> *&nbsp;</td>
          <td class="paramname"> <em>parameters</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This constructor initializes CCB with pointer to chromosomes' parameters. 
<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>parameters</em>&nbsp;</td><td>pointer to chromosomes' parameters.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="112ea3a7faca02c7882d6ff545bb09ef"></a><!-- doxytag: member="Chromosome::GaChromosomeParamsBlock::GaChromosomeParamsBlock" ref="112ea3a7faca02c7882d6ff545bb09ef" args="(const GaChromosomeParamsBlock &amp;rhs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Chromosome::GaChromosomeParamsBlock::GaChromosomeParamsBlock           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html">GaChromosomeParamsBlock</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rhs</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This is copy constructor. The constructor doesn't create copy of parameters' object, it only copies pointer to chromosomes' parameters. 
<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>rhs</em>&nbsp;</td><td>reference to CCB which is copied.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="497ada1acfb3591d2230ba862786865c"></a><!-- doxytag: member="Chromosome::GaChromosomeParamsBlock::GaChromosomeParamsBlock" ref="497ada1acfb3591d2230ba862786865c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Chromosome::GaChromosomeParamsBlock::GaChromosomeParamsBlock           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This constructor initializes empty CCB. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="1c0b2e1407e9f620a94a73a41ba91502"></a><!-- doxytag: member="Chromosome::GaChromosomeParamsBlock::GetParameters" ref="1c0b2e1407e9f620a94a73a41ba91502" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_chromosome_1_1_ga_chromosome_params.html">GaChromosomeParams</a>&amp; GACALL Chromosome::GaChromosomeParamsBlock::GetParameters           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method is not thread-safe. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Method returns reference to chromosomes� parameters.</dd></dl>

</div>
</div><p>
<a class="anchor" name="8a63bfb91b39f4544f80f5374d8dc7a1"></a><!-- doxytag: member="Chromosome::GaChromosomeParamsBlock::SetParameters" ref="8a63bfb91b39f4544f80f5374d8dc7a1" args="(GaChromosomeParams *params)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GACALL Chromosome::GaChromosomeParamsBlock::SetParameters           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_chromosome_1_1_ga_chromosome_params.html">GaChromosomeParams</a> *&nbsp;</td>
          <td class="paramname"> <em>params</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>SetParameters</code> method sets pointer to chromosomes' parameters. 
<p>
This method is not thread-safe. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>params</em>&nbsp;</td><td>pointer to new parameters.</td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="2054c73de1a8604ee6d2cea80be46ba3"></a><!-- doxytag: member="Chromosome::GaChromosomeParamsBlock::GaDefaultChromosome" ref="2054c73de1a8604ee6d2cea80be46ba3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="class_chromosome_1_1_ga_default_chromosome.html">GaDefaultChromosome</a><code> [friend]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="3aca9502cb0a5ff3720ed15f0832b940"></a><!-- doxytag: member="Chromosome::GaChromosomeParamsBlock::_parameters" ref="3aca9502cb0a5ff3720ed15f0832b940" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_chromosome_1_1_ga_chromosome_params.html">GaChromosomeParams</a>* <a class="el" href="class_chromosome_1_1_ga_chromosome_params_block.html#3aca9502cb0a5ff3720ed15f0832b940">Chromosome::GaChromosomeParamsBlock::_parameters</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pointer to chromosomes' parameters. 
<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>source/<a class="el" href="_chromosome_8h.html">Chromosome.h</a></ul>
</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