Click here to Skip to main content
12,748,322 members (39,782 online)
Click here to Skip to main content

Stats

318.2K views
30.1K downloads
539 bookmarked
Posted 19 May 2008

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: Chromosome::Representation::GaArithmeticalCode Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespace_chromosome.html">Chromosome</a>::<a class="el" href="namespace_chromosome_1_1_representation.html">Representation</a>::<a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a>
  </div>
</div>
<div class="contents">
<h1>Chromosome::Representation::GaArithmeticalCode Class Reference</h1><!-- doxytag: class="Chromosome::Representation::GaArithmeticalCode" --><code><a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html" title="GaArithmeticalCode interface should be implemented by chromosomes&#39; classes which...">GaArithmeticalCode</a></code> interface should be implemented by chromosomes' classes which code supports arithmetical operations over it or its values.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;source/RepresentationInterfaces.h&gt;</code>
<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>, and <a class="el" href="class_chromosome_1_1_representation_1_1_ga_s_v_arithmetic_chromosome.html">Chromosome::Representation::GaSVArithmeticChromosome&lt; TYPE &gt;</a>.
<p>

<p>
<a href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code-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 <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_arithmetical_code.html#3c8e4716e18c74c92db89b7dfe4e1431">operator+</a> (const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;rhs) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method operator new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by summing of those values.  <a href="#3c8e4716e18c74c92db89b7dfe4e1431"></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_arithmetical_code.html#3143eba06b5261295c288332df29805a">operator-</a> (const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;rhs) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method operator new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by subtracting of those values.  <a href="#3143eba06b5261295c288332df29805a"></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_arithmetical_code.html#eb0bfdf7865e01b3d063f0650e24d968">operator*</a> (const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;rhs) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method operator new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by multiplying of those values.  <a href="#eb0bfdf7865e01b3d063f0650e24d968"></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_arithmetical_code.html#c5d2f660b6eeb24f542cf52288d04f76">operator/</a> (const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;rhs) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method operator new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by dividing of those values.  <a href="#c5d2f660b6eeb24f542cf52288d04f76"></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_arithmetical_code.html#c1489eab5d672eb221cecd1b2da1f52a">Midpoint</a> (const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;c) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method produces new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by midpoint algorithm.  <a href="#c1489eab5d672eb221cecd1b2da1f52a"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<code><a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html" title="GaArithmeticalCode interface should be implemented by chromosomes&#39; classes which...">GaArithmeticalCode</a></code> interface should be implemented by chromosomes' classes which code supports arithmetical operations over it or its values. 
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="3c8e4716e18c74c92db89b7dfe4e1431"></a><!-- doxytag: member="Chromosome::Representation::GaArithmeticalCode::operator+" ref="3c8e4716e18c74c92db89b7dfe4e1431" args="(const GaArithmeticalCode &amp;rhs) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> GACALL Chromosome::Representation::GaArithmeticalCode::operator+           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rhs</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method operator new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by summing of those 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>rhs</em>&nbsp;</td><td>the second code for summing.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Method returns smart pointer to newly created chromosome.</dd></dl>

<p>Implemented in <a class="el" href="class_chromosome_1_1_representation_1_1_ga_m_v_arithmetic_chromosome.html#0b9ca2483f3740f6a018ee1b91d711aa">Chromosome::Representation::GaMVArithmeticChromosome&lt; TYPE &gt;</a>, and <a class="el" href="class_chromosome_1_1_representation_1_1_ga_s_v_arithmetic_chromosome.html#a06bea37042294e8bf37844e81820db7">Chromosome::Representation::GaSVArithmeticChromosome&lt; TYPE &gt;</a>.</p>

</div>
</div><p>
<a class="anchor" name="3143eba06b5261295c288332df29805a"></a><!-- doxytag: member="Chromosome::Representation::GaArithmeticalCode::operator-" ref="3143eba06b5261295c288332df29805a" args="(const GaArithmeticalCode &amp;rhs) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> GACALL Chromosome::Representation::GaArithmeticalCode::operator-           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rhs</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method operator new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by subtracting of those 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>rhs</em>&nbsp;</td><td>the second code for subtracting.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Method returns smart pointer to newly created chromosome.</dd></dl>

<p>Implemented in <a class="el" href="class_chromosome_1_1_representation_1_1_ga_m_v_arithmetic_chromosome.html#abba1a48d8517456ceaddf81d4c729a9">Chromosome::Representation::GaMVArithmeticChromosome&lt; TYPE &gt;</a>, and <a class="el" href="class_chromosome_1_1_representation_1_1_ga_s_v_arithmetic_chromosome.html#aea25308799b95809c19340a37784a8b">Chromosome::Representation::GaSVArithmeticChromosome&lt; TYPE &gt;</a>.</p>

</div>
</div><p>
<a class="anchor" name="eb0bfdf7865e01b3d063f0650e24d968"></a><!-- doxytag: member="Chromosome::Representation::GaArithmeticalCode::operator*" ref="eb0bfdf7865e01b3d063f0650e24d968" args="(const GaArithmeticalCode &amp;rhs) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> GACALL Chromosome::Representation::GaArithmeticalCode::operator*           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rhs</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method operator new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by multiplying of those 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>rhs</em>&nbsp;</td><td>the second code for multiplying.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Method returns smart pointer to newly created chromosome.</dd></dl>

<p>Implemented in <a class="el" href="class_chromosome_1_1_representation_1_1_ga_m_v_arithmetic_chromosome.html#032a904758f913042d73314046a6acfd">Chromosome::Representation::GaMVArithmeticChromosome&lt; TYPE &gt;</a>, and <a class="el" href="class_chromosome_1_1_representation_1_1_ga_s_v_arithmetic_chromosome.html#24af35bb18846f7fdfea789a6b1be8e4">Chromosome::Representation::GaSVArithmeticChromosome&lt; TYPE &gt;</a>.</p>

</div>
</div><p>
<a class="anchor" name="c5d2f660b6eeb24f542cf52288d04f76"></a><!-- doxytag: member="Chromosome::Representation::GaArithmeticalCode::operator/" ref="c5d2f660b6eeb24f542cf52288d04f76" args="(const GaArithmeticalCode &amp;rhs) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> GACALL Chromosome::Representation::GaArithmeticalCode::operator/           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rhs</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method operator new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by dividing of those 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>rhs</em>&nbsp;</td><td>the second code for dividing.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Method returns smart pointer to newly created chromosome.</dd></dl>

<p>Implemented in <a class="el" href="class_chromosome_1_1_representation_1_1_ga_m_v_arithmetic_chromosome.html#342a129e5ce6b4052713753bc03c2942">Chromosome::Representation::GaMVArithmeticChromosome&lt; TYPE &gt;</a>, and <a class="el" href="class_chromosome_1_1_representation_1_1_ga_s_v_arithmetic_chromosome.html#a67f99730e1d6eeaa91e76182614c6d6">Chromosome::Representation::GaSVArithmeticChromosome&lt; TYPE &gt;</a>.</p>

</div>
</div><p>
<a class="anchor" name="c1489eab5d672eb221cecd1b2da1f52a"></a><!-- doxytag: member="Chromosome::Representation::GaArithmeticalCode::Midpoint" ref="c1489eab5d672eb221cecd1b2da1f52a" args="(const GaArithmeticalCode &amp;c) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_common_1_1_ga_smart_ptr.html">GaChromosomePtr</a> GACALL Chromosome::Representation::GaArithmeticalCode::Midpoint           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_chromosome_1_1_representation_1_1_ga_arithmetical_code.html">GaArithmeticalCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method produces new chromosome which code has values which are calculated form corresponding values of codes of <code>this</code> and <code>c</code> chromosomes by midpoint algorithm. 
<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>the second code for calculating midpoint.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Method returns smart pointer to newly created chromosome.</dd></dl>

<p>Implemented in <a class="el" href="class_chromosome_1_1_representation_1_1_ga_m_v_arithmetic_chromosome.html#5735a930c3432c2e675a76cdd9dbde06">Chromosome::Representation::GaMVArithmeticChromosome&lt; TYPE &gt;</a>, and <a class="el" href="class_chromosome_1_1_representation_1_1_ga_s_v_arithmetic_chromosome.html#e36c0350eaa51dbb16242e2bd308a8be">Chromosome::Representation::GaSVArithmeticChromosome&lt; TYPE &gt;</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>source/<a class="el" href="_representation_interfaces_8h.html">RepresentationInterfaces.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
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170215.1 | Last Updated 7 Apr 2012
Article Copyright 2008 by Mladen Janković
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid