New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
static assertion failed: HRectBound can only be used with the LMetric<> metric type. #525
Comments
It looks like you're using an old version of the tutorial... is there a link somewhere on mlpack.org that went to that page? (There shouldn't be, so if there is, I'll fix it.) Take a look at the most recent version of the tutorial instead: The
I'm not sure why the |
I am using
but the compiler complains:
|
When I changed
|
I think the correct usage of |
Yes, the tutorial was wrong; it was fixed some time ago in 79fd639 (but this was apparently after 2.0.1, so these are only updated in the git master branch documentation: http://mlpack.org/docs/mlpack-git/doxygen.php?doc=rstutorial.html ; side note: I need to rebuild those with an older version of Doxygen so the CSS styling is more correct...). I also noticed that the mlpack website had some incorrect links on help.html to old versions of documentation; this is fixed in mlpack/mlpack.org@abf55c2 . So the problem here wasn't the static_assert but instead that the documentation was out of date, and the tree classes are used a bit differently now. Can you try with the new tutorial code and see if that fixes things? |
Closing for inactivity... if you'd like to reopen this, we can, but I think the issue is solved. |
The documentation (http://www.mlpack.org/doxygen.php?doc=rstutorial.html) says
where
HRectBound<2>
is not valid anymore,g++
(5.2.0) complains:after read the code
mlpack/core/tree/hrectbound.hpp
, I foundHRectBound
needsMetricType
template argument. So I changedbound::HRectBound<2>
tobound::HRectBound<metric::LMetric<2, true>>
, then I got the new error:but the MetricType is a LMetric.
The text was updated successfully, but these errors were encountered: