[mlpack-git] [mlpack/mlpack] Universal B tree implementation (#746)
notifications at github.com
Thu Aug 25 11:06:52 EDT 2016
> + point(i) = std::numeric_limits<VecElemType>::lowest();
> + }
> + }
> + * Compare two addresses. The function returns 1 if the first address is greater
> + * than the second one, -1 if the first address is less than the second one,
> + * otherwise the function returns 0.
> + */
> +template<typename AddressType1, typename AddressType2>
> +int CompareAddresses(const AddressType1& addr1, const AddressType2& addr2)
> + static_assert(sizeof(typename AddressType1::elem_type) ==
> + sizeof(typename AddressType2::elem_type), "We aren't able to compare "
> + "adresses of distinct sizes");
Ah, okay, I forgot that `AddressElemType` is only ever `uint32_t` or `uint64_t`. It's your call whether or not you want to change it. I think we should keep the two different `AddressType1` and `AddressType2` types, otherwise a user can't call `CompareAddresses` with a subview (like `matrix.col(i)`) and a point, or other weird derived Armadillo types like that.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlpack-git