<p>Personally I think that we should avoid supporting Cubes, and have users represent their data always as an arma::Mat object.  If they want they can actually represent their data in their program as a Cube, but when they use mlpack they should represent it as a Mat.  This is pretty easy actually:</p>

<pre><code>arma::Cube cube; // this is filled with data, each slice is a point
arma::Mat matrixRepresentation(cube.memptr(), cube.n_slices, cube.n_rows * cube.n_cols, false); // don't copy memory; this is an alias
</code></pre>

<p>Maybe there is some nicer Armadillo function to do that; I didn't look.</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/pull/523#issuecomment-191843403">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNfMEoSKJn7iyPMVgf-3ImGnF-uoks5ppw5XgaJpZM4HhWF3.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/523#issuecomment-191843403"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>