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

Ryan Curtin notifications at github.com
Mon Sep 26 08:48:34 EDT 2016

rcurtin 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),

I tested it out with both clang and gcc in a simple test program, and the assembly produced is way shorter with your solution.  I'll change the code accordingly.

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/20160926/c8b854e7/attachment-0001.html>

More information about the mlpack-git mailing list