<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'>> @@ -189,5 +187,40 @@ void AugLagrangianFunction<LRSDPFunction>::Gradient(
> gradient = 2 * s * coordinates;
> }
>
> +// Template specializations for function and gradient evaluation.
> +// Note that C++ does not allow partial specialization of class members,
> +// so we have to go about this in a somewhat round-about way.
> +template <>
> +inline double AugLagrangianFunction<LRSDPFunction<SDP<arma::sp_mat>>>::Evaluate(
> + const arma::mat& coordinates) const
> +{
> + return EvaluateImpl(function, coordinates, lambda, sigma);
> +}
</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;">—<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>