<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'>> + */
> +#ifndef __MLPACK_CORE_OPTIMIZERS_SDP_LINEAR_CONSTRAINT_IMPL_HPP
> +#define __MLPACK_CORE_OPTIMIZERS_SDP_LINEAR_CONSTRAINT_IMPL_HPP
> +
> +#include "linear_constraint.hpp"
> +
> +namespace mlpack {
> +namespace optimization {
> +
> +// MatrixConstraint implementation
> +
> +template <typename MatrixType>
> +arma::vec MatrixConstraint<MatrixType>::Evaluate(const arma::mat& x)
> +{
> + const size_t m = _a.size();
> + 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;">—<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>