<p>In <a href="https://github.com/mlpack/mlpack/pull/699#discussion_r69016947">src/mlpack/core/tree/rectangle_tree/r_plus_tree_split_impl.hpp</a>:</p>
<pre style='color:#555'>> + SweepCostType cost;
> +
> + if (node->IsLeaf())
> + cost = SweepType<SplitPolicyType>::SweepLeafNode(k, node, cut);
> + else
> + cost = SweepType<SplitPolicyType>::SweepNonLeafNode(k, node, cut);
> +
> +
> + if (cost < minCost)
> + {
> + minCost = cost;
> + minCutAxis = k;
> + minCut = cut;
> + }
> + }
> + return true;
</pre>
<p>What happens if every call to <code>SweepLeafNode()</code> or <code>SweepNonLeafNode</code> returns <code>std::numeric_limits<SweepCostType>::max()</code>? Then <code>minCutAxis</code> will be the invalid <code>node->Bound().Dim()</code>. It seems like maybe in that case we should return false.</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, <a href="https://github.com/mlpack/mlpack/pull/699/files/e165d759f9ae612b9965f70fbbf8abdb19dc8d07#r69016947">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFJF-C9ZXxmoWyzkInkIBZXJgo4udks5qQs_PgaJpZM4I3ATw">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFBqShUKjEcG0q8D9TX9WBSOguQSHks5qQs_PgaJpZM4I3ATw.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/699/files/e165d759f9ae612b9965f70fbbf8abdb19dc8d07#r69016947"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>