<p>In <a href="https://github.com/mlpack/mlpack/pull/374#discussion-diff-22746823">src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +                                     const size_t n,
&gt; +                                     const size_t p)
&gt; +{
&gt; +  const size_t mpn = m + n;
&gt; +  float r = 0.5 + sqrt(0.25 + 2 * p);
&gt; +  if (ceil(r) &gt; mpn)
&gt; +    r = mpn; // An upper bound on the dimension.
&gt; +  return ceil(r);
&gt; +}
&gt; +
&gt; +arma::mat MatrixCompletion::CreateInitialPoint(const size_t m,
&gt; +                                               const size_t n,
&gt; +                                               const size_t r)
&gt; +{
&gt; +  const size_t mpn = m + n;
&gt; +  return arma::randu&lt;arma::mat&gt;(mpn, r);
</pre>
<p>Ah.  Yes.  I forgot about that constructor... no reason to templatize then.</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/374/files#r22746823">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFLpl_NUBgzvrd8GsZq0H_V4f7KpKks5ngEi3gaJpZM4DOLPX.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#r22746823"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>