<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r69383547">src/mlpack/methods/ne/genome.hpp</a>:</p>
<pre style='color:#555'>&gt; +        ssize_t fromNeuronIdx = GetNeuronIndex(aLinkGenes[i].FromNeuronId());
&gt; +        double input = aNeuronGenes[toNeuronIdx].Input() + 
&gt; +                       aNeuronGenes[fromNeuronIdx].Activation() * aLinkGenes[i].Weight();
&gt; +        aNeuronGenes[toNeuronIdx].Input(input);
&gt; +        
&gt; +        if (i == NumLink() - 1) {
&gt; +          aNeuronGenes[toNeuronIdx].CalcActivation();
&gt; +        } else if (GetNeuronIndex(aLinkGenes[i + 1].ToNeuronId()) != toNeuronIdx) {
&gt; +          aNeuronGenes[toNeuronIdx].CalcActivation();
&gt; +        }
&gt; +      }
&gt; +    }
&gt; +  }
&gt; +
&gt; +  // Get output vector.
&gt; +  std::vector&lt;double&gt; Output() {
</pre>
<p>Let's use a reference here, also, it might be a good idea, to use an arma::vec here:</p>

<p><code><br>
Output(std::vector&lt;double&gt;&amp; output)<br>
</code></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/686/files/554a279b0089e4385dfb40077e578d6ae2a42ece#r69383547">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFKei2HLsrGVGBGoMMBjorWPUSZBUks5qRuxKgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOOoIQlhDjsdf0bqL8T9VlaKEjwWks5qRuxKgaJpZM4IwJa6.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/686/files/554a279b0089e4385dfb40077e578d6ae2a42ece#r69383547"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>