<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=“www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Module: DSL — Documentation by YARD 0.8.7.3
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" /> <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type=“text/javascript” charset=“utf-8”>
hasFrames = window.top.frames.main ? true : false; relpath = ''; framesUrl = "frames.html#!" + escape(window.location.href);
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="js/app.js"></script> </head> <body> <div id="header"> <div id="menu"> <a href="_index.html">Index (D)</a> » <span class="title">DSL</span> <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search"> <a class="full_list_link" id="class_list_link" href="class_list.html"> Class List </a> <a class="full_list_link" id="method_list_link" href="method_list.html"> Method List </a> <a class="full_list_link" id="file_list_link" href="file_list.html"> File List </a>
</div>
<div class="clear"></div> </div> <iframe id="search_frame"></iframe> <div id="content"><h1>Module: DSL
</h1>
<dl class=“box”>
<dt class="r1">Includes:</dt> <dd class="r1"><span class='object_link'><a href="NEAT.html" title="NEAT (module)">NEAT</a></span>, <span class='object_link'><a href="NEAT/BasicNeuronTypes.html" title="NEAT::BasicNeuronTypes (module)">NEAT::BasicNeuronTypes</a></span></dd> <dt class="r2 last">Defined in:</dt> <dd class="r2 last">lib/rubyneat/dsl.rb</dd>
</dl> <div class=“clear”></div>
<h2>Overview</h2><div class=“docstring”>
<div class="discussion">
<h1 id=“label-RubyNEAT+DSL”>RubyNEAT DSL</h1>
<p>DSL is a doman-specific language for RubyNEAT to allow you to configure the NEAT engine for various evolutionary projects.</p>
</div>
</div> <div class=“tags”>
</div>
<h2>Constant Summary</h2> <h2>Constant Summary</h2> <h3 class="inherited">Constants included from <span class='object_link'><a href="NEAT.html" title="NEAT (module)">NEAT</a></span></h3> <p class="inherited"><span class='object_link'><a href="NEAT.html#STIMULUS-constant" title="NEAT::STIMULUS (constant)">NEAT::STIMULUS</a></span></p> <h2> Instance Method Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#condition_boolean_vector-instance_method" title="#condition_boolean_vector (instance method)">- (Object) <strong>condition_boolean_vector</strong>(vec) </a> </span> <span class="summary_desc"><div class='inline'>
<p>Helper function to Condition boolean vectors to be +1 if true, -1 if false.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#define-instance_method" title="#define (instance method)">- (Object) <strong>define</strong>(name = NEAT.random_name_generator, &block) </a> </span> <span class="summary_desc"><div class='inline'>
<p>DSL – Define defines the parameters to the controller.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#evolve-instance_method" title="#evolve (instance method)">- (Object) <strong>evolve</strong>(&block) </a> </span> <span class="summary_desc"><div class='inline'>
<p>DSL – Run evolution.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#fitness-instance_method" title="#fitness (instance method)">- (Object) <strong>fitness</strong>(&block) </a> </span> <span class="summary_desc"><div class='inline'>
<p>fitness function calls the block with 2 vectors or two hashes, input and output vectors of the critter being evaluated for fitness, as well as a sequence number that can be used to index what the actual output should be.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(m, *args, &block) </a> </span> <span class="summary_desc"><div class='inline'>
<p>This is used to handle the details of our DSL.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#query-instance_method" title="#query (instance method)">- (Object) <strong>query</strong>(&block) </a> </span> <span class="summary_desc"><div class='inline'>
<p>Query function is called with the sequence (time evalution) number, and returns an array or hash of parameters that will be given to the input nodes.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#report-instance_method" title="#report (instance method)">- (Object) <strong>report</strong>(&block) </a> </span> <span class="summary_desc"><div class='inline'>
<p>Report on evaluations.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#run_engine-instance_method" title="#run_engine (instance method)">- (Object) <strong>run_engine</strong>(&block) </a> </span> <span class="summary_desc"><div class='inline'>
<p>Run the engine.</p> </div></span>
</li>
<li class="public "> <span class="summary_signature"> <a href="#uncondition_boolean_vector-instance_method" title="#uncondition_boolean_vector (instance method)">- (Object) <strong>uncondition_boolean_vector</strong>(vec) </a> </span> <span class="summary_desc"><div class='inline'>
<p>Helper function to Uncondition boolean vectors to be +1 if true, -1 if false.</p> </div></span>
</li>
</ul> <h3 class="inherited">Methods included from <span class='object_link'><a href="NEAT.html" title="NEAT (module)">NEAT</a></span></h3> <p class="inherited"><span class='object_link'><a href="NEAT.html#controller-class_method" title="NEAT.controller (method)">controller</a></span>, <span class='object_link'><a href="NEAT.html#controller%3D-class_method" title="NEAT.controller= (method)">controller=</a></span>, <span class='object_link'><a href="NEAT.html#create_controller-class_method" title="NEAT.create_controller (method)">create_controller</a></span>, <span class='object_link'><a href="NEAT.html#dpp-class_method" title="NEAT.dpp (method)">dpp</a></span>, <span class='object_link'><a href="NEAT.html#gaussian-class_method" title="NEAT.gaussian (method)">gaussian</a></span>, <span class='object_link'><a href="NEAT.html#new_innovation-class_method" title="NEAT.new_innovation (method)">new_innovation</a></span>, <span class='object_link'><a href="NEAT.html#random_name_generator-class_method" title="NEAT.random_name_generator (method)">random_name_generator</a></span></p>
<div id=“method_missing_details” class=“method_details_list”>
<h2>Dynamic Method Handling</h2> <p class="notice this"> This class handles dynamic methods through the <tt>method_missing</tt> method </p> <div class="method_details first"> <h3 class="signature first" id="method_missing-instance_method"> - (<tt>Object</tt>) <strong>method_missing</strong>(m, *args, &block)
</h3><div class=“docstring”>
<div class="discussion">
<p>This is used to handle the details of our DSL.</p>
</div>
</div> <div class=“tags”>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
82 83 84 85 86 87 88 89 90 91 92</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 82</span>
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_m'>m</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='comment'># we want to catch parameters settings here.
</span> <span class='kw'>if</span> <span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_parms'>parms</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span> <span class='lparen'>(</span><span class='id identifier rubyid_assignment'>assignment</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>=</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rparen'>)</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>NeatException</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Missing value(s) to %s</span><span class='tstring_end'>"</span></span> <span class='op'>%</span> <span class='id identifier rubyid_m'>m</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='id identifier rubyid_val'>val</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='id identifier rubyid_args'>args</span> <span class='gvar'>$log</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Caught method %s with parameter of %s</span><span class='tstring_end'>"</span></span> <span class='op'>%</span> <span class='lbracket'>[</span><span class='id identifier rubyid_assignment'>assignment</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rbracket'>]</span> <span class='rbrace'>}</span> <span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_parms'>parms</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_assignment'>assignment</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span> <span class='kw'>else</span> <span class='kw'>super</span> <span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
</div>
<div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> <h3 class="signature first" id="condition_boolean_vector-instance_method"> - (<tt>Object</tt>) <strong>condition_boolean_vector</strong>(vec)
</h3><div class=“docstring”>
<div class="discussion">
<p>Helper function to Condition boolean vectors to be +1 if true, -1 if false</p>
</div>
</div> <div class=“tags”>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
57 58 59</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 57</span>
<span class='kw'>def</span> <span class='id identifier rubyid_condition_boolean_vector'>condition_boolean_vector</span><span class='lparen'>(</span><span class='id identifier rubyid_vec'>vec</span><span class='rparen'>)</span>
<span class='id identifier rubyid_vec'>vec</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_b'>b</span><span class='op'>|</span> <span class='id identifier rubyid_b'>b</span> <span class='op'>?</span> <span class='int'>1</span> <span class='op'>:</span> <span class='op'>-</span><span class='int'>1</span><span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
<div class="method_details "> <h3 class="signature " id="define-instance_method"> - (<tt>Object</tt>) <strong>define</strong>(name = NEAT.random_name_generator, &block)
</h3><div class=“docstring”>
<div class="discussion">
<p>DSL – Define defines the parameters to the controller.</p>
</div>
</div> <div class=“tags”>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 14</span>
<span class='kw'>def</span> <span class='id identifier rubyid_define'>define</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='const'>NEAT</span><span class='period'>.</span><span class='id identifier rubyid_random_name_generator'>random_name_generator</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='lbracket'>[</span> <span class='symbol'>:inputs</span><span class='comma'>,</span> <span class='symbol'>:outputs</span><span class='comma'>,</span> <span class='symbol'>:hidden</span> <span class='comment'># we really don't care about mapping hidden neurons, but we'll ignore them later.
</span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_iometh'>iometh</span><span class='op'>|</span>
<span class='id identifier rubyid_instance_eval'>instance_eval</span> <span class='tstring'><span class='tstring_beg'>%Q[</span><span class='tstring_content'> def </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_iometh'>iometh</span><span class='embexpr_end'>}</span><span class='tstring_content'>(nodes = nil, &block) neui = unless nodes.nil? nodes else block.() end NEAT::controller.neural_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_iometh'>iometh</span><span class='embexpr_end'>}</span><span class='tstring_content'> = if neui.kind_of? Hash neui else Hash[neui.map{|n| [NEAT::random_name_generator, n]}] end end</span><span class='tstring_end'>]</span></span> <span class='kw'>end</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='lparen'>(</span><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
<div class="method_details "> <h3 class="signature " id="evolve-instance_method"> - (<tt>Object</tt>) <strong>evolve</strong>(&block)
</h3><div class=“docstring”>
<div class="discussion">
<p>DSL – Run evolution</p>
</div>
</div> <div class=“tags”>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
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</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 38</span>
<span class='kw'>def</span> <span class='id identifier rubyid_evolve'>evolve</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='comment'># Query function is called with the sequence (time evalution) number,
</span> <span class='comment'># and returns an array or hash of parameters that will be given </span> <span class='comment'># to the input nodes. In the case of hash, the keys in the hash </span> <span class='comment'># shall correspond to the names given to the input neurons. </span> <span class='kw'>def</span> <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_query_func'>query_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span> <span class='kw'>end</span> <span class='comment'># fitness function calls the block with 2 vectors or two hashes, input and output
</span> <span class='comment'># vectors of the critter being evaluated for fitness, as well as a sequence </span> <span class='comment'># number that can be used to index what the actual output should be. </span> <span class='comment'># |vin, vout, seq| </span> <span class='kw'>def</span> <span class='id identifier rubyid_fitness'>fitness</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_fitness_func'>fitness_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span> <span class='kw'>end</span> <span class='comment'># Helper function to
</span> <span class='comment'># Condition boolean vectors to be +1 if true, -1 if false </span> <span class='kw'>def</span> <span class='id identifier rubyid_condition_boolean_vector'>condition_boolean_vector</span><span class='lparen'>(</span><span class='id identifier rubyid_vec'>vec</span><span class='rparen'>)</span>
<span class='id identifier rubyid_vec'>vec</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_b'>b</span><span class='op'>|</span> <span class='id identifier rubyid_b'>b</span> <span class='op'>?</span> <span class='int'>1</span> <span class='op'>:</span> <span class='op'>-</span><span class='int'>1</span><span class='rbrace'>}</span> <span class='kw'>end</span> <span class='comment'># Helper function to
</span> <span class='comment'># Uncondition boolean vectors to be +1 if true, -1 if false </span> <span class='kw'>def</span> <span class='id identifier rubyid_uncondition_boolean_vector'>uncondition_boolean_vector</span><span class='lparen'>(</span><span class='id identifier rubyid_vec'>vec</span><span class='rparen'>)</span>
<span class='id identifier rubyid_vec'>vec</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_o'>o</span> <span class='op'>></span> <span class='float'>0.0</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span><span class='rbrace'>}</span> <span class='kw'>end</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='lparen'>(</span><span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
<div class="method_details "> <h3 class="signature " id="fitness-instance_method"> - (<tt>Object</tt>) <strong>fitness</strong>(&block)
</h3><div class=“docstring”>
<div class="discussion">
<p>fitness function calls the block with 2 vectors or two hashes, input and output vectors of the critter being evaluated for fitness, as well as a sequence number that can be used to index what the actual output should be. |vin, vout, seq|</p>
</div>
</div> <div class=“tags”>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
51 52 53</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 51</span>
<span class='kw'>def</span> <span class='id identifier rubyid_fitness'>fitness</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_fitness_func'>fitness_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
<div class="method_details "> <h3 class="signature " id="query-instance_method"> - (<tt>Object</tt>) <strong>query</strong>(&block)
</h3><div class=“docstring”>
<div class="discussion">
<p>Query function is called with the sequence (time evalution) number, and returns an array or hash of parameters that will be given to the input nodes. In the case of hash, the keys in the hash shall correspond to the names given to the input neurons.</p>
</div>
</div> <div class=“tags”>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
43 44 45</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 43</span>
<span class='kw'>def</span> <span class='id identifier rubyid_query'>query</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_query_func'>query_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
<div class="method_details "> <h3 class="signature " id="report-instance_method"> - (<tt>Object</tt>) <strong>report</strong>(&block)
</h3><div class=“docstring”>
<div class="discussion">
<p>Report on evaluations</p>
</div>
</div> <div class=“tags”>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
72 73</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 72</span>
<span class='kw'>def</span> <span class='id identifier rubyid_report'>report</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span> <span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
<div class="method_details "> <h3 class="signature " id="run_engine-instance_method"> - (<tt>Object</tt>) <strong>run_engine</strong>(&block)
</h3><div class=“docstring”>
<div class="discussion">
<p>Run the engine. The block is called on each generation.</p>
</div>
</div> <div class=“tags”>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
76 77 78 79</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 76</span>
<span class='kw'>def</span> <span class='id identifier rubyid_run_engine'>run_engine</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_end_run_func'>end_run_func</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span> <span class='const'>NEAT</span><span class='op'>::</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
<div class="method_details "> <h3 class="signature " id="uncondition_boolean_vector-instance_method"> - (<tt>Object</tt>) <strong>uncondition_boolean_vector</strong>(vec)
</h3><div class=“docstring”>
<div class="discussion">
<p>Helper function to Uncondition boolean vectors to be +1 if true, -1 if false</p>
</div>
</div> <div class=“tags”>
</div><table class=“source_code”>
<tr> <td> <pre class="lines">
63 64 65</pre>
</td> <td> <pre class="code"><span class="info file"># File 'lib/rubyneat/dsl.rb', line 63</span>
<span class='kw'>def</span> <span class='id identifier rubyid_uncondition_boolean_vector'>uncondition_boolean_vector</span><span class='lparen'>(</span><span class='id identifier rubyid_vec'>vec</span><span class='rparen'>)</span>
<span class='id identifier rubyid_vec'>vec</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_o'>o</span><span class='op'>|</span> <span class='id identifier rubyid_o'>o</span> <span class='op'>></span> <span class='float'>0.0</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span><span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
</td> </tr>
</table> </div>
</div>
</div>
<div id="footer"> Generated on Sun Dec 29 20:55:08 2013 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.8.7.3 (ruby-2.0.0).
</div>
</body>
</html>