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

Ryan Curtin notifications at github.com
Mon Aug 22 19:36:33 EDT 2016


> +void CellBound<MetricType, ElemType>::AddBound(
> +    const arma::Col<ElemType>& loCorner,
> +    const arma::Col<ElemType>& hiCorner)
> +{
> +  assert(numBounds < loBound.n_cols);
> +  assert(loBound.n_rows == dim);
> +  assert(loCorner.n_elem == dim);
> +  assert(hiCorner.n_elem == dim);
> +
> +  // If the subrectangle is not contained entirely in the outer rectangle,
> +  // we shrink it.
> +  for (size_t k = 0; k < dim; k++)
> +  {
> +    loBound(k, numBounds) = std::max(loCorner[k], bounds[k].Lo());
> +
> +    hiBound(k, numBounds) = std::min(bounds[k].Hi(), hiCorner[k]);

That's true, and I guess in those cases you can remove those hyperrectangles.  I thought about it more... if all of the hyperrectangles are tight in this manner, then is there any reason to store the minimum bounding hyperrectangle?  I don't think it would be useful anymore.  But maybe I have overlooked something.

-- 
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/2c5eb5780226c30b8fb088ee928487f0970dc802#r75779408
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160822/b268016f/attachment.html>


More information about the mlpack-git mailing list