<p>In <a href="https://github.com/mlpack/mlpack/pull/391#discussion_r23552924">src/mlpack/core/optimizers/sdp/lrsdp_function_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; @@ -189,5 +187,40 @@ void AugLagrangianFunction&lt;LRSDPFunction&gt;::Gradient(
&gt;    gradient = 2 * s * coordinates;
&gt;  }
&gt;  
&gt; +// Template specializations for function and gradient evaluation.
&gt; +// Note that C++ does not allow partial specialization of class members,
&gt; +// so we have to go about this in a somewhat round-about way.
&gt; +template &lt;&gt;
&gt; +inline double AugLagrangianFunction&lt;LRSDPFunction&lt;SDP&lt;arma::sp_mat&gt;&gt;&gt;::Evaluate(
&gt; +    const arma::mat&amp; coordinates) const
&gt; +{
&gt; +  return EvaluateImpl(function, coordinates, lambda, sigma);
&gt; +}
</pre>
<p>Two questions:</p>

<ol class="task-list">
<li>How does this avoid the no partial specialization allowed for class members (see comment)</li>
<li>Doesn't this require us to change the type signature on <code>AugLagrangianFunction</code>?</li>
</ol>

<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/391/files#r23552924">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFDRXzLqB5qTq8L_mq3wpxTZ_nX4Cks5nloGEgaJpZM4DVljE.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/391/files#r23552924"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>