Template Class Degrees
Defined in File degrees.h
Inheritance Relationships
Base Type
public sparsebase::feature::FeaturePreprocessType< IDType * >
(Template Class FeaturePreprocessType)
Class Documentation
-
template<typename IDType, typename NNZType, typename ValueType>
class sparsebase::feature::Degrees : public sparsebase::feature::FeaturePreprocessType<IDType*> Count the degrees of every vertex in the graph representation of a format object
Public Types
-
typedef utils::Parameters ParamsType
An empty struct used for the parameters of Degrees.
Public Functions
-
Degrees()
-
Degrees(ParamsType)
-
std::unordered_map<std::type_index, std::any> Extract(format::Format *format, std::vector<context::Context*>, bool convert_input) override
-
std::vector<std::type_index> get_sub_ids() override
-
std::vector<utils::Extractable*> get_subs() override
-
IDType *GetDegrees(format::Format *format, std::vector<context::Context*> contexts, bool convert_input)
Degree generation executor function that carries out function matching.
- Parameters
format – a single format pointer to any format
contexts – vector of contexts that can be used for extracting features.
convert_input – whether or not to convert the input format if that is needed.
- Returns
an array of size format.get_dimensions()[0] where element i is the degree of the ith vertex in
format
-
std::tuple<std::vector<std::vector<format::Format*>>, IDType*> GetDegreesCached(format::Format *format, std::vector<context::Context*> contexts, bool convert_input)
Degree generation executor function that carries out function matching with cached output
- Parameters
format – a single format pointer to any format
contexts – vector of contexts that can be used for extracting features.
convert_input – whether or not to convert the input format if that is needed.
- Returns
an array of size format.get_dimensions()[0] where element i is the degree of the ith vertex in
format
-
~Degrees()
Public Static Functions
-
static std::type_index get_id_static()
-
static IDType *GetDegreesCSR(std::vector<format::Format*> formats, utils::Parameters *params)
Degree generation implementation function for CSRs.
- Parameters
formats – A vector containing a single format pointer that should point at a CSR object
params – a Parameters pointer, though it is not used in the function
- Returns
an array of size formats[0].get_dimensions()[0] where element i is the degree of the ith vertex in
formats[0]
Protected Functions
-
void Register()
-
typedef utils::Parameters ParamsType