<!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::GaRandomFloat 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 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 List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class 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_float.html">GaRandomFloat</a>
</div>
</div>
<div class="contents">
<h1>Common::GaRandomFloat Class Reference</h1><!-- doxytag: class="Common::GaRandomFloat" --><!-- doxytag: inherits="GaRandom< float >" --><code><a class="el" href="class_common_1_1_ga_random_float.html" title="GaRandomFloat class generates random single precision floating-point numbers. Targeted...">GaRandomFloat</a></code> class generates random single precision floating-point numbers. Targeted architecture must support IEEE 754 standard. The class implements <a class="el" href="class_common_1_1_ga_random.html" title="Interface for random value generators.">GaRandom</a> interface. 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, but all public methods are thread-safe.
<a href="#_details">More...</a>
<p>
<code>#include <source/Random.h></code>
<p>
Inherits <a class="el" href="class_common_1_1_ga_random.html">Common::GaRandom< float ></a>.
<p>
<p>
<a href="class_common_1_1_ga_random_float-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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_random_float.html#08422f72443dd544b93f59b0fed81862">GaRandomFloat</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This constructor initializes random generator with current time as seed. <a href="#08422f72443dd544b93f59b0fed81862"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_random_float.html#e4fc9b9bcf0096676778c9e1aa539f91">GaRandomFloat</a> (unsigned long seed)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This constructor initialize random generator with user-defined seed. <a href="#e4fc9b9bcf0096676778c9e1aa539f91"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual float GACALL </td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_random_float.html#a58b13973040ace5e73e8913440366fd">Generate</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method generates random values in interval(0, 1). <a href="#a58b13973040ace5e73e8913440366fd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual float GACALL </td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_random_float.html#6816d207eeeaac64b809cd56d96b80fc">Generate</a> (const float &max)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method generates random values in interval(0, <code>max</code>). <a href="#6816d207eeeaac64b809cd56d96b80fc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual float GACALL </td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_random_float.html#f4be344484d88a34aa43566382476136">Generate</a> (const float &min, const float &max)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This method generates random values in interval(<code>min</code>, <code>max</code>). <a href="#f4be344484d88a34aa43566382476136"></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_random_generator.html">GaRandomGenerator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_common_1_1_ga_random_float.html#264ff2a05c0c612b3934daca96c7b6ed">_generator</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Instance of algorithm for generating random numbers. <a href="#264ff2a05c0c612b3934daca96c7b6ed"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<code><a class="el" href="class_common_1_1_ga_random_float.html" title="GaRandomFloat class generates random single precision floating-point numbers. Targeted...">GaRandomFloat</a></code> class generates random single precision floating-point numbers. Targeted architecture must support IEEE 754 standard. The class implements <a class="el" href="class_common_1_1_ga_random.html" title="Interface for random value generators.">GaRandom</a> interface. 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, but all public methods are thread-safe.
<p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="08422f72443dd544b93f59b0fed81862"></a><!-- doxytag: member="Common::GaRandomFloat::GaRandomFloat" ref="08422f72443dd544b93f59b0fed81862" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Common::GaRandomFloat::GaRandomFloat </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
This constructor initializes random generator with current time as seed.
<p>
</div>
</div><p>
<a class="anchor" name="e4fc9b9bcf0096676778c9e1aa539f91"></a><!-- doxytag: member="Common::GaRandomFloat::GaRandomFloat" ref="e4fc9b9bcf0096676778c9e1aa539f91" args="(unsigned long seed)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Common::GaRandomFloat::GaRandomFloat </td>
<td>(</td>
<td class="paramtype">unsigned long </td>
<td class="paramname"> <em>seed</em> </td>
<td> ) </td>
<td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
This constructor initialize random generator with user-defined seed.
<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>seed</em> </td><td>user-defined seed.</td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a58b13973040ace5e73e8913440366fd"></a><!-- doxytag: member="Common::GaRandomFloat::Generate" ref="a58b13973040ace5e73e8913440366fd" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual float GACALL Common::GaRandomFloat::Generate </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
This method generates random values in interval(0, 1).
<p>
This method is thread-safe. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns generate random value.</dd></dl>
<p>Implements <a class="el" href="class_common_1_1_ga_random.html#d6f9ee3346f19a552da4e70484de49eb">Common::GaRandom< float ></a>.</p>
</div>
</div><p>
<a class="anchor" name="6816d207eeeaac64b809cd56d96b80fc"></a><!-- doxytag: member="Common::GaRandomFloat::Generate" ref="6816d207eeeaac64b809cd56d96b80fc" args="(const float &max)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual float GACALL Common::GaRandomFloat::Generate </td>
<td>(</td>
<td class="paramtype">const float & </td>
<td class="paramname"> <em>max</em> </td>
<td> ) </td>
<td width="100%"><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
This method generates random values in interval(0, <code>max</code>).
<p>
This method is 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>max</em> </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>Implements <a class="el" href="class_common_1_1_ga_random.html#6116f8c2789932b7d8739362602af738">Common::GaRandom< float ></a>.</p>
</div>
</div><p>
<a class="anchor" name="f4be344484d88a34aa43566382476136"></a><!-- doxytag: member="Common::GaRandomFloat::Generate" ref="f4be344484d88a34aa43566382476136" args="(const float &min, const float &max)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual float GACALL Common::GaRandomFloat::Generate </td>
<td>(</td>
<td class="paramtype">const float & </td>
<td class="paramname"> <em>min</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float & </td>
<td class="paramname"> <em>max</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
This method generates random values in interval(<code>min</code>, <code>max</code>).
<p>
This method is 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>min</em> </td><td>minimal value which can be generated.</td></tr>
<tr><td valign="top"></td><td valign="top"><em>max</em> </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>Implements <a class="el" href="class_common_1_1_ga_random.html#cbd6b1eced274f8896b381428adee435">Common::GaRandom< float ></a>.</p>
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="264ff2a05c0c612b3934daca96c7b6ed"></a><!-- doxytag: member="Common::GaRandomFloat::_generator" ref="264ff2a05c0c612b3934daca96c7b6ed" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_common_1_1_ga_random_generator.html">GaRandomGenerator</a> <a class="el" href="class_common_1_1_ga_random_float.html#264ff2a05c0c612b3934daca96c7b6ed">Common::GaRandomFloat::_generator</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Instance of algorithm for generating random numbers.
<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>