Click here to Skip to main content
12,449,440 members (60,824 online)
Click here to Skip to main content

Stats

306K views
28.9K downloads
534 bookmarked
Posted

Genetic Algorithm Library

, 7 Apr 2012 GPL3
A framework for genetic algorithms
TSP.exe
GeneticLibrary.dll
TestApp1.exe
TestApp2.exe
GaSchedule.exe
GaSchedule.cfg
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
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
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::SelectionOperations::GaSelectDuplicatesParams 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="namespace_population_1_1_selection_operations.html">SelectionOperations</a>::<a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_duplicates_params.html">GaSelectDuplicatesParams</a>
  </div>
</div>
<div class="contents">
<h1>Population::SelectionOperations::GaSelectDuplicatesParams Class Reference</h1><!-- doxytag: class="Population::SelectionOperations::GaSelectDuplicatesParams" --><!-- doxytag: inherits="Population::GaSelectionParams" -->This class should be used (directly or by inheritance) by selection operations which can control duplicates of chromosome in result set.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;source/SelectionOperations.h&gt;</code>
<p>
Inherits <a class="el" href="class_population_1_1_ga_selection_params.html">Population::GaSelectionParams</a>.
<p>
Inherited by <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_random_best_params.html">Population::SelectionOperations::GaSelectRandomBestParams</a>, and <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_tournament_params.html">Population::SelectionOperations::GaSelectTournamentParams</a>.
<p>

<p>
<a href="class_population_1_1_selection_operations_1_1_ga_select_duplicates_params-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_population_1_1_selection_operations_1_1_ga_select_duplicates_params.html#9c45f12aa838ee31d292f32783269e5a">GaSelectDuplicatesParams</a> (bool duplicates, int selectionSize)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes parameters with user defined values.  <a href="#9c45f12aa838ee31d292f32783269e5a"></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_population_1_1_selection_operations_1_1_ga_select_duplicates_params.html#7d0b905f7b69d6929c779ddbc84f99f0">GaSelectDuplicatesParams</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes parameters with default values. Duplicates are not allowed, and selection size is 2.  <a href="#7d0b905f7b69d6929c779ddbc84f99f0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_common_1_1_ga_parameters.html">GaParameters</a> *GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_duplicates_params.html#1ce3a8b40e2d0419b0c9af04014790ee">Clone</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">More details are given in specification of GaParameters::Clone method.  <a href="#1ce3a8b40e2d0419b0c9af04014790ee"></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_selection_operations_1_1_ga_select_duplicates_params.html#002a17408dbb8ec86e24d25fa9f125d5">GetDuplicates</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#002a17408dbb8ec86e24d25fa9f125d5"></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_selection_operations_1_1_ga_select_duplicates_params.html#a43019f4dbe73ee4655167f0aa0a7313">SetDuplicates</a> (bool duplicates)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>SetDuplicates</code> method sets acceptance of duplicates of chromosomes in selection result set.  <a href="#a43019f4dbe73ee4655167f0aa0a7313"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></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_selection_operations_1_1_ga_select_duplicates_params.html#f6a5d1063b40b2739b55894b11c4dbb2">_duplicates</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indicates if duplicates of same chromosome are allowed in selection result set.  <a href="#f6a5d1063b40b2739b55894b11c4dbb2"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class should be used (directly or by inheritance) by selection operations which can control duplicates of chromosome in result 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. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="9c45f12aa838ee31d292f32783269e5a"></a><!-- doxytag: member="Population::SelectionOperations::GaSelectDuplicatesParams::GaSelectDuplicatesParams" ref="9c45f12aa838ee31d292f32783269e5a" args="(bool duplicates, int selectionSize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Population::SelectionOperations::GaSelectDuplicatesParams::GaSelectDuplicatesParams           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>duplicates</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>selectionSize</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 parameters with user defined values. 
<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>duplicates</em>&nbsp;</td><td>if this parameter is set to <code>true</code>, duplicates of same chromosome in result set are allowed. If it is set to <code>false</code> duplicates are not allowed.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>selectionSize</em>&nbsp;</td><td>number of chromosomes which should be selected.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="7d0b905f7b69d6929c779ddbc84f99f0"></a><!-- doxytag: member="Population::SelectionOperations::GaSelectDuplicatesParams::GaSelectDuplicatesParams" ref="7d0b905f7b69d6929c779ddbc84f99f0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Population::SelectionOperations::GaSelectDuplicatesParams::GaSelectDuplicatesParams           </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 parameters with default values. Duplicates are not allowed, and selection size is 2. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="1ce3a8b40e2d0419b0c9af04014790ee"></a><!-- doxytag: member="Population::SelectionOperations::GaSelectDuplicatesParams::Clone" ref="1ce3a8b40e2d0419b0c9af04014790ee" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_common_1_1_ga_parameters.html">GaParameters</a>* GACALL Population::SelectionOperations::GaSelectDuplicatesParams::Clone           </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>
More details are given in specification of GaParameters::Clone method. 
<p>
This method is not thread-safe. 
<p>Reimplemented from <a class="el" href="class_population_1_1_ga_selection_params.html#28ec27c4d02d4e96e073ad5a1c8e7412">Population::GaSelectionParams</a>.</p>

<p>Reimplemented in <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_random_best_params.html#c3cb5a410fcec5ba8ff2abdc750e8192">Population::SelectionOperations::GaSelectRandomBestParams</a>, and <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_tournament_params.html#14b90bbaed70e769452a2d347eaf6fc8">Population::SelectionOperations::GaSelectTournamentParams</a>.</p>

</div>
</div><p>
<a class="anchor" name="002a17408dbb8ec86e24d25fa9f125d5"></a><!-- doxytag: member="Population::SelectionOperations::GaSelectDuplicatesParams::GetDuplicates" ref="002a17408dbb8ec86e24d25fa9f125d5" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool GACALL Population::SelectionOperations::GaSelectDuplicatesParams::GetDuplicates           </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 duplicates of same chromosome in result set are allowed, otherwise it returns <code>false</code>.</dd></dl>

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

<p>
<code>SetDuplicates</code> method sets acceptance of duplicates of chromosomes in selection 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>duplicates</em>&nbsp;</td><td>if this parameter is set to <code>true</code>, duplicates of same chromosome in result set are allowed. If it is set to <code>false</code> duplicates are not allowed.</td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="f6a5d1063b40b2739b55894b11c4dbb2"></a><!-- doxytag: member="Population::SelectionOperations::GaSelectDuplicatesParams::_duplicates" ref="f6a5d1063b40b2739b55894b11c4dbb2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_population_1_1_selection_operations_1_1_ga_select_duplicates_params.html#f6a5d1063b40b2739b55894b11c4dbb2">Population::SelectionOperations::GaSelectDuplicatesParams::_duplicates</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Indicates if duplicates of same chromosome are allowed in selection result set. 
<p>

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

Share

About the Author

Mladen Janković
Software Developer
Serbia Serbia
No Biography provided

You may also be interested in...

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