[mlpack-git] [mlpack/mlpack] R+ and R++ trees implementation (#699)

lozhnikov notifications at github.com
Wed Jun 29 17:24:06 EDT 2016


> +  std::vector<SortStruct<ElemType>> sorted(node->NumChildren());
> +
> +  for (size_t i = 0; i < node->NumChildren(); i++)
> +  {
> +    sorted[i].d = SplitPolicy::Bound(node->Child(i))[axis].Hi();
> +    sorted[i].n = i;
> +  }
> +  // Sort high bounds of children.
> +  std::sort(sorted.begin(), sorted.end(), StructComp<ElemType>);
> +
> +  size_t splitPointer = fillFactor * node->NumChildren();
> +
> +  axisCut = sorted[splitPointer - 1].d;
> +
> +  // Check if the partition is suitable.
> +  if (!CheckNonLeafSweep(node, axis, axisCut))

Absolutely so, I'll add a comment in order to clarify that.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/699/files/e165d759f9ae612b9965f70fbbf8abdb19dc8d07#r69030868
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160629/e01c802a/attachment.html>


More information about the mlpack-git mailing list