/usr/share/doc/libevocosm-dev/html/a00003.html is in libevocosm-dev 3.1.0-3.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Evocosm</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<h1 align="center" color="#606080">
Evocosm - A C++ Framework for Evolutionary Computing
</h1>
<h2 align="center"><a href="index.html">Main Index</a></h2>
<p align="center">
Created by <a href="mailto:scott.ladd@@coyotegulch.com?subject=libevocosm">Scott Robert Ladd</a> at
<a href="http://www.coyotegulch.com">Coyote Gulch Productions</a>.
</p>
<hr>
<!-- Generated by Doxygen 1.7.4 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="a00051.html">libevocosm</a> </li>
<li class="navelem"><a class="el" href="a00003.html">evoreal</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">libevocosm::evoreal Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="libevocosm::evoreal" --><!-- doxytag: inherits="libevocosm::globals" -->
<p>Tools for evolving real numbers.
<a href="a00003.html#details">More...</a></p>
<p><code>#include <<a class="el" href="a00037_source.html">evoreal.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for libevocosm::evoreal:</div>
<div class="dyncontent">
<div class="center">
<img src="a00003.png" usemap="#libevocosm::evoreal_map" alt=""/>
<map id="libevocosm::evoreal_map" name="libevocosm::evoreal_map">
<area href="a00008.html" title="Elements shared by all classes in Evocosm." alt="libevocosm::globals" shape="rect" coords="0,0,124,24"/>
</map>
</div></div>
<p><a href="a00060.html">List of all members.</a></p>
<h2><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li><a class="el" href="a00003.html#a5a73ebc1646d6ff0eaf9209c61122e68">evoreal</a> (float a_sign_weight=5.0F, float a_exponent_weight=5.0F, float a_mantissa_weight=90.0F)
<dl class="el"><dd class="mdescRight">Creation constructor. <a href="#a5a73ebc1646d6ff0eaf9209c61122e68"></a><br/></dl><li><a class="el" href="a00003.html#a231271cb08c7ac7b317b66955ef44582">evoreal</a> (<a class="el" href="a00003.html">evoreal</a> &a_source)
<dl class="el"><dd class="mdescRight">Copy constructor. <a href="#a231271cb08c7ac7b317b66955ef44582"></a><br/></dl><li><a class="el" href="a00003.html">evoreal</a> & <a class="el" href="a00003.html#acb43516f7a6560f08f4553d97a210d41">operator=</a> (<a class="el" href="a00003.html">evoreal</a> &a_source)
<dl class="el"><dd class="mdescRight">Assignment. <a href="#acb43516f7a6560f08f4553d97a210d41"></a><br/></dl><li>float <a class="el" href="a00003.html#a4868f130ce3e90d3ccd19b33d3d3631f">mutate</a> (float a_f)
<dl class="el"><dd class="mdescRight">Mutation for <b>float</b> values. <a href="#a4868f130ce3e90d3ccd19b33d3d3631f"></a><br/></dl><li>double <a class="el" href="a00003.html#a8b8d17b69a3af3b808e56bc37f8d974e">mutate</a> (double a_d)
<dl class="el"><dd class="mdescRight">Mutation for <b>double</b> values. <a href="#a8b8d17b69a3af3b808e56bc37f8d974e"></a><br/></dl><li>float <a class="el" href="a00003.html#ae262cab3a9f1620404f51e7c985d6963">crossover</a> (float a_f1, float a_f2)
<dl class="el"><dd class="mdescRight">Crossover for <b>float</b> values. <a href="#ae262cab3a9f1620404f51e7c985d6963"></a><br/></dl><li>double <a class="el" href="a00003.html#a03dcd90a97ad0407a1f56a065aabe04a">crossover</a> (double a_d1, double a_d2)
<dl class="el"><dd class="mdescRight">Crossover for <b>double</b> values. <a href="#a03dcd90a97ad0407a1f56a065aabe04a"></a><br/></dl></ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The majority of genetic algorithms work on pure bit strings, converting those strings to the desired types for fitness testing. In Lawrence Davis' book "Handbook of Genetic Algorithms," he transforms a 44-bit string into two floating point values via a series of operations. I've seen similar techniques elsewhere, and I find them a bit cumbersome. </p>
<p>In the purest sense, a GA should have no knowledge of the format of the data it is modifying; however, natural chromosomes do encode some structure in their sequence; for example, crossover appears to take place in specific positions along the chromosome. And while mutation doesn't care about a chromosome's structure, it does affect that structure. In context of a computer program, the structure of a chromosome isn't so important as the ability to logically modify its bits through crossover and mutation. </p>
<p>I built tools for the mutation and crossover of encoded floating-point values of types <b>float</b> and <b>double</b>. The code that follows assumes we are working with 32-bit floats and 64-bit IEEE-754 doubles, which, in my experience, the norm for many C and C++ compilers. Yes, I'm aware of the VAX and other systems; this code is explicitly non-portable outside implementations of IEC 60559/IEEE-754. </p>
</div><hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a5a73ebc1646d6ff0eaf9209c61122e68"></a><!-- doxytag: member="libevocosm::evoreal::evoreal" ref="a5a73ebc1646d6ff0eaf9209c61122e68" args="(float a_sign_weight=5.0F, float a_exponent_weight=5.0F, float a_mantissa_weight=90.0F)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">libevocosm::evoreal::evoreal </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"><em>a_sign_weight</em> = <code>5.0F</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>a_exponent_weight</em> = <code>5.0F</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>a_mantissa_weight</em> = <code>90.0F</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new evoreal object based on a set of weights that define the chance of mutation in various components of a floating-point value. The default weights have worked well in a variety of applications, but are (of course) settable for specific application and experimentation. </p>
<p>Each weight is a percentage of the total of all three weights; for example, if the three weights add to 100 (as they do by efault), and a_sign_weight is 12, the chance of a mutation in the sign bit is 12%. The default weights were chosen based on experience in using these tools in a variety of applications. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_sign_weight</td><td>- Weight assigned to changes in sign </td></tr>
<tr><td class="paramname">a_exponent_weight</td><td>- Weight assigned to changes in the exponent </td></tr>
<tr><td class="paramname">a_mantissa_weight</td><td>- Weight assigned to changes in the mantissa </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a231271cb08c7ac7b317b66955ef44582"></a><!-- doxytag: member="libevocosm::evoreal::evoreal" ref="a231271cb08c7ac7b317b66955ef44582" args="(evoreal &a_source)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">libevocosm::evoreal::evoreal </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00003.html">evoreal</a> & </td>
<td class="paramname"><em>a_source</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new evoreal with the same states as an existing one. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_source</td><td>- The source object </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae262cab3a9f1620404f51e7c985d6963"></a><!-- doxytag: member="libevocosm::evoreal::crossover" ref="ae262cab3a9f1620404f51e7c985d6963" args="(float a_f1, float a_f2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float libevocosm::evoreal::crossover </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"><em>a_f1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>a_f2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new float by combining two values through a real-specialized form of crossover. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_f1</td><td>- First parent number </td></tr>
<tr><td class="paramname">a_f2</td><td>- Second parent number </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A combination of the two arguments </dd></dl>
</div>
</div>
<a class="anchor" id="a03dcd90a97ad0407a1f56a065aabe04a"></a><!-- doxytag: member="libevocosm::evoreal::crossover" ref="a03dcd90a97ad0407a1f56a065aabe04a" args="(double a_d1, double a_d2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double libevocosm::evoreal::crossover </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>a_d1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>a_d2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new double by combining two values through a real-specialized form of crossover. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_d1</td><td>- First parent number </td></tr>
<tr><td class="paramname">a_d2</td><td>- Second parent number </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A combination of the two arguments </dd></dl>
</div>
</div>
<a class="anchor" id="a4868f130ce3e90d3ccd19b33d3d3631f"></a><!-- doxytag: member="libevocosm::evoreal::mutate" ref="a4868f130ce3e90d3ccd19b33d3d3631f" args="(float a_f)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float libevocosm::evoreal::mutate </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"><em>a_f</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a new float that is a mutated version of the argument. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_f</td><td>- Number to be cloned; the result is then mutated </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A clone of a_f that has bene mutated </dd></dl>
</div>
</div>
<a class="anchor" id="a8b8d17b69a3af3b808e56bc37f8d974e"></a><!-- doxytag: member="libevocosm::evoreal::mutate" ref="a8b8d17b69a3af3b808e56bc37f8d974e" args="(double a_d)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double libevocosm::evoreal::mutate </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>a_d</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a new float that is a mutated version of the argument. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_d</td><td>- Number to be cloned; the result is then mutated </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A clone of a_d that has bene mutated </dd></dl>
</div>
</div>
<a class="anchor" id="acb43516f7a6560f08f4553d97a210d41"></a><!-- doxytag: member="libevocosm::evoreal::operator=" ref="acb43516f7a6560f08f4553d97a210d41" args="(evoreal &a_source)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00003.html">evoreal</a>& libevocosm::evoreal::operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00003.html">evoreal</a> & </td>
<td class="paramname"><em>a_source</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Assigns the state of one evoreal to another. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_source</td><td>- The source object </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00037_source.html">evoreal.h</a></li>
</ul>
</div>
<hr>
<p align="center"><small>
© 1996-2005 Scott Robert Ladd. All rights reserved.<br>
HTML documentation generated by Dimitri van Heesch's excellent <a href="http://www.doxygen.org">Doxygen</a> tool.
</small>
</p>
</body>
</html>
|