<p>That is the exact strategy which I am following. The advantage is that all the nodes will be processed in linear order and thus the descendants will be arranged in order in the dataset.<br>
However, I am facing a problem in this. Say when we find the near and far set for the newPointIndex, it distributes the dataset as [childNearSet | childFarSet | other remaining set]. And after child node construction, it becomes [childUsedSet | childUnusedFarSet | other remaining set]. The problem is we need the set to look like [childUsedSet | nearSetLeft | farSetLeft], but we don't know which are near and which are far nodes. Currently, I am trying to find a optimal approach to segregate the data.<br>
Since my exams are starting I may not be able to complete the changes in the coming week. I will try my best to complete it in the next week.</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 or <a href="https://github.com/mlpack/mlpack/pull/624#issuecomment-211516621">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFM5ShBYl5G-xwzawufkKc-_-h_lFks5p4828gaJpZM4IJBsx.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/624#issuecomment-211516621"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>