<blockquote>
<p>There are some range checking must be done on runtime, you prefer to provide runtime check, or write down the preconditions in comments?</p>
</blockquote>

<p>Can you elaborate?  It's worth noting that Armadillo will do range checking when compiled in debug mode, so adding our own range checks may not be necessary.  Some kind of sanity check for a high-level function call (like to <code>MaximalInputs()</code>) is reasonable since <code>MaximalInputs()</code> won't be being called more than once in most situations.</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/465#issuecomment-151879119">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFIR2_H49Sm8wvLXGHvFyoOGnP8q-ks5pAN8QgaJpZM4GWT_f.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/465#issuecomment-151879119"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>