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

Ryan Curtin notifications at github.com
Wed Jun 29 15:52:22 EDT 2016


> +         template<typename> class SweepType>
> +template<typename TreeType>
> +void RPlusTreeSplit<SplitPolicyType, SweepType>::
> +AddFakeNodes(const TreeType* tree, TreeType* emptyTree)
> +{
> +  size_t numDescendantNodes = tree->TreeDepth() - 1;
> +
> +  TreeType* node = emptyTree;
> +  for (size_t i = 0; i < numDescendantNodes; i++)
> +  {
> +    TreeType* child = new TreeType(node);
> +    node->children[node->NumChildren()++] = child;
> +
> +    node = child;
> +  }
> +}

Just to be sure I am understanding correctly, this function is used to make sure that the tree has equivalent maximum depth in every branch?

---
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#r69015102
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160629/35fc3b92/attachment.html>


More information about the mlpack-git mailing list