<p>In <a href="https://github.com/mlpack/mlpack/pull/374#discussion-diff-22746173">src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp</a>:</p>
<pre style='color:#555'>> +
> +MatrixCompletion::MatrixCompletion(const size_t m,
> + const size_t n,
> + const arma::umat& indices,
> + const arma::vec& values)
> + : m(m), n(n), indices(indices), values(values),
> + sdp(indices.n_cols, 0, CreateInitialPoint(m, n, DefaultRank(m, n, indices.n_cols)))
> +{
> + checkValues();
> + initSdp();
> +}
> +
> +void MatrixCompletion::checkValues()
> +{
> + if (indices.n_rows != 2)
> + Log::Fatal << "indices.n_rows != 2" << std::endl;
</pre>
<p>Sure. Alternatively, I wonder if arma has a particular type where the # of rows is set to 2 (let the type system enforce this!). </p>
<p>I fully support <code>Log::Fatal</code> returning backtraces. I think it's not too bad if you compile with <code>-fno-omit-frame-pointer</code>. </p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/374/files#r22746173">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFJsqon7fjaJDmIAJ0W3azTwjIgbwks5ngEYwgaJpZM4DOLPX.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/374/files#r22746173"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>