Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Genetic Algorithm Library

, 7 Apr 2012 GPL3
A framework for genetic algorithms
galdemoapps.zip
TSP.exe
GeneticLibrary.dll
TestApp1.exe
TestApp2.exe
GaSchedule.exe
GaSchedule.cfg
GalDemoSource.zip
TestApp1
TestApp1.vcxproj.filters
TestApp2
TestApp2.vcxproj.filters
TSP
res
.svn
entries
prop-base
Toolbar.bmp.svn-base
TSP.ico.svn-base
props
text-base
Toolbar.bmp.svn-base
TSP.ico.svn-base
TSP.rc2.svn-base
tmp
prop-base
props
text-base
Toolbar.bmp
TSP.ico
TSP.vcxproj.filters
GaSchedule
Algorithm
GaSchedule.cfg
GaSchedule.vcxproj.filters
res
GaSchedule.ico
galdocumentation.zip
doxygen.png
Graphic
ab_cp.png
alg_st.png
a_cr.png
c_cp.png
i_cp.png
mp_cr.png
mv_cr.png
r_cp.png
s_cp.png
s_cr.png
galsource.zip
GeneticLibrary
build
release
gcc_bsd
gcc_linux
gcc_macos
gcc_solaris
icc_linux
icc_macos
icc_win
mingw
msvc
scc_solaris
makefiles
gcc_bsd_debug
gcc_bsd_release
gcc_linux_debug
gcc_linux_release
gcc_macos_debug
gcc_macos_release
gcc_solaris_debug
gcc_solaris_release
icc_linux_debug
icc_linux_release
icc_macos_debug
icc_macos_release
scc_solaris_debug
scc_solaris_release
source
vs
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Genetic Algorithm Library: Population::GaCouplingResultSet 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_population.html">Population</a>::<a class="el" href="class_population_1_1_ga_coupling_result_set.html">GaCouplingResultSet</a>
  </div>
</div>
<div class="contents">
<h1>Population::GaCouplingResultSet Class Reference</h1><!-- doxytag: class="Population::GaCouplingResultSet" -->This class is used as storage for coupling operation (result set). Result set contains pointer to selection result set which stores parent chromosomes. It also contains array of newly produced chromosomes and array of their parents' indices.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;source/PopulationOperations.h&gt;</code>
<p>

<p>
<a href="class_population_1_1_ga_coupling_result_set-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">GAL_API&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#82dc449c98a054366cc212ddcb2e2f7a">GaCouplingResultSet</a> (int numberOfOffsprings, <a class="el" href="class_population_1_1_ga_selection_result_set.html">GaSelectionResultSet</a> *selectionResults)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes coupling result set with maximum number of offspring which can be stored and selection result set which stores parents.  <a href="#82dc449c98a054366cc212ddcb2e2f7a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual GAL_API&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#bc5eed4cde7f616775ad5f4d998aadbf">~GaCouplingResultSet</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor frees memory of array which stores parents' indices and array of smart pointers to offspring.  <a href="#bc5eed4cde7f616775ad5f4d998aadbf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">GAL_API bool GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#0af3c1d8c4d2bf65308ad8cc2bce490e">GetOffspringAt</a> (int pos, <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> &amp;offspring, int &amp;parent) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>GetOffspringAt</code> method returns newly created chromosome and its parent's index at specified position in result set.  <a href="#0af3c1d8c4d2bf65308ad8cc2bce490e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">GAL_API bool GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#cd7589d2eb90730175f1d286742eaa8a">SetOffspringAt</a> (int pos, <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> offspring, int parent)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>SetOffspringAt</code> method sets smart pointer to new chromosome and index of its parent at specified position in result set. It can be used to insert new chromosomes in result set.  <a href="#cd7589d2eb90730175f1d286742eaa8a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#1b72a873d088ce80c524b0d20ab4c630">GetNumberOfOffsprings</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#1b72a873d088ce80c524b0d20ab4c630"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">GAL_API void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#d3f3e0bde4b57df0989c01857d5b9f05">SetNumberOfOffsprings</a> (int number)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>SetNumberOOffspring</code> method changes size of arrays so they can store specified number of offspring.  <a href="#d3f3e0bde4b57df0989c01857d5b9f05"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><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_population_1_1_ga_coupling_result_set.html#fc5e366151315fbf36d4bae26fc9c2d1">GetOffspringsBuffer</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#fc5e366151315fbf36d4bae26fc9c2d1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int *GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#dcfffae76412d05ff6c82bc1d466c293">GetParentsBuffer</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#dcfffae76412d05ff6c82bc1d466c293"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_population_1_1_ga_selection_result_set.html">GaSelectionResultSet</a> &amp;GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#97702c5ac1d40382c227e6b5e34c820f">GetSelectionResultSet</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#97702c5ac1d40382c227e6b5e34c820f"></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_population_1_1_ga_coupling_result_set.html#ae1db8efb90270e8d13bbd0f3bce2f99">SetClearDuplicates</a> (bool clear)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>SetClearDuplicates</code> method setsh whether the duplicated chromosomes should be removed from result set before they are inserted into population.  <a href="#ae1db8efb90270e8d13bbd0f3bce2f99"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#9e89d30c32b7b980606e1dfa570c251c">GetClearDuplicates</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#9e89d30c32b7b980606e1dfa570c251c"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#a97a61b4b2a619c7b510706bad7c887a">_offsprings</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to array of smart pointers which are point to newly produced offspring.  <a href="#a97a61b4b2a619c7b510706bad7c887a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#55cccc4964c68717dcc5c2977550bc1c">_parents</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Array of parents' indices of newly created offspring.  <a href="#55cccc4964c68717dcc5c2977550bc1c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#253ee082df3668ff8f8c9382a49fb037">_numberOfOffsprings</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of chromosomes which can be stored in this result set.  <a href="#253ee082df3668ff8f8c9382a49fb037"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#1f9df12f77db19da788f4b363919330f">_clearDuplicates</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indicates whehter the duplicated chromosomes should be removed from result set before they are inserted into population.  <a href="#1f9df12f77db19da788f4b363919330f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_population_1_1_ga_selection_result_set.html">GaSelectionResultSet</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_ga_coupling_result_set.html#82c40c189ea3c847f063353c17bdf9e3">_selection</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to result set of selection operation. It contains chromosomes which are used as parents to produce offspring.  <a href="#82c40c189ea3c847f063353c17bdf9e3"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class is used as storage for coupling operation (result set). Result set contains pointer to selection result set which stores parent chromosomes. It also contains array of newly produced chromosomes and array of their parents' indices. 
<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="82dc449c98a054366cc212ddcb2e2f7a"></a><!-- doxytag: member="Population::GaCouplingResultSet::GaCouplingResultSet" ref="82dc449c98a054366cc212ddcb2e2f7a" args="(int numberOfOffsprings, GaSelectionResultSet *selectionResults)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Population::GaCouplingResultSet::GaCouplingResultSet           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>numberOfOffsprings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_population_1_1_ga_selection_result_set.html">GaSelectionResultSet</a> *&nbsp;</td>
          <td class="paramname"> <em>selectionResults</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This constructor initializes coupling result set with maximum number of offspring which can be stored and selection result set which stores parents. 
<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>numberOfOffsprings</em>&nbsp;</td><td>maximum number of offspring which this result set can store.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>selectionResults</em>&nbsp;</td><td>pointer to selection results which stores parents.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="bc5eed4cde7f616775ad5f4d998aadbf"></a><!-- doxytag: member="Population::GaCouplingResultSet::~GaCouplingResultSet" ref="bc5eed4cde7f616775ad5f4d998aadbf" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Population::GaCouplingResultSet::~GaCouplingResultSet           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor frees memory of array which stores parents' indices and array of smart pointers to offspring. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="0af3c1d8c4d2bf65308ad8cc2bce490e"></a><!-- doxytag: member="Population::GaCouplingResultSet::GetOffspringAt" ref="0af3c1d8c4d2bf65308ad8cc2bce490e" args="(int pos, GaChromosomePtr &amp;offspring, int &amp;parent) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Population::GaCouplingResultSet::GetOffspringAt           </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"><a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>offspring</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&nbsp;</td>
          <td class="paramname"> <em>parent</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>GetOffspringAt</code> method returns newly created chromosome and its parent's index at specified position in result set. 
<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 offspring chromosome.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offspring</em>&nbsp;</td><td>reference to smart pointer to which is stored pointer to new chromosome.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parent</em>&nbsp;</td><td>reference to variable to which is stored index of new chromosome's parent.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Method returns <code>true</code> if chromosome exists at the position.</dd></dl>

</div>
</div><p>
<a class="anchor" name="cd7589d2eb90730175f1d286742eaa8a"></a><!-- doxytag: member="Population::GaCouplingResultSet::SetOffspringAt" ref="cd7589d2eb90730175f1d286742eaa8a" args="(int pos, GaChromosomePtr offspring, int parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Population::GaCouplingResultSet::SetOffspringAt           </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"><a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a>&nbsp;</td>
          <td class="paramname"> <em>offspring</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>parent</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>SetOffspringAt</code> method sets smart pointer to new chromosome and index of its parent at specified position in result set. It can be used to insert new chromosomes in result set. 
<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 in result set which is changed.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offspring</em>&nbsp;</td><td>smart pointer to new chromosome which is inserted.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parent</em>&nbsp;</td><td>index of parent's chromosome.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Method returns <code>true</code> if new chromosomes is inserted in result set.</dd></dl>

</div>
</div><p>
<a class="anchor" name="1b72a873d088ce80c524b0d20ab4c630"></a><!-- doxytag: member="Population::GaCouplingResultSet::GetNumberOfOffsprings" ref="1b72a873d088ce80c524b0d20ab4c630" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int GACALL Population::GaCouplingResultSet::GetNumberOfOffsprings           </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 maximal number of offspring which this result can store.</dd></dl>

</div>
</div><p>
<a class="anchor" name="d3f3e0bde4b57df0989c01857d5b9f05"></a><!-- doxytag: member="Population::GaCouplingResultSet::SetNumberOfOffsprings" ref="d3f3e0bde4b57df0989c01857d5b9f05" args="(int number)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Population::GaCouplingResultSet::SetNumberOfOffsprings           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>number</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>SetNumberOOffspring</code> method changes size of arrays so they can store specified number of offspring. 
<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>number</em>&nbsp;</td><td>new number of chromosomes which can be stored in this result set.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="fc5e366151315fbf36d4bae26fc9c2d1"></a><!-- doxytag: member="Population::GaCouplingResultSet::GetOffspringsBuffer" ref="fc5e366151315fbf36d4bae26fc9c2d1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a>* GACALL Population::GaCouplingResultSet::GetOffspringsBuffer           </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 pointer to array of smart pointers to newly created chromosomes.</dd></dl>

</div>
</div><p>
<a class="anchor" name="dcfffae76412d05ff6c82bc1d466c293"></a><!-- doxytag: member="Population::GaCouplingResultSet::GetParentsBuffer" ref="dcfffae76412d05ff6c82bc1d466c293" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int* GACALL Population::GaCouplingResultSet::GetParentsBuffer           </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 pointer to array of parent's indices.</dd></dl>

</div>
</div><p>
<a class="anchor" name="97702c5ac1d40382c227e6b5e34c820f"></a><!-- doxytag: member="Population::GaCouplingResultSet::GetSelectionResultSet" ref="97702c5ac1d40382c227e6b5e34c820f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_population_1_1_ga_selection_result_set.html">GaSelectionResultSet</a>&amp; GACALL Population::GaCouplingResultSet::GetSelectionResultSet           </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 selection which stores parent chromosomes.</dd></dl>

</div>
</div><p>
<a class="anchor" name="ae1db8efb90270e8d13bbd0f3bce2f99"></a><!-- doxytag: member="Population::GaCouplingResultSet::SetClearDuplicates" ref="ae1db8efb90270e8d13bbd0f3bce2f99" args="(bool clear)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GACALL Population::GaCouplingResultSet::SetClearDuplicates           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>clear</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>SetClearDuplicates</code> method setsh whether the duplicated chromosomes should be removed from result set before they are inserted into population. 
<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>clear</em>&nbsp;</td><td>this parameter should be set to <code>true</code> if the duplicated chromosomes should be removed from result set before they are inserted into population.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="9e89d30c32b7b980606e1dfa570c251c"></a><!-- doxytag: member="Population::GaCouplingResultSet::GetClearDuplicates" ref="9e89d30c32b7b980606e1dfa570c251c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool GACALL Population::GaCouplingResultSet::GetClearDuplicates           </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 <code>true</code> if the duplicated chromosomes should be removed from result set before they are inserted into population.</dd></dl>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="a97a61b4b2a619c7b510706bad7c887a"></a><!-- doxytag: member="Population::GaCouplingResultSet::_offsprings" ref="a97a61b4b2a619c7b510706bad7c887a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a>* <a class="el" href="class_population_1_1_ga_coupling_result_set.html#a97a61b4b2a619c7b510706bad7c887a">Population::GaCouplingResultSet::_offsprings</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pointer to array of smart pointers which are point to newly produced offspring. 
<p>

</div>
</div><p>
<a class="anchor" name="55cccc4964c68717dcc5c2977550bc1c"></a><!-- doxytag: member="Population::GaCouplingResultSet::_parents" ref="55cccc4964c68717dcc5c2977550bc1c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int* <a class="el" href="class_population_1_1_ga_coupling_result_set.html#55cccc4964c68717dcc5c2977550bc1c">Population::GaCouplingResultSet::_parents</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Array of parents' indices of newly created offspring. 
<p>

</div>
</div><p>
<a class="anchor" name="253ee082df3668ff8f8c9382a49fb037"></a><!-- doxytag: member="Population::GaCouplingResultSet::_numberOfOffsprings" ref="253ee082df3668ff8f8c9382a49fb037" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_population_1_1_ga_coupling_result_set.html#253ee082df3668ff8f8c9382a49fb037">Population::GaCouplingResultSet::_numberOfOffsprings</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Number of chromosomes which can be stored in this result set. 
<p>

</div>
</div><p>
<a class="anchor" name="1f9df12f77db19da788f4b363919330f"></a><!-- doxytag: member="Population::GaCouplingResultSet::_clearDuplicates" ref="1f9df12f77db19da788f4b363919330f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_population_1_1_ga_coupling_result_set.html#1f9df12f77db19da788f4b363919330f">Population::GaCouplingResultSet::_clearDuplicates</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Indicates whehter the duplicated chromosomes should be removed from result set before they are inserted into population. 
<p>

</div>
</div><p>
<a class="anchor" name="82c40c189ea3c847f063353c17bdf9e3"></a><!-- doxytag: member="Population::GaCouplingResultSet::_selection" ref="82c40c189ea3c847f063353c17bdf9e3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_population_1_1_ga_selection_result_set.html">GaSelectionResultSet</a>* <a class="el" href="class_population_1_1_ga_coupling_result_set.html#82c40c189ea3c847f063353c17bdf9e3">Population::GaCouplingResultSet::_selection</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pointer to result set of selection operation. It contains chromosomes which are used as parents to produce offspring. 
<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>source/<a class="el" href="_population_operations_8h.html">PopulationOperations.h</a><li>source/<a class="el" href="_population_operations_8cpp.html">PopulationOperations.cpp</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)

Share

About the Author

Mladen Janković
Software Developer
Serbia Serbia
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.1411028.1 | Last Updated 7 Apr 2012
Article Copyright 2008 by Mladen Janković
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid