Initial commit
[trapthecap.git] / doc / classes / Genome.html
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE html
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <head>
8 <title>Class: Genome</title>
9 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10 <meta http-equiv="Content-Script-Type" content="text/javascript" />
11 <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12 <script type="text/javascript">
13 // <![CDATA[
14
15 function popupCode( url ) {
16 window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17 }
18
19 function toggleCode( id ) {
20 if ( document.getElementById )
21 elem = document.getElementById( id );
22 else if ( document.all )
23 elem = eval( "document.all." + id );
24 else
25 return false;
26
27 elemStyle = elem.style;
28
29 if ( elemStyle.display != "block" ) {
30 elemStyle.display = "block"
31 } else {
32 elemStyle.display = "none"
33 }
34
35 return true;
36 }
37
38 // Make codeblocks hidden by default
39 document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
41 // ]]>
42 </script>
43
44 </head>
45 <body>
46
47
48
49 <div id="classHeader">
50 <table class="header-table">
51 <tr class="top-aligned-row">
52 <td><strong>Class</strong></td>
53 <td class="class-name-in-header">Genome</td>
54 </tr>
55 <tr class="top-aligned-row">
56 <td><strong>In:</strong></td>
57 <td>
58 <a href="../files/lib/libgenetics_rb.html">
59 lib/libgenetics.rb
60 </a>
61 <br />
62 <a href="../files/lib/libpplayer_rb.html">
63 lib/libpplayer.rb
64 </a>
65 <br />
66 </td>
67 </tr>
68
69 <tr class="top-aligned-row">
70 <td><strong>Parent:</strong></td>
71 <td>
72 Object
73 </td>
74 </tr>
75 </table>
76 </div>
77 <!-- banner header -->
78
79 <div id="bodyContent">
80
81
82
83 <div id="contextContent">
84
85 <div id="description">
86 <p>
87 A single genome in a population
88 </p>
89
90 </div>
91
92
93 </div>
94
95 <div id="method-list">
96 <h3 class="section-bar">Methods</h3>
97
98 <div class="name-list">
99 <a href="#M000004">crossover</a>&nbsp;&nbsp;
100 <a href="#M000002">mutate</a>&nbsp;&nbsp;
101 <a href="#M000003">mutate!</a>&nbsp;&nbsp;
102 <a href="#M000001">new</a>&nbsp;&nbsp;
103 <a href="#M000005">to_potential_player</a>&nbsp;&nbsp;
104 </div>
105 </div>
106
107 </div>
108
109
110 <!-- if includes -->
111
112 <div id="section">
113
114
115
116
117
118 <div id="attribute-list">
119 <h3 class="section-bar">Attributes</h3>
120
121 <div class="name-list">
122 <table>
123 <tr class="top-aligned-row context-row">
124 <td class="context-item-name">genome</td>
125 <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
126 <td class="context-item-desc"></td>
127 </tr>
128 </table>
129 </div>
130 </div>
131
132
133
134 <!-- if method_list -->
135 <div id="methods">
136 <h3 class="section-bar">Public Class methods</h3>
137
138 <div id="method-M000001" class="method-detail">
139 <a name="M000001"></a>
140
141 <div class="method-heading">
142 <a href="Genome.src/M000001.html" target="Code" class="method-signature"
143 onclick="popupCode('Genome.src/M000001.html');return false;">
144 <span class="method-name">new</span><span class="method-args">(bitstring_or_length)</span>
145 </a>
146 </div>
147
148 <div class="method-description">
149 <p>
150 Create a random genome of the given length
151 </p>
152 </div>
153 </div>
154
155 <h3 class="section-bar">Public Instance methods</h3>
156
157 <div id="method-M000004" class="method-detail">
158 <a name="M000004"></a>
159
160 <div class="method-heading">
161 <a href="Genome.src/M000004.html" target="Code" class="method-signature"
162 onclick="popupCode('Genome.src/M000004.html');return false;">
163 <span class="method-name">crossover</span><span class="method-args">(other_genome, crossover_point)</span>
164 </a>
165 </div>
166
167 <div class="method-description">
168 <p>
169 Crossover two genomes at the given point
170 </p>
171 </div>
172 </div>
173
174 <div id="method-M000002" class="method-detail">
175 <a name="M000002"></a>
176
177 <div class="method-heading">
178 <a href="Genome.src/M000002.html" target="Code" class="method-signature"
179 onclick="popupCode('Genome.src/M000002.html');return false;">
180 <span class="method-name">mutate</span><span class="method-args">(mutation_probability = 0.05)</span>
181 </a>
182 </div>
183
184 <div class="method-description">
185 <p>
186 Mutate a genome with the given rate per bit
187 </p>
188 </div>
189 </div>
190
191 <div id="method-M000003" class="method-detail">
192 <a name="M000003"></a>
193
194 <div class="method-heading">
195 <a href="Genome.src/M000003.html" target="Code" class="method-signature"
196 onclick="popupCode('Genome.src/M000003.html');return false;">
197 <span class="method-name">mutate!</span><span class="method-args">(mutation_probability = 0.05)</span>
198 </a>
199 </div>
200
201 <div class="method-description">
202 <p>
203 Mutate a genome in-place with the given rate per bit
204 </p>
205 </div>
206 </div>
207
208 <div id="method-M000005" class="method-detail">
209 <a name="M000005"></a>
210
211 <div class="method-heading">
212 <a href="Genome.src/M000005.html" target="Code" class="method-signature"
213 onclick="popupCode('Genome.src/M000005.html');return false;">
214 <span class="method-name">to_potential_player</span><span class="method-args">()</span>
215 </a>
216 </div>
217
218 <div class="method-description">
219 <p>
220 Create a potential player from a genome
221 </p>
222 </div>
223 </div>
224
225
226 </div>
227
228
229 </div>
230
231
232 <div id="validator-badges">
233 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
234 </div>
235
236 </body>
237 </html>