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::GaReplacementParams 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_replacement_params.html">GaReplacementParams</a>
  </div>
</div>
<div class="contents">
<h1>Population::GaReplacementParams Class Reference</h1><!-- doxytag: class="Population::GaReplacementParams" --><!-- doxytag: inherits="Common::GaParameters" -->This class is base for parameters of replacement operation.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;source/PopulationOperations.h&gt;</code>
<p>
Inherits <a class="el" href="class_common_1_1_ga_parameters.html">Common::GaParameters</a>.
<p>
Inherited by <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_elitism_params.html">Population::ReplacementOperations::GaReplaceElitismParams</a>.
<p>

<p>
<a href="class_population_1_1_ga_replacement_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_ga_replacement_params.html#0023f07d3a47b860db2a8044a9ebc1d8">GaReplacementParams</a> (int replacementSize)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes replacement parameters with user-defined replacement size.  <a href="#0023f07d3a47b860db2a8044a9ebc1d8"></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_ga_replacement_params.html#803731086acca3a8831f172519580ae6">GaReplacementParams</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This constructor initializes replacement parameters with default values. Default replacement size is 2.  <a href="#803731086acca3a8831f172519580ae6"></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_ga_replacement_params.html#910483417cf92e83b44f941f0984e5d6">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="#910483417cf92e83b44f941f0984e5d6"></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_replacement_params.html#f7729c0c1b1c334b8a55d903c8798848">GetReplacementSize</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not thread-safe.  <a href="#f7729c0c1b1c334b8a55d903c8798848"></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_replacement_params.html#a707bf0fc0f6529c10fa241585d72d8d">SetReplacementSize</a> (int size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>SetReplacementSize</code> method sets number of chromosomes which should be replaced.  <a href="#a707bf0fc0f6529c10fa241585d72d8d"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></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_replacement_params.html#386565de6f9c58fd8ee3a376d57c9034">_replacemetSize</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of chromosomes which should be replaced.  <a href="#386565de6f9c58fd8ee3a376d57c9034"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class is base for parameters of replacement operation. 
<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="0023f07d3a47b860db2a8044a9ebc1d8"></a><!-- doxytag: member="Population::GaReplacementParams::GaReplacementParams" ref="0023f07d3a47b860db2a8044a9ebc1d8" args="(int replacementSize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Population::GaReplacementParams::GaReplacementParams           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>replacementSize</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This constructor initializes replacement parameters with user-defined replacement 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>replacementSize</em>&nbsp;</td><td>number of chromosomes which should be replaced.</td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="803731086acca3a8831f172519580ae6"></a><!-- doxytag: member="Population::GaReplacementParams::GaReplacementParams" ref="803731086acca3a8831f172519580ae6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Population::GaReplacementParams::GaReplacementParams           </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 replacement parameters with default values. Default replacement size is 2. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="910483417cf92e83b44f941f0984e5d6"></a><!-- doxytag: member="Population::GaReplacementParams::Clone" ref="910483417cf92e83b44f941f0984e5d6" 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::GaReplacementParams::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>

<p>Implements <a class="el" href="class_common_1_1_ga_parameters.html#34bbac22569d859ba80aa3fd8501c02a">Common::GaParameters</a>.</p>

<p>Reimplemented in <a class="el" href="class_population_1_1_replacement_operations_1_1_ga_replace_elitism_params.html#d495ba7eb76d886fc9fe3247ad7eced6">Population::ReplacementOperations::GaReplaceElitismParams</a>.</p>

</div>
</div><p>
<a class="anchor" name="f7729c0c1b1c334b8a55d903c8798848"></a><!-- doxytag: member="Population::GaReplacementParams::GetReplacementSize" ref="f7729c0c1b1c334b8a55d903c8798848" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int GACALL Population::GaReplacementParams::GetReplacementSize           </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 number of chromosomes which should be replaced.</dd></dl>

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

<p>
<code>SetReplacementSize</code> method sets number of chromosomes which should be replaced. 
<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>size</em>&nbsp;</td><td>new number of chromosomes for replacement.</td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="386565de6f9c58fd8ee3a376d57c9034"></a><!-- doxytag: member="Population::GaReplacementParams::_replacemetSize" ref="386565de6f9c58fd8ee3a376d57c9034" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_population_1_1_ga_replacement_params.html#386565de6f9c58fd8ee3a376d57c9034">Population::GaReplacementParams::_replacemetSize</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Number of chromosomes which should be replaced. 
<p>

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

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