<p><code>ind2sub()</code> and <code>sub2ind()</code> came in Armadillo 6.400, which in my opinion is too recent.  Ubuntu 14.04 (which many people are still using) still has Armadillo 4.200.  I think the better solution is just to backport <code>ind2sub()</code> and <code>sub2ind()</code> into <code>src/mlpack/core/arma_extend/</code>.  Basically this comes down to using preprocessor macros to detect the version and then including the function if the version is too old.  Take a look at <code>src/mlpack/core/arma_extend/typedef.hpp</code> to see an idea of what I mean (also <code>src/mlpack/core/arma_extend/arma_extend.hpp</code>).</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, <a href="https://github.com/mlpack/mlpack/pull/679#issuecomment-223823573">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFHLOfKsHrO7IX16mxSjBhY32pfe9ks5qIv3ggaJpZM4IuWJe">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFE7u5sStzmWdk1DBOwb568ETrVK2ks5qIv3ggaJpZM4IuWJe.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/679#issuecomment-223823573"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>