<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r68588758">src/mlpack/methods/ne/neat.hpp</a>:</p>
<pre style='color:#555'>&gt; +
&gt; +    ssize_t largerGenomeSize = std::max(genome1.NumLink(), genome2.NumLink());
&gt; +    double deltaD = numDisjoint / largerGenomeSize;
&gt; +    return deltaD; 
&gt; +  }
&gt; +
&gt; +  // Measure two genomes&#39; weight difference.
&gt; +  double WeightDiff(Genome&amp; genome1, Genome&amp; genome2) {
&gt; +    double deltaW = 0;
&gt; +    ssize_t coincident = 0;
&gt; +
&gt; +    for (ssize_t i=0; i&lt;genome1.NumLink(); ++i) {
&gt; +      ssize_t innovId = genome1.aLinkGenes[i].InnovationId();
&gt; +      ssize_t idx = genome2.GetLinkIndex(innovId);
&gt; +      if (idx != -1 &amp;&amp; genome1.aLinkGenes[i].Enabled()) {
&gt; +        deltaW += std::abs(genome1.aLinkGenes[i].Weight() - genome2.aLinkGenes[idx].Weight());
</pre>
<p>Oh! I misunderstood. I think you are right.</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/a605eef0e349b0a08cc1a289c6857240c6ae5e23#r68588758">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFEmEc9ZIwbzQXODBBchSck2JJA8Cks5qP-G5gaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFF6q6-oDdH1EljzbyH4cUOKPPQ5Vks5qP-G5gaJpZM4IwJa6.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/a605eef0e349b0a08cc1a289c6857240c6ae5e23#r68588758"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>