[mlpack-git] [mlpack/mlpack] Universal B tree implementation (#746)

Ryan Curtin notifications at github.com
Thu Aug 25 15:08:18 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);

What happens when `maxNumBounds` isn't even?  Do we end up with `maxNumBounds - 1` bounds?  That's what it seems like to me.  I don't know if there is an easy fix.

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


More information about the mlpack-git mailing list