<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r69383593">src/mlpack/methods/ne/neat.hpp</a>:</p>
<pre style='color:#555'>&gt; +    return -1;  // -1 means no match found, a new innovation.
&gt; +  }
&gt; +
&gt; +  // Check whether a neuron innovation already exist.
&gt; +  ssize_t CheckNeuronInnovation(ssize_t splitLinkInnovId) {
&gt; +    for (ssize_t i=0; i&lt;aNeuronInnovations.size(); ++i) {
&gt; +      if (aNeuronInnovations[i].splitLinkInnovId == splitLinkInnovId) {
&gt; +        return i;
&gt; +      }
&gt; +    }
&gt; +
&gt; +    return -1;
&gt; +  }
&gt; +
&gt; +  // Add a new link innovation.
&gt; +  LinkInnovation AddLinkInnovation(ssize_t fromNeuronId, ssize_t toNeuronId) {
</pre>
<p>I think it's a good idea to use a reference here:</p>

<p><code><br>
 AddLinkInnovation(ssize_t fromNeuronId, ssize_t toNeuronId, LinkInnovation&amp; linkInnov)<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#r69383593">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFEMFfhp6F4iY4fgzxTFNzEwL_5nBks5qRu4AgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFJejyjQYKSAmaFAiDUrjWIlDnJ0yks5qRu4AgaJpZM4IwJa6.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#r69383593"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>