[mlpack-git] [mlpack/mlpack] Universal B tree implementation (#746)
Ryan Curtin
notifications at github.com
Thu Aug 25 17:34:20 EDT 2016
> + // of hyperrectangles is restricted.
> + size_t numCorners = 0;
> + for (size_t pos = numEqualBits + 1; pos < order * tmpHiAddress.n_elem; pos++)
> + {
> + size_t row = pos / order;
> + size_t bit = order - 1 - pos % order;
> +
> + // This hyperrectangle is not contained entirely in the bound.
> + // So, the number of hyperrectangles should be increased.
> + if (tmpHiAddress[row] & ((AddressElemType) 1 << bit))
> + numCorners++;
> +
> + // We ran out of the limit of hyperrectangles. In that case we enlare
> + // the last hyperrectangle.
> + if (numCorners >= maxNumBounds / 2)
> + tmpHiAddress[row] |= ((AddressElemType) 1 << bit);
I think the first strategy is best here. I don't think it's a problem if the functions are not symmetric, and I think the performance impact will be negligible. Definitely the first strategy is best, but if you want to make an extra pass that's fine too. I just want to avoid a situation where a user says "but if I set maxNumBounds to 8 and 9 the performance is the same, and that doesn't make sense!"
--
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/f17843fc8e8ef2b1c4b04d572c521575f20a1f3c#r76329137
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160825/284bc634/attachment.html>
More information about the mlpack-git
mailing list