[mlpack-git] [mlpack/mlpack] Octree (#790)

lozhnikov notifications at github.com
Sun Sep 25 13:37:39 EDT 2016

lozhnikov commented on this pull request.

> +template<typename MetricType, typename StatisticType, typename MatType>
+void Octree<MetricType, StatisticType, MatType>::SplitNode(
+    const arma::vec& center,
+    const double width,
+    const size_t maxLeafSize)
+  // No need to split if we have fewer than the maximum number of points in this
+  // node.
+  if (count <= maxLeafSize)
+    return;
+  // We must split the dataset by sequentially creating each of the children.
+  // We do this in two steps: first we make a pass to count the number of points
+  // that will fall into each child; then in the second pass we rearrange the
+  // points and create the children.
+  arma::Col<size_t> childCounts(std::pow(2, dataset->n_rows),

Hm.. I am mistaken, of course I mean `((size_t) 1) << dataset->n_rows`.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160925/d4657aab/attachment.html>

More information about the mlpack-git mailing list