Click here to Skip to main content
12,627,377 members (34,054 online)
Click here to Skip to main content

Stats

313.3K views
29.6K downloads
537 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: Common::GaRandom&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_common.html">Common</a>::<a class="el" href="class_common_1_1_ga_random.html">GaRandom</a>
  </div>
</div>
<div class="contents">
<h1>Common::GaRandom&lt; TYPE &gt; Class Template Reference</h1><!-- doxytag: class="Common::GaRandom" -->Interface for random value generators.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;source/Random.h&gt;</code>
<p>

<p>
<a href="class_common_1_1_ga_random-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 TYPE GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_random.html#d6f9ee3346f19a552da4e70484de49eb">Generate</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method generates random values of <code>TYPE</code> with no specific range.  <a href="#d6f9ee3346f19a552da4e70484de49eb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual TYPE GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_random.html#6116f8c2789932b7d8739362602af738">Generate</a> (const TYPE &amp;max)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method generates random value of <code>TYPE</code> with specified maximum.  <a href="#6116f8c2789932b7d8739362602af738"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual TYPE GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_random.html#cbd6b1eced274f8896b381428adee435">Generate</a> (const TYPE &amp;min, const TYPE &amp;max)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method generates random value of <code>TYPE</code> within specified range of values.  <a href="#cbd6b1eced274f8896b381428adee435"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;typename TYPE&gt;<br>
 class Common::GaRandom&lt; TYPE &gt;</h3>

Interface for random value generators. 
<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>TYPE</em>&nbsp;</td><td>type of generated values.</td></tr>
  </table>
</dl>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="d6f9ee3346f19a552da4e70484de49eb"></a><!-- doxytag: member="Common::GaRandom::Generate" ref="d6f9ee3346f19a552da4e70484de49eb" args="()=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual TYPE GACALL <a class="el" href="class_common_1_1_ga_random.html">Common::GaRandom</a>&lt; TYPE &gt;::Generate           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method generates random values of <code>TYPE</code> with no specific range. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns generate random value.</dd></dl>

<p>Implemented in <a class="el" href="class_common_1_1_ga_random_integer.html#1f66e70ab6906703a2fec32e89cc0fd4">Common::GaRandomInteger</a>, <a class="el" href="class_common_1_1_ga_random_float.html#a58b13973040ace5e73e8913440366fd">Common::GaRandomFloat</a>, <a class="el" href="class_common_1_1_ga_random_double.html#d511c089237ab38c2a355f83c0a3d73e">Common::GaRandomDouble</a>, and <a class="el" href="class_common_1_1_ga_random_bool.html#c951a9347bfb8de6e7b0ea8c9900a4d8">Common::GaRandomBool</a>.</p>

</div>
</div><p>
<a class="anchor" name="6116f8c2789932b7d8739362602af738"></a><!-- doxytag: member="Common::GaRandom::Generate" ref="6116f8c2789932b7d8739362602af738" args="(const TYPE &amp;max)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual TYPE GACALL <a class="el" href="class_common_1_1_ga_random.html">Common::GaRandom</a>&lt; TYPE &gt;::Generate           </td>
          <td>(</td>
          <td class="paramtype">const TYPE &amp;&nbsp;</td>
          <td class="paramname"> <em>max</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method generates random value of <code>TYPE</code> with specified maximum. 
<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>max</em>&nbsp;</td><td>maximal value which can be generated.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns generate random value.</dd></dl>

<p>Implemented in <a class="el" href="class_common_1_1_ga_random_integer.html#0b442616a91a62801256fb26f2b7447d">Common::GaRandomInteger</a>, <a class="el" href="class_common_1_1_ga_random_float.html#6816d207eeeaac64b809cd56d96b80fc">Common::GaRandomFloat</a>, <a class="el" href="class_common_1_1_ga_random_double.html#f2eca2a861fc13fb94ac43849299d52b">Common::GaRandomDouble</a>, and <a class="el" href="class_common_1_1_ga_random_bool.html#973149dd16ecefeaad73120e1178861d">Common::GaRandomBool</a>.</p>

</div>
</div><p>
<a class="anchor" name="cbd6b1eced274f8896b381428adee435"></a><!-- doxytag: member="Common::GaRandom::Generate" ref="cbd6b1eced274f8896b381428adee435" args="(const TYPE &amp;min, const TYPE &amp;max)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TYPE&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual TYPE GACALL <a class="el" href="class_common_1_1_ga_random.html">Common::GaRandom</a>&lt; TYPE &gt;::Generate           </td>
          <td>(</td>
          <td class="paramtype">const TYPE &amp;&nbsp;</td>
          <td class="paramname"> <em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const TYPE &amp;&nbsp;</td>
          <td class="paramname"> <em>max</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method generates random value of <code>TYPE</code> within specified range of 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>min</em>&nbsp;</td><td>minimal value which can be generated.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>max</em>&nbsp;</td><td>maximal value which can be generated.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns generate random value.</dd></dl>

<p>Implemented in <a class="el" href="class_common_1_1_ga_random_integer.html#091d19be164f0194415813e82d302528">Common::GaRandomInteger</a>, <a class="el" href="class_common_1_1_ga_random_float.html#f4be344484d88a34aa43566382476136">Common::GaRandomFloat</a>, <a class="el" href="class_common_1_1_ga_random_double.html#bc8052fa3d209e3e2a24c3fa2b738c91">Common::GaRandomDouble</a>, and <a class="el" href="class_common_1_1_ga_random_bool.html#b85311d9233c4c40b2039a1f4db2e89f">Common::GaRandomBool</a>.</p>

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

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