Click here to Skip to main content
15,896,154 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::Representation::GaMultiValueChromosome&lt; TYPE &gt; Class Template 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="namespace_chromosome_1_1_representation.html">Representation</a>::<a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">GaMultiValueChromosome</a>
  </div>
</div>
<div class="contents">
<h1>Chromosome::Representation::GaMultiValueChromosome&lt; TYPE &gt; Class Template Reference</h1><!-- doxytag: class="Chromosome::Representation::GaMultiValueChromosome" --><!-- doxytag: inherits="GaDomainChromosome&lt; TYPE &gt;,Chromosome::Representation::GaSwapableCode,Chromosome::Representation::GaSizableCode,Chromosome::Representation::GaMutableCode,Chromosome::Representation::GaMultiValueCode" -->This class can be used for chromosomes which code has multiple values. Values can be of any type, but all values must have same type, they must use same value set and must obey requirements introduced by the value set.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;source/MultiValueChromosome.h&gt;</code>
<p>
Inherits <a class="el" href="class_chromosome_1_1_representation_1_1_ga_domain_chromosome.html">Chromosome::Representation::GaDomainChromosome&lt; TYPE &gt;</a>, <a class="el" href="class_chromosome_1_1_representation_1_1_ga_swapable_code.html">Chromosome::Representation::GaSwapableCode</a>, <a class="el" href="class_chromosome_1_1_representation_1_1_ga_sizable_code.html">Chromosome::Representation::GaSizableCode</a>, <a class="el" href="class_chromosome_1_1_representation_1_1_ga_mutable_code.html">Chromosome::Representation::GaMutableCode</a>, and <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html">Chromosome::Representation::GaMultiValueCode</a>.
<p>
Inherited by <a class="el" href="class_chromosome_1_1_representation_1_1_ga_m_v_arithmetic_chromosome.html">Chromosome::Representation::GaMVArithmeticChromosome&lt; TYPE &gt;</a>.
<p>

<p>
<a href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome-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">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#2c203d045f43ec5671e13d790417ef12">Remove</a> (int start, int size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_sizable_code.html#7560c4c9abe76b1874552315fff94c57" title="This method removes values start position to start + size position.">GaSizableCode::Remove</a> method.  <a href="#2c203d045f43ec5671e13d790417ef12"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#0725ddac755511fa3440b33ee892ecd9">Insert</a> (int start, <a class="el" href="class_chromosome_1_1_representation_1_1_ga_code_value.html">GaCodeValue</a> *data, int size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_sizable_code.html#7d984c1fd6766ab74f99333e1aefba0e" title="This method inserts new values into chromosome&#39;s code.">GaSizableCode::Insert</a> method.  <a href="#0725ddac755511fa3440b33ee892ecd9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#7f169ea383101427221120e6c11131b0">Swap</a> (int start1, int size1, int start2, int size2)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">If swapping two parts overlap, position of second part is moved after the end of first part.  <a href="#7f169ea383101427221120e6c11131b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#67b59f554cd66c980591cf6ee1faf04f">Flip</a> (int start, int size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_mutable_code.html#40f02a83ade23f05533c98ac946e7e99" title="This method changes values of chromosome&#39;s code randomly from start position...">GaMutableCode::Flip</a> method.  <a href="#67b59f554cd66c980591cf6ee1faf04f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#397e0d8e426660f06c20d4c2b70a8041">Invert</a> (int start, int size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_mutable_code.html#fddd1f03bf92ebeda31df41bae361998" title="This method inverts values of chromosome&#39;s code from start position to start...">GaMutableCode::Invert</a> method.  <a href="#397e0d8e426660f06c20d4c2b70a8041"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_chromosome_1_1_representation_1_1_ga_code_values_buffer.html">GaCodeValuesBuffer</a> *GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#0a62ae817271cc2ae9430a6b5819c1f2">MakeBuffer</a> (int size) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html#8e554f190a1da395e44b06b90d8a6812" title="This method makes new buffer for storing values of chromosomes&#39; codes but doesn&#39;t...">GaMultiValueCode::MakeBuffer</a> method.  <a href="#0a62ae817271cc2ae9430a6b5819c1f2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#7a545869b9c25d041a3d80a61ae91e64">FillBuffer</a> (int pos, int size, <a class="el" href="class_chromosome_1_1_representation_1_1_ga_code_values_buffer.html">GaCodeValuesBuffer</a> &amp;buffer) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html#9187ee510ff40f35d2af01fa23ca955d" title="This method copies values of chromosome&#39;s code from pos to pos + size into buffer...">GaMultiValueCode::FillBuffer</a> method.  <a href="#7a545869b9c25d041a3d80a61ae91e64"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#29f02e08bbaa2f28b0b8b186d8d11d90">FromBuffer</a> (const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_code_values_buffer.html">GaCodeValuesBuffer</a> &amp;buffer)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html#d2ec1f984b96c30e3c93f80325c2c899" title="This method makes chromosome&#39;s code and stores it in chromosome form buffer of...">GaMultiValueCode::FromBuffer</a> method.  <a href="#29f02e08bbaa2f28b0b8b186d8d11d90"></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_representation_1_1_ga_multi_value_chromosome.html#69cb22e956d5e1735d1cd1d8310ccbf7">GaMultiValueChromosome</a> (TYPE *values, int size, <a class="el" href="class_chromosome_1_1_representation_1_1_ga_chromosome_domain_block.html">GaChromosomeDomainBlock</a>&lt; TYPE &gt; *configBlock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes chromosome with CCB and user-defined code.  <a href="#69cb22e956d5e1735d1cd1d8310ccbf7"></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_representation_1_1_ga_multi_value_chromosome.html#5ecba20db34550019c93ec721c744e5c">GaMultiValueChromosome</a> (int size, <a class="el" href="class_chromosome_1_1_representation_1_1_ga_chromosome_domain_block.html">GaChromosomeDomainBlock</a>&lt; TYPE &gt; *configBlock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes chromosome with CCB and random code with defined size.  <a href="#5ecba20db34550019c93ec721c744e5c"></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_representation_1_1_ga_multi_value_chromosome.html#a85062938ab2b647010fa774591bd11e">GaMultiValueChromosome</a> (<a class="el" href="class_chromosome_1_1_representation_1_1_ga_chromosome_domain_block.html">GaChromosomeDomainBlock</a>&lt; TYPE &gt; *configBlock)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes chromosome with CCB.  <a href="#a85062938ab2b647010fa774591bd11e"></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_representation_1_1_ga_multi_value_chromosome.html#40f3108bbe0e8a1be9b134c3b6a1af84">GaMultiValueChromosome</a> (const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">GaMultiValueChromosome</a>&lt; TYPE &gt; &amp;c, bool setupOnly)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is copy constructor.  <a href="#40f3108bbe0e8a1be9b134c3b6a1af84"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#86d5855dea7f93e204a26463e6fc4876">MakeCopy</a> (bool setupOnly) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_ga_chromosome.html#bbae73891fe34a13f0882b729ca08495" title="This method produces copy of chromosome. It can create exact copy or it can create...">GaChromosome::MakeCopy</a> method.  <a href="#86d5855dea7f93e204a26463e6fc4876"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#a96a33e02eca52f229b024304ec90ddf">MakeNewFromPrototype</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method uses <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#86d5855dea7f93e204a26463e6fc4876" title="More details are given in specification of GaChromosome::MakeCopy method.">MakeCopy</a> method to create chromosome's object, so if additional steps are not needed for creating chromosome from prototype, classes which inherits this class don't have to override this method.  <a href="#a96a33e02eca52f229b024304ec90ddf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#f42c93a0fe23fa54f928c9dcf25af0bb">GetCodeSize</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#f42c93a0fe23fa54f928c9dcf25af0bb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">TYPE GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#31efe518e2e26c273f1db57693c0752e">GetAt</a> (int pos) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>GetAt</code> method returns value of chromosome's at specified position.  <a href="#31efe518e2e26c273f1db57693c0752e"></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_representation_1_1_ga_multi_value_chromosome.html#c2e2506fdf39f30f47f9d333d094e003">SetAt</a> (TYPE value, int pos)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>SetAt</code> method sets value of chromosome's code at given position.  <a href="#c2e2506fdf39f30f47f9d333d094e003"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const vector&lt; TYPE &gt; &amp;GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#9ee6ff3bcfa603977c608ec7c02f038d">GetCode</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#9ee6ff3bcfa603977c608ec7c02f038d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_chromosome_1_1_ga_chromosome.html">GaChromosome</a> &amp;GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#5fe34f24e10b8d43c74bfe4e59a0886b">operator=</a> (const <a class="el" href="class_chromosome_1_1_ga_chromosome.html">GaChromosome</a> &amp;rhs)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_ga_chromosome.html#8870128357483be066e06f8ea36d0a8a" title="This operator copies setup and chromosome&#39;s code from rhs.">GaChromosome::operator =</a>.  <a href="#5fe34f24e10b8d43c74bfe4e59a0886b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#6b9041daa21138a3a23b0ca2cf0ef703">operator==</a> (const <a class="el" href="class_chromosome_1_1_ga_chromosome.html">GaChromosome</a> &amp;c) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of <a class="el" href="class_chromosome_1_1_ga_chromosome.html#4ae6d5bdcc745d7c730db3d3b687e751" title="This operator compares chromosomes&#39; codes.">GaChromosome::operator ==</a>.  <a href="#6b9041daa21138a3a23b0ca2cf0ef703"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#72fd119987c73fbaa88d8250d856bd0e">PreapareForMutation</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>PreapareForMutation</code> method copies values form chromosome's code to backup vector.  <a href="#72fd119987c73fbaa88d8250d856bd0e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#fb8f403fb181f6b87ba2ed9fd038d5f2">AcceptMutation</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method only clears backup vector.  <a href="#fb8f403fb181f6b87ba2ed9fd038d5f2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#c192551b6c23494d8b18c813ee4975c6">RejectMutation</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>RejectMutation</code> method restores chromosome's code from backup vector. It also clears backup vector.  <a href="#c192551b6c23494d8b18c813ee4975c6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">vector&lt; TYPE &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#9f84b5008329176caa3f9f882895a04a">_values</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Chromosome's code.  <a href="#9f84b5008329176caa3f9f882895a04a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">vector&lt; TYPE &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#6b206c744f9a2f311df45a6922bb5f29">_backup</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Backup copy chromosome's code before mutation if improving-only mutation flag is set in chromosome's parameters.  <a href="#6b206c744f9a2f311df45a6922bb5f29"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;typename TYPE&gt;<br>
 class Chromosome::Representation::GaMultiValueChromosome&lt; TYPE &gt;</h3>

This class can be used for chromosomes which code has multiple values. Values can be of any type, but all values must have same type, they must use same value set and must obey requirements introduced by the value set. 
<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. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>TYPE</em>&nbsp;</td><td>type of value in chromosome's code.</td></tr>
  </table>
</dl>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="69cb22e956d5e1735d1cd1d8310ccbf7"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::GaMultiValueChromosome" ref="69cb22e956d5e1735d1cd1d8310ccbf7" args="(TYPE *values, int size, GaChromosomeDomainBlock&lt; TYPE &gt; *configBlock)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::<a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">GaMultiValueChromosome</a>           </td>
          <td>(</td>
          <td class="paramtype">TYPE *&nbsp;</td>
          <td class="paramname"> <em>values</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_chromosome_domain_block.html">GaChromosomeDomainBlock</a>&lt; TYPE &gt; *&nbsp;</td>
          <td class="paramname"> <em>configBlock</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This constructor initializes chromosome with CCB and user-defined code. 
<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>values</em>&nbsp;</td><td>values of chromosome's code.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>size of chromosome's code.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>configBlock</em>&nbsp;</td><td>pointer to CCB.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="5ecba20db34550019c93ec721c744e5c"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::GaMultiValueChromosome" ref="5ecba20db34550019c93ec721c744e5c" args="(int size, GaChromosomeDomainBlock&lt; TYPE &gt; *configBlock)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::<a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">GaMultiValueChromosome</a>           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_chromosome_domain_block.html">GaChromosomeDomainBlock</a>&lt; TYPE &gt; *&nbsp;</td>
          <td class="paramname"> <em>configBlock</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This constructor initializes chromosome with CCB and random code with defined size. 
<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>size</em>&nbsp;</td><td>size of chromosome's code.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>configBlock</em>&nbsp;</td><td>pointer to CCB.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="a85062938ab2b647010fa774591bd11e"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::GaMultiValueChromosome" ref="a85062938ab2b647010fa774591bd11e" args="(GaChromosomeDomainBlock&lt; TYPE &gt; *configBlock)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::<a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">GaMultiValueChromosome</a>           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_chromosome_domain_block.html">GaChromosomeDomainBlock</a>&lt; TYPE &gt; *&nbsp;</td>
          <td class="paramname"> <em>configBlock</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

</div>
</div><p>
<a class="anchor" name="40f3108bbe0e8a1be9b134c3b6a1af84"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::GaMultiValueChromosome" ref="40f3108bbe0e8a1be9b134c3b6a1af84" args="(const GaMultiValueChromosome&lt; TYPE &gt; &amp;c, bool setupOnly)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::<a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">GaMultiValueChromosome</a>           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">GaMultiValueChromosome</a>&lt; TYPE &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>setupOnly</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This is copy constructor. 
<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>c</em>&nbsp;</td><td>reference to chromosome which is copied.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>setupOnly</em>&nbsp;</td><td>if this parameter is <code>true</code>, only pointer to CCB is copied. If this parameter is <code>false</code>, chromosome's data and CCB is copied.</td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="2c203d045f43ec5671e13d790417ef12"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::Remove" ref="2c203d045f43ec5671e13d790417ef12" args="(int start, int size)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::Remove           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_sizable_code.html#7560c4c9abe76b1874552315fff94c57" title="This method removes values start position to start + size position.">GaSizableCode::Remove</a> method. 
<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_representation_1_1_ga_sizable_code.html#7560c4c9abe76b1874552315fff94c57">Chromosome::Representation::GaSizableCode</a>.</p>

</div>
</div><p>
<a class="anchor" name="0725ddac755511fa3440b33ee892ecd9"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::Insert" ref="0725ddac755511fa3440b33ee892ecd9" args="(int start, GaCodeValue *data, int size)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::Insert           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_code_value.html">GaCodeValue</a> *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_sizable_code.html#7d984c1fd6766ab74f99333e1aefba0e" title="This method inserts new values into chromosome&#39;s code.">GaSizableCode::Insert</a> method. 
<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_representation_1_1_ga_sizable_code.html#7d984c1fd6766ab74f99333e1aefba0e">Chromosome::Representation::GaSizableCode</a>.</p>

</div>
</div><p>
<a class="anchor" name="7f169ea383101427221120e6c11131b0"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::Swap" ref="7f169ea383101427221120e6c11131b0" args="(int start1, int size1, int start2, int size2)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::Swap           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>start1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>start2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size2</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
If swapping two parts overlap, position of second part is moved after the end of first part. 
<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_swapable_code.html#13c33d3f4210faa8abd708dd138426e0" title="This method swaps positions of parts of chromosome&#39;s code.">GaSwapableCode::Swap</a> method.<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_representation_1_1_ga_swapable_code.html#13c33d3f4210faa8abd708dd138426e0">Chromosome::Representation::GaSwapableCode</a>.</p>

</div>
</div><p>
<a class="anchor" name="67b59f554cd66c980591cf6ee1faf04f"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::Flip" ref="67b59f554cd66c980591cf6ee1faf04f" args="(int start, int size)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::Flip           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_mutable_code.html#40f02a83ade23f05533c98ac946e7e99" title="This method changes values of chromosome&#39;s code randomly from start position...">GaMutableCode::Flip</a> method. 
<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_representation_1_1_ga_mutable_code.html#40f02a83ade23f05533c98ac946e7e99">Chromosome::Representation::GaMutableCode</a>.</p>

</div>
</div><p>
<a class="anchor" name="397e0d8e426660f06c20d4c2b70a8041"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::Invert" ref="397e0d8e426660f06c20d4c2b70a8041" args="(int start, int size)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::Invert           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_mutable_code.html#fddd1f03bf92ebeda31df41bae361998" title="This method inverts values of chromosome&#39;s code from start position to start...">GaMutableCode::Invert</a> method. 
<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_representation_1_1_ga_mutable_code.html#fddd1f03bf92ebeda31df41bae361998">Chromosome::Representation::GaMutableCode</a>.</p>

</div>
</div><p>
<a class="anchor" name="0a62ae817271cc2ae9430a6b5819c1f2"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::MakeBuffer" ref="0a62ae817271cc2ae9430a6b5819c1f2" args="(int size) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_chromosome_1_1_representation_1_1_ga_code_values_buffer.html">GaCodeValuesBuffer</a>* GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::MakeBuffer           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html#8e554f190a1da395e44b06b90d8a6812" title="This method makes new buffer for storing values of chromosomes&#39; codes but doesn&#39;t...">GaMultiValueCode::MakeBuffer</a> method. 
<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html#8e554f190a1da395e44b06b90d8a6812">Chromosome::Representation::GaMultiValueCode</a>.</p>

</div>
</div><p>
<a class="anchor" name="7a545869b9c25d041a3d80a61ae91e64"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::FillBuffer" ref="7a545869b9c25d041a3d80a61ae91e64" args="(int pos, int size, GaCodeValuesBuffer &amp;buffer) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::FillBuffer           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_chromosome_1_1_representation_1_1_ga_code_values_buffer.html">GaCodeValuesBuffer</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>buffer</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html#9187ee510ff40f35d2af01fa23ca955d" title="This method copies values of chromosome&#39;s code from pos to pos + size into buffer...">GaMultiValueCode::FillBuffer</a> method. 
<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html#9187ee510ff40f35d2af01fa23ca955d">Chromosome::Representation::GaMultiValueCode</a>.</p>

</div>
</div><p>
<a class="anchor" name="29f02e08bbaa2f28b0b8b186d8d11d90"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::FromBuffer" ref="29f02e08bbaa2f28b0b8b186d8d11d90" args="(const GaCodeValuesBuffer &amp;buffer)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::FromBuffer           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_code_values_buffer.html">GaCodeValuesBuffer</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>buffer</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html#d2ec1f984b96c30e3c93f80325c2c899" title="This method makes chromosome&#39;s code and stores it in chromosome form buffer of...">GaMultiValueCode::FromBuffer</a> method. 
<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_code.html#d2ec1f984b96c30e3c93f80325c2c899">Chromosome::Representation::GaMultiValueCode</a>.</p>

</div>
</div><p>
<a class="anchor" name="86d5855dea7f93e204a26463e6fc4876"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::MakeCopy" ref="86d5855dea7f93e204a26463e6fc4876" args="(bool setupOnly) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::MakeCopy           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>setupOnly</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_ga_chromosome.html#bbae73891fe34a13f0882b729ca08495" title="This method produces copy of chromosome. It can create exact copy or it can create...">GaChromosome::MakeCopy</a> method. 
<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_ga_chromosome.html#bbae73891fe34a13f0882b729ca08495">Chromosome::GaChromosome</a>.</p>

<p>Reimplemented in <a class="el" href="class_chromosome_1_1_representation_1_1_ga_m_v_arithmetic_chromosome.html#d0ac9fd3fbe97b905cf7e4a030c4f7f9">Chromosome::Representation::GaMVArithmeticChromosome&lt; TYPE &gt;</a>.</p>

</div>
</div><p>
<a class="anchor" name="a96a33e02eca52f229b024304ec90ddf"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::MakeNewFromPrototype" ref="a96a33e02eca52f229b024304ec90ddf" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::MakeNewFromPrototype           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method uses <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#86d5855dea7f93e204a26463e6fc4876" title="More details are given in specification of GaChromosome::MakeCopy method.">MakeCopy</a> method to create chromosome's object, so if additional steps are not needed for creating chromosome from prototype, classes which inherits this class don't have to override this method. 
<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_ga_chromosome.html#1baa2a0dcb133a07606aacbbfa66b655" title="This method creates new chromosome with exact setup (parameters, operations, etc)...">GaChromosome::MakeNewFromPrototype</a> method. 
<p>Implements <a class="el" href="class_chromosome_1_1_ga_chromosome.html#1baa2a0dcb133a07606aacbbfa66b655">Chromosome::GaChromosome</a>.</p>

</div>
</div><p>
<a class="anchor" name="f42c93a0fe23fa54f928c9dcf25af0bb"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::GetCodeSize" ref="f42c93a0fe23fa54f928c9dcf25af0bb" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual int GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::GetCodeSize           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline, virtual]</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 always returns number of values in chromosome's code.</dd></dl>

<p>Implements <a class="el" href="class_chromosome_1_1_ga_chromosome.html#881d9437f305d04af112364a164eb40f">Chromosome::GaChromosome</a>.</p>

</div>
</div><p>
<a class="anchor" name="31efe518e2e26c273f1db57693c0752e"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::GetAt" ref="31efe518e2e26c273f1db57693c0752e" args="(int pos) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">TYPE GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::GetAt           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>pos</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>GetAt</code> method returns value of chromosome's at specified position. 
<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>pos</em>&nbsp;</td><td>position of the value.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Method returns value of chromosome's code at specified position.</dd></dl>

</div>
</div><p>
<a class="anchor" name="c2e2506fdf39f30f47f9d333d094e003"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::SetAt" ref="c2e2506fdf39f30f47f9d333d094e003" args="(TYPE value, int pos)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::SetAt           </td>
          <td>(</td>
          <td class="paramtype">TYPE&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>SetAt</code> method sets value of chromosome's code at given position. 
<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>value</em>&nbsp;</td><td>new value.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>position of value.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="9ee6ff3bcfa603977c608ec7c02f038d"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::GetCode" ref="9ee6ff3bcfa603977c608ec7c02f038d" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const vector&lt;TYPE&gt;&amp; GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::GetCode           </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 vector of values which represent chromosome's code.</dd></dl>

</div>
</div><p>
<a class="anchor" name="5fe34f24e10b8d43c74bfe4e59a0886b"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::operator=" ref="5fe34f24e10b8d43c74bfe4e59a0886b" args="(const GaChromosome &amp;rhs)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_chromosome_1_1_ga_chromosome.html">GaChromosome</a>&amp; GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::operator=           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_ga_chromosome.html">GaChromosome</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rhs</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_ga_chromosome.html#8870128357483be066e06f8ea36d0a8a" title="This operator copies setup and chromosome&#39;s code from rhs.">GaChromosome::operator =</a>. 
<p>
This method is not thread-safe. 
<p>Reimplemented from <a class="el" href="class_chromosome_1_1_ga_default_chromosome.html#c9ef0b443788b8636ddbc7bd9d7dffb3">Chromosome::GaDefaultChromosome</a>.</p>

</div>
</div><p>
<a class="anchor" name="6b9041daa21138a3a23b0ca2cf0ef703"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::operator==" ref="6b9041daa21138a3a23b0ca2cf0ef703" args="(const GaChromosome &amp;c) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual bool GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::operator==           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_ga_chromosome.html">GaChromosome</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
More details are given in specification of <a class="el" href="class_chromosome_1_1_ga_chromosome.html#4ae6d5bdcc745d7c730db3d3b687e751" title="This operator compares chromosomes&#39; codes.">GaChromosome::operator ==</a>. 
<p>
This method is not thread-safe. 
<p>Implements <a class="el" href="class_chromosome_1_1_ga_chromosome.html#4ae6d5bdcc745d7c730db3d3b687e751">Chromosome::GaChromosome</a>.</p>

</div>
</div><p>
<a class="anchor" name="72fd119987c73fbaa88d8250d856bd0e"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::PreapareForMutation" ref="72fd119987c73fbaa88d8250d856bd0e" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::PreapareForMutation           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>PreapareForMutation</code> method copies values form chromosome's code to backup vector. 
<p>

<p>Implements <a class="el" href="class_chromosome_1_1_ga_default_chromosome.html#06f5db9c612501ef15e26b269898a3c4">Chromosome::GaDefaultChromosome</a>.</p>

</div>
</div><p>
<a class="anchor" name="fb8f403fb181f6b87ba2ed9fd038d5f2"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::AcceptMutation" ref="fb8f403fb181f6b87ba2ed9fd038d5f2" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::AcceptMutation           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method only clears backup vector. 
<p>

<p>Implements <a class="el" href="class_chromosome_1_1_ga_default_chromosome.html#ca9543fe2ed696be3b935945766c9f7c">Chromosome::GaDefaultChromosome</a>.</p>

</div>
</div><p>
<a class="anchor" name="c192551b6c23494d8b18c813ee4975c6"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::RejectMutation" ref="c192551b6c23494d8b18c813ee4975c6" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void GACALL <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::RejectMutation           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>RejectMutation</code> method restores chromosome's code from backup vector. It also clears backup vector. 
<p>

<p>Implements <a class="el" href="class_chromosome_1_1_ga_default_chromosome.html#6d83d4d58c36bdd153268002753f2623">Chromosome::GaDefaultChromosome</a>.</p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="9f84b5008329176caa3f9f882895a04a"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::_values" ref="9f84b5008329176caa3f9f882895a04a" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;TYPE&gt; <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::<a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#9f84b5008329176caa3f9f882895a04a">_values</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Chromosome's code. 
<p>

</div>
</div><p>
<a class="anchor" name="6b206c744f9a2f311df45a6922bb5f29"></a><!-- doxytag: member="Chromosome::Representation::GaMultiValueChromosome::_backup" ref="6b206c744f9a2f311df45a6922bb5f29" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">vector&lt;TYPE&gt; <a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html">Chromosome::Representation::GaMultiValueChromosome</a>&lt; TYPE &gt;::<a class="el" href="class_chromosome_1_1_representation_1_1_ga_multi_value_chromosome.html#6b206c744f9a2f311df45a6922bb5f29">_backup</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Backup copy chromosome's code before mutation if improving-only mutation flag is set in chromosome's parameters. 
<p>

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