<p>In <a href="https://github.com/mlpack/mlpack/pull/580#discussion_r56502688">src/mlpack/core/optimizers/sdp/linear_constraint_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; + */
&gt; +#ifndef __MLPACK_CORE_OPTIMIZERS_SDP_LINEAR_CONSTRAINT_IMPL_HPP
&gt; +#define __MLPACK_CORE_OPTIMIZERS_SDP_LINEAR_CONSTRAINT_IMPL_HPP
&gt; +
&gt; +#include &quot;linear_constraint.hpp&quot;
&gt; +
&gt; +namespace mlpack {
&gt; +namespace optimization {
&gt; +
&gt; +// MatrixConstraint implementation
&gt; +
&gt; +template &lt;typename MatrixType&gt;
&gt; +arma::vec MatrixConstraint&lt;MatrixType&gt;::Evaluate(const arma::mat&amp; x)
&gt; +{
&gt; +  const size_t m = _a.size();
&gt; +  arma::vec vals = arma::vec(m);
</pre>
<p>You can just do <code>arma::vec vals(m);</code> or even <code>arma::vec vals(_a.size());</code> here.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/580/files/1de2fb1ed30fe9007ecb6c7de4d2b91f7184b9f6#r56502688">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFDaehfwzfkiXew-e8hSh2mYS6_MUks5puVb3gaJpZM4Hyp0C.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/580/files/1de2fb1ed30fe9007ecb6c7de4d2b91f7184b9f6#r56502688"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>