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

Ryan Curtin notifications at github.com
Thu Aug 25 15:13:49 EDT 2016


> +
> +  /**
> +   * Serialize the bound object.
> +   */
> +  template<typename Archive>
> +  void Serialize(Archive& ar, const unsigned int version);
> +
> + private:
> +  //! The precision of the tree element type.
> +  static constexpr size_t order = sizeof(AddressElemType) * CHAR_BIT;
> +  //! Maximum number of subrectangles.
> +  const size_t maxNumBounds = 10;
> +  //! The dimensionality of the bound.
> +  size_t dim;
> +  //! The bounds for each dimension.
> +  math::RangeType<ElemType>* bounds;

It seems like we can't remove this because of the `Center()` calculation and the `Diameter()`.  Removing it would mean that for `Center()` we would have to calculate the mean of all subrectangle centers, and it would be harder to cache something for `Diameter()`.  My idea in removing it was to make `sizeof(CellBound)` smaller but it seems that's not really feasible.  But I thought it would be useful to write down the notes anyway in case it was ever revisited later. :)

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


More information about the mlpack-git mailing list