<p>Our SDP abstraction right now only supports sparse and dense matrices. This is sufficiently general, but for some certain classes of constraints, quite suboptimal. </p>

<p>As an example, suppose I want to have the constraint that the sum of all elements in the matrix is constant. While we can express this as <code>Tr((11^T) * X) = b</code>, this is quite inefficient to evaluate for something that could be expressed as <code>X.sum()</code>. </p>

<p>Hence, it would be desirable to have a third type of constraint, "linearOperator", which is just a linear function which takes symmetric matrices to real numbers. The straightforward way to implement this would be a vector of <code>std::function</code> objects. </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/issues/401">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFJe6deXQ_5Tx3p_PXOpI3HN1x0Rnks5nqll5gaJpZM4Deiax.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/issues/401"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>