Class Extractor
Defined in File extractor.h
Inheritance Relationships
Base Type
public sparsebase::utils::ClassMatcherMixin< utils::Extractable * >
(Template Class ClassMatcherMixin)
Derived Type
public sparsebase::feature::FeatureExtractor< IDType, NNZType, ValueType, FeatureType >
(Template Class FeatureExtractor)
Class Documentation
-
class sparsebase::feature::Extractor : public sparsebase::utils::ClassMatcherMixin<utils::Extractable*>
Extractor provides an interface for users to generate multiple features optimally with a single call.
Detailed
Subclassed by sparsebase::feature::FeatureExtractor< IDType, NNZType, ValueType, FeatureType >
Public Functions
-
~Extractor()
-
std::unordered_map<std::type_index, std::any> Extract(format::Format *format, const std::vector<context::Context*> &con, bool convert_input)
Computes the features that are added to in_ private data member.
Detailed Description.
- Parameters
format – a format to be used as the data source.
con – vector of contexts to be used to determine the where the computation will take place.
- Returns
void
-
void Add(Feature f)
Adds a feature to private in_ data member.
Detailed Description.
- Parameters
f – a Feature argument.
- Returns
void
-
void Subtract(Feature f)
Subtracts a feature from private in_ data member.
Detailed Description.
- Parameters
f – a Feature argument.
- Returns
void
-
std::vector<std::type_index> GetList()
Returns the in_ private data member as a vector.
Detailed Description.
- Returns
vector of type std::type_index
-
void PrintFuncList()
Prints all the registered functions to the ClassMatcher map.
Detailed Description.
- Returns
void
-
std::vector<utils::Extractable*> GetFuncList()
Public Static Functions
-
static std::unordered_map<std::type_index, std::any> Extract(std::vector<Feature> &features, format::Format *format, const std::vector<context::Context*>&, bool convert_input)
Computes the features that are passed.
Detailed Description.
- Parameters
features – vector of features to extract.
format – a format to be used as the data source.
con – vector of contexts to be used to determine the where the computation will take place.
- Returns
void
Protected Functions
-
Extractor() noexcept = default
-
~Extractor()