<p>We don't have to ignore them; it is possible to create <code>arma::sp_mat</code> that contains explicit zeroes; the call to the <code>sp_mat</code> constructor a few lines down may have the additional boolean parameters <code>sort_locations</code> and <code>check_for_zeros</code> (by default they are both true).</p>

<p>Most factorizers that work on <code>sp_mat</code> that are written sensibly will iterate over the "nonzero" elements in the <code>sp_mat</code> using the <code>sp_mat::const_iterator</code> class (and friends), which will include the zero elements if we set <code>check_for_zeros = false</code>.</p>

<p>So other options may include setting <code>check_for_zeros</code> to <code>false</code>, modifying the CF constructor to take <code>sort_locations</code> and <code>check_for_zeros</code> parameters, or taking the patch with warning as-is.  I wanted to see what you thought before proceeding, though.</p>

<p>(In the long run, I'd like to eliminate all instances of <code>locations</code>/<code>values</code> sparse matrix passing and just pass <code>sp_mat</code>, but that's a big task that should involve some benchmarking and speed testing too.)</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/376#issuecomment-69594864">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFEQBi8vKj8I4_tEIrTqQlaOPirTgks5ng-pugaJpZM4DQ8wr.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/376#issuecomment-69594864"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>