[mlpack-git] [mlpack/mlpack] Universal B tree implementation (#746)
Ryan Curtin
notifications at github.com
Thu Aug 18 12:52:41 EDT 2016
> + const size_t begin,
> + const size_t count,
> + size_t& splitCol)
> +{
> + constexpr size_t order = sizeof(AddressElemType) * CHAR_BIT;
> + if (begin == 0 && count == data.n_cols)
> + {
> + // Calculate all addresses.
> + InitializeAddresses(data);
> +
> + // Probably this is not a good idea. Maybe it is better to get
> + // a number of distinct samples and find the median.
> + std::sort(addresses.begin(), addresses.end(), ComparePair);
> +
> + // Rearrange dataset.
> + PerformSplit(data, count);
Oh, I think I understand now. An address is actually a vector, not just a single element, so yeah, `sort_index()` will not be helpful. In this case, could you please add some comments to the `PerformSplit` function? I had a hard time understanding exactly what was going on and why the two auxiliary vectors were necessary.
--
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/746/files/8c5a97dcb1641ae6c98edc70426fb19f5cd7cb79#r75345484
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160818/1243309f/attachment.html>
More information about the mlpack-git
mailing list