/usr/share/doc/libevocosm-dev/html/a00031.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 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | <!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="a00031.html">simple_fsm</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="#pro-static-attribs">Static Protected Attributes</a> </div>
<div class="headertitle">
<div class="title">libevocosm::simple_fsm< InSize, OutSize > Class Template Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="libevocosm::simple_fsm" --><!-- doxytag: inherits="libevocosm::globals,libevocosm::fsm_tools" -->
<p>A finite state machine.
<a href="a00031.html#details">More...</a></p>
<p><code>#include <<a class="el" href="a00050_source.html">simple_fsm.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for libevocosm::simple_fsm< InSize, OutSize >:</div>
<div class="dyncontent">
<div class="center">
<img src="a00031.png" usemap="#libevocosm::simple_fsm< InSize, OutSize >_map" alt=""/>
<map id="libevocosm::simple_fsm< InSize, OutSize >_map" name="libevocosm::simple_fsm< InSize, OutSize >_map">
<area href="a00008.html" title="Elements shared by all classes in Evocosm." alt="libevocosm::globals" shape="rect" coords="0,0,253,24"/>
<area href="a00006.html" alt="libevocosm::fsm_tools" shape="rect" coords="263,0,516,24"/>
</map>
</div></div>
<p><a href="a00085.html">List of all members.</a></p>
<h2><a name="nested-classes"></a>
Classes</h2>
<ul>
<li>struct <a class="el" href="a00032.html">tranout_t</a>
<dl class="el"><dd class="mdescRight">Defines a transition and output state pair. <a href="a00032.html#details">More...</a><br/></dl></ul>
<h2><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li><a class="el" href="a00031.html#a8ac3ae6ff3fcb19d024743b97986c3ae">simple_fsm</a> (size_t a_size)
<dl class="el"><dd class="mdescRight">Creation constructor. <a href="#a8ac3ae6ff3fcb19d024743b97986c3ae"></a><br/></dl><li><a class="el" href="a00031.html#aac6275924b07fb055db20132b3925ad5">simple_fsm</a> (const <a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize > &a_parent1, const <a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize > &a_parent2)
<dl class="el"><dd class="mdescRight">Construct via bisexual crossover. <a href="#aac6275924b07fb055db20132b3925ad5"></a><br/></dl><li><a class="el" href="a00031.html#adc0656bb1323e17a14cf6da0a8a46592">simple_fsm</a> (const <a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize > &a_source)
<dl class="el"><dd class="mdescRight">Copy constructor. <a href="#adc0656bb1323e17a14cf6da0a8a46592"></a><br/></dl><li>virtual <a class="el" href="a00031.html#aea029c2abc05148ac751de16746d6aaf">~simple_fsm</a> ()
<dl class="el"><dd class="mdescRight">Virtual destructor. <a href="#aea029c2abc05148ac751de16746d6aaf"></a><br/></dl><li><a class="el" href="a00031.html">simple_fsm</a> & <a class="el" href="a00031.html#a35f6d813bb5d647ee08b046506a2108b">operator=</a> (const <a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize > &a_source)
<li>void <a class="el" href="a00031.html#af23c85c810a5460226509c7c40bf41d7">mutate</a> (double a_rate)
<dl class="el"><dd class="mdescRight">Mutation. <a href="#af23c85c810a5460226509c7c40bf41d7"></a><br/></dl><li>size_t <a class="el" href="a00031.html#a036dc5db922b27d44b260d523d317e8c">transition</a> (size_t a_input)
<dl class="el"><dd class="mdescRight">Cause state transition. <a href="#a036dc5db922b27d44b260d523d317e8c"></a><br/></dl><li>void <a class="el" href="a00031.html#ab1bc6b840999fb41366264566c142363">reset</a> ()
<dl class="el"><dd class="mdescRight">Reset to start-up state. <a href="#ab1bc6b840999fb41366264566c142363"></a><br/></dl><li>size_t <a class="el" href="a00031.html#ac96baae705433d6ac5189e1701fcb2e2">size</a> () const
<dl class="el"><dd class="mdescRight">Get size. <a href="#ac96baae705433d6ac5189e1701fcb2e2"></a><br/></dl><li>const <a class="el" href="a00032.html">tranout_t</a> & <a class="el" href="a00031.html#a06399f9af5d69fed21b43e7b7f653b04">get_transition</a> (size_t a_state, size_t a_input) const
<dl class="el"><dd class="mdescRight">Get a transition from the internal state table. <a href="#a06399f9af5d69fed21b43e7b7f653b04"></a><br/></dl><li>size_t <a class="el" href="a00031.html#a63da38d645e320f8e1d5c513985438bd">num_input_states</a> () const
<dl class="el"><dd class="mdescRight">Get number of input states. <a href="#a63da38d645e320f8e1d5c513985438bd"></a><br/></dl><li>size_t <a class="el" href="a00031.html#af0e98050a58c868d0141690038de410d">num_output_states</a> () const
<dl class="el"><dd class="mdescRight">Get number of output states. <a href="#af0e98050a58c868d0141690038de410d"></a><br/></dl><li>size_t <a class="el" href="a00031.html#a01045e0e4a4759fbeeccdba927f42859">init_state</a> () const
<dl class="el"><dd class="mdescRight">Get initial state. <a href="#a01045e0e4a4759fbeeccdba927f42859"></a><br/></dl><li>size_t <a class="el" href="a00031.html#a7e64dd6afa2f1cc557b842c303ab27ae">current_state</a> () const
<dl class="el"><dd class="mdescRight">Get current state. <a href="#a7e64dd6afa2f1cc557b842c303ab27ae"></a><br/></dl></ul>
<h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2>
<ul>
<li>static void <a class="el" href="a00031.html#a4ef651ac87f21aac7f53019d5f99dbb1">set_mutation_weight</a> (<a class="el" href="a00006.html#a6ca2d286249aafc52418759d31bf2c11">mutation_id</a> a_type, double a_weight)
<dl class="el"><dd class="mdescRight">Set a mutation weight. <a href="#a4ef651ac87f21aac7f53019d5f99dbb1"></a><br/></dl></ul>
<h2><a name="pro-attribs"></a>
Protected Attributes</h2>
<ul>
<li><a class="anchor" id="a22ad6c320a9f9d677f3506048c7ceb21"></a><!-- doxytag: member="libevocosm::simple_fsm::m_state_table" ref="a22ad6c320a9f9d677f3506048c7ceb21" args="" -->
<a class="el" href="a00032.html">tranout_t</a> ** <a class="el" href="a00031.html#a22ad6c320a9f9d677f3506048c7ceb21">m_state_table</a>
<dl class="el"><dd class="mdescRight">State table (the machine definition) <br/></dl><li><a class="anchor" id="a7f3eb9cc715515feed152e8ba4f5fc76"></a><!-- doxytag: member="libevocosm::simple_fsm::m_init_state" ref="a7f3eb9cc715515feed152e8ba4f5fc76" args="" -->
size_t <a class="el" href="a00031.html#a7f3eb9cc715515feed152e8ba4f5fc76">m_init_state</a>
<dl class="el"><dd class="mdescRight">Initial state. <br/></dl><li><a class="anchor" id="aee2cfc9f7b9367bf4da02625f0e9c1f9"></a><!-- doxytag: member="libevocosm::simple_fsm::m_current_state" ref="aee2cfc9f7b9367bf4da02625f0e9c1f9" args="" -->
size_t <a class="el" href="a00031.html#aee2cfc9f7b9367bf4da02625f0e9c1f9">m_current_state</a>
<dl class="el"><dd class="mdescRight">Current state. <br/></dl><li><a class="anchor" id="a7e7386dd92c22448466f1a89a6a45d8a"></a><!-- doxytag: member="libevocosm::simple_fsm::m_size" ref="a7e7386dd92c22448466f1a89a6a45d8a" args="" -->
size_t <a class="el" href="a00031.html#a7e7386dd92c22448466f1a89a6a45d8a">m_size</a>
<dl class="el"><dd class="mdescRight">Number of states. <br/></dl></ul>
<h2><a name="pro-static-attribs"></a>
Static Protected Attributes</h2>
<ul>
<li><a class="anchor" id="adebec6b61a0d57e67c5a087ca72e402c"></a><!-- doxytag: member="libevocosm::simple_fsm::g_selector" ref="adebec6b61a0d57e67c5a087ca72e402c" args="" -->
static mutation_selector <a class="el" href="a00031.html#adebec6b61a0d57e67c5a087ca72e402c">g_selector</a>
<dl class="el"><dd class="mdescRight">Global mutation selector. <br/></dl></ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template<size_t InSize, size_t OutSize><br/>
class libevocosm::simple_fsm< InSize, OutSize ></h3>
<p>The class defines an abstract finite state machine that uses unsigned integer input and output types. This is much faster than the generic fsm class because the transition table can be represented as a simple two-dimensional array. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">InputSize</td><td>Number of input states </td></tr>
<tr><td class="paramname">OutputSize</td><td>Number of output states </td></tr>
</table>
</dd>
</dl>
</div><hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a8ac3ae6ff3fcb19d024743b97986c3ae"></a><!-- doxytag: member="libevocosm::simple_fsm::simple_fsm" ref="a8ac3ae6ff3fcb19d024743b97986c3ae" args="(size_t a_size)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::<a class="el" href="a00031.html">simple_fsm</a> </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>a_size</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new finite state machine with a given number of states. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_size</td><td>- Initial number of states in this machine </td></tr>
</table>
</dd>
</dl>
<p>References <a class="el" href="a00008.html#a9825bffe91d1fd4ab6b4d1dc1013c586">libevocosm::globals::g_random</a>, <a class="el" href="a00031.html#aee2cfc9f7b9367bf4da02625f0e9c1f9">libevocosm::simple_fsm< InSize, OutSize >::m_current_state</a>, <a class="el" href="a00031.html#a7f3eb9cc715515feed152e8ba4f5fc76">libevocosm::simple_fsm< InSize, OutSize >::m_init_state</a>, <a class="el" href="a00032.html#a39120d03d086180d7472022cb52a75ff">libevocosm::simple_fsm< InSize, OutSize >::tranout_t::m_new_state</a>, <a class="el" href="a00032.html#afc28f0c42f7e5b835a6db796f9161d8c">libevocosm::simple_fsm< InSize, OutSize >::tranout_t::m_output</a>, <a class="el" href="a00031.html#a7e7386dd92c22448466f1a89a6a45d8a">libevocosm::simple_fsm< InSize, OutSize >::m_size</a>, and <a class="el" href="a00031.html#a22ad6c320a9f9d677f3506048c7ceb21">libevocosm::simple_fsm< InSize, OutSize >::m_state_table</a>.</p>
</div>
</div>
<a class="anchor" id="aac6275924b07fb055db20132b3925ad5"></a><!-- doxytag: member="libevocosm::simple_fsm::simple_fsm" ref="aac6275924b07fb055db20132b3925ad5" args="(const simple_fsm< InSize, OutSize > &a_parent1, const simple_fsm< InSize, OutSize > &a_parent2)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::<a class="el" href="a00031.html">simple_fsm</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize > & </td>
<td class="paramname"><em>a_parent1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize > & </td>
<td class="paramname"><em>a_parent2</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new <a class="el" href="a00031.html" title="A finite state machine.">simple_fsm</a> by combining the states of two parent machines. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_parent1</td><td>- The first parent organism </td></tr>
<tr><td class="paramname">a_parent2</td><td>- The second parent organism </td></tr>
</table>
</dd>
</dl>
<p>References <a class="el" href="a00008.html#a9825bffe91d1fd4ab6b4d1dc1013c586">libevocosm::globals::g_random</a>, <a class="el" href="a00031.html#aee2cfc9f7b9367bf4da02625f0e9c1f9">libevocosm::simple_fsm< InSize, OutSize >::m_current_state</a>, <a class="el" href="a00031.html#a7f3eb9cc715515feed152e8ba4f5fc76">libevocosm::simple_fsm< InSize, OutSize >::m_init_state</a>, <a class="el" href="a00032.html#a39120d03d086180d7472022cb52a75ff">libevocosm::simple_fsm< InSize, OutSize >::tranout_t::m_new_state</a>, <a class="el" href="a00032.html#afc28f0c42f7e5b835a6db796f9161d8c">libevocosm::simple_fsm< InSize, OutSize >::tranout_t::m_output</a>, <a class="el" href="a00031.html#a7e7386dd92c22448466f1a89a6a45d8a">libevocosm::simple_fsm< InSize, OutSize >::m_size</a>, and <a class="el" href="a00031.html#a22ad6c320a9f9d677f3506048c7ceb21">libevocosm::simple_fsm< InSize, OutSize >::m_state_table</a>.</p>
</div>
</div>
<a class="anchor" id="adc0656bb1323e17a14cf6da0a8a46592"></a><!-- doxytag: member="libevocosm::simple_fsm::simple_fsm" ref="adc0656bb1323e17a14cf6da0a8a46592" args="(const simple_fsm< InSize, OutSize > &a_source)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::<a class="el" href="a00031.html">simple_fsm</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize > & </td>
<td class="paramname"><em>a_source</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new <a class="el" href="a00031.html" title="A finite state machine.">simple_fsm</a> identical to an existing one. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_source</td><td>- Object to be copied </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aea029c2abc05148ac751de16746d6aaf"></a><!-- doxytag: member="libevocosm::simple_fsm::~simple_fsm" ref="aea029c2abc05148ac751de16746d6aaf" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::~<a class="el" href="a00031.html">simple_fsm</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Does nothing in the base class; exists to allow destruction of derived class objects through base class pointers. </p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7e64dd6afa2f1cc557b842c303ab27ae"></a><!-- doxytag: member="libevocosm::simple_fsm::current_state" ref="a7e64dd6afa2f1cc557b842c303ab27ae" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">size_t <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::current_state </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the current (active) state. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The current state </dd></dl>
</div>
</div>
<a class="anchor" id="a06399f9af5d69fed21b43e7b7f653b04"></a><!-- doxytag: member="libevocosm::simple_fsm::get_transition" ref="a06399f9af5d69fed21b43e7b7f653b04" args="(size_t a_state, size_t a_input) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize >::<a class="el" href="a00032.html">tranout_t</a> & <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::get_transition </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>a_state</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>a_input</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get a transition from the internal state table. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_state</td><td>- Target state </td></tr>
<tr><td class="paramname">a_input</td><td>- State information to return </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A transition from the internal state table </dd></dl>
</div>
</div>
<a class="anchor" id="a01045e0e4a4759fbeeccdba927f42859"></a><!-- doxytag: member="libevocosm::simple_fsm::init_state" ref="a01045e0e4a4759fbeeccdba927f42859" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">size_t <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::init_state </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the initial (start up) state. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The initial state </dd></dl>
</div>
</div>
<a class="anchor" id="af23c85c810a5460226509c7c40bf41d7"></a><!-- doxytag: member="libevocosm::simple_fsm::mutate" ref="af23c85c810a5460226509c7c40bf41d7" args="(double a_rate)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::mutate </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"><em>a_rate</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Mutates a finite state machine object. The four mutations supported are:</p>
<ul>
<li>Change a random output symbol</li>
<li>Change a random state transition</li>
<li>Swap two randomly-selected states</li>
<li>Randomly change the initial state Why not store the input and output sets in the machine itself? That would duplicate information across every machine of a given type, greatly increasing the memory footprint of each <a class="el" href="a00031.html" title="A finite state machine.">simple_fsm</a>. The same principle holds for the mutation selector. <dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_rate</td><td>- Chance that any given state will mutate </td></tr>
</table>
</dd>
</dl>
</li>
</ul>
<p>References <a class="el" href="a00032.html#a39120d03d086180d7472022cb52a75ff">libevocosm::simple_fsm< InSize, OutSize >::tranout_t::m_new_state</a>.</p>
</div>
</div>
<a class="anchor" id="a63da38d645e320f8e1d5c513985438bd"></a><!-- doxytag: member="libevocosm::simple_fsm::num_input_states" ref="a63da38d645e320f8e1d5c513985438bd" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">size_t <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::num_input_states </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the number of input states </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of input states </dd></dl>
</div>
</div>
<a class="anchor" id="af0e98050a58c868d0141690038de410d"></a><!-- doxytag: member="libevocosm::simple_fsm::num_output_states" ref="af0e98050a58c868d0141690038de410d" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">size_t <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::num_output_states </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the number of output states </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of output states </dd></dl>
</div>
</div>
<a class="anchor" id="a35f6d813bb5d647ee08b046506a2108b"></a><!-- doxytag: member="libevocosm::simple_fsm::operator=" ref="a35f6d813bb5d647ee08b046506a2108b" args="(const simple_fsm< InSize, OutSize > &a_source)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize > & <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="a00031.html">simple_fsm</a>< InSize, OutSize > & </td>
<td class="paramname"><em>a_source</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Copies the state of an existing <a class="el" href="a00031.html" title="A finite state machine.">simple_fsm</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_source</td><td>- Object to be copied </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A reference to the target object </dd></dl>
<p>References <a class="el" href="a00031.html#aee2cfc9f7b9367bf4da02625f0e9c1f9">libevocosm::simple_fsm< InSize, OutSize >::m_current_state</a>, <a class="el" href="a00031.html#a7f3eb9cc715515feed152e8ba4f5fc76">libevocosm::simple_fsm< InSize, OutSize >::m_init_state</a>, and <a class="el" href="a00031.html#a7e7386dd92c22448466f1a89a6a45d8a">libevocosm::simple_fsm< InSize, OutSize >::m_size</a>.</p>
</div>
</div>
<a class="anchor" id="ab1bc6b840999fb41366264566c142363"></a><!-- doxytag: member="libevocosm::simple_fsm::reset" ref="ab1bc6b840999fb41366264566c142363" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::reset </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Prepares the FSM to start running from its initial state. </p>
</div>
</div>
<a class="anchor" id="a4ef651ac87f21aac7f53019d5f99dbb1"></a><!-- doxytag: member="libevocosm::simple_fsm::set_mutation_weight" ref="a4ef651ac87f21aac7f53019d5f99dbb1" args="(mutation_id a_type, double a_weight)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::set_mutation_weight </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00006.html#a6ca2d286249aafc52418759d31bf2c11">mutation_id</a> </td>
<td class="paramname"><em>a_type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>a_weight</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the weight value associated with a specific mutation; this changes the relative chance of this mutation happening. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_type</td><td>- ID of the weight to be changed </td></tr>
<tr><td class="paramname">a_weight</td><td>- New weight to be assigned </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac96baae705433d6ac5189e1701fcb2e2"></a><!-- doxytag: member="libevocosm::simple_fsm::size" ref="ac96baae705433d6ac5189e1701fcb2e2" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">size_t <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the size of a <a class="el" href="a00031.html" title="A finite state machine.">simple_fsm</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The size, in number of states </dd></dl>
</div>
</div>
<a class="anchor" id="a036dc5db922b27d44b260d523d317e8c"></a><!-- doxytag: member="libevocosm::simple_fsm::transition" ref="a036dc5db922b27d44b260d523d317e8c" args="(size_t a_input)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<size_t InSize, size_t OutSize> </div>
<table class="memname">
<tr>
<td class="memname">size_t <a class="el" href="a00031.html">libevocosm::simple_fsm</a>< InSize, OutSize >::transition </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>a_input</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Based on an input symbol, this function changes the state of an <a class="el" href="a00031.html" title="A finite state machine.">simple_fsm</a> and returns an output symbol. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">a_input</td><td>- An input value </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Output value resulting from transition </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00050_source.html">simple_fsm.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>
|