<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r66966608">src/mlpack/methods/ne/genome.hpp</a>:</p>
<pre style='color:#555'>&gt; +      if (aNeuronGenes[i].Id() == id) {
&gt; +        return aNeuronGenes[i];
&gt; +      }
&gt; +    }
&gt; +  }
&gt; +
&gt; +  // Get neuron index by id.
&gt; +  size_t GetNeuronIndex(size_t id) const {
&gt; +    for(size_t i=0; i &lt; NumNeuron(); ++i) {
&gt; +        if (aNeuronGenes[i].Id() == id) {
&gt; +            return i;
&gt; +        }
&gt; +    }
&gt; +
&gt; +    return -1;
&gt; +  }
</pre>
<p>If we use size_t as return type, we can't use -1, maybe we can start with 1 and return 0?</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/ee548b6e8b43ae5ef30eda8d5ed8b85d5908d0a0#r66966608">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFH6tGQP874fE20D3DD4M1rlZY21Pks5qLqkwgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFH_gGGo0gfYyrrbu0-mKdaZLbW_Sks5qLqkwgaJpZM4IwJa6.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/ee548b6e8b43ae5ef30eda8d5ed8b85d5908d0a0#r66966608"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>