Convert DimensionReductionMethod to a class instead of enum#94
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.
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.
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.