[mlpack-git] [mlpack/mlpack] static_assert about IsLMetric is too restrictive (#744)

Ryan Curtin notifications at github.com
Sat Aug 6 00:52:46 EDT 2016


But, the issue here is, I am not sure that `HRectBound::MinDistance()` and `HRectBound::MaxDistance()` will be correct when using the periodic boundary metric you've suggested here.  Since those two functions manually implement a distance calculation, I don't think they take into account the periodicity of the space you're writing here.

In the long long ago, there used to be a class called `PeriodicHRectBound`, but it was neglected, untested, and didn't work.  I can point you to the code for that if you like, but really I think the right solution to your problem here is to also write a `PeriodicHRectBound` class that implements the same functions as `HRectBound` (you can even extend from `HRectBound` if you like), and then implement specialized versions of `MinDistance()` and `MaxDistance()` that take into account the periodic condition.  If I remember right the geometry for getting those calculations right gets a bit complex, though. :(

If something I've said is incorrect, please comment and I'll reopen this and we can address it, but for now, since I think this isn't a bug, I'm going to go ahead and close it.  Thanks for getting in touch and pointing this out though. :)

---
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/issues/744#issuecomment-238005869
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160805/73db0fca/attachment.html>


More information about the mlpack-git mailing list