-
Notifications
You must be signed in to change notification settings - Fork 57
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
Convert DimensionReductionMethod to a class instead of enum #94
Conversation
include/tapkee/defines/methods.hpp
Outdated
bool needs_features; | ||
}; | ||
|
||
static const KFDTraits RequiresKernel{true, false, false}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe here consider std::bitset<3>
, it will look a bit more concise, I think particularly below in the lookup with traits.test(i)
instead of std::get<i>(traits)
. Although for readability or expressiveness below, probably a struct with three names fields would be preferable. I think all three are good and probably prefer the bitset one most :-)
This is a nice cleanup, substituting the |
include/tapkee/methods.hpp
Outdated
{ \ | ||
throw unsupported_method_error("Features callback is missed"); \ | ||
} \ | ||
if (method.is(X)) { \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be method == X
so that Method::is(const Method&)
is not needed? Just wild-asking, it can be that the method is required in other parts of the code. I was thinking toward removing Method
or at least the inheritance relationship there for a bit more of code reduction.
No description provided.