<p>In <a href="https://github.com/mlpack/mlpack/pull/388#discussion_r23611075">src/mlpack/tests/mean_shift_test.cpp</a>:</p>
<pre style='color:#555'>&gt; +  BOOST_REQUIRE_NE(firstClass, secondClass);
&gt; +  
&gt; +  for (size_t i = 13; i &lt; 20; i++)
&gt; +    BOOST_REQUIRE_EQUAL(assignments(i), secondClass);
&gt; +  
&gt; +  size_t thirdClass = assignments(20);
&gt; +  
&gt; +  // To ensure that this is the third class which we haven&#39;t seen yet.
&gt; +  BOOST_REQUIRE_NE(firstClass, thirdClass);
&gt; +  BOOST_REQUIRE_NE(secondClass, thirdClass);
&gt; +  
&gt; +  for (size_t i = 20; i &lt; 30; i++)
&gt; +    BOOST_REQUIRE_EQUAL(assignments(i), thirdClass);
&gt; +  
&gt; +}
&gt; +
</pre>
<p>Two points may converge to one same centroid, so even duplicate thresh is set to 0, the number of  clusters may be still less than dataset.n_cols.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/388/files#r23611075">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFONjc27fGYEmPQQzoJewxsmRG5e4ks5nl5mmgaJpZM4DTzb1.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/388/files#r23611075"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>